From: Andreas Monzner Date: Fri, 12 Oct 2007 12:30:20 +0000 (+0000) Subject: initial hide conditional widgets X-Git-Tag: 2.6.0~1821 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/071b99f578486ea21e3323e6f7190693f11fc35a initial hide conditional widgets --- diff --git a/lib/python/Components/ConditionalWidget.py b/lib/python/Components/ConditionalWidget.py index c1baceb2..f4b99837 100644 --- a/lib/python/Components/ConditionalWidget.py +++ b/lib/python/Components/ConditionalWidget.py @@ -11,7 +11,10 @@ class ConditionalWidget(GUIComponent): self.conditionCheckTimer = eTimer() self.conditionCheckTimer.timeout.get().append(self.update) self.conditionCheckTimer.start(1000) - + + def postWidgetCreate(self, instance): + self.visible = 0 + def setConnect(self, conditionalFunction): self.conditionalFunction = conditionalFunction @@ -32,11 +35,8 @@ class ConditionalWidget(GUIComponent): class BlinkingWidget(GUIComponent): def __init__(self): GUIComponent.__init__(self) - - self.blinking = True - + self.blinking = False self.setBlinkTime(500) - self.timer = eTimer() self.timer.timeout.get().append(self.blink) diff --git a/lib/python/Screens/Dish.py b/lib/python/Screens/Dish.py index e05b2a88..88be3778 100644 --- a/lib/python/Screens/Dish.py +++ b/lib/python/Screens/Dish.py @@ -10,9 +10,9 @@ 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() config.usage.showdish.addNotifier(self.configChanged) self.configChanged(config.usage.showdish) @@ -22,3 +22,9 @@ class Dish(Screen): 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