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
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)
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)
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