aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/TimerSelection.py
blob: a97c7ba3d259abba5881c26925cba60250fbabb3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
from Screen import Screen
from Components.TimerList import TimerList
from Components.ActionMap import ActionMap

class TimerSelection(Screen):
	def __init__(self, session, list):
		Screen.__init__(self, session)
		
		self.list = list

		self["timerlist"] = TimerList(self.list)
		
		self["actions"] = ActionMap(["OkCancelActions"], 
			{
				"ok": self.selected,
				"cancel": self.leave,
			}, -1)

		
	def leave(self):
		self.close(None)
	
	def selected(self):
		self.close(self["timerlist"].getCurrentIndex())