aboutsummaryrefslogtreecommitdiff
path: root/lib/python
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
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')
-rw-r--r--lib/python/Components/ScanSetup.py46
-rw-r--r--lib/python/Components/config.py6
-rw-r--r--lib/python/Screens/NetworkSetup.py4
3 files changed, 30 insertions, 26 deletions
diff --git a/lib/python/Components/ScanSetup.py b/lib/python/Components/ScanSetup.py
index ed3a70f9..864eec74 100644
--- a/lib/python/Components/ScanSetup.py
+++ b/lib/python/Components/ScanSetup.py
@@ -10,39 +10,41 @@ def InitScanSetup():
config.scan.sat = ConfigSubsection()
config.scan.cab = ConfigSubsection()
config.scan.ter = ConfigSubsection()
- config.scan.type = configElement("config.scan.type", configSelection, 0, ("Single transponder", "Single satellite", "Multisat"))
+ config.scan.type = configElement("config.scan.type", configSelection, 0, ("Single transponder", "Single satellite", "Multisat"), False)
nimList = [ ]
for nim in nimmanager.nimList():
nimList.append(nim[0])
nimList.append("all")
- config.scan.nims = configElement("config.scan.nims", configSelection, 0, nimList)
+ config.scan.nims = configElement("config.scan.nims", configSelection, 0, nimList, False)
# sat
- config.scan.sat.frequency = configElement("config.scan.sat.frequency", configSequence, [12187], (("."), (10000,14000)))
- config.scan.sat.inversion = configElement("config.scan.sat.inversion", configSelection, 0, ("off", "on"))
- config.scan.sat.symbolrate = configElement("config.scan.sat.symbolrate", configSequence, [27500], (("."), (1,30000)))
- config.scan.sat.polarzation = configElement("config.scan.sat.polarzation", configSelection, 0, ("horizontal", "vertical"))
- config.scan.sat.fec = configElement("config.scan.sat.fec", configSelection, 0, ("Auto", "1/2", "2/3", "3/4", "4/5", "5/6", "7/8", "8/9"))
+ config.scan.sat.frequency = configElement("config.scan.sat.frequency", configSequence, [12187], (("."), (10000,14000)), False)
+ config.scan.sat.inversion = configElement("config.scan.sat.inversion", configSelection, 0, ("off", "on"), False)
+ config.scan.sat.symbolrate = configElement("config.scan.sat.symbolrate", configSequence, [27500], (("."), (1,30000)), False)
+ config.scan.sat.polarzation = configElement("config.scan.sat.polarzation", configSelection, 0, ("horizontal", "vertical"), False)
+ config.scan.sat.fec = configElement("config.scan.sat.fec", configSelection, 0, ("Auto", "1/2", "2/3", "3/4", "4/5", "5/6", "7/8", "8/9"), False)
# cable
- config.scan.cab.frequency = configElement("config.scan.cab.frequency", configSequence, [466], (("."), (10000,14000)))
- config.scan.cab.inversion = configElement("config.scan.cab.inversion", configSelection, 0, ("off", "on"))
- config.scan.cab.modulation = configElement("config.scan.cab.modulation", configSelection, 0, ("Auto", "16-QAM", "32-QAM", "64-QAM", "128-QAM", "256-QAM"))
- config.scan.cab.fec = configElement("config.scan.cab.fec", configSelection, 0, ("Auto", "1/2", "2/3", "3/4", "4/5", "5/6", "7/8", "8/9"))
- config.scan.cab.symbolrate = configElement("config.scan.cab.symbolrate", configSequence, [6900], (("."), (1,30000)))
+ config.scan.cab.frequency = configElement("config.scan.cab.frequency", configSequence, [466], (("."), (10000,14000)), False)
+ config.scan.cab.inversion = configElement("config.scan.cab.inversion", configSelection, 0, ("off", "on"), False)
+ config.scan.cab.modulation = configElement("config.scan.cab.modulation", configSelection, 0, ("Auto", "16-QAM", "32-QAM", "64-QAM", "128-QAM", "256-QAM"), False)
+ config.scan.cab.fec = configElement("config.scan.cab.fec", configSelection, 0, ("Auto", "1/2", "2/3", "3/4", "4/5", "5/6", "7/8", "8/9"), False)
+ config.scan.cab.symbolrate = configElement("config.scan.cab.symbolrate", configSequence, [6900], (("."), (1,30000)), False)
# terrestial
- config.scan.ter.frequency = configElement("config.scan.ter.frequency", configSequence, [466], (("."), (10000,14000)))
- config.scan.ter.inversion = configElement("config.scan.ter.inversion", configSelection, 0, ("off", "on"))
- config.scan.ter.bandwidth = configElement("config.scan.ter.bandwidth", configSelection, 0, ("Auto", "6 MHz", "7MHz", "8MHz"))
- config.scan.ter.fechigh = configElement("config.scan.ter.fechigh", configSelection, 0, ("Auto", "1/2", "2/3", "3/4", "4/5", "5/6", "7/8", "8/9"))
- config.scan.ter.feclow = configElement("config.scan.ter.feclow", configSelection, 0, ("Auto", "1/2", "2/3", "3/4", "4/5", "5/6", "7/8", "8/9"))
- config.scan.ter.modulation = configElement("config.scan.ter.modulation", configSelection, 0, ("Auto", "16-QAM", "32-QAM", "64-QAM", "128-QAM", "256-QAM"))
- config.scan.ter.transmission = configElement("config.scan.ter.transmission", configSelection, 0, ("Auto", "2K", "8K"))
- config.scan.ter.guard = configElement("config.scan.ter.guard", configSelection, 0, ("Auto", "1/4", "1/8", "1/16", "1/32"))
- config.scan.ter.hierarchy = configElement("config.scan.ter.hierarchy", configSelection, 0, ("Auto", "1", "2", "4"))
+ config.scan.ter.frequency = configElement("config.scan.ter.frequency", configSequence, [466], (("."), (10000,14000)), False)
+ config.scan.ter.inversion = configElement("config.scan.ter.inversion", configSelection, 0, ("off", "on"), False)
+ config.scan.ter.bandwidth = configElement("config.scan.ter.bandwidth", configSelection, 0, ("Auto", "6 MHz", "7MHz", "8MHz"), False)
+ config.scan.ter.fechigh = configElement("config.scan.ter.fechigh", configSelection, 0, ("Auto", "1/2", "2/3", "3/4", "4/5", "5/6", "7/8", "8/9"), False)
+ config.scan.ter.feclow = configElement("config.scan.ter.feclow", configSelection, 0, ("Auto", "1/2", "2/3", "3/4", "4/5", "5/6", "7/8", "8/9"), False)
+ config.scan.ter.modulation = configElement("config.scan.ter.modulation", configSelection, 0, ("Auto", "16-QAM", "32-QAM", "64-QAM", "128-QAM", "256-QAM"), False)
+ config.scan.ter.transmission = configElement("config.scan.ter.transmission", configSelection, 0, ("Auto", "2K", "8K"), False)
+ config.scan.ter.guard = configElement("config.scan.ter.guard", configSelection, 0, ("Auto", "1/4", "1/8", "1/16", "1/32"), False)
+ config.scan.ter.hierarchy = configElement("config.scan.ter.hierarchy", configSelection, 0, ("Auto", "1", "2", "4"), False)
config.scan.scansat = {}
for sat in nimmanager.satList:
#print sat[1]
- config.scan.scansat[sat[1]] = configElement("config.scan.scansat[" + str(sat[1]) + "]", configSelection, 0, ("yes", "no")) \ No newline at end of file
+ config.scan.scansat[sat[1]] = configElement("config.scan.scansat[" + str(sat[1]) + "]", configSelection, 0, ("yes", "no"), False)
+
+ \ No newline at end of file
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
diff --git a/lib/python/Screens/NetworkSetup.py b/lib/python/Screens/NetworkSetup.py
index 54330581..c99ee247 100644
--- a/lib/python/Screens/NetworkSetup.py
+++ b/lib/python/Screens/NetworkSetup.py
@@ -47,8 +47,8 @@ class NetworkSetup(Screen):
self.newConfig()
def keySave(self):
- for x in self["config"].list:
- x[1].save()
+ #for x in self["config"].list:
+ #x[1].save()
self.close()
def keyCancel(self):