aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2007-10-28 09:22:33 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2007-10-28 09:22:33 +0000
commit468f9d6d40262c6cc75a06afd2dfa232bd91bfd9 (patch)
treeca09191efe4789e7084845e964c80b4e860262d0 /lib/python/Components
parent306bdc11b9e1bfa625bc57c51edc8fd042d0ba9d (diff)
downloadenigma2-468f9d6d40262c6cc75a06afd2dfa232bd91bfd9.tar.gz
enigma2-468f9d6d40262c6cc75a06afd2dfa232bd91bfd9.zip
parental control:
automatically wrap to validation pin entry in pin changing dialog when 4 figures were entered leave dialog when 4 figures were entered in the validation pin entry
Diffstat (limited to 'lib/python/Components')
-rw-r--r--lib/python/Components/ConfigList.py4
-rw-r--r--lib/python/Components/config.py7
2 files changed, 11 insertions, 0 deletions
diff --git a/lib/python/Components/ConfigList.py b/lib/python/Components/ConfigList.py
index 7ed6031a..47b577e2 100644
--- a/lib/python/Components/ConfigList.py
+++ b/lib/python/Components/ConfigList.py
@@ -48,6 +48,10 @@ class ConfigList(HTMLComponent, GUIComponent, object):
def getCurrentIndex(self):
return self.l.getCurrentSelectionIndex()
+ def setCurrentIndex(self, index):
+ if self.instance is not None:
+ self.instance.moveSelectionTo(index)
+
def invalidateCurrent(self):
self.l.invalidateEntry(self.l.getCurrentSelectionIndex())
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py
index a872c300..de06871a 100644
--- a/lib/python/Components/config.py
+++ b/lib/python/Components/config.py
@@ -328,6 +328,8 @@ class ConfigSequence(ConfigElement):
self.default = default
self.value = copy.copy(default)
+
+ self.endNotifier = []
def validate(self):
max_pos = 0
@@ -344,6 +346,8 @@ class ConfigSequence(ConfigElement):
num += 1
if self.marked_pos >= max_pos:
+ for x in self.endNotifier:
+ x(self)
self.marked_pos = max_pos - 1
if self.marked_pos < 0:
@@ -357,6 +361,9 @@ class ConfigSequence(ConfigElement):
if self.marked_pos >= total_len:
self.marked_pos = total_len - 1
+
+ def addEndNotifier(self, notifier):
+ self.endNotifier.append(notifier)
def handleKey(self, key):
if key == KEY_LEFT: