aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/FixedMenu.py
blob: 96b2b5bd5159c1ea890f2604b0a3af288c489cea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
from Screen import Screen
from Components.Sources.List import List
from Components.ActionMap import ActionMap
from Components.Header import Header

class FixedMenu(Screen):
	def okbuttonClick(self):
		selection = self["menu"].getCurrent()
		selection[1]()

	def __init__(self, session, title, list):
		Screen.__init__(self, session)

		self["menu"] = List(list)	

		self["actions"] = ActionMap(["OkCancelActions"], 
			{
				"ok": self.okbuttonClick,
				"cancel": self.close
			})

		self["title"] = Header(title)