X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/2590d97005eecab111a4bf8476da9eb1c700654c..4bc08995411e21f3564f09e136809be68ddf96a8:/mytest.py 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