Merge branch 'obi/master'
[enigma2.git] / lib / python / Screens / TimerSelection.py
1 from Screen import Screen
2 from Components.TimerList import TimerList
3 from Components.ActionMap import ActionMap
4
5 class TimerSelection(Screen):
6         def __init__(self, session, list):
7                 Screen.__init__(self, session)
8                 
9                 self.list = list
10
11                 self["timerlist"] = TimerList(self.list)
12                 
13                 self["actions"] = ActionMap(["OkCancelActions"], 
14                         {
15                                 "ok": self.selected,
16                                 "cancel": self.leave,
17                         }, -1)
18
19                 
20         def leave(self):
21                 self.close(None)
22         
23         def selected(self):
24                 self.close(self["timerlist"].getCurrentIndex())