immediate take care of changed "visualize rotor movement" option
[enigma2.git] / lib / python / Screens / Dish.py
index c8e9b6c74ee456ccb8e5b55b5524ef015b7690cc..e05b2a8896d627987becbd1ebb49710dd2630375 100644 (file)
@@ -3,9 +3,9 @@ from Screen import Screen
 from Components.BlinkingPixmap import BlinkingPixmapConditional
 from Components.Pixmap import Pixmap
 from Components.Button import Button
 from Components.BlinkingPixmap import BlinkingPixmapConditional
 from Components.Pixmap import Pixmap
 from Components.Button import Button
-from Components.config import config, currentConfigSelectionElement
+from Components.config import config
 
 
-from enigma import *
+from enigma import eDVBSatelliteEquipmentControl
 
 class Dish(Screen):
        def __init__(self, session):
 
 class Dish(Screen):
        def __init__(self, session):
@@ -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 currentConfigSelectionElement(config.usage.showdish) == "no":
+               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)