From: Stefan Pluecken Date: Tue, 22 Nov 2005 10:16:49 +0000 (+0000) Subject: just show other sat nims in linked tuners dialog X-Git-Tag: 2.6.0~5019 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/ae61cad19c3d66a8e15bc0096cff5742e7841f9d just show other sat nims in linked tuners dialog --- diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 5a2e16fa..51fd7913 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -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))