add possibility to select between different list styles via context menu
[enigma2.git] / lib / python / Components / Converter / Poll.py
index 3ba5e87..060c12e 100644 (file)
@@ -3,7 +3,7 @@ from enigma import eTimer
 class Poll(object):
        def __init__(self):
                self.__poll_timer = eTimer()
-               self.__poll_timer.timeout.get().append(self.changed)
+               self.__poll_timer.timeout.get().append(self.poll)
                self.__interval = 1000
                self.__enabled = False
 
@@ -20,3 +20,12 @@ class Poll(object):
 
        poll_interval = property(lambda self: self.__interval, __setInterval)
        poll_enabled = property(lambda self: self.__enabled, __setEnable)
+
+       def poll(self):
+               self.changed((self.CHANGED_POLL,))
+
+       def doSuspend(self, suspended):
+               self.enabled = not suspended
+               if not suspended:
+                       self.poll()
+