aboutsummaryrefslogtreecommitdiff
path: root/mytest.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2005-01-29 05:22:00 +0000
committerFelix Domke <tmbinc@elitedvb.net>2005-01-29 05:22:00 +0000
commit6b7b7977a92c9a092763bf699cba85347f9f2ec6 (patch)
tree473fbea9df91c570db54ec8e65d968e72c18a492 /mytest.py
parent2590d97005eecab111a4bf8476da9eb1c700654c (diff)
downloadenigma2-6b7b7977a92c9a092763bf699cba85347f9f2ec6.tar.gz
enigma2-6b7b7977a92c9a092763bf699cba85347f9f2ec6.zip
- add fake "main menu"
- enable grc threading - disable some debug - dialog stacks
Diffstat (limited to 'mytest.py')
-rw-r--r--mytest.py25
1 files changed, 12 insertions, 13 deletions
diff --git a/mytest.py b/mytest.py
index edaf24a5..e257f11a 100644
--- a/mytest.py
+++ b/mytest.py
@@ -34,15 +34,6 @@ components = {}
# do global
screens["global"](components)
-# test our screens
-components["$001"] = screens["testDialog"]()
-
-#print "*** classes:"
-#dump(screens)
-#
-#print "*** instances:"
-#dump(components)
-
# display
class OutputDevice:
@@ -68,6 +59,8 @@ class Session:
self.delayTimer.timeout.get().append(self.processDelay)
self.currentDialog = None
+
+ self.dialogStack = [ ]
def processDelay(self):
self.currentDialog.doClose()
@@ -77,9 +70,15 @@ class Session:
del self.currentDialog
del self.currentWindow
- self.open(screens["testDialog"]())
-
+ if len(self.dialogStack):
+ (self.currentDialog, self.currentWindow) = self.dialogStack.pop()
+ self.currentWindow.show()
+
def open(self, screen):
+ if self.currentDialog:
+ self.dialogStack.append((self.currentDialog, self.currentWindow))
+ self.currentWindow.hide()
+
self.currentDialog = screen
screen.session = self
@@ -114,8 +113,8 @@ def runScreenTest():
session = Session()
session.desktop = getDesktop()
- session.open(screens["clockDisplay"](components["clock"]))
-# session.open(screens["testDialog"]())
+# session.open(screens["clockDisplay"](components["clock"]))
+ session.open(screens["testDialog"]())
# simple reason for this helper function: we want to call the currently
# active "okbutton", even when we changed the dialog