aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/config.py
diff options
context:
space:
mode:
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>2005-10-11 01:00:40 +0000
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>2005-10-11 01:00:40 +0000
commit4d1d7ab4619beef6a1b5ef5990fb5942da9358d8 (patch)
treed3cd4cdb7471d4891e7d326e33052741ba903e0e /lib/python/Components/config.py
parent2d0ef7747f575fc5202433c58c676deadeaafb7e (diff)
downloadenigma2-4d1d7ab4619beef6a1b5ef5990fb5942da9358d8.tar.gz
enigma2-4d1d7ab4619beef6a1b5ef5990fb5942da9358d8.zip
add additional argument to the configElement constructor to make configElements, that don't save themselves and use it in
scan-setup
Diffstat (limited to 'lib/python/Components/config.py')
-rw-r--r--lib/python/Components/config.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/python/Components/config.py b/lib/python/Components/config.py
index 5d098a37..482482ce 100644
--- a/lib/python/Components/config.py
+++ b/lib/python/Components/config.py
@@ -316,13 +316,14 @@ class configElement:
#is this right? activate settings after load/cancel and use default
self.change()
- def __init__(self, configPath, control, defaultValue, vals):
+ def __init__(self, configPath, control, defaultValue, vals, shouldSave = True):
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);
@@ -333,7 +334,8 @@ class configElement:
def reload(self):
self.loadData()
def save(self):
- configfile.setKey(self.configPath, self.datatoFile(self.controlType,self.value))
+ if (self.shouldSave == True):
+ configfile.setKey(self.configPath, self.datatoFile(self.controlType,self.value))
def getConfigListEntry(description, element):
b = element