- split of Components into different files
[enigma2.git] / lib / python / Components / config.py
1 #  temp stuff :)
2 class configBoolean:
3         def __init__(self, reg):
4                 self.reg = reg
5                 self.val = 0
6         
7         def toggle(self):
8                 self.val += 1
9                 self.val %= 3
10         
11         def __str__(self):
12                 return ("NO", "YES", "MAYBE")[self.val]
13
14 class configValue:
15         def __init__(self, obj):
16                 self.obj = obj
17                 
18         def __str__(self):
19                 return self.obj
20
21 def configEntry(obj):
22         # das hier ist ein zugriff auf die registry...
23         if obj == "HKEY_LOCAL_ENIGMA/IMPORTANT/USER_ANNOYING_STUFF/SDTV/FLASHES/GREEN":
24                 return ("SDTV green flashes", configBoolean(obj))
25         elif obj == "HKEY_LOCAL_ENIGMA/IMPORTANT/USER_ANNOYING_STUFF/HDTV/FLASHES/GREEN":
26                 return ("HDTV reen flashes", configBoolean(obj))
27         else:
28                 return ("invalid", "")
29