add ConfigurationBackup
[enigma2.git] / lib / python / Components / NimManager.py
index 3610b843994170a8146c42e0714a24ae12b0abbb..ac73c00ebcb3433b00cb0ccc6a130adcd70bd7ce 100644 (file)
@@ -2,7 +2,6 @@ from config import config       #global config instance
 
 from config import configElement
 from config import ConfigSubsection
-from config import ConfigSlider
 from config import configSelection
 from config import currentConfigSelectionElement
 from config import getConfigSelectionElement
@@ -381,7 +380,6 @@ class NimManager:
                                        pass
                                else:
                                        self.transponders[self.parsedCab] = [ ]
-
                                self.transponders[self.parsedCab].append((1, freq, sr, mod, fec))
 
        class parseTerrestrials(ContentHandler):
@@ -416,7 +414,16 @@ class NimManager:
                                self.transponders[self.parsedTer].append((2, freq, bw, const, crh, crl, guard, transm, hierarchy, inv))
 
        def getTransponders(self, pos):
-               return self.transponders[pos]
+               if self.transponders.has_key(pos):
+                       return self.transponders[pos]
+               else:
+                       return []
+
+       def getTranspondersCable(self, cable):
+               return self.transponderscable[cable]
+
+       def getCableDescription(self, nim):
+               return self.cablesList[config.Nims[nim].cable.value]
 
        def getConfiguredSats(self):
                return self.sec.getSatList()
@@ -480,10 +487,16 @@ class NimManager:
 
        def getNimType(self, slotID):
                if slotID >= self.nimCount:
-                       return "empty/unknown"
+                       return self.nimType["empty/unknown"]
                else:   
                        return self.nimType[self.nimTypes[slotID]]
                        
+       def getNimTypeName(self, slotID):
+               if slotID >= self.nimCount:
+                       return "empty/unknown"
+               else:   
+                       return self.nimTypes[slotID]
+               
        def getNimName(self, slotID):
                return self.nimNames[slotID]
 
@@ -641,8 +654,7 @@ def InitNimManager(nimmgr):
                        nim.diseqcB = configElement(cname + "diseqcB", configSatlist, 130, nimmgr.satList, False);
                        nim.diseqcC = configElement(cname + "diseqcC", configSatlist, 0, nimmgr.satList, False);
                        nim.diseqcD = configElement(cname + "diseqcD", configSatlist, 0, nimmgr.satList, False);
-#                      nim.positionerMode = configElement(cname + "positionerMode", configSelection, 0, (("usals", _("USALS")), ("manual", _("manual"))), False);
-                       nim.positionerMode = configElement(cname + "positionerMode", configSelection, 0, (("usals", _("USALS"))), False);
+                       nim.positionerMode = configElement(cname + "positionerMode", configSelection, 0, (("usals", _("USALS")), ("manual", _("manual"))), False);
                        nim.longitude = configElement(cname + "longitude", configSequence, [5,100], configsequencearg.get("FLOAT", [(0,90),(0,999)]), False);
                        nim.longitudeOrientation = configElement(cname + "longitudeOrientation", configSelection, 0, (("east", _("East")), ("west", _("West"))), False)
                        nim.latitude = configElement(cname + "latitude", configSequence, [50,767], configsequencearg.get("FLOAT", [(0,90),(0,999)]), False);