aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Input.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-05-22 03:41:17 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2006-05-22 03:41:17 +0000
commitab964ab19187f8862cb088a63b821ee86d3fbafc (patch)
treed2a84b22aec8eed228cd00cac1e51bc9bfdbc8ed /lib/python/Components/Input.py
parent5e57d6b68efa092a6a85fdee2c6904c6bd473905 (diff)
downloadenigma2-ab964ab19187f8862cb088a63b821ee86d3fbafc.tar.gz
enigma2-ab964ab19187f8862cb088a63b821ee86d3fbafc.zip
don't bluescreen on pressing up/down when cursor is on empty position in an input box
Diffstat (limited to 'lib/python/Components/Input.py')
-rw-r--r--lib/python/Components/Input.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/python/Components/Input.py b/lib/python/Components/Input.py
index d561c5db..0bd13059 100644
--- a/lib/python/Components/Input.py
+++ b/lib/python/Components/Input.py
@@ -54,7 +54,7 @@ class Input(VariableText, HTMLComponent, GUIComponent):
self.update()
def up(self):
- if self.text[self.currPos] == "9":
+ if self.text[self.currPos] == "9" or self.text[self.currPos] == " ":
newNumber = "0"
else:
newNumber = str(int(self.text[self.currPos]) + 1)
@@ -62,10 +62,11 @@ class Input(VariableText, HTMLComponent, GUIComponent):
self.update()
def down(self):
- if self.text[self.currPos] == "0":
+ if self.text[self.currPos] == "0" or self.text[self.currPos] == " ":
newNumber = "9"
else:
newNumber = str(int(self.text[self.currPos]) - 1)
+
self.text = self.text[0:self.currPos] + newNumber + self.text[self.currPos + 1:]
self.update()