X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/aa4989974a32ab2437d51fb6352b3eb54cecd83d..567cf170322df2e897871787255c50bd522e6313:/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 e6d83bf5..5456fb18 100644 --- a/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py +++ b/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py @@ -1,17 +1,12 @@ -from enigma import * from Screens.Screen import Screen from Screens.MessageBox import MessageBox from Components.ActionMap import NumberActionMap -from Components.Label import Label from Components.Input import Input -from Components.GUIComponent import * from Components.Pixmap import Pixmap -from Components.FileList import FileEntryComponent, FileList +from Components.FileList import FileList from Screens.ChoiceBox import ChoiceBox from Plugins.Plugin import PluginDescriptor -import os - class Test(Screen): skin = """ @@ -49,8 +44,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() @@ -69,7 +70,8 @@ class Test(Screen): self["text"].number(number) def main(session, **kwargs): - 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")]) + 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