properly use rcused config element
[enigma2.git] / lib / python / Screens / Rc.py
index 39b8b7fb9a8993d4db141642ae0aa4ba1fa7df80..34e0fba959903d61bdfe979b96ca07ceca5f6644 100644 (file)
@@ -3,8 +3,6 @@ from Tools.Directories import resolveFilename, SCOPE_SKIN
 from xml.etree.ElementTree import ElementTree
 from Components.config import config, ConfigInteger
 
-config.misc.rcused = ConfigInteger(default = 1)
-
 class Rc:
        def __init__(self):
                self["rc"] = MultiPixmap()
@@ -13,6 +11,8 @@ class Rc:
                self["arrowup"] = MovingPixmap()
                self["arrowup2"] = MovingPixmap()
                
+               config.misc.rcused = ConfigInteger(default = 1)
+               
                self.rcheight = 500
                self.rcheighthalf = 250
                
@@ -25,8 +25,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"))
@@ -66,9 +65,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):