aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-05-25 23:14:05 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-05-25 23:14:05 +0000
commitfb412ff32c7938649c72d55eed3f5c8ccb5e0a99 (patch)
treedbb7a55d966b6c56d506427a8576ab1afb337bb1 /lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py
parent48f2728ecdeabde7de0f497f8a69dbddcb047b90 (diff)
downloadenigma2-fb412ff32c7938649c72d55eed3f5c8ccb5e0a99.tar.gz
enigma2-fb412ff32c7938649c72d55eed3f5c8ccb5e0a99.zip
add timeout for MessageBox screens (just add timeout=<seconds> as argument when creating MessageBox instances)
Diffstat (limited to 'lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py')
-rw-r--r--lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py13
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py b/lib/python/Plugins/DemoPlugins/TestPlugin/plugin.py
index e6d83bf5..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()
@@ -69,7 +75,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