aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/config.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2005-09-02 04:57:47 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2005-09-02 04:57:47 +0000
commit7e3e90678897a0924cd365e117fd71679032dc40 (patch)
treef376b4c5ab88c7743e7bbff3fedebd2e925959cc /lib/python/Components/config.py
parentdba47e0b252b39fc2d58ec0db2275051e0a29508 (diff)
downloadenigma2-7e3e90678897a0924cd365e117fd71679032dc40.tar.gz
enigma2-7e3e90678897a0924cd365e117fd71679032dc40.zip
network setup ConfigList style
Diffstat (limited to 'lib/python/Components/config.py')
-rw-r--r--lib/python/Components/config.py36
1 files changed, 36 insertions, 0 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py
index 5a96a100..14c03655 100644
--- a/lib/python/Components/config.py
+++ b/lib/python/Components/config.py
@@ -77,6 +77,42 @@ class configBoolean:
def __call__(self): #needed by configlist
self.checkValues()
return ("text", self.parent.vals[self.parent.value])
+
+class configSequence:
+ def __init__(self, parent):
+ self.parent = parent
+
+ def checkValues(self):
+ pass
+# if self.parent.value < 0:
+# self.parent.value = 0
+#
+# if(self.parent.value >= (len(self.parent.vals) - 1)):
+# self.parent.value = len(self.parent.vals) - 1
+#
+ def cancel(self):
+ self.parent.reload()
+
+ def save(self):
+ self.parent.save()
+
+ def handleKey(self, key):
+ if key == config.prevElement:
+ self.parent.value = self.parent.value - 1
+ if key == config.nextElement:
+ self.parent.value = self.parent.value + 1
+
+ self.checkValues()
+
+ self.parent.change()
+
+ def __call__(self): #needed by configlist
+ value = ""
+ for i in self.parent.value:
+ if (value != ""):
+ value += self.parent.vals[0]
+ value += str(i)
+ return ("text", value)
class configValue:
def __init__(self, obj):