aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2008-11-07 09:00:32 +0100
committerFraxinas <andreas.frisch@multimedia-labs.de>2008-11-07 09:00:32 +0100
commit35d025bd394476f31a195cff83b26cc614fe1a5d (patch)
treeee3bd5d992aa12d618e74801bd472ecbcd67d458 /lib/python
parent8c5e8f7163867e2e8bfc07784904dc14a9ebaa86 (diff)
parente4632437dcaf95c92abd3b1fed122a61c97e3a5b (diff)
downloadenigma2-35d025bd394476f31a195cff83b26cc614fe1a5d.tar.gz
enigma2-35d025bd394476f31a195cff83b26cc614fe1a5d.zip
Merge branch 'master' of fraxinas@git.opendreambox.org:/git/enigma2
Diffstat (limited to 'lib/python')
-rwxr-xr-x[-rw-r--r--]lib/python/Components/config.py11
-rw-r--r--lib/python/Screens/Wizard.py52
2 files changed, 38 insertions, 25 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py
index b448ca6d..c21a9192 100644..100755
--- a/lib/python/Components/config.py
+++ b/lib/python/Components/config.py
@@ -513,6 +513,7 @@ class ConfigIP(ConfigSequence):
self.auto_jump = auto_jump
def handleKey(self, key):
+
if key == KEY_LEFT:
if self.marked_block > 0:
self.marked_block -= 1
@@ -531,8 +532,14 @@ class ConfigIP(ConfigSequence):
self.marked_block = len(self.limits)-1
self.overwrite = True
- if key in KEY_NUMBERS:
- number = getKeyNumber(key)
+ if key in KEY_NUMBERS or key == KEY_ASCII:
+ if key == KEY_ASCII:
+ code = getPrevAsciiCode()
+ if code < 48 or code > 57:
+ return
+ number = code - 48
+ else:
+ number = getKeyNumber(key)
oldvalue = self._value[self.marked_block]
if self.overwrite:
diff --git a/lib/python/Screens/Wizard.py b/lib/python/Screens/Wizard.py
index 53600dfe..23d6253a 100644
--- a/lib/python/Screens/Wizard.py
+++ b/lib/python/Screens/Wizard.py
@@ -311,7 +311,7 @@ class Wizard(Screen):
if self.updateValues not in self.onShown:
self.onShown.append(self.updateValues)
-
+
if self.showConfig:
if self.wizard[currStep]["config"]["type"] == "dynamic":
eval("self." + self.wizard[currStep]["config"]["evaluation"])()
@@ -325,25 +325,24 @@ class Wizard(Screen):
else:
self.currStep = self.getStepWithID(nextStep)
+ print_now = True
if ((currStep == self.numSteps and self.wizard[currStep]["nextstep"] is None) or self.wizard[currStep]["id"] == "end"): # wizard finished
print "wizard finished"
self.markDone()
self.close()
else:
- self.codeafter=True
+ self.codeafter = True
self.runCode(self.wizard[currStep]["codeafter"])
- async = self.runCode(self.wizard[currStep]["codeafter_async"])
- if self.wizard[currStep]["nextstep"] is not None:
- self.currStep = self.getStepWithID(self.wizard[currStep]["nextstep"])
- if gotoStep is not None:
- self.currStep = self.getStepWithID(gotoStep)
- if not async:
- self.currStep += 1
- self.updateValues()
- print "Now: " + str(self.currStep)
+ self.prevStep = currStep
+ self.gotoStep = gotoStep
+ if not self.runCode(self.wizard[currStep]["codeafter_async"]):
+ self.afterAsyncCode()
else:
- self.onShown.remove(self.updateValues)
- print "Now: " + str(self.currStep+1), "(after async code finished)"
+ if self.updateValues in self.onShown:
+ self.onShown.remove(self.updateValues)
+
+ if print_now:
+ print "Now: " + str(self.currStep)
def ok(self):
print "OK"
@@ -358,7 +357,8 @@ class Wizard(Screen):
# 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)
+ if self.updateValues in self.onShown:
+ self.onShown.remove(self.updateValues)
self.configInstance.runAsync(self.finished)
return
else:
@@ -464,10 +464,13 @@ class Wizard(Screen):
del self.configInstance["config"]
self.configInstance.doClose()
self.configInstance = None
-
+
self.condition = True
exec (self.wizard[self.currStep]["condition"])
- if self.condition:
+ if not self.condition:
+ self.currStep += 1
+ self.updateValues()
+ else:
if len(self.stepHistory) == 0 or self.stepHistory[-1] != self.currStep:
self.stepHistory.append(self.currStep)
print "wizard step:", self.wizard[self.currStep]
@@ -491,21 +494,24 @@ class Wizard(Screen):
self.codeafter=False
self.runCode(self.wizard[self.currStep]["code"])
- self.async = self.runCode(self.wizard[self.currStep]["code_async"])
- if self.async:
- self.onShown.remove(self.updateValues)
+ if self.runCode(self.wizard[self.currStep]["code_async"]):
+ if self.updateValues in self.onShown:
+ self.onShown.remove(self.updateValues)
else:
self.afterAsyncCode()
- else:
- self.currStep += 1
- self.updateValues()
def afterAsyncCode(self):
- if self.updateValues not in self.onShown:
+ if not self.updateValues in self.onShown:
self.onShown.append(self.updateValues)
+
if self.codeafter:
+ if self.wizard[self.prevStep]["nextstep"] is not None:
+ self.currStep = self.getStepWithID(self.wizard[self.prevStep]["nextstep"])
+ if self.gotoStep is not None:
+ self.currStep = self.getStepWithID(self.gotoStep)
self.currStep += 1
self.updateValues()
+ print "Now: " + str(self.currStep)
else:
if self.showList:
print "showing list,", self.currStep