immediate take care of changed "visualize rotor movement" option
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sat, 4 Aug 2007 11:42:54 +0000 (11:42 +0000)
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>
Sat, 4 Aug 2007 11:42:54 +0000 (11:42 +0000)
lib/python/Screens/Dish.py

index a34f0c5..e05b2a8 100644 (file)
@@ -14,7 +14,11 @@ class Dish(Screen):
                self["transparent"] = Button("")
                self["Dishpixmap"] = BlinkingPixmapConditional()
                #self["Dishpixmap"] = Pixmap()
                self["transparent"] = Button("")
                self["Dishpixmap"] = BlinkingPixmapConditional()
                #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)
                        self["Dishpixmap"].setConnect(lambda: False)
                else:
                        self["Dishpixmap"].setConnect(eDVBSatelliteEquipmentControl.getInstance().isRotorMoving)