show bskyb HD services in channelselection
[enigma2.git] / lib / python / Screens / Dish.py
index 1f5c391c04438d77bb63179427c0c681188d23dd..da759b5e2115e212241ba6363a184fd5179ca13b 100644 (file)
@@ -2,16 +2,27 @@ from Screen import Screen
 
 from Components.BlinkingPixmap import BlinkingPixmapConditional
 from Components.Pixmap import Pixmap
-from Components.Button import Button
+from Components.config import config
 
-from enigma import *
+from enigma import eDVBSatelliteEquipmentControl
 
 class Dish(Screen):
        def __init__(self, session):
                Screen.__init__(self, session)
-               
-               self["transparent"] = Button("")
                self["Dishpixmap"] = BlinkingPixmapConditional()
+               self["Dishpixmap"].onVisibilityChange.append(self.DishpixmapVisibilityChanged)
                #self["Dishpixmap"] = Pixmap()
-               self["Dishpixmap"].setConnect(lambda: False)
-               #self["Dishpixmap"].setConnect(eDVBSatelliteEquipmentControl.getInstance().isRotorMoving)
+               config.usage.showdish.addNotifier(self.configChanged)
+               self.configChanged(config.usage.showdish)
+
+       def configChanged(self, configElement):
+               if not configElement.value:
+                       self["Dishpixmap"].setConnect(lambda: False)
+               else:
+                       self["Dishpixmap"].setConnect(eDVBSatelliteEquipmentControl.getInstance().isRotorMoving)
+
+       def DishpixmapVisibilityChanged(self, state):
+               if state:
+                       self.show() # show complete screen
+               else:
+                       self.hide() # hide complete screen