fix "run" for dvb-t
authorFelix Domke <tmbinc@elitedvb.net>
Fri, 7 Apr 2006 16:02:37 +0000 (16:02 +0000)
committerFelix Domke <tmbinc@elitedvb.net>
Fri, 7 Apr 2006 16:02:37 +0000 (16:02 +0000)
lib/python/Screens/Satconfig.py

index 936e5d1..c665cfd 100644 (file)
@@ -42,8 +42,10 @@ class NimSetup(Screen):
                self.advancedUsalsEntry = None
                self.advancedLof = None
                self.advancedPowerMeasurement = None
                self.advancedUsalsEntry = None
                self.advancedLof = None
                self.advancedPowerMeasurement = None
+               
+               self.nim_type = nimmanager.getNimType(self.nim.slotid)
 
 
-               if (nimmanager.getNimType(self.nim.slotid) == nimmanager.nimType["DVB-S"]):
+               if self.nim_type == nimmanager.nimType["DVB-S"]:
                        self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
                        self.list.append(self.configMode)
 
                        self.configMode = getConfigListEntry(_("Configuration Mode"), self.nimConfig.configMode)
                        self.list.append(self.configMode)
 
@@ -62,9 +64,12 @@ class NimSetup(Screen):
                                self.list.append(self.advancedSatsEntry)
                                currSat = self.nimConfig.advanced.sat[nimmanager.satList[self.nimConfig.advanced.sats.value][1]]
                                self.fillListWithAdvancedSatEntrys(currSat)
                                self.list.append(self.advancedSatsEntry)
                                currSat = self.nimConfig.advanced.sat[nimmanager.satList[self.nimConfig.advanced.sats.value][1]]
                                self.fillListWithAdvancedSatEntrys(currSat)
-               elif (nimmanager.getNimType(self.nim.slotid) == nimmanager.nimType["DVB-C"]):
+                       self.have_advanced = True
+               elif self.nim_type == nimmanager.nimType["DVB-C"]:
                        self.list.append(getConfigListEntry(_("Cable provider"), self.nimConfig.cable))
                        self.list.append(getConfigListEntry(_("Cable provider"), self.nimConfig.cable))
-               elif (nimmanager.getNimType(self.nim.slotid) == nimmanager.nimType["DVB-T"]):
+                       self.have_advanced = False
+               elif self.nim_type == nimmanager.nimType["DVB-T"]:
+                       self.have_advanced = False
                        self.list.append(getConfigListEntry(_("Terrestrial provider"), self.nimConfig.terrestrial))
 
                self["config"].list = self.list
                        self.list.append(getConfigListEntry(_("Terrestrial provider"), self.nimConfig.terrestrial))
 
                self["config"].list = self.list
@@ -90,7 +95,7 @@ class NimSetup(Screen):
                        self["config"].handleKey(config.key[str(number)])
 
        def run(self):
                        self["config"].handleKey(config.key[str(number)])
 
        def run(self):
-               if currentConfigSelectionElement(config.Nims[self.nim.slotid].configMode) == "advanced":
+               if self.have_advanced and currentConfigSelectionElement(config.Nims[self.nim.slotid].configMode) == "advanced":
                        self.fillAdvancedList()
                for x in self["config"].list:
                        x[1].save()
                        self.fillAdvancedList()
                for x in self["config"].list:
                        x[1].save()