fix non working rotor turning pixmap
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 12 Oct 2007 12:40:40 +0000 (12:40 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Fri, 12 Oct 2007 12:40:40 +0000 (12:40 +0000)
data/skin_default.xml
lib/python/Components/GUIComponent.py

index 18db44d..f80e637 100644 (file)
@@ -159,7 +159,7 @@ self.instance.move(ePoint((720-wsizex)/2, (576-wsizey)/(count &gt; 7 and 2 or 3)
                <widget name="config" position="10,30" size="420,220" />
        </screen>
        <!-- Dish -->
                <widget name="config" position="10,30" size="420,220" />
        </screen>
        <!-- Dish -->
-       <screen name="Dish" flags="wfNoBorder" position="300,100" size="130,160" title="Dish" zPosition="-2" backgroundColor="transparent" >
+       <screen name="Dish" flags="wfNoBorder" position="300,100" size="130,160" title="Dish" zPosition="-1" backgroundColor="transparent" >
                <widget name="Dishpixmap" pixmap="skin_default/dish.png" position="0,0" size="130,160" alphatest="off" />
        </screen>
        <!-- EPG Selection - Single -->
                <widget name="Dishpixmap" pixmap="skin_default/dish.png" position="0,0" size="130,160" alphatest="off" />
        </screen>
        <!-- EPG Selection - Single -->
index c900796..deb8b34 100644 (file)
@@ -7,6 +7,8 @@ class GUIComponent(object):
        
        def __init__(self):
                self.instance = None
        
        def __init__(self):
                self.instance = None
+               self.onVisibilityChange = [ ]
+               self.__visible = 0
                self.visible = 1
                self.skinAttributes = None
        
                self.visible = 1
                self.skinAttributes = None
        
@@ -50,14 +52,22 @@ class GUIComponent(object):
                self.instance.setZPosition(z)
 
        def show(self):
                self.instance.setZPosition(z)
 
        def show(self):
+               old = self.__visible
                self.__visible = 1
                if self.instance is not None:
                        self.instance.show()
                self.__visible = 1
                if self.instance is not None:
                        self.instance.show()
+               if old != self.__visible:
+                       for fnc in self.onVisibilityChange:
+                               fnc(True)
 
        def hide(self):
 
        def hide(self):
+               old = self.__visible
                self.__visible = 0
                if self.instance is not None:
                        self.instance.hide()
                self.__visible = 0
                if self.instance is not None:
                        self.instance.hide()
+               if old != self.__visible:
+                       for fnc in self.onVisibilityChange:
+                               fnc(False)
 
        def getVisible(self):
                return self.__visible
 
        def getVisible(self):
                return self.__visible