diff options
| author | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-10-12 12:30:20 +0000 |
|---|---|---|
| committer | Andreas Monzner <andreas.monzner@multimedia-labs.de> | 2007-10-12 12:30:20 +0000 |
| commit | 071b99f578486ea21e3323e6f7190693f11fc35a (patch) | |
| tree | 01b3bb2cccfb4982285a8dbc2da4f918eb88085e | |
| parent | e0ff0dd4a45a16cbb4f6e32e3566074eeb5acab6 (diff) | |
| download | enigma2-071b99f578486ea21e3323e6f7190693f11fc35a.tar.gz enigma2-071b99f578486ea21e3323e6f7190693f11fc35a.zip | |
initial hide conditional widgets
| -rw-r--r-- | lib/python/Components/ConditionalWidget.py | 10 | ||||
| -rw-r--r-- | lib/python/Screens/Dish.py | 8 |
2 files changed, 12 insertions, 6 deletions
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 |
