diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-10-09 21:15:18 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-10-09 21:15:18 +0000 |
| commit | 81ba8338641aa41e52e498b43aeefa66714819fe (patch) | |
| tree | f33e5a54b539fa417f2cd04493fe375e1790ff57 /lib/python | |
| parent | 9a50f28d3d26591c6d5b3fec61bb4764e0abbcec (diff) | |
| download | enigma2-81ba8338641aa41e52e498b43aeefa66714819fe.tar.gz enigma2-81ba8338641aa41e52e498b43aeefa66714819fe.zip | |
fix ConfigText to use unicode, fix ConfigClock
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Components/config.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 104e4465..cf94614c 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -415,7 +415,9 @@ class ConfigPosition(ConfigSequence): class ConfigClock(ConfigSequence): def __init__(self, default): - ConfigSequence.__init__(self, seperator = ":", limits = [(0,23),(0,59)], default = default) + import time + t = time.localtime(default) + ConfigSequence.__init__(self, seperator = ":", limits = [(0,23),(0,59)], default = [t.tm_hour, t.tm_min]) class ConfigInteger(ConfigSequence): def __init__(self, default, limits): @@ -491,7 +493,7 @@ class ConfigText(ConfigElement, NumericalTextInput): self.text = self.text.ljust(len(self.text) + 1) elif key in KEY_NUMBERS: number = self.getKey(getKeyNumber(key)) - self.text = self.text[0:self.marked_pos] + str(number) + self.text[self.marked_pos + 1:] + self.text = self.text[0:self.marked_pos] + unicode(number) + self.text[self.marked_pos + 1:] elif key == KEY_TIMEOUT: self.timeout() return |
