add possibility to select between different list styles via context menu
[enigma2.git] / lib / python / Components / Converter / EventTime.py
index 955fdbc..966f2ca 100644 (file)
@@ -28,7 +28,7 @@ class EventTime(Poll, Converter, object):
                        self.poll_interval = 30*1000
                        self.poll_enabled = True
                else:
-                       raise str("'%s' is not <StartTime|EndTime|Remaining|Duration> for EventTime converter" % type)
+                       raise str("'%s' is not <StartTime|EndTime|Remaining|Duration|Progress> for EventTime converter" % type)
 
        @cached
        def getTime(self):
@@ -73,3 +73,11 @@ class EventTime(Poll, Converter, object):
        time = property(getTime)
        value = property(getValue)
        range = 1000
+
+       def changed(self, what):
+               Converter.changed(self, what)
+               if self.type == self.PROGRESS and len(self.downstream_elements):
+                       if not self.source.event and self.downstream_elements[0].visible:
+                               self.downstream_elements[0].visible = False
+                       elif self.source.event and not self.downstream_elements[0].visible:
+                               self.downstream_elements[0].visible = True