X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/31fb73a15d12559b15f5506622c3902476d3ea0f..4ad28359f1e3090e963e1a8083c34c0940d0514d:/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 5991f594..c4e28fea 100644 --- a/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py +++ b/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py @@ -7,6 +7,7 @@ from Components.Input import Input from Components.GUIComponent import * from Components.Pixmap import Pixmap from Components.FileList import FileEntryComponent, FileList +from Screens.ChoiceBox import ChoiceBox from Plugins.Plugin import PluginDescriptor import os @@ -45,6 +46,11 @@ class Test(Screen): "0": self.keyNumberGlobal }, -1) + self.onShown.append(self.openTest) + + def openTest(self): + self.session.open(InputBox) + def keyLeft(self): self["text"].left() @@ -63,7 +69,12 @@ class Test(Screen): self["text"].number(number) def main(session): - session.open(Test) + 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 s§&$!"), "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