From 4cb23507b16682ceeb4ad31a7de837ef2f4326f3 Mon Sep 17 00:00:00 2001 From: Ronny Strutz Date: Sat, 15 Oct 2005 12:39:08 +0000 Subject: [PATCH 1/1] add ci --- lib/python/Screens/Ci.py | 50 ++++++++++++++++++++++++++++++++++++++++++ lib/python/Screens/Makefile.am | 2 +- lib/python/Screens/__init__.py | 2 +- 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 lib/python/Screens/Ci.py diff --git a/lib/python/Screens/Ci.py b/lib/python/Screens/Ci.py new file mode 100644 index 0000000..79e06b3 --- /dev/null +++ b/lib/python/Screens/Ci.py @@ -0,0 +1,50 @@ +from Screen import * +from Components.MenuList import MenuList +from Components.ActionMap import ActionMap +from Components.Header import Header +from Components.Button import Button +from Components.Label import Label + +class CiMmi(Screen): + def addEntry(self, list, entry): + if entry[0] == "TEXT": #handle every item (text / pin only?) + pass + pass + + def __init__(self, session, slotid, title, subtitle, bottom, entries): + Screen.__init__(self, session) + + self.slotid = slotid + self["title"] = Label(title) + self["subtitle"] = Label(subtitle) + self["bottom"] = Label(bottom) + + list = [ ] + for entry in entries: + self.addEntry(list, entry) + self["entries"] = MenuList(list) #menulist!? + + self["actions"] = ActionMap(["OkCancelActions"], + { + #"ok": self.okbuttonClick, + "cancel": self.close + }) + +#just for testing - we need an cimanager? (or not?) +class CiSelection(Screen): + def okbuttonClick(self): + #generate menu / list + list = [ ] + list.append( ("TEXT", "CA-Info") ) + list.append( ("TEXT", "Card Status") ) + #list.append( ("PIN", "Card Pin") ) + self.session.open(CiMmi, 0, "Wichtiges CI", "Mainmenu", "Footer", list) + + def __init__(self, session): + Screen.__init__(self, session) + + self["actions"] = ActionMap(["OkCancelActions"], + { + "ok": self.okbuttonClick, + "cancel": self.close + }) diff --git a/lib/python/Screens/Makefile.am b/lib/python/Screens/Makefile.am index 462c794..14c397c 100644 --- a/lib/python/Screens/Makefile.am +++ b/lib/python/Screens/Makefile.am @@ -4,4 +4,4 @@ install_PYTHON = \ 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 FixedMenu.py \ - Satconfig.py ScanSetup.py NetworkSetup.py __init__.py + Satconfig.py ScanSetup.py NetworkSetup.py Ci.py __init__.py diff --git a/lib/python/Screens/__init__.py b/lib/python/Screens/__init__.py index d350f1a..f082754 100644 --- a/lib/python/Screens/__init__.py +++ b/lib/python/Screens/__init__.py @@ -2,4 +2,4 @@ __all__ = ["ChannelSelection", "ClockDisplay", "ConfigMenu", "InfoBar", "MessageBox", "Menu", "MovieSelection", "ScartLoopThrough", "Screen", "ServiceScan", "About", "TimerEdit", "Setup", "HarddiskSetup", "FixedMenu", - "Satconfig", "Scanconfig" ] + "Satconfig", "Scanconfig", "Ci.py" ] -- 2.7.4