cleanup the timerlist by pressing blue in the timer list
[enigma2.git] / timer.py
index 7123a84a66c3b38adc65749f9c813976e16e1ed6..5500c34ad4c84e0633bf682780973f9584afd558 100644 (file)
--- a/timer.py
+++ b/timer.py
@@ -53,6 +53,9 @@ class TimerEntry:
                                print time.strftime("%c", time.localtime(self.end))
                                self.begin += 86400
                                self.end += 86400
+                       
+                       self.timeChanged()
+                       
 
        def __lt__(self, o):
                return self.getNextActivation() < o.getNextActivation()
@@ -102,9 +105,14 @@ class Timer:
                self.lastActivation = time.time()
                
                self.calcNextActivation()
+               self.on_state_change = [ ]
        
        def stateChanged(self, entry):
-               pass
+               for f in self.on_state_change:
+                       f(entry)
+                       
+       def cleanup(self):
+               self.processed_timers = []
        
        def addTimerEntry(self, entry, noRecalc=0):
                entry.processRepeated()