aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/Wizard.py
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-06-06 22:30:18 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-06-06 22:30:18 +0000
commit83fa9db5a2a4acb79d71f9a662f086d2931c63ae (patch)
tree3486b3073852bbd9a5952d7ccbfc4178bc24eb71 /lib/python/Screens/Wizard.py
parent70608ea260f899f0c072b294f7f231ae072f7d6c (diff)
downloadenigma2-83fa9db5a2a4acb79d71f9a662f086d2931c63ae.tar.gz
enigma2-83fa9db5a2a4acb79d71f9a662f086d2931c63ae.zip
add runAsync support to wizzard
change run to runAsync in ScanSimple and ScanSetup (now the new cable transponder scan is working out of startwizzard too)
Diffstat (limited to 'lib/python/Screens/Wizard.py')
-rw-r--r--lib/python/Screens/Wizard.py40
1 files changed, 27 insertions, 13 deletions
diff --git a/lib/python/Screens/Wizard.py b/lib/python/Screens/Wizard.py
index 8c4f8867..29bb6e2d 100644
--- a/lib/python/Screens/Wizard.py
+++ b/lib/python/Screens/Wizard.py
@@ -152,19 +152,14 @@ class Wizard(Screen, HelpableScreen):
return count
count += 1
return 0
-
- def ok(self):
- print "OK"
+
+ def finished(self, **args):
+ print "finished"
currStep = self.currStep
-
- if self.showConfig:
- if (self.wizard[currStep]["config"]["screen"] != None):
- # TODO: don't die, if no run() is available
- # there was a try/except here, but i can't see a reason
- # for this. If there is one, please do a more specific check
- # and/or a comment in which situation there is no run()
- self.configInstance.run()
-
+
+ if self.updateValues not in self.onShown:
+ self.onShown.append(self.updateValues)
+
if self.showList:
if (len(self.wizard[currStep]["list"]) > 0):
nextStep = self.wizard[currStep]["list"][self["list"].l.getCurrentSelectionIndex()][1]
@@ -179,9 +174,28 @@ class Wizard(Screen, HelpableScreen):
self.currStep = self.getStepWithID(self.wizard[currStep]["nextstep"])
self.currStep += 1
self.updateValues()
-
+
print "Now: " + str(self.currStep)
+
+ def ok(self):
+ print "OK"
+ currStep = self.currStep
+
+ if self.showConfig:
+ if (self.wizard[currStep]["config"]["screen"] != None):
+ # TODO: don't die, if no run() is available
+ # there was a try/except here, but i can't see a reason
+ # for this. If there is one, please do a more specific check
+ # and/or a comment in which situation there is no run()
+ if callable(getattr(self.configInstance, "runAsync", None)):
+ self.onShown.remove(self.updateValues)
+ self.configInstance.runAsync(self.finished)
+ return
+ else:
+ self.configInstance.run()
+ self.finished()
+
def keyNumberGlobal(self, number):
if (self.wizard[self.currStep]["config"]["screen"] != None):
self.configInstance.keyNumberGlobal(number)