fix inverted setting (meaning was inverted too)
[enigma2.git] / lib / python / Components / ConditionalWidget.py
index 8d4af30a397147a84579dba6209c909ec9d8e223..b77d8658b1149f320f4d67fc7833ce5b7dc71ee3 100644 (file)
@@ -30,6 +30,9 @@ class Widget(GUIComponent):
        def hideWidget(self):
                self.state = self.HIDDEN
                self.instance.hide()
+               
+       def move(self, x, y):
+               self.instance.move(ePoint(int(x), int(y)))
        
 class ConditionalWidget(Widget):
        def __init__(self, withTimer = True):
@@ -40,7 +43,7 @@ class ConditionalWidget(Widget):
                if (withTimer):
                        self.conditionCheckTimer = eTimer()
                        self.conditionCheckTimer.timeout.get().append(self.update)
-                       self.conditionCheckTimer.start(500)
+                       self.conditionCheckTimer.start(1000)
                
        def setConnect(self, conditionalFunction):
                self.conditionalFunction = conditionalFunction
@@ -57,14 +60,11 @@ class ConditionalWidget(Widget):
                if (self.conditionalFunction != None):
                        try:
                                self.conditionalFunction() # check, if the conditionalfunction is still valid
+                               self.activateCondition(self.conditionalFunction())
                        except:
                                self.conditionalFunction = None
                                self.activateCondition(False)
                        
-                       self.activateCondition(self.conditionalFunction())
-
-                       
-                       
 import time
 
 class BlinkingWidget(Widget):