just show other sat nims in linked tuners dialog
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Tue, 22 Nov 2005 10:16:49 +0000 (10:16 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Tue, 22 Nov 2005 10:16:49 +0000 (10:16 +0000)
lib/python/Components/NimManager.py

index 5a2e16fa74a8068a4cf464c1fef241762d549cf2..51fd791357b96956cafcf6b421da3f27115953d5 100644 (file)
@@ -253,6 +253,13 @@ class NimManager:
                        if (chktype == self.nimType[str(type)]):
                                return True
                return False
+       
+       def getNimListOfType(self, type, exception = -1):
+               list = []
+               for x in self.nimslots:
+                       if ((x.nimType == type) and (x.slotid != exception)):
+                               list.append(x.slotid)
+               return list
 
        def getConfigPrefix(self, slotid):
                return "config.Nim" + ("A","B","C","D")[slotid] + "."
@@ -367,7 +374,12 @@ 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")));
+                       
+                       satNimList = nimmgr.getNimListOfType(nimmgr.nimType["DVB-S"], slot.slotid)
+                       satNimListNames = []
+                       for x in satNimList:
+                               satNimListNames.append(nimmgr.getNimName(x))
+                       nim.linkedTo = configElement(cname + "linkedTo", configSelection, 0, satNimListNames);
                        
                        #perhaps the instance of the slot is more useful?
                        nim.configMode.addNotifier(boundFunction(nimConfigModeChanged,x))