suspend timers when all renders are hidden
[enigma2.git] / lib / python / Components / ConditionalWidget.py
index 7e4304aec7d463eb08c100bc0da3fdd545565a85..391b887196f014bb33c5985f2dcd169487bc0f2c 100644 (file)
@@ -19,9 +19,9 @@ class ConditionalWidget(GUIComponent):
                
        def activateCondition(self, condition):
                if condition:
-                       self.state = self.SHOWN
+                       self.visible = 1
                else:
-                       self.state = self.HIDDEN
+                       self.visible = 0
 
        def update(self):
                if (self.conditionalFunction != None):
@@ -50,10 +50,7 @@ class BlinkingWidget(GUIComponent):
                
        def blink(self):
                if self.blinking == True:
-                       if self.state == self.SHOWN:
-                               self.hide()
-                       elif self.state == self.HIDDEN:
-                               self.show()
+                       self.visible = not self.visible
                        
        def startBlinking(self):
                self.blinking = True
@@ -61,7 +58,7 @@ class BlinkingWidget(GUIComponent):
                
        def stopBlinking(self):
                self.blinking = False
-               if self.state == self.SHOWN:
+               if self.visible:
                        self.hide()
                self.timer.stop()