X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/7e13c14fb5b2d6e36e62fdfcdc49c3e1fef0183f..cffee89d7b3567ee92901f6963108c33ea3ac469:/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py diff --git a/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py b/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py index d4d24f32..e074aeec 100644 --- a/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py +++ b/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py @@ -49,8 +49,14 @@ class Test(Screen): self.onShown.append(self.openTest) def openTest(self): - self.session.open(InputBox) - + self.session.openWithCallback(self.callback, MessageBox, _("Test-Messagebox?")) + +# self.session.open(InputBox) + + def callback(self, answer): + print "answer:", answer + self.close() + def keyLeft(self): self["text"].left() @@ -68,13 +74,12 @@ class Test(Screen): print "pressed", number self["text"].number(number) -def main(session): - session.openWithCallback(test, ChoiceBox, title="Hallo", list=[(_("yes"), "yes"), (_("no"), "no")]) +def main(session, **kwargs): + session.openWithCallback(test, MessageBox, _("Test-Messagebox?"), timeout = 10) + #session.openWithCallback(test, ChoiceBox, title="Delete everything on this Dreambox?", list=[(_("yes"), "yes"), (_("no"), "no"), (_("perhaps"), "perhaps"), (_("ask me tomorrow"), "ask me tomorrow"), (_("leave me alone with this!"), "yes")]) def test(returnValue): print "You entered", returnValue -def Plugins(): - return PluginDescriptor(name="Test", description="plugin to test some capabilities", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main) - - \ No newline at end of file +def Plugins(**kwargs): + return PluginDescriptor(name="Test", description="plugin to test some capabilities", where = PluginDescriptor.WHERE_PLUGINMENU, fnc=main)