X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2FScreens%2FDish.py;h=da759b5e2115e212241ba6363a184fd5179ca13b;hb=72bc8cf59d2f2192bcf1491758169a77b106190a;hp=bcc35807fdb522a0055a0cc2f9279fda6350a642;hpb=6eeefece35e4269e02fdb7abab4f79d8e7b8f98b;p=vuplus_dvbapp diff --git a/lib/python/Screens/Dish.py b/lib/python/Screens/Dish.py index bcc3580..da759b5 100644 --- a/lib/python/Screens/Dish.py +++ b/lib/python/Screens/Dish.py @@ -2,19 +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() - if not config.usage.showdish.value: + 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