From c767434380ce3dc9fed8c55e69cda5c4e1544005 Mon Sep 17 00:00:00 2001 From: Ronny Strutz Date: Fri, 25 Nov 2005 16:16:22 +0000 Subject: [PATCH] fix GUI for handling loopthrough btw nims - pls add functionality --- lib/python/Components/NimManager.py | 22 +++++++++++++++++++--- lib/python/Screens/Satconfig.py | 10 ++++++++-- 2 files changed, 27 insertions(+), 5 deletions(-) diff --git a/lib/python/Components/NimManager.py b/lib/python/Components/NimManager.py index 1c5b58fa..18c90f13 100644 --- a/lib/python/Components/NimManager.py +++ b/lib/python/Components/NimManager.py @@ -332,8 +332,10 @@ class NimManager: print "Unlinking slot " + str(slotid) # TODO call c++ to unlink nim in slot slotid if (mode == 1): # linked - if (len(self.getNimListOfType(self.nimType["DVB-S"], slotid)) > 0): - print "Linking slot " + str(slotid) + " to " + str(nimmgr.getConfigPrefix(slotid).value) + pass + #FIXME!!! + #if (len(self.getNimListOfType(self.nimType["DVB-S"], slotid)) > 0): + # print "Linking slot " + str(slotid) + " to " + str(nimmgr.getConfigPrefix(slotid).value) # TODO call c++ to link nim in slot slotid with nim in slot nimmgr.getConfigPrefix(slotid).value def nimLinkedToChanged(self, slotid, val): print "Linking slot " + str(slotid) + " to " + str(val) @@ -382,7 +384,21 @@ def InitNimManager(nimmgr): nim = config.Nims[x] if slot.nimType == nimmgr.nimType["DVB-S"]: - nim.configMode = configElement(cname + "configMode", configSelection, 0, (_("Simple"), _("Linked tuner"))) # "Advanced")); + nim.configMode = configElement(cname + "configMode", configSelection, 0, (_("Simple"), _("Loopthrough to Socket A"))) # "Advanced")); + + #important - check if just the 2nd one is LT only and the first one is DVB-S + if nim.configMode.value == 1: #linked + if x == 0: #first one can never be linked to anything + nim.configMode.value = 0 #reset to simple + nim.configMode.save() + else: + #FIXME: make it better + for y in nimmgr.nimslots: + if y.slotid == 0: + if y.nimType != nimmgr.nimType["DVB-S"]: + nim.configMode.value = 0 #reset to simple + nim.configMode.save() + 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); diff --git a/lib/python/Screens/Satconfig.py b/lib/python/Screens/Satconfig.py index c1a6d5b7..074033fa 100644 --- a/lib/python/Screens/Satconfig.py +++ b/lib/python/Screens/Satconfig.py @@ -44,7 +44,8 @@ class NimSetup(Screen): if (config.Nims[self.nim.slotid].diseqcMode.value == 4): self.createPositionerSetup(self.nim, self.list) elif config.Nims[self.nim.slotid].configMode.value == 1: # linked tuner - self.list.append(getConfigListEntry(_("Linked to"), config.Nims[self.nim.slotid].linkedTo)) + #self.list.append(getConfigListEntry(_("Linked to"), config.Nims[self.nim.slotid].linkedTo)) + pass elif config.Nims[self.nim.slotid].configMode.value == 2: # advanced mode print "FIXME: implement advanced mode" @@ -69,7 +70,12 @@ class NimSetup(Screen): def keyRight(self): #forbid to enable advanced mode until its ready - #if self["config"].getCurrent()[0] != _("Configmode"): + #perhaps its better to use an own element here + #this suckz .. how enable advanced config? + if self["config"].getCurrent()[0] == _("Configmode"): + if self.nim.slotid == 0: + return + self["config"].handleKey(config.key["nextElement"]) self.newConfig() -- 2.30.2