diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2005-01-26 01:15:38 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2005-01-26 01:15:38 +0000 |
| commit | a5307ff8aa3456aa5bec285e7d94d8d7c014d131 (patch) | |
| tree | ab4fbe6e2c7bbade138539349dab9f1d9923ce00 /mytest.py | |
| parent | fef70b939aea15a2438f480d7bdd679e181dcb06 (diff) | |
| download | enigma2-a5307ff8aa3456aa5bec285e7d94d8d7c014d131.tar.gz enigma2-a5307ff8aa3456aa5bec285e7d94d8d7c014d131.zip | |
update python
Diffstat (limited to 'mytest.py')
| -rw-r--r-- | mytest.py | 36 |
1 files changed, 18 insertions, 18 deletions
@@ -59,19 +59,21 @@ class Session: self.desktop = None self.delayTimer = eTimer() self.delayTimer.timeout.get().append(self.processDelay) + + self.currentDialog = None def processDelay(self): - components[self.screenname].close() + self.currentDialog.close() if self.currentWindow != None: self.currentWindow.hide() - del components[self.screenname] + del self.currentDialog del self.currentWindow + self.open(screens["testDialog"]()) - def open(self, screenname, screen): - components[screenname] = screen - self.screenname = screenname + def open(self, screen): + self.currentDialog = screen screen.session = self if self.desktop != None: @@ -82,9 +84,9 @@ class Session: gui = GUIOutputDevice() gui.parent = wnd - gui.create(components["$002"]) + gui.create(self.currentDialog) - applyGUIskin(components["$002"], None, "clockDialog") + applyGUIskin(self.currentDialog, None, screen.__class__.__name__) wnd.show() else: @@ -97,21 +99,19 @@ def runScreenTest(): session = Session() session.desktop = getDesktop() -# components["$002"] = screens["clockDisplay"](components["clock"]) - - session.open("$002", screens["clockDisplay"](components["clock"])) + 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 + # + # more complicated reason: we don't want to hold a reference. def blub(): -# x = components["$002"] - components["$002"].data["okbutton"]["instance"].push() -# dump(components) -# print "session, close screen " + str(sys.getrefcount(x)) -# session.close() - + session.currentDialog.data["okbutton"]["instance"].push() + tmr = eTimer() tmr.timeout.get().append(blub) - tmr.start(4000, 1) + tmr.start(4000, 0) runMainloop() |
