diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-10-11 01:13:48 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2005-10-11 01:13:48 +0000 |
| commit | 7c1700cc9ba3cae93b1868bb14b57d61f497e9a4 (patch) | |
| tree | 4f8f368789df3f463aaf3d06e955a9b49ac360c3 /lib/python/Components/config.py | |
| parent | 4d1d7ab4619beef6a1b5ef5990fb5942da9358d8 (diff) | |
| download | enigma2-7c1700cc9ba3cae93b1868bb14b57d61f497e9a4.tar.gz enigma2-7c1700cc9ba3cae93b1868bb14b57d61f497e9a4.zip | |
use a configElement_nonSave instead of constructor argument in configElement
Diffstat (limited to 'lib/python/Components/config.py')
| -rw-r--r-- | lib/python/Components/config.py | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py index 482482ce..3598fd6e 100644 --- a/lib/python/Components/config.py +++ b/lib/python/Components/config.py @@ -316,14 +316,13 @@ class configElement: #is this right? activate settings after load/cancel and use default self.change() - def __init__(self, configPath, control, defaultValue, vals, shouldSave = True): + 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.shouldSave = shouldSave self.loadData() def addNotifier(self, notifier): self.notifierList.append(notifier); @@ -334,9 +333,15 @@ class configElement: def reload(self): self.loadData() def save(self): - if (self.shouldSave == True): - configfile.setKey(self.configPath, self.datatoFile(self.controlType,self.value)) + configfile.setKey(self.configPath, self.datatoFile(self.controlType,self.value)) +class configElement_nonSave(configElement): + def __init__(self, configPath, control, defaultValue, vals): + configElement.__init__(self, configPath, control, defaultValue, vals) + + def save(self): + pass + def getConfigListEntry(description, element): b = element item = b.controlType(b) |
