diff options
| author | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2008-07-20 19:20:50 +0000 |
|---|---|---|
| committer | Stefan Pluecken <stefan.pluecken@multimedia-labs.de> | 2008-07-20 19:20:50 +0000 |
| commit | 28f2c454309697e78017bf2df4fdbcd8cebd9ed1 (patch) | |
| tree | 641a0ef593ae21efaff105905efbc31da4180b1c /lib/python/Screens/Satconfig.py | |
| parent | 3f66fa4d17ba703871da304d005a1945ba7ed97d (diff) | |
| download | enigma2-28f2c454309697e78017bf2df4fdbcd8cebd9ed1.tar.gz enigma2-28f2c454309697e78017bf2df4fdbcd8cebd9ed1.zip | |
do some voodoo on the config list to store the connectedTo values properly (reset to all choices while saving items to get a fixed default value)
Diffstat (limited to 'lib/python/Screens/Satconfig.py')
| -rw-r--r-- | lib/python/Screens/Satconfig.py | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py index 49fc2b7b..d2ff975b 100644 --- a/lib/python/Screens/Satconfig.py +++ b/lib/python/Screens/Satconfig.py @@ -60,7 +60,7 @@ class NimSetup(Screen, ConfigListScreen): choices["satposdepends"] = _("second cable of motorized LNB") if len(nimmanager.canConnectTo(self.slotid)) > 0: choices["loopthrough"] = _("loopthrough to") - self.nim.config.configMode.setChoices(choices) + self.nimConfig.configMode.setChoices(choices) def createSetup(self): print "Creating setup" @@ -113,7 +113,7 @@ class NimSetup(Screen, ConfigListScreen): elif self.nimConfig.configMode.value == "loopthrough": choices = [] print "connectable to:", nimmanager.canConnectTo(self.slotid) - connectable = nimmanager.canConnectTo(self.slotid) + connectable = nimmanager.canConnectTo(self.slotid) for id in connectable: choices.append((str(id), nimmanager.getNimDescription(id))) self.nimConfig.connectedTo.setChoices(choices) @@ -336,7 +336,7 @@ class NimSetup(Screen, ConfigListScreen): self.createConfigMode() self.createSetup() # safeAll is needed, so that keyCancel works properly - self.saveAll() + ConfigListScreen.saveAll(self) def keyLeft(self): ConfigListScreen.keyLeft(self) @@ -345,6 +345,17 @@ class NimSetup(Screen, ConfigListScreen): def keyRight(self): ConfigListScreen.keyRight(self) self.newConfig() + + def saveAll(self): + if self.nim.isCompatible("DVB-S"): + # reset connectedTo to all choices to properly store the default value + choices = [] + nimlist = nimmanager.getNimListOfType("DVB-S", self.slotid) + for id in nimlist: + choices.append((str(id), nimmanager.getNimDescription(id))) + self.nimConfig.connectedTo.setChoices(choices) + for x in self["config"].list: + x[1].save() class NimSelection(Screen): def __init__(self, session): |
