Merge branch 'master' of git.opendreambox.org:/git/enigma2
[enigma2.git] / lib / python / Screens / Rc.py
index 49ee1d753baec92625a876de5206097110a7901d..27ba1abde55babdf516631698fcbd073e4c16ccd 100644 (file)
@@ -13,6 +13,8 @@ class Rc:
                self["arrowup"] = MovingPixmap()
                self["arrowup2"] = MovingPixmap()
                
+               config.misc.rcused = ConfigInteger(default = 1)
+               
                self.rcheight = 500
                self.rcheighthalf = 250
                
@@ -25,8 +27,7 @@ class Rc:
                self.onShown.append(self.initRc)
 
        def initRc(self):
-               self["rc"].setPixmapNum(config.misc.rcused.value)
-               
+               self["rc"].setPixmapNum(config.misc.rcused.value)               
                                
        def readPositions(self):
                tree = ElementTree(file = resolveFilename(SCOPE_SKIN, "rcpositions.xml"))
@@ -35,19 +36,14 @@ class Rc:
                for rc in rcs:
                        id = int(rc.attrib["id"])
                        self.rcs[id] = {}
-                       print "id:", id
                        for key in rc:
                                name = key.attrib["name"]
                                pos = key.attrib["pos"].split(",")
-                               print "name:", name
-                               print "pos:", pos
                                self.rcs[id][name] = (int(pos[0]), int(pos[1]))
                
        def getSelectPic(self, pos):
                for selectPic in self.selectpics:
                        if pos[1] <= selectPic[0]:
-                               print "pos[1]:", pos[1]
-                               print "selectPic[0]:", selectPic[0]
                                return (selectPic[1], selectPic[2])
                return None
        
@@ -71,9 +67,9 @@ class Rc:
                                        break
                        if selectPic is not None:
                                print "selectPic:", selectPic
-                               self[selectPic].show()
                                self[selectPic].moveTo(rcpos[0] + pos[0] + selectPics[1][0], rcpos[1] + pos[1] + selectPics[1][1], 1)
                                self[selectPic].startMoving()
+                               self[selectPic].show()
                                self.selectedKeys.append(selectPic)
        
        def clearSelectedKeys(self):
@@ -85,4 +81,3 @@ class Rc:
                for selectPic in self.selectpics:
                        for pic in selectPic[1]:
                                self[pic].hide()
-       
\ No newline at end of file