aboutsummaryrefslogtreecommitdiff
path: root/lib/python
diff options
context:
space:
mode:
authorRonny Strutz <ronny.strutz@multimedia-labs.de>2005-09-29 11:12:43 +0000
committerRonny Strutz <ronny.strutz@multimedia-labs.de>2005-09-29 11:12:43 +0000
commit2acb465616ee1e910b345a0c5e9ec7429daf9f90 (patch)
tree3d56b0a910fc9fe46584eaa718359e4cc60fcfe7 /lib/python
parent814111dab07d3e661567de7c6bd360e84b1a59ba (diff)
downloadenigma2-2acb465616ee1e910b345a0c5e9ec7429daf9f90.tar.gz
enigma2-2acb465616ee1e910b345a0c5e9ec7429daf9f90.zip
added satconfig, FIXME
Diffstat (limited to 'lib/python')
-rw-r--r--lib/python/Screens/Satconfig.py53
1 files changed, 53 insertions, 0 deletions
diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py
new file mode 100644
index 00000000..78f60f4f
--- /dev/null
+++ b/lib/python/Screens/Satconfig.py
@@ -0,0 +1,53 @@
+from Screen import Screen
+from Components.ActionMap import ActionMap
+from Components.ConfigList import ConfigList
+from Components.config import *
+
+class setupSelection:
+ def __init__(self, parent):
+ self.parent = parent
+
+ def handleKey(self, key):
+ if key == config.key["prevElement"]:
+ self.parent.value = self.parent.value - 1
+ if key == config.key["nextElement"]:
+ self.parent.value = self.parent.value + 1
+
+ def __call__(self, selected): #needed by configlist
+ print "value" + self.parent.value
+ return ("text", self.parent.vals[self.parent.value])
+
+class setupElement:
+ def __init__(self, configPath, control, defaultValue, vals):
+ self.configPath = configPath
+ self.defaultValue = defaultValue
+ self.controlType = control
+ self.vals = vals
+ self.notifierList = [ ]
+ self.enabled = True
+ self.value = self.defaultValue
+
+class Satconfig(Screen):
+ def keyLeft(self):
+ if (self["config"].getCurrent()[1].parent.enabled == True):
+ self["config"].handleKey(config.key["prevElement"])
+ def keyRight(self):
+ if (self["config"].getCurrent()[1].parent.enabled == True):
+ self["config"].handleKey(config.key["nextElement"])
+
+ def __init__(self, session):
+ Screen.__init__(self, session)
+
+ self["actions"] = ActionMap(["SetupActions"],
+ {
+ "cancel": self.close,
+ #"ok": self.close,
+ "left": self.keyLeft,
+ "right": self.keyRight,
+ })
+
+ blasel = setupElement("blub", setupSelection, 1, ("A", "B"))
+ item = blasel.controlType(blasel)
+ list = []
+ list.append( ("Tuner-Slot",item) );
+ self["config"] = ConfigList(list)