diff options
| author | acid-burn <acidburn@opendreambox.org> | 2009-10-07 12:08:36 +0200 |
|---|---|---|
| committer | acid-burn <acidburn@opendreambox.org> | 2009-10-07 12:08:36 +0200 |
| commit | 7ac3daaddd1d808a9238391cd14613931900e4f9 (patch) | |
| tree | b91a4f2c1dfbfd197050e6ebfbe9edaa49cfa265 /lib/python/Plugins/SystemPlugins | |
| parent | a50e6cee4c01a0fb96c1446e6f9d39da1e7556c8 (diff) | |
| download | enigma2-7ac3daaddd1d808a9238391cd14613931900e4f9.tar.gz enigma2-7ac3daaddd1d808a9238391cd14613931900e4f9.zip | |
CommonInterfaceAssignment/plugin.py: - rework gui a bit
- move Buttons to top and replace Labels with StaticText
- add some more informations where helpful
- minor bugfixes
Diffstat (limited to 'lib/python/Plugins/SystemPlugins')
| -rwxr-xr-x | lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py | 217 |
1 files changed, 112 insertions, 105 deletions
diff --git a/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py b/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py index 6e444b7b..48669c73 100755 --- a/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py +++ b/lib/python/Plugins/SystemPlugins/CommonInterfaceAssignment/plugin.py @@ -18,29 +18,27 @@ from os import system, path as os_path class CIselectMainMenu(Screen): skin = """ - <screen position="180,150" size="350,270" title="CI assignment" > - <widget name="CiList" position="10,10" size="330,200" scrollbarMode="showOnDemand" /> - <ePixmap position="10,210" size="290,2" pixmap="skin_default/div-h.png" transparent="1" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/red.png" position="10,220" size="140,40" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/green.png" position="160,220" size="140,40" alphatest="on" /> - <widget source="key_red" render="Label" position="10,220" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> - <widget source="key_green" render="Label" position="160,220" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> + <screen name="CIselectMainMenu" position="center,center" size="500,250" title="CI assignment" > + <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" /> + <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" /> + <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> + <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> + <widget name="CiList" position="5,50" size="490,200" scrollbarMode="showOnDemand" /> </screen>""" def __init__(self, session, args = 0): - self.skin = CIselectMainMenu.skin + Screen.__init__(self, session) - self["key_red"] = StaticText(_("Cancel")) - self["key_green"] = StaticText(_("Config")) + self["key_red"] = StaticText(_("Close")) + self["key_green"] = StaticText(_("Edit")) self["actions"] = ActionMap(["ColorActions","SetupActions"], { "green": self.greenPressed, - "red": self.redPressed, - "yellow": self.yellowPressed, + "red": self.close, "ok": self.greenPressed, - "cancel": self.cancel + "cancel": self.close }, -1) NUM_CI=eDVBCIInterfaces.getInstance().getNumOfSlots() @@ -86,52 +84,47 @@ class CIselectMainMenu(Screen): else: self.session.open(easyCIconfigMenu, slot) - def yellowPressed(self): + """def yellowPressed(self): # unused NUM_CI=eDVBCIInterfaces.getInstance().getNumOfSlots() print "[CI_Check] FOUND %d CI Slots " % NUM_CI if NUM_CI > 0: for ci in range(NUM_CI): - print eDVBCIInterfaces.getInstance().getDescrambleRules(ci) -# else: -# print "no ci found" + print eDVBCIInterfaces.getInstance().getDescrambleRules(ci)""" - def redPressed(self): - print "[CI_Config] RED BUTTON not implemented yet - only use self.cancel()" - self.cancel() - - def cancel(self): - self.close() class CIconfigMenu(Screen): skin = """ - <screen position="60,80" size="595,436" title="CI assignment" > - <widget name="CAidList.desc" position="10,10" size="575,22" font="Regular;20" /> - <widget name="CAidList" position="10,40" size="575,45" font="Regular;20" /> - <widget name="ServiceList.desc" position="10,90" size="575,22" font="Regular;20" /> - <widget name="ServiceList" position="10,120" size="575,250" scrollbarMode="showOnDemand" /> - <ePixmap position="10,380" size="575,2" pixmap="skin_default/div-h.png" transparent="1" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/red.png" position="10,390" size="140,40" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/green.png" position="155,390" size="140,40" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/yellow.png" position="300,390" size="140,40" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/blue.png" position="445,390" size="140,40" alphatest="on" /> - <widget source="key_red" render="Label" position="10,390" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> - <widget source="key_green" render="Label" position="155,390" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> - <widget source="key_yellow" render="Label" position="300,390" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> - <widget source="key_blue" render="Label" position="445,390" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> + <screen name="CIconfigMenu" position="center,center" size="560,440" title="CI assignment" > + <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" /> + <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" /> + <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" /> + <ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" size="140,40" alphatest="on" /> + <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> + <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> + <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" /> + <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" /> + <widget source="CAidList_desc" render="Label" position="5,50" size="550,22" font="Regular;20" backgroundColor="#25062748" transparent="1" /> + <widget source="CAidList" render="Label" position="5,80" size="550,45" font="Regular;20" backgroundColor="#25062748" transparent="1" /> + <ePixmap pixmap="skin_default/div-h.png" position="0,125" zPosition="1" size="560,2" /> + <widget source="ServiceList_desc" render="Label" position="5,130" size="550,22" font="Regular;20" backgroundColor="#25062748" transparent="1" /> + <widget name="ServiceList" position="5,160" size="550,250" zPosition="1" scrollbarMode="showOnDemand" /> + <widget source="ServiceList_info" render="Label" position="5,160" size="550,250" zPosition="2" font="Regular;20" backgroundColor="#25062748" transparent="1" /> </screen>""" def __init__(self, session, ci_slot="9"): - self.skin = CIconfigMenu.skin + Screen.__init__(self, session) self.ci_slot=ci_slot self.filename="/etc/enigma2/ci"+str(self.ci_slot)+".xml" - self["key_red"] = StaticText(_("delete")) + self["key_red"] = StaticText(_("Delete")) self["key_green"] = StaticText(_("add Service")) self["key_yellow"] = StaticText(_("add Provider")) self["key_blue"] = StaticText(_("select CAId")) - self["CAidList.desc"] = Label(_("assigned CAIds")) - self["ServiceList.desc"] = Label(_("assigned Services/Provider")) + self["CAidList_desc"] = StaticText(_("assigned CAIds:")) + self["CAidList"] = StaticText() + self["ServiceList_desc"] = StaticText(_("assigned Services/Provider:")) + self["ServiceList_info"] = StaticText() self["actions"] = ActionMap(["ColorActions","SetupActions"], { @@ -139,7 +132,6 @@ class CIconfigMenu(Screen): "red": self.redPressed, "yellow": self.yellowPressed, "blue": self.bluePressed, - "ok": self.okPressed, "cancel": self.cancel }, -1) @@ -153,10 +145,10 @@ class CIconfigMenu(Screen): self.caidlist.append((str(hex(int(caid))),str(caid),i)) print "[CI_Wizzard_Config_CI%d] read following CAIds from CI: %s" %(self.ci_slot, self.caidlist) - self.selectedcaid =[] + + self.selectedcaid = [] self.servicelist = [] - self.caids=_("no CAId selected") - self["CAidList"] = Label(self.caids) + self.caids = "" serviceList = ConfigList(self.servicelist) serviceList.list = self.servicelist @@ -167,6 +159,7 @@ class CIconfigMenu(Screen): # if config mode !=advanced autoselect any caid if config.usage.setup_level.index <= 1: # advanced self.selectedcaid=self.caidlist + self.finishedCAidSelection(self.selectedcaid) self.onShown.append(self.setWindowTitle) def setWindowTitle(self): @@ -184,19 +177,23 @@ class CIconfigMenu(Screen): def bluePressed(self): self.session.openWithCallback(self.finishedCAidSelection, CAidSelect, self.caidlist, self.selectedcaid) - def okPressed(self): - print "[CI_Config_CI%d] OK BUTTON not implemented yet" %self.ci_slot - def cancel(self): self.saveXML() activate_all(self) self.close() + def setServiceListInfo(self): + if len(self.servicelist): + self["ServiceList_info"].setText("") + else: + self["ServiceList_info"].setText(_("no Services/Providers selected")) + def delete(self): cur = self["ServiceList"].getCurrent() if cur and len(cur) > 2: self.servicelist.remove(cur) self["ServiceList"].l.setList(self.servicelist) + self.setServiceListInfo() def finishedChannelSelection(self, *args): if len(args): @@ -208,6 +205,7 @@ class CIconfigMenu(Screen): if split_ref[0] == "1":#== dvb service und nicht muell von None self.servicelist.append( (service_name , ConfigNothing(), 0, service_ref.ref.toString()) ) self["ServiceList"].l.setList(self.servicelist) + self.setServiceListInfo() def finishedProviderSelection(self, *args): if len(args)>1: # bei nix selected kommt nur 1 arg zurueck (==None) @@ -216,16 +214,21 @@ class CIconfigMenu(Screen): if find_in_list(self.servicelist, name, 0)==False: self.servicelist.append( (name , ConfigNothing(), 1, dvbnamespace) ) self["ServiceList"].l.setList(self.servicelist) + self.setServiceListInfo() def finishedCAidSelection(self, *args): if len(args): self.selectedcaid=args[0] self.caids="" - for item in self.selectedcaid: - if len(self.caids): - self.caids+= ", " + item[0] - else: - self.caids=item[0] + if len(self.selectedcaid): + for item in self.selectedcaid: + if len(self.caids): + self.caids+= ", " + item[0] + else: + self.caids=item[0] + else: + self.selectedcaid=[] + self.caids=_("no CAId selected") else: self.selectedcaid=[] self.caids=_("no CAId selected") @@ -269,7 +272,6 @@ class CIconfigMenu(Screen): self.read_providers=[] self.usingcaid=[] self.ci_config=[] -# for ci in tree.findall("ci"): for slot in tree.findall("slot"): read_slot = getValue(slot.findall("id"), False).encode("UTF-8") print "ci " + read_slot @@ -306,52 +308,51 @@ class CIconfigMenu(Screen): print self.ci_config self.finishedCAidSelection(self.selectedcaid) self["ServiceList"].l.setList(self.servicelist) + self.setServiceListInfo() + class easyCIconfigMenu(CIconfigMenu): skin = """ - <screen position="80,80" size="470,420" title="CI assignment" > - <widget name="ServiceList.desc" position="10,10" size="420,22" font="Regular;20" /> - <widget name="ServiceList" position="10,40" size="450,340" scrollbarMode="showOnDemand" /> - <ePixmap position="10,360" size="450,2" pixmap="skin_default/div-h.png" transparent="1" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/red.png" position="10,370" size="140,40" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/green.png" position="160,370" size="140,40" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/yellow.png" position="310,370" size="140,40" alphatest="on" /> - <widget source="key_red" render="Label" position="10,370" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> - <widget source="key_green" render="Label" position="160,370" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> - <widget source="key_yellow" render="Label" position="310,370" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> + <screen name="easyCIconfigMenu" position="center,center" size="560,440" title="CI assignment" > + <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" /> + <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" /> + <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" /> + <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> + <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> + <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" /> + <widget source="ServiceList_desc" render="Label" position="5,50" size="550,22" font="Regular;20" backgroundColor="#25062748" transparent="1" /> + <widget name="ServiceList" position="5,80" size="550,300" zPosition="1" scrollbarMode="showOnDemand" /> + <widget source="ServiceList_info" render="Label" position="5,80" size="550,300" zPosition="2" font="Regular;20" backgroundColor="#25062748" transparent="1" /> </screen>""" def __init__(self, session, ci_slot="9"): + ci=ci_slot CIconfigMenu.__init__(self, session, ci_slot) - self.skin = easyCIconfigMenu.skin self["actions"] = ActionMap(["ColorActions","SetupActions"], { "green": self.greenPressed, "red": self.redPressed, "yellow": self.yellowPressed, - "blue": self.bluePressed, - "ok": self.okPressed, "cancel": self.cancel - }, -1) + }) - def bluePressed(self): - print "do nothing" class CAidSelect(Screen): skin = """ - <screen position="210,140" size="310,290" title="select CAId's" > - <widget name="list" position="10,10" size="290,210" scrollbarMode="showOnDemand" /> - <ePixmap position="10,230" size="290,2" pixmap="skin_default/div-h.png" transparent="1" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/red.png" position="10,240" size="140,40" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/green.png" position="160,240" size="140,40" alphatest="on" /> - <widget source="key_red" render="Label" position="10,240" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> - <widget source="key_green" render="Label" position="160,240" zPosition="1" size="140,40" font="Regular;19" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> + <screen name="CAidSelect" position="center,center" size="450,440" title="select CAId's" > + <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" /> + <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" /> + <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> + <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> + <widget name="list" position="5,50" size="440,330" scrollbarMode="showOnDemand" /> + <ePixmap pixmap="skin_default/div-h.png" position="0,390" zPosition="1" size="450,2" /> + <widget source="introduction" render="Label" position="0,400" size="450,40" zPosition="10" font="Regular;21" halign="center" valign="center" backgroundColor="#25062748" transparent="1" /> </screen>""" def __init__(self, session, list, selected_caids): - self.skin = CAidSelect.skin + Screen.__init__(self, session) self.list = SelectionList() @@ -365,6 +366,7 @@ class CAidSelect(Screen): self["key_red"] = StaticText(_("Cancel")) self["key_green"] = StaticText(_("Save")) + self["introduction"] = StaticText(_("Press OK to select/deselect a CAId.")) self["actions"] = ActionMap(["ColorActions","SetupActions"], { @@ -388,16 +390,15 @@ class CAidSelect(Screen): class myProviderSelection(ChannelSelectionBase): skin = """ - <screen position="80,80" size="560,430" title="Select provider to add..."> + <screen name="myProviderSelection" position="center,center" size="560,440" title="Select provider to add..."> <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" size="140,40" alphatest="on" /> - <widget name="key_red" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> - <widget name="key_green" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> - <widget name="key_yellow" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" /> - <widget name="key_blue" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" /> - <widget name="list" position="00,45" size="560,364" scrollbarMode="showOnDemand" /> + <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> + <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> + <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" /> + <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" /> + <widget name="list" position="5,50" size="550,330" scrollbarMode="showOnDemand" /> + <ePixmap pixmap="skin_default/div-h.png" position="0,390" zPosition="1" size="560,2" /> + <widget source="introduction" render="Label" position="0,400" size="560,40" zPosition="10" font="Regular;21" halign="center" valign="center" backgroundColor="#25062748" transparent="1" /> </screen>""" def __init__(self, session, title): @@ -407,19 +408,20 @@ class myProviderSelection(ChannelSelectionBase): self["actions"] = ActionMap(["OkCancelActions", "ChannelSelectBaseActions"], { "showFavourites": self.doNothing, - "showAllServices": self.doNothing, + "showAllServices": self.cancel, "showProviders": self.doNothing, "showSatellites": self.doNothing, "cancel": self.cancel, - "ok": self.channelSelected, + "ok": self.channelSelected }) - self["key_red"] = StaticText(_("")) - self["key_green"] = StaticText(_("")) - self["key_yellow"] = StaticText(_("")) - self["key_blue"] = StaticText(_("")) + self["key_red"] = StaticText(_("Close")) + self["key_green"] = StaticText() + self["key_yellow"] = StaticText() + self["key_blue"] = StaticText() + self["introduction"] = StaticText(_("Press OK to select a Provider.")) def doNothing(self): - print "nothing to do..." + pass def __onExecCallback(self): self.showSatellites() @@ -492,16 +494,17 @@ class myProviderSelection(ChannelSelectionBase): class myChannelSelection(ChannelSelectionBase): skin = """ - <screen position="80,80" size="560,430" title="Select service to add..."> + <screen name="myChannelSelection" position="center,center" size="560,440" title="Select service to add..."> <ePixmap pixmap="skin_default/buttons/red.png" position="0,0" size="140,40" alphatest="on" /> <ePixmap pixmap="skin_default/buttons/green.png" position="140,0" size="140,40" alphatest="on" /> - <ePixmap pixmap="skin_default/buttons/yellow.png" position="280,0" size="140,40" alphatest="on" /> <ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" size="140,40" alphatest="on" /> - <widget name="key_red" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> - <widget name="key_green" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> - <widget name="key_yellow" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" /> - <widget name="key_blue" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" /> - <widget name="list" position="00,45" size="560,364" scrollbarMode="showOnDemand" /> + <widget source="key_red" render="Label" position="0,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" /> + <widget source="key_green" render="Label" position="140,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" /> + <widget source="key_yellow" render="Label" position="280,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#a08500" transparent="1" /> + <widget source="key_blue" render="Label" position="420,0" zPosition="1" size="140,40" font="Regular;20" halign="center" valign="center" backgroundColor="#18188b" transparent="1" /> + <widget name="list" position="5,50" size="550,330" scrollbarMode="showOnDemand" /> + <ePixmap pixmap="skin_default/div-h.png" position="0,390" zPosition="1" size="560,2" /> + <widget source="introduction" render="Label" position="0,400" size="560,40" zPosition="10" font="Regular;21" halign="center" valign="center" backgroundColor="#25062748" transparent="1" /> </screen>""" def __init__(self, session, title): @@ -517,22 +520,26 @@ class myChannelSelection(ChannelSelectionBase): self["actions"] = ActionMap(["OkCancelActions", "TvRadioActions", "ChannelSelectBaseActions"], { "showProviders": self.doNothing, - "showSatellites": self.doNothing, + "showSatellites": self.showAllServices, + "showAllServices": self.cancel, "cancel": self.cancel, "ok": self.channelSelected, "keyRadio": self.setModeRadio, "keyTV": self.setModeTv }) - self["key_green"] = StaticText(_("")) - self["key_yellow"] = StaticText(_("")) + self["key_red"] = StaticText(_("Close")) + self["key_green"] = StaticText(_("All")) + self["key_yellow"] = StaticText() + self["key_blue"] = StaticText(_("Favourites")) + self["introduction"] = StaticText(_("Press OK to select a Provider.")) def __onExecCallback(self): self.setModeTv() self.setTitle(_("Select service to add...")) def doNothing(self): - print "nothing to do..." + pass def channelSelected(self): # just return selected service ref = self.getCurrentSelection() |
