diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2005-01-29 05:22:00 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2005-01-29 05:22:00 +0000 |
| commit | 6b7b7977a92c9a092763bf699cba85347f9f2ec6 (patch) | |
| tree | 473fbea9df91c570db54ec8e65d968e72c18a492 /mytest.py | |
| parent | 2590d97005eecab111a4bf8476da9eb1c700654c (diff) | |
| download | enigma2-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.py | 25 |
1 files changed, 12 insertions, 13 deletions
@@ -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 |
