Merge branch 'master' into experimental
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sat, 7 Nov 2009 12:53:41 +0000 (13:53 +0100)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Sat, 7 Nov 2009 12:53:41 +0000 (13:53 +0100)
1  2 
lib/python/Components/NimManager.py
lib/python/Components/config.py

index c339947cefcacce7e68031c8816c169828bff535,1dff777af3189fa1f4f404cfa1ecbbecbdda2702..3c3aa26cb0daf50c1df110f6c4974756ed58d45f
@@@ -565,9 -565,10 +565,10 @@@ class NimManager
                if self.hasNimType("DVB-S"):
                        print "Reading satellites.xml"
                        db.readSatellites(self.satList, self.satellites, self.transponders)
- #                     print "SATLIST", self.satList
- #                     print "SATS", self.satellites
- #                     print "TRANSPONDERS", self.transponders
+                       self.satList.sort(key = lambda x: x[0]) # sort by orbpos
+                       #print "SATLIST", self.satList
+                       #print "SATS", self.satellites
+                       #print "TRANSPONDERS", self.transponders
  
                if self.hasNimType("DVB-C"):
                        print "Reading cables.xml"
@@@ -939,7 -940,7 +940,7 @@@ def InitNimManager(nimmgr)
  
        lnb_choices = {
                "universal_lnb": _("Universal LNB"),
 -#             "unicable": _("Unicable"),
 +              "unicable": _("Unicable"),
                "c_band": _("C-Band"),
                "user_defined": _("User defined")}
  
index a1f3d2c376e66d437bc74bfc5ceedca10a784859,d15c232ba1c259cbcac07c97289117bd4bfbfe1c..a596b96d01b7c539883ac049ce62856dd73dee1e
@@@ -1,6 -1,6 +1,6 @@@
  from enigma import getPrevAsciiCode
  from Tools.NumericalTextInput import NumericalTextInput
 -from Tools.Directories import resolveFilename, SCOPE_CONFIG
 +from Tools.Directories import resolveFilename, SCOPE_CONFIG, fileExists
  from Components.Harddisk import harddiskmanager
  from copy import copy as copy_copy
  from os import path as os_path
@@@ -1184,7 -1184,6 +1184,6 @@@ class ConfigSatlist(ConfigSelection)
        def __init__(self, list, default = None):
                if default is not None:
                        default = str(default)
-               list.sort(key = lambda x: int(x[0]))
                self._satList = list
                choices = [(str(orbpos), desc) for (orbpos, desc, flags) in list]
                
@@@ -1298,6 -1297,7 +1297,6 @@@ class ConfigLocations(ConfigElement)
                self.default = default
                self.locations = []
                self.mountpoints = []
 -              harddiskmanager.on_partition_list_change.append(self.mountpointsChanged)
                self.value = default[:]
  
        def setValue(self, value):
                locations = [[x, None, False, False] for x in tmp]
                self.refreshMountpoints()
                for x in locations:
 -                      if os_path.exists(x[0]):
 +                      if fileExists(x[0]):
                                x[1] = self.getMountpoint(x[0])
                                x[2] = True
                self.locations = locations
                        return False
                return self.tostring([x[0] for x in locations]) != sv
  
 -      def mountpointsChanged(self, action, dev):
 -              print "Mounts changed: ", action, dev
 -              mp = dev.mountpoint+"/"
 -              if action == "add":
 -                      self.addedMount(mp)
 -              elif action == "remove":
 -                      self.removedMount(mp)
 -              self.refreshMountpoints()
 -
        def addedMount(self, mp):
                for x in self.locations:
                        if x[1] == mp:
                                x[2] = True
 -                      elif x[1] == None and os_path.exists(x[0]):
 +                      elif x[1] == None and fileExists(x[0]):
                                x[1] = self.getMountpoint(x[0])
                                x[2] = True
  
                                x[2] = False
  
        def refreshMountpoints(self):
 -              self.mountpoints = [p.mountpoint + "/" for p in harddiskmanager.getMountedPartitions() if p.mountpoint != "/"]
 +              self.mountpoints = [p.mountpoint for p in harddiskmanager.getMountedPartitions() if p.mountpoint != "/"]
                self.mountpoints.sort(key = lambda x: -len(x))
  
        def checkChangedMountpoints(self):