store config in /etc/enigma2 and create the path if needed
[enigma2.git] / lib / python / Screens / ConfigMenu.py
1 from Screen import Screen
2 from Components.ConfigList import ConfigList
3 from Components.config import *
4 from Components.ActionMap import ActionMap
5
6 class ConfigMenu(Screen):
7         #create a generic class for view/edit settings
8         #all stuff come from xml file
9         #configtype / datasource / validate-call / ...
10
11         def __init__(self, session):
12                 Screen.__init__(self, session)
13
14                 self["actions"] = ActionMap(["OkCancelActions"], 
15                         {
16                                 "ok": self.okbuttonClick,
17                                 "cancel": self.close
18                         })
19
20 class configTest(Screen):
21
22         def __init__(self, session):
23                 Screen.__init__(self, session)
24                 
25
26                 self["config"] = ConfigList(
27                         [
28                                 configEntry("HKEY_LOCAL_ENIGMA/IMPORTANT/USER_ANNOYING_STUFF/SDTV/FLASHES/GREEN"),
29                                 configEntry("HKEY_LOCAL_ENIGMA/IMPORTANT/USER_ANNOYING_STUFF/HDTV/FLASHES/GREEN"),
30                         ])
31
32                 self["actions"] = ActionMap(["OkCancelActions"], 
33                         {
34                                 "ok": self["config"].toggle,
35                                 "cancel": self.close
36                         })
37