-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"])
-