3 def __init__(self, parent):
7 if self.parent.value < 0:
10 if(self.parent.value >= (len(self.parent.vals) - 1)):
11 self.parent.value = len(self.parent.vals) - 1
19 def handleKey(self, key):
21 self.parent.value = self.parent.value - 1
23 self.parent.value = self.parent.value + 1
29 def __call__(self): #needed by configlist
32 return ("text", self.parent.vals[self.parent.value])
35 def __init__(self, obj):
42 # das hier ist ein zugriff auf die registry...
43 if obj == "HKEY_LOCAL_ENIGMA/IMPORTANT/USER_ANNOYING_STUFF/SDTV/FLASHES/GREEN":
44 return ("SDTV green flashes", configBoolean(obj))
45 elif obj == "HKEY_LOCAL_ENIGMA/IMPORTANT/USER_ANNOYING_STUFF/HDTV/FLASHES/GREEN":
46 return ("HDTV reen flashes", configBoolean(obj))
48 return ("invalid", "")
57 def __init__(self, parent):
61 print "slider - cancel"
66 def checkValues(self):
67 if self.parent.value < 0:
70 if self.parent.value > 10:
71 self.parent.value = 10
73 def handleKey(self, key):
75 self.parent.value = self.parent.value - 1
77 self.parent.value = self.parent.value + 1
82 def __call__(self): #needed by configlist
84 return ("slider", self.parent.value * 10)
86 class ConfigSubsection:
91 def __init__(self, configPath, control, defaultValue, vals):
92 self.configPath = configPath
93 # self.value = 0 #read from registry else use default
94 self.value = defaultValue #read from registry else use default
95 self.defaultValue = defaultValue
96 self.controlType = control
98 self.notifierList = [ ]
99 def addNotifier(self, notifier):
100 self.notifierList.append(notifier);
103 for notifier in self.notifierList:
106 self.value = self.defaultValue #HACK :-)