aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens/FixedMenu.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/python/Screens/FixedMenu.py')
-rw-r--r--lib/python/Screens/FixedMenu.py23
1 files changed, 23 insertions, 0 deletions
diff --git a/lib/python/Screens/FixedMenu.py b/lib/python/Screens/FixedMenu.py
new file mode 100644
index 00000000..d2d08048
--- /dev/null
+++ b/lib/python/Screens/FixedMenu.py
@@ -0,0 +1,23 @@
+from Screen import Screen
+from Menu import MenuList
+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"] = MenuList(list)
+
+ self["actions"] = ActionMap(["OkCancelActions"],
+ {
+ "ok": self.okbuttonClick,
+ "cancel": self.close
+ })
+
+ self["title"] = Header(title)
+