From: Felix Domke Date: Thu, 29 Sep 2005 22:10:55 +0000 (+0000) Subject: add FixedMenu X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=commitdiff_plain;h=3bb123519259a57b81ee84e2632e1ef0e2137399 add FixedMenu --- diff --git a/lib/python/Screens/FixedMenu.py b/lib/python/Screens/FixedMenu.py new file mode 100644 index 0000000..d2d0804 --- /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) + diff --git a/lib/python/Screens/Makefile.am b/lib/python/Screens/Makefile.am index 6ebec27..77f35ef 100644 --- a/lib/python/Screens/Makefile.am +++ b/lib/python/Screens/Makefile.am @@ -3,5 +3,5 @@ installdir = $(LIBDIR)/enigma2/python/Screens install_DATA = \ ChannelSelection.py ClockDisplay.py ConfigMenu.py InfoBar.py Menu.py \ MessageBox.py ScartLoopThrough.py Screen.py ServiceScan.py TimerEdit.py \ - MovieSelection.py Setup.py About.py HarddiskSetup.py Satconfig.py \ - __init__.py + MovieSelection.py Setup.py About.py HarddiskSetup.py FixedMenu.py \ + Satconfig.py __init__.py diff --git a/lib/python/Screens/__init__.py b/lib/python/Screens/__init__.py index 4dc5faf..82a4856 100644 --- a/lib/python/Screens/__init__.py +++ b/lib/python/Screens/__init__.py @@ -1,4 +1,5 @@ __all__ = ["ChannelSelection", "ClockDisplay", "ConfigMenu", "InfoBar", "MessageBox", "Menu", "MovieSelection", "ScartLoopThrough", "Screen", "ServiceScan", "About", - "TimerEdit", "Setup", "HarddiskSetup", "Satconfig"] + "TimerEdit", "Setup", "HarddiskSetup", "FixedMenu", + "Satconfig" ]