diff options
| author | Ronny Strutz <ronny.strutz@multimedia-labs.de> | 2005-10-05 00:39:25 +0000 |
|---|---|---|
| committer | Ronny Strutz <ronny.strutz@multimedia-labs.de> | 2005-10-05 00:39:25 +0000 |
| commit | d891c2772bce3590fc7d11edc880b350f67eae55 (patch) | |
| tree | 1b83dd824342c4f2437e4f44e6c6814b0afea88c /lib/python | |
| parent | e5bbd02558ad3f44606cf4ae790b57c682ce5ce0 (diff) | |
| download | enigma2-d891c2772bce3590fc7d11edc880b350f67eae55.tar.gz enigma2-d891c2772bce3590fc7d11edc880b350f67eae55.zip | |
added nim-selection
Diffstat (limited to 'lib/python')
| -rw-r--r-- | lib/python/Screens/Satconfig.py | 58 |
1 files changed, 14 insertions, 44 deletions
diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py index 75e5e894..3bad0714 100644 --- a/lib/python/Screens/Satconfig.py +++ b/lib/python/Screens/Satconfig.py @@ -2,52 +2,22 @@ from Screen import Screen from Components.ActionMap import ActionMap from Components.ConfigList import ConfigList from Components.config import * +from Components.MenuList import MenuList +from Components.NimManager import nimmanager -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" + str(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"]) - +class NimSelection(Screen): def __init__(self, session): Screen.__init__(self, session) - self["actions"] = ActionMap(["SetupActions"], - { - "cancel": self.close, - #"ok": self.close, - "left": self.keyLeft, - "right": self.keyRight, - }) + self["nimlist"] = MenuList(nimmanager.nimList()) + + self["actions"] = ActionMap(["OkCancelActions"], + { + "ok": self.okbuttonClick , + "cancel": self.close + }) - blasel = setupElement("blub", setupSelection, 1, ("A", "B")) - item = blasel.controlType(blasel) - list = [] - list.append( ("Tuner-Slot",item) ); - self["config"] = ConfigList(list) + def okbuttonClick(self): + #selection = self["hddlist"].getCurrent() + #self.session.open(HarddiskSetup, selection[1]) + pass |
