fix some hacker's code
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Fri, 30 Dec 2005 14:27:35 +0000 (14:27 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Fri, 30 Dec 2005 14:27:35 +0000 (14:27 +0000)
lib/python/Components/NimManager.py
lib/python/Screens/Satconfig.py

index bf4bdc93982531c88bd1c17e3a326848c473335c..c5b1b22365cb89d59dd3ecd01c9b0d7dc882f610 100644 (file)
@@ -412,7 +412,10 @@ def InitNimManager(nimmgr):
                nim = config.Nims[x]
                
                if slot.nimType == nimmgr.nimType["DVB-S"]:
-                       nim.configMode = configElement(cname + "configMode", configSelection, 0, (("simple", _("Simple")), ("nothing", _("Nothing connected")), ("loopthrough", _("Loopthrough to Socket A")), ("advanced", _("Advanced")))) # "Advanced"));
+                       if slot.slotid == 0:
+                               nim.configMode = configElement(cname + "configMode", configSelection, 0, (("simple", _("Simple")), ("advanced", _("Advanced"))))
+                       else:                                                   
+                               nim.configMode = configElement(cname + "configMode", configSelection, 0, (("simple", _("Simple")), ("nothing", _("Nothing connected")), ("loopthrough", _("Loopthrough to Socket A")), ("advanced", _("Advanced"))))
                        
                        #important - check if just the 2nd one is LT only and the first one is DVB-S
                        if currentConfigSelectionElement(nim.configMode) == "loopthrough": #linked
index f7550444b2490b20b055979c3733476189113536..4da5ecfe5c3f46413243e4a15a2afe36ebf71b96 100644 (file)
@@ -68,21 +68,30 @@ class NimSetup(Screen):
                        self.createSetup()
                
        def keyLeft(self):
-               if self["config"].getCurrent() == self.configMode:
-                       if self.nim.slotid == 0:
-                               return
+               #if self["config"].getCurrent() == self.configMode:
+                       #if self.nim.slotid == 0:
+                               #while currentConfigSelectionElement(config.Nims[self.nim.slotid].configMode) != "simple" and currentConfigSelectionElement(config.Nims[self.nim.slotid].configMode) != "advanced":
+                                       #self["config"].handleKey(config.key["prevElement"])
+                       #else:
+                               #self["config"].handleKey(config.key["prevElement"])
+#              else:
                self["config"].handleKey(config.key["prevElement"])
+
                self.newConfig()
 
        def keyRight(self):
                #forbid to enable advanced mode until its ready
                #perhaps its better to use an own element here
                #this suckz .. how enable advanced config?
-               if self["config"].getCurrent() == self.configMode:
-                       if self.nim.slotid == 0:
-                               return
-
+               #if self["config"].getCurrent() == self.configMode:
+                       #if self.nim.slotid == 0:
+                               #while currentConfigSelectionElement(config.Nims[self.nim.slotid].configMode) != "simple" and currentConfigSelectionElement(config.Nims[self.nim.slotid].configMode) != "advanced":
+                                       #self["config"].handleKey(config.key["nextElement"])
+                       #else:
+                               #self["config"].handleKey(config.key["prevElement"])
+               #else:
                self["config"].handleKey(config.key["nextElement"])
+               
                self.newConfig()
 
        def keyNumberGlobal(self, number):