blob: 0122346b05da8803021424fc6fcc94e7f7297134 (
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.Sources.StaticText import StaticText
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"] = StaticText(title)
|