add config options for linked NIMs
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Tue, 22 Nov 2005 10:05:06 +0000 (10:05 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Tue, 22 Nov 2005 10:05:06 +0000 (10:05 +0000)
lib/python/Components/NimManager.py
lib/python/Screens/Satconfig.py

index 437c51dac3bc196ce27805d0d8b7c5ba7521d18c..5a2e16fa74a8068a4cf464c1fef241762d549cf2 100644 (file)
@@ -359,7 +359,7 @@ def InitNimManager(nimmgr):
                nim = config.Nims[x]
                
                if slot.nimType == nimmgr.nimType["DVB-S"]:
-                       nim.configMode = configElement(cname + "configMode", configSelection, 0, (_("Simple"), _("Advanced")));
+                       nim.configMode = configElement(cname + "configMode", configSelection, 0, (_("Simple"), _("Linked tuner"))) # _("Advanced")));
                        nim.diseqcMode = configElement(cname + "diseqcMode", configSelection, 2, (_("Single"), _("Toneburst A/B"), _("DiSEqC A/B"), _("DiSEqC A/B/C/D"), _("Positioner")));
                        nim.diseqcA = configElement(cname + "diseqcA", configSatlist, 192, nimmgr.satList);
                        nim.diseqcB = configElement(cname + "diseqcB", configSatlist, 130, nimmgr.satList);
@@ -367,6 +367,7 @@ def InitNimManager(nimmgr):
                        nim.diseqcD = configElement(cname + "diseqcD", configSatlist, 0, nimmgr.satList);
                        nim.longitude = configElement(cname + "longitude", configSequence, [0,0], configsequencearg.get("FLOAT", [(0,90),(0,999)]));
                        nim.latitude = configElement(cname + "latitude", configSequence, [0,0], configsequencearg.get("FLOAT", [(0,90),(0,999)]));
+                       nim.linkedTo = configElement(cname + "linkedTo", configSelection, 1 - slot.slotid, (_("Slot A"), _("Slot B")));
                        
                        #perhaps the instance of the slot is more useful?
                        nim.configMode.addNotifier(boundFunction(nimConfigModeChanged,x))
index db200ee1a1a318d7710a90d8e9a056cd135ec51f..30e2d5d50f9a9307f19455275739e277c6e5955c 100644 (file)
@@ -37,7 +37,9 @@ class NimSetup(Screen):
                                        self.createSimpleSetup(self.nim, self.list, config.Nims[self.nim.slotid].diseqcMode.value)
                                if (config.Nims[self.nim.slotid].diseqcMode.value == 4):
                                        self.createPositionerSetup(self.nim, self.list)
-                       else:   
+                       elif config.Nims[self.nim.slotid].configMode.value == 1: # linked tuner
+                               self.list.append(getConfigListEntry(_("Linked to"), config.Nims[self.nim.slotid].linkedTo))
+                       elif config.Nims[self.nim.slotid].configMode.value == 2: # advanced mode
                                print "FIXME: implement advanced mode"
                
                elif (nimmanager.getNimType(self.nim.slotid) == nimmanager.nimType["DVB-C"]):
@@ -61,8 +63,8 @@ class NimSetup(Screen):
 
        def keyRight(self):
                #forbid to enable advanced mode until its ready
-               if self["config"].getCurrent()[0] != _("Configmode"):
-                       self["config"].handleKey(config.key["nextElement"])
+               #if self["config"].getCurrent()[0] != _("Configmode"):
+               self["config"].handleKey(config.key["nextElement"])
                self.newConfig()
 
        def keyNumberGlobal(self, number):