aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2005-09-02 04:23:01 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2005-09-02 04:23:01 +0000
commitdba47e0b252b39fc2d58ec0db2275051e0a29508 (patch)
tree0332cb9b1a243ab84f9fe085aa7d4b907ccf3d04 /lib/python/Components
parent3a3836240d87bc63d4865d56a49fb2113634308b (diff)
downloadenigma2-dba47e0b252b39fc2d58ec0db2275051e0a29508.tar.gz
enigma2-dba47e0b252b39fc2d58ec0db2275051e0a29508.zip
user predefined vars instead of integers for keyhandling in Config
Diffstat (limited to 'lib/python/Components')
-rw-r--r--lib/python/Components/config.py14
1 files changed, 8 insertions, 6 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py
index ed85ed22..5a96a100 100644
--- a/lib/python/Components/config.py
+++ b/lib/python/Components/config.py
@@ -65,9 +65,9 @@ class configBoolean:
self.parent.save()
def handleKey(self, key):
- if key == 1:
+ if key == config.prevElement:
self.parent.value = self.parent.value - 1
- if key == 2:
+ if key == config.nextElement:
self.parent.value = self.parent.value + 1
self.checkValues()
@@ -87,8 +87,10 @@ class configValue:
class Config:
def __init__(self):
- pass
-
+ self.choseElement = 0
+ self.prevElement = 1
+ self.nextElement = 2
+
config = Config();
configfile = configFile()
@@ -110,9 +112,9 @@ class ConfigSlider:
self.parent.value = 10
def handleKey(self, key):
- if key == 1:
+ if key == config.prevElement:
self.parent.value = self.parent.value - 1
- if key == 2:
+ if key == config.nextElement:
self.parent.value = self.parent.value + 1
self.checkValues()