def checkQuickSel(self, path): list = None button = os.path.basename(path)[12:-4] try: menu = xml.dom.minidom.parse(path) db = QuickButtonXML(menu) list = db.getSelection() except Exception, e: self.session.open(MessageBox,("XML " + _("Error") + ": %s" % (e)), MessageBox.TYPE_ERROR) print "[MultiQuickbutton] ERROR: ",e
def createList(self): self.a = None for button in values: if config.plugins.QuickButton.info.value: try: functionbutton = " [" path = "/etc/MultiQuickButton/quickbutton_" + button + ".xml" menu = xml.dom.minidom.parse(path) self.XML_db = QuickButtonXML(menu) for a in self.XML_db.getMenu(): if a[1] == "1": if functionbutton == " [": functionbutton = _(a[0]) else: functionbutton = functionbutton + " | " + _(a[0]) if functionbutton == " [": space1 = " " space2 = " " functionbutton = " " else: space1 = " [" space2 = "]" globals()['functionbutton_%s' % button] = space1 + functionbutton + space2 except Exception, a: self.a = a else: globals()['functionbutton_%s' % button] = " "
def __init__(self, session, path=None, title=""): Screen.__init__(self, session) self.session = session self.path = path self.newtitle = title self.changed = False self.e = None list = [] try: menu = xml.dom.minidom.parse(self.path) self.XML_db = QuickButtonXML(menu) for e in self.XML_db.getMenu(): if e[1] == "1": list.append(QuickButtonListEntry('green', (e[0], '1'))) else: list.append(QuickButtonListEntry('red', (e[0], ''))) except Exception, e: self.e = e list = []
def __init__(self, session, path=None, title = "" ): Screen.__init__(self, session) self.session = session self.path = path self.newtitle = title self.changed = False self.e = None list = [] try: menu = xml.dom.minidom.parse(self.path) self.XML_db = QuickButtonXML(menu) for e in self.XML_db.getMenu(): if e[1] == "1": list.append(QuickButtonListEntry('green',(e[0], '1'))) else: list.append(QuickButtonListEntry('red',(e[0], ''))) except Exception, e: self.e = e list = []
class MultiQuickButton(Screen): global HD_Res try: sz_w = getDesktop(0).size().width() except: sz_w = 720 if sz_w == 1280: HD_Res = True else: HD_Res = False if HD_Res: skin = """ <screen position="240,100" size="800,520" title="MultiQuickButton Panel %s" > <widget name="list" position="10,10" size="780,410" scrollbarMode="showOnDemand" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_red.png" zPosition="2" position="20,450" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_green.png" zPosition="2" position="210,450" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_yellow.png" zPosition="2" position="420,450" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_blue.png" zPosition="2" position="610,450" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_0.png" zPosition="2" position="15,490" size="35,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_1.png" zPosition="2" position="205,490" size="35,25" alphatest="on" /> <widget name="key_red" backgroundColor="#1f771f" zPosition="2" position="50,445" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_green" backgroundColor="#1f771f" position="240,445" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_yellow" backgroundColor="#1f771f" position="450,445" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_blue" backgroundColor="#1f771f" position="640,445" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_0" backgroundColor="#1f771f" zPosition="2" position="50,484" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_1" backgroundColor="#1f771f" position="240,484" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_2" backgroundColor="#1f771f" position="450,484" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_3" backgroundColor="#1f771f" position="640,484" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="background" backgroundColor="#220a0a0a" zPosition="1" position="0,450" size="800,80" font="Regular;20" halign="left" valign="center" /> </screen>""" % (MultiQuickButton_version) else: skin = """ <screen position="50,190" size="620,320" title="MultiQuickButton Panel %s" > <widget name="list" position="10,10" size="600,210" scrollbarMode="showOnDemand" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_red.png" zPosition="2" position="10,250" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_green.png" zPosition="2" position="160,250" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_yellow.png" zPosition="2" position="330,250" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_blue.png" zPosition="2" position="490,250" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_0.png" zPosition="2" position="6,290" size="35,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_1.png" zPosition="2" position="156,290" size="35,25" alphatest="on" /> <widget name="key_red" backgroundColor="#1f771f" zPosition="2" position="35,245" size="250,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_green" backgroundColor="#1f771f" position="185,245" zPosition="2" size="250,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_yellow" backgroundColor="#1f771f" position="355,245" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_blue" backgroundColor="#1f771f" position="515,245" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_0" backgroundColor="#1f771f" position="35,285" zPosition="2" size="250,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_1" backgroundColor="#1f771f" position="185,285" zPosition="2" size="250,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_2" backgroundColor="#1f771f" position="355,285" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_3" backgroundColor="#1f771f" position="515,285" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="background" backgroundColor="#220a0a0a" zPosition="1" position="0,320" size="620,80" font="Regular;20" halign="left" valign="center" /> </screen>""" % (MultiQuickButton_version) def __init__(self, session, args=None): Screen.__init__(self, session) self.session = session self.menu = args self.settigspath = "" self["background"] = Label('') self["key_red"] = Label(autostart) self["key_green"] = Label(menuentry) self["key_yellow"] = Label(_("Restore")) self["key_blue"] = Label(_("Backup")) self["key_0"] = Label(info) self["key_1"] = Label(okexit) self["key_2"] = Label("") self["key_3"] = Label("") self.createList() self["list"] = QuickButtonList(list=self.list, selection = 0) self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "NumberActions", "EPGSelectActions"], { "ok": self.run, "cancel": self.close, "red": self.autostart, "green": self.setMainMenu, "yellow": self.restore, "blue": self.backup, "0": self.setInfo, "1": self.toggleOkExit, "info": self.showAbout, }, -1) self.onShown.append(self.updateSettings) def createList(self): self.a = None for button in values: if config.plugins.QuickButton.info.value: try: functionbutton = " [" path = "/etc/MultiQuickButton/quickbutton_" + button + ".xml" menu = xml.dom.minidom.parse(path) self.XML_db = QuickButtonXML(menu) for a in self.XML_db.getMenu(): if a[1] == "1": if functionbutton == " [": functionbutton = _(a[0]) else: functionbutton = functionbutton + " | " + _(a[0]) if functionbutton == " [": space1 = " " space2 = " " functionbutton = " " else: space1 = " [" space2 = "]" globals()['functionbutton_%s' % button] = space1 + functionbutton + space2 except Exception, a: self.a = a else: globals()['functionbutton_%s' % button] = " " self.list = [] self.list.append(QuickButtonListEntry('',(_('red') + functionbutton_red, 'red'))) self.list.append(QuickButtonListEntry('',((_('red') + _(' long')) + functionbutton_red_long, 'red_long'))) self.list.append(QuickButtonListEntry('',(_('green') + functionbutton_green, 'green'))) self.list.append(QuickButtonListEntry('',((_('green') + _(' long')) + functionbutton_green_long, 'green_long'))) self.list.append(QuickButtonListEntry('',(_('yellow') + functionbutton_yellow, 'yellow'))) self.list.append(QuickButtonListEntry('',((_('yellow') + _(' long')) + functionbutton_yellow_long, 'yellow_long'))) self.list.append(QuickButtonListEntry('',(_('blue') + functionbutton_blue, 'blue'))) self.list.append(QuickButtonListEntry('',((_('blue') + _(' long')) + functionbutton_blue_long, 'blue_long'))) self.list.append(QuickButtonListEntry('',(_('TEXT') + functionbutton_text, 'text'))) self.list.append(QuickButtonListEntry('',((_('TEXT') + _(' long')) + functionbutton_text_long, 'text_long'))) self.list.append(QuickButtonListEntry('',((_('HELP') + _(' long')) + functionbutton_help_long, 'help_long'))) self.list.append(QuickButtonListEntry('',(_('VU+ EPG / INFO') + functionbutton_info, 'info'))) self.list.append(QuickButtonListEntry('',((_('VU+ EPG / INFO') + _(' long')) + functionbutton_info_long, 'info_long'))) self.list.append(QuickButtonListEntry('',(_('HOME') + functionbutton_home, 'home'))) self.list.append(QuickButtonListEntry('',((_('HOME') + _(' long')) + functionbutton_home_long, 'home_long'))) self.list.append(QuickButtonListEntry('',(_('END') + functionbutton_end, 'end'))) self.list.append(QuickButtonListEntry('',((_('END') + _(' long')) + functionbutton_end_long, 'end_long'))) self.list.append(QuickButtonListEntry('',(_('Subtitle') + functionbutton_subtitle, 'subtitle'))) self.list.append(QuickButtonListEntry('',(_('VU+ R-Button') + functionbutton_pvr, 'pvr'))) self.list.append(QuickButtonListEntry('',((_('VU+ R-Button') + _(' long')) + functionbutton_pvr_long, 'pvr_long'))) self.list.append(QuickButtonListEntry('',(_('RADIO') + functionbutton_radio, 'radio'))) self.list.append(QuickButtonListEntry('',((_('RADIO') + _(' long')) + functionbutton_radio_long, 'radio_long'))) self.list.append(QuickButtonListEntry('',(_('TV') + functionbutton_tv, 'tv'))) self.list.append(QuickButtonListEntry('',(_('Cross Up') + functionbutton_cross_up, 'cross_up'))) self.list.append(QuickButtonListEntry('',(_('Cross Down') + functionbutton_cross_down, 'cross_down'))) self.list.append(QuickButtonListEntry('',(_('Cross Left') + functionbutton_cross_left, 'cross_left'))) self.list.append(QuickButtonListEntry('',(_('Cross Right') + functionbutton_cross_right, 'cross_right'))) self.list.append(QuickButtonListEntry('',(_('Channel +') + functionbutton_channelup, 'channelup'))) self.list.append(QuickButtonListEntry('',(_('Channel -') + functionbutton_channeldown, 'channeldown'))) self.list.append(QuickButtonListEntry('',(_('Forward >') + functionbutton_next, 'next'))) self.list.append(QuickButtonListEntry('',(_('Backward <') + functionbutton_previous, 'previous'))) self.list.append(QuickButtonListEntry('',(_('Volume +') + functionbutton_mqb_volup, 'mqb_volup'))) self.list.append(QuickButtonListEntry('',(_('Volume -') + functionbutton_mqb_voldown, 'mqb_voldown'))) self.list.append(QuickButtonListEntry('',(_('Mute') + functionbutton_mqb_mute, 'mqb_mute'))) self.list.append(QuickButtonListEntry('',(_('Power') + functionbutton_mqb_power, 'mqb_power'))) self.list.append(QuickButtonListEntry('',((_('Power') + _(' long')) + functionbutton_mqb_power_long, 'mqb_power_long'))) self.list.append(QuickButtonListEntry('',(_('Audio') + functionbutton_audio, 'audio'))) if config.plugins.QuickButton.okexitstate.value: self.list.append(QuickButtonListEntry('',('OK' + functionbutton_ok, 'ok'))) self.list.append(QuickButtonListEntry('',(_('EXIT') + functionbutton_exit, 'exit'))) self.list.append(QuickButtonListEntry('',(_('Play') + functionbutton_play, 'play'))) self.list.append(QuickButtonListEntry('',(_('Pause') + functionbutton_pause, 'pause'))) self.list.append(QuickButtonListEntry('',(_('Stop') + functionbutton_stop, 'stop'))) self.list.append(QuickButtonListEntry('',(_('Rewind <<') + functionbutton_rewind, 'rewind'))) self.list.append(QuickButtonListEntry('',(_('FastForward >>') + functionbutton_fastforward, 'fastforward')))
class QuickButton(Screen): global HD_Res try: sz_w = getDesktop(0).size().width() except: sz_w = 720 if sz_w == 1280: HD_Res = True else: HD_Res = False if HD_Res: skin = """ <screen position="240,100" size="800,520" title="QuickButton" > <widget name="list" position="10,10" size="780,450" scrollbarMode="showOnDemand" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_red.png" zPosition="2" position="15,487" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_green.png" zPosition="2" position="205,487" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_yellow.png" zPosition="2" position="395,487" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_blue.png" zPosition="2" position="585,487" size="25,25" alphatest="on" /> <widget name="key_red" backgroundColor="#1f771f" zPosition="2" position="50,480" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_green" backgroundColor="#1f771f" position="240,480" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_yellow" backgroundColor="#1f771f" position="430,480" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_blue" backgroundColor="#1f771f" position="620,480" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="background" backgroundColor="#220a0a0a" zPosition="1" position="0,480" size="800,40" font="Regular;20" halign="left" valign="center" /> </screen>""" else: skin = """ <screen position="60,90" size="600,420" title="QuickButton" > <widget name="list" position="10,10" size="580,350" scrollbarMode="showOnDemand" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_red.png" zPosition="2" position="15,387" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_green.png" zPosition="2" position="155,387" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_yellow.png" zPosition="2" position="295,387" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_blue.png" zPosition="2" position="435,387" size="25,25" alphatest="on" /> <widget name="key_red" backgroundColor="#1f771f" zPosition="2" position="40,380" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_green" backgroundColor="#1f771f" position="180,380" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_yellow" backgroundColor="#1f771f" position="320,380" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_blue" backgroundColor="#1f771f" position="460,380" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="background" backgroundColor="#220a0a0a" zPosition="1" position="0,380" size="600,40" font="Regular;20" halign="left" valign="center" /> </screen>""" def __init__(self, session, path=None, title = "" ): Screen.__init__(self, session) self.session = session self.path = path self.newtitle = title self.changed = False self.e = None list = [] try: menu = xml.dom.minidom.parse(self.path) self.XML_db = QuickButtonXML(menu) for e in self.XML_db.getMenu(): if e[1] == "1": list.append(QuickButtonListEntry('green',(_(e[0]),e[0], '1'))) else: list.append(QuickButtonListEntry('red',(_(e[0]),e[0], ''))) except Exception, e: self.e = e list = [] self["list"] = QuickButtonList(list=list, selection = 0) self["background"] = Label('') self["key_red"] = Label(_("Cancel")) self["key_green"] = Label(_("Save")) self["key_yellow"] = Label(_("delete")) self["key_blue"] = Label(_("Add")) self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "DirectionActions"], { "ok": self.run, "cancel": self.cancel, "red": self.close, "green": self.save, "yellow": self.delete, "blue": self.add, "up": self.up, "down": self.down, "left": self.keyLeft, "right": self.keyRight }, -1) self.onExecBegin.append(self.error) self.onShown.append(self.updateTitle)
class MultiQuickButton(Screen): global HD_Res try: sz_w = getDesktop(0).size().width() except: sz_w = 720 if sz_w == 1280: HD_Res = True else: HD_Res = False if HD_Res: skin = """ <screen position="240,100" size="800,520" title="MultiQuickButton Panel %s" > <widget name="list" position="10,10" size="780,410" scrollbarMode="showOnDemand" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_red.png" zPosition="2" position="20,450" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_green.png" zPosition="2" position="210,450" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_yellow.png" zPosition="2" position="420,450" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_blue.png" zPosition="2" position="610,450" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_0.png" zPosition="2" position="15,490" size="35,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_1.png" zPosition="2" position="205,490" size="35,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_2.png" zPosition="2" position="415,490" size="35,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_3.png" zPosition="2" position="605,490" size="35,25" alphatest="on" /> <widget name="key_red" backgroundColor="#1f771f" zPosition="2" position="50,445" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_green" backgroundColor="#1f771f" position="240,445" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_yellow" backgroundColor="#1f771f" position="450,445" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_blue" backgroundColor="#1f771f" position="640,445" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_0" backgroundColor="#1f771f" zPosition="2" position="50,484" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_1" backgroundColor="#1f771f" position="240,484" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_2" backgroundColor="#1f771f" position="450,484" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_3" backgroundColor="#1f771f" position="640,484" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="background" backgroundColor="#220a0a0a" zPosition="1" position="0,450" size="800,80" font="Regular;20" halign="left" valign="center" /> </screen>""" % (MultiQuickButton_version) else: skin = """ <screen position="50,190" size="620,320" title="MultiQuickButton Panel %s" > <widget name="list" position="10,10" size="600,210" scrollbarMode="showOnDemand" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_red.png" zPosition="2" position="10,250" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_green.png" zPosition="2" position="160,250" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_yellow.png" zPosition="2" position="330,250" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_blue.png" zPosition="2" position="490,250" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_0.png" zPosition="2" position="6,290" size="35,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_1.png" zPosition="2" position="156,290" size="35,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_2.png" zPosition="2" position="326,290" size="35,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_3.png" zPosition="2" position="486,290" size="35,25" alphatest="on" /> <widget name="key_red" backgroundColor="#1f771f" zPosition="2" position="35,245" size="250,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_green" backgroundColor="#1f771f" position="185,245" zPosition="2" size="250,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_yellow" backgroundColor="#1f771f" position="355,245" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_blue" backgroundColor="#1f771f" position="515,245" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_0" backgroundColor="#1f771f" position="35,285" zPosition="2" size="250,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_1" backgroundColor="#1f771f" position="185,285" zPosition="2" size="250,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_2" backgroundColor="#1f771f" position="355,285" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_3" backgroundColor="#1f771f" position="515,285" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="background" backgroundColor="#220a0a0a" zPosition="1" position="0,320" size="620,80" font="Regular;20" halign="left" valign="center" /> </screen>""" % (MultiQuickButton_version) def __init__(self, session, args=None): Screen.__init__(self, session) self.session = session self.menu = args self.settigspath = "" self["background"] = Label('') self["key_red"] = Label(autostart) self["key_green"] = Label(menuentry) self["key_yellow"] = Label(_("Restore")) self["key_blue"] = Label(_("Backup")) self["key_0"] = Label(info) self["key_1"] = Label(okexit) self["key_2"] = Label(_("Channels")) self["key_3"] = Label(_("Macros")) self["key_4"] = Label(_("query keys")) self.createList() self["list"] = QuickButtonList(list=self.list, selection = 0) self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "NumberActions", "EPGSelectActions"], { "ok": self.run, "cancel": self.close, "red": self.autostart, "green": self.setMainMenu, "yellow": self.restore, "blue": self.backup, "0": self.setInfo, "1": self.toggleOkExit, "2": self.setChannels, "3": self.configMacro, "4": self.showbutton, "info": self.showAbout, }, -1) self.onShown.append(self.updateSettings) def createList(self): self.a = None for button in values: if config.plugins.QuickButton.info.value: try: functionbutton = " [" path = "/etc/MultiQuickButton/quickbutton_" + button + ".xml" menu = xml.dom.minidom.parse(path) self.XML_db = QuickButtonXML(menu) for a in self.XML_db.getMenu(): if a[1] == "1": if functionbutton == " [": functionbutton = _(a[0]) else: functionbutton = functionbutton + " | " + _(a[0]) if functionbutton == " [": space1 = " " space2 = " " functionbutton = " " else: space1 = " [" space2 = "]" globals()['functionbutton_%s' % button] = space1 + functionbutton + space2 except Exception, a: self.a = a else: globals()['functionbutton_%s' % button] = " " self.list = [] self.list.append(QuickButtonListEntry('',(_('red') + functionbutton_red, 'red'))) self.list.append(QuickButtonListEntry('',((_('red') + _(' long')) + functionbutton_red_long, 'red_long'))) self.list.append(QuickButtonListEntry('',(_('green') + functionbutton_green, 'green'))) self.list.append(QuickButtonListEntry('',((_('green') + _(' long')) + functionbutton_green_long, 'green_long'))) self.list.append(QuickButtonListEntry('',(_('yellow') + functionbutton_yellow, 'yellow'))) self.list.append(QuickButtonListEntry('',((_('yellow') + _(' long')) + functionbutton_yellow_long, 'yellow_long'))) self.list.append(QuickButtonListEntry('',(_('blue') + functionbutton_blue, 'blue'))) self.list.append(QuickButtonListEntry('',((_('blue') + _(' long')) + functionbutton_blue_long, 'blue_long'))) self.list.append(QuickButtonListEntry('',( ('Text') + functionbutton_text, 'text'))) self.list.append(QuickButtonListEntry('',(( ('Text') + _(' long')) + functionbutton_text_long, 'text_long'))) # self.list.append(QuickButtonListEntry('',(_('Help') + functionbutton_displayHelp, 'displayHelp'))) self.list.append(QuickButtonListEntry('',(( ('Help') + _(' long')) + functionbutton_help_long, 'help_long'))) # self.list.append(QuickButtonListEntry('',((_('MENU') + _(' long')) + functionbutton_menu_long, 'menu_long'))) if getBoxType().startswith('et'): self.list.append(QuickButtonListEntry('',(_('Info') + functionbutton_info, 'info'))) self.list.append(QuickButtonListEntry('',((_('Info') + _(' long')) + functionbutton_info_long, 'info_long'))) if getBoxType() == 'ET9500' or getBoxType() == 'ET6500': self.list.append(QuickButtonListEntry('',(_('EPG') + functionbutton_epg, 'epg'))) self.list.append(QuickButtonListEntry('',((_('EPG') + _(' long')) + functionbutton_epg_long, 'epg_long'))) self.list.append(QuickButtonListEntry('',(_('List') + functionbutton_list, 'list'))) self.list.append(QuickButtonListEntry('',((_('List') + _(' long')) + functionbutton_list_long, 'list_long'))) self.list.append(QuickButtonListEntry('',(_('Back') + functionbutton_back, 'back'))) self.list.append(QuickButtonListEntry('',(( ('Back') + _(' long')) + functionbutton_back_long, 'back_long'))) self.list.append(QuickButtonListEntry('',(_('Portal') + functionbutton_portal, 'portal'))) self.list.append(QuickButtonListEntry('',(( ('Portal') + _(' long')) + functionbutton_portal_long, 'portal_long'))) else: self.list.append(QuickButtonListEntry('',(_('Guide') + functionbutton_epg, 'epg'))) self.list.append(QuickButtonListEntry('',((_('Guide') + _(' long')) + functionbutton_epg_long, 'epg_long'))) self.list.append(QuickButtonListEntry('',(_('Vkey') + functionbutton_pvr, 'pvr'))) self.list.append(QuickButtonListEntry('',((_('Vkey') + _(' long')) + functionbutton_pvr_long, 'pvr_long'))) self.list.append(QuickButtonListEntry('',(_('Mark') + functionbutton_portal, 'portal'))) self.list.append(QuickButtonListEntry('',((_('Mark') + _(' long')) + functionbutton_portal_long, 'portal_long'))) self.list.append(QuickButtonListEntry('',(_('Playlist') + functionbutton_playlist, 'playlist'))) self.list.append(QuickButtonListEntry('',((_('Playlist') + _(' long')) + functionbutton_playlist_long, 'playlist_long'))) self.list.append(QuickButtonListEntry('',(_('Filelist') + functionbutton_filelist, 'filelist'))) self.list.append(QuickButtonListEntry('',((_('Filelist') + _(' long')) + functionbutton_filelist_long, 'filelist_long'))) self.list.append(QuickButtonListEntry('',(_('Subtitle') + functionbutton_subtitle, 'subtitle'))) self.list.append(QuickButtonListEntry('',((_('Subtitle') + _(' long')) + functionbutton_subtitle_long, 'subtitle_long'))) self.list.append(QuickButtonListEntry('',(_('PIP') + functionbutton_activatePiP, 'activatePiP'))) self.list.append(QuickButtonListEntry('',((_('PIP') + _(' long')) + functionbutton_pip_long, 'pip_long'))) self.list.append(QuickButtonListEntry('',(_('Timeshift') + functionbutton_timeshift, 'timeshift'))) self.list.append(QuickButtonListEntry('',((_('Timeshift') + _(' long')) + functionbutton_timeshift_long, 'timeshift_long'))) self.list.append(QuickButtonListEntry('',(_('Search') + functionbutton_search, 'search'))) self.list.append(QuickButtonListEntry('',((_('Search') + _(' long')) + functionbutton_search_long, 'search_long'))) self.list.append(QuickButtonListEntry('',(_('Timer') + functionbutton_timer, 'timer'))) self.list.append(QuickButtonListEntry('',((_('Timer') + _(' long')) + functionbutton_timer_long, 'timer_long'))) else: self.list.append(QuickButtonListEntry('',(_('EPG') + functionbutton_info, 'info'))) self.list.append(QuickButtonListEntry('',((_('EPG') + _(' long')) + functionbutton_info_long, 'info_long'))) self.list.append(QuickButtonListEntry('',(_('Filelist') + functionbutton_pvr, 'pvr'))) self.list.append(QuickButtonListEntry('',((_('Filellist') + _(' long')) + functionbutton_pvr_long, 'pvr_long'))) self.list.append(QuickButtonListEntry('',(_('Radio') + functionbutton_radio, 'radio'))) self.list.append(QuickButtonListEntry('',((_('Radio') + _(' long')) + functionbutton_radio_long, 'radio_long'))) self.list.append(QuickButtonListEntry('',(_('TV') + functionbutton_tv, 'tv'))) self.list.append(QuickButtonListEntry('',((_('TV') + _(' long')) + functionbutton_tv_long, 'tv_long'))) if getBoxType().startswith('vu'): self.list.append(QuickButtonListEntry('',(_('Home') + functionbutton_home, 'home'))) self.list.append(QuickButtonListEntry('',((_('Home') + _(' long')) + functionbutton_home_long, 'home_long'))) self.list.append(QuickButtonListEntry('',(_('End') + functionbutton_end, 'end'))) self.list.append(QuickButtonListEntry('',((_('End') + _(' long')) + functionbutton_end_long, 'end_long'))) if getBoxType().startswith('venton') or getBoxType().startswith('ini') or getBoxType().startswith('gb') or getBoxType().startswith('tm') or getBoxType().startswith('iqon') or getBoxType().startswith('media') or getBoxType().startswith('opti'): if getBoxType().startswith('venton') or getBoxType().startswith('ini'): self.list.append(QuickButtonListEntry('',( ('Timer') + functionbutton_timer, 'timer'))) self.list.append(QuickButtonListEntry('',(( ('Timer') + _(' long')) + functionbutton_timer_long, 'timer_long'))) self.list.append(QuickButtonListEntry('',( ('F1') + functionbutton_f1, 'f1'))) self.list.append(QuickButtonListEntry('',(( ('F1') + _(' long')) + functionbutton_f1_long, 'f1_long'))) self.list.append(QuickButtonListEntry('',( ('F2') + functionbutton_f1, 'f1'))) self.list.append(QuickButtonListEntry('',(( ('F2') + _(' long')) + functionbutton_f2_long, 'f2_long'))) self.list.append(QuickButtonListEntry('',( ('F3') + functionbutton_f3, 'f3'))) self.list.append(QuickButtonListEntry('',(( ('F3') + _(' long')) + functionbutton_f3_long, 'f3_long'))) self.list.append(QuickButtonListEntry('',( ('F4') + functionbutton_f4, 'f4'))) self.list.append(QuickButtonListEntry('',(( ('F4') + _(' long')) + functionbutton_f4_long, 'f3_long'))) self.list.append(QuickButtonListEntry('',( ('Fav') + functionbutton_favorites, 'favorites'))) self.list.append(QuickButtonListEntry('',(( ('Fav') + _(' long')) + functionbutton_favorites_long, 'favorites_long'))) self.list.append(QuickButtonListEntry('',( ('Sleep') + functionbutton_sleep, 'sleep'))) self.list.append(QuickButtonListEntry('',(( ('Sleep') + _(' long')) + functionbutton_sleep_long, 'sleep_long'))) self.list.append(QuickButtonListEntry('',(_('Cross Up') + functionbutton_cross_up, 'cross_up'))) self.list.append(QuickButtonListEntry('',(_('Cross Down') + functionbutton_cross_down, 'cross_down'))) self.list.append(QuickButtonListEntry('',(_('Cross Left') + functionbutton_cross_left, 'cross_left'))) self.list.append(QuickButtonListEntry('',(_('Cross Right') + functionbutton_cross_right, 'cross_right'))) self.list.append(QuickButtonListEntry('',(_('Channel +') + functionbutton_channelup, 'channelup'))) self.list.append(QuickButtonListEntry('',(_('Channel -') + functionbutton_channeldown, 'channeldown'))) self.list.append(QuickButtonListEntry('',(_('Next >') + functionbutton_next, 'next'))) self.list.append(QuickButtonListEntry('',(_('Prev <') + functionbutton_previous, 'previous'))) self.list.append(QuickButtonListEntry('',(_('Audio') + functionbutton_audio, 'audio'))) self.list.append(QuickButtonListEntry('',((_('Audio') + _(' long')) + functionbutton_audio_long, 'audio_long'))) if config.plugins.QuickButton.okexitstate.value: self.list.append(QuickButtonListEntry('',(_('OK') + functionbutton_ok, 'ok'))) self.list.append(QuickButtonListEntry('',(_('EXIT') + functionbutton_exit, 'exit'))) if getBoxType().startswith('et') or getBoxType().startswith('venton') or getBoxType().startswith('ini'): self.list.append(QuickButtonListEntry('',(_('Play/Pause') + functionbutton_play, 'play'))) if getBoxType().startswith('inihde'): self.list.append(QuickButtonListEntry('',(_('Plugin') + functionbutton_portal, 'portal'))) self.list.append(QuickButtonListEntry('',((_('Plugin') + _(' long')) + functionbutton_portal_long, 'portal_long'))) self.list.append(QuickButtonListEntry('',(_('Media') + functionbutton_media, 'media'))) self.list.append(QuickButtonListEntry('',((_('Media') + _(' long')) + functionbutton_media_long, 'media_long'))) else: self.list.append(QuickButtonListEntry('',(_('Play') + functionbutton_play, 'play'))) self.list.append(QuickButtonListEntry('',(_('Pause') + functionbutton_pause, 'pause'))) self.list.append(QuickButtonListEntry('',(_('Stop') + functionbutton_stop, 'stop'))) self.list.append(QuickButtonListEntry('',(_('Rewind <<') + functionbutton_rewind, 'rewind'))) self.list.append(QuickButtonListEntry('',(_('FastForward >>') + functionbutton_fastforward, 'fastforward')))
class QuickButton(Screen): global HD_Res try: sz_w = getDesktop(0).size().width() except: sz_w = 720 if sz_w == 1280: HD_Res = True else: HD_Res = False if HD_Res: skin = """ <screen name="QuickButton" position="240,100" size="800,520" title="QuickButton" > <widget name="list" position="10,10" size="780,450" scrollbarMode="showOnDemand" /> <ePixmap pixmap="skin_default/buttons/button_red.png" zPosition="2" position="20,490" size="20,20" alphatest="on" /> <ePixmap pixmap="skin_default/buttons/button_green.png" zPosition="2" position="210,490" size="20,20" alphatest="on" /> <ePixmap pixmap="skin_default/buttons/button_yellow.png" zPosition="2" position="400,490" size="20,20" alphatest="on" /> <ePixmap pixmap="skin_default/buttons/button_blue.png" zPosition="2" position="590,490" size="20,20" alphatest="on" /> <widget name="key_red" backgroundColor="#1f771f" zPosition="2" position="50,480" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_green" backgroundColor="#1f771f" position="240,480" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_yellow" backgroundColor="#1f771f" position="430,480" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_blue" backgroundColor="#1f771f" position="620,480" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="background" backgroundColor="#220a0a0a" zPosition="1" position="0,480" size="800,40" font="Regular;20" halign="left" valign="center" /> </screen>""" else: skin = """ <screen name="QuickButton" position="60,90" size="600,420" title="QuickButton" > <widget name="list" position="10,10" size="580,350" scrollbarMode="showOnDemand" /> <ePixmap pixmap="skin_default/buttons/button_red.png" zPosition="2" position="20,390" size="20,20" alphatest="on" /> <ePixmap pixmap="skin_default/buttons/button_green.png" zPosition="2" position="160,390" size="20,20" alphatest="on" /> <ePixmap pixmap="skin_default/buttons/button_yellow.png" zPosition="2" position="300,390" size="20,20" alphatest="on" /> <ePixmap pixmap="skin_default/buttons/button_blue.png" zPosition="2" position="440,390" size="20,20" alphatest="on" /> <widget name="key_red" backgroundColor="#1f771f" zPosition="2" position="40,380" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_green" backgroundColor="#1f771f" position="180,380" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_yellow" backgroundColor="#1f771f" position="320,380" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_blue" backgroundColor="#1f771f" position="460,380" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="background" backgroundColor="#220a0a0a" zPosition="1" position="0,380" size="600,40" font="Regular;20" halign="left" valign="center" /> </screen>""" def __init__(self, session, path=None, title=""): Screen.__init__(self, session) self.session = session self.path = path self.newtitle = title self.changed = False self.e = None list = [] try: menu = xml.dom.minidom.parse(self.path) self.XML_db = QuickButtonXML(menu) for e in self.XML_db.getMenu(): if e[1] == "1": list.append(QuickButtonListEntry('green', (e[0], '1'))) else: list.append(QuickButtonListEntry('red', (e[0], ''))) except Exception, e: self.e = e list = [] self["list"] = QuickButtonList(list=list, selection=0) self["background"] = Label('') self["key_red"] = Label(_("Cancel")) self["key_green"] = Label(_("Save")) self["key_yellow"] = Label(_("delete")) self["key_blue"] = Label(_("Add")) self["actions"] = ActionMap( ["OkCancelActions", "ColorActions", "DirectionActions"], { "ok": self.run, "cancel": self.cancel, "red": self.close, "green": self.save, "yellow": self.delete, "blue": self.add, "up": self.up, "down": self.down, "left": self.keyLeft, "right": self.keyRight }, -1) self.onExecBegin.append(self.error) self.onShown.append(self.updateTitle)
class MultiQuickButton(Screen): global HD_Res try: sz_w = getDesktop(0).size().width() except: sz_w = 720 if sz_w == 1280: HD_Res = True else: HD_Res = False if HD_Res: skin = """ <screen position="240,100" size="800,520" title="MultiQuickButton Panel %s" > <widget name="list" position="10,10" size="780,410" scrollbarMode="showOnDemand" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_red.png" zPosition="2" position="20,450" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_green.png" zPosition="2" position="210,450" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_yellow.png" zPosition="2" position="420,450" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_blue.png" zPosition="2" position="610,450" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_0.png" zPosition="2" position="15,490" size="35,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_1.png" zPosition="2" position="205,490" size="35,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_2.png" zPosition="2" position="415,490" size="35,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_3.png" zPosition="2" position="605,490" size="35,25" alphatest="on" /> <widget name="key_red" backgroundColor="#1f771f" zPosition="2" position="50,445" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_green" backgroundColor="#1f771f" position="240,445" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_yellow" backgroundColor="#1f771f" position="450,445" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_blue" backgroundColor="#1f771f" position="640,445" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_0" backgroundColor="#1f771f" zPosition="2" position="50,484" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_1" backgroundColor="#1f771f" position="240,484" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_2" backgroundColor="#1f771f" position="450,484" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_3" backgroundColor="#1f771f" position="640,484" zPosition="2" size="180,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="background" backgroundColor="#220a0a0a" zPosition="1" position="0,450" size="800,80" font="Regular;20" halign="left" valign="center" /> </screen>""" % (MultiQuickButton_version) else: skin = """ <screen position="50,190" size="620,320" title="MultiQuickButton Panel %s" > <widget name="list" position="10,10" size="600,210" scrollbarMode="showOnDemand" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_red.png" zPosition="2" position="10,250" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_green.png" zPosition="2" position="160,250" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_yellow.png" zPosition="2" position="330,250" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/button_blue.png" zPosition="2" position="490,250" size="25,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_0.png" zPosition="2" position="6,290" size="35,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_1.png" zPosition="2" position="156,290" size="35,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_2.png" zPosition="2" position="326,290" size="35,25" alphatest="on" /> <ePixmap pixmap="/usr/lib/enigma2/python/Plugins/Extensions/MultiQuickButton/pic/key_3.png" zPosition="2" position="486,290" size="35,25" alphatest="on" /> <widget name="key_red" backgroundColor="#1f771f" zPosition="2" position="35,245" size="250,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_green" backgroundColor="#1f771f" position="185,245" zPosition="2" size="250,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_yellow" backgroundColor="#1f771f" position="355,245" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_blue" backgroundColor="#1f771f" position="515,245" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_0" backgroundColor="#1f771f" position="35,285" zPosition="2" size="250,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_1" backgroundColor="#1f771f" position="185,285" zPosition="2" size="250,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_2" backgroundColor="#1f771f" position="355,285" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="key_3" backgroundColor="#1f771f" position="515,285" zPosition="2" size="150,40" font="Regular;20" halign="left" valign="center" transparent="1" /> <widget name="background" backgroundColor="#220a0a0a" zPosition="1" position="0,320" size="620,80" font="Regular;20" halign="left" valign="center" /> </screen>""" % (MultiQuickButton_version) def __init__(self, session, args=None): Screen.__init__(self, session) self.session = session self.menu = args self.settigspath = "" self["background"] = Label('') self["key_red"] = Label(autostart) self["key_green"] = Label(menuentry) self["key_yellow"] = Label(_("Restore")) self["key_blue"] = Label(_("Backup")) self["key_0"] = Label(info) self["key_1"] = Label(okexit) self["key_2"] = Label(_("Channels")) self["key_3"] = Label(_("Macros")) self.createList() self["list"] = QuickButtonList(list=self.list, selection = 0) self["actions"] = ActionMap(["OkCancelActions", "ColorActions", "NumberActions", "EPGSelectActions"], { "ok": self.run, "cancel": self.close, "red": self.autostart, "green": self.setMainMenu, "yellow": self.restore, "blue": self.backup, "0": self.setInfo, "1": self.toggleOkExit, "2": self.setChannels, "3": self.configMacro, "info": self.showAbout, }, -1) self.onShown.append(self.updateSettings) def createList(self): self.a = None for button in values: if config.plugins.QuickButton.info.value: try: functionbutton = " [" path = "/etc/MultiQuickButton/quickbutton_" + button + ".xml" menu = xml.dom.minidom.parse(path) self.XML_db = QuickButtonXML(menu) for a in self.XML_db.getMenu(): if a[1] == "1": if functionbutton == " [": functionbutton = _(a[0]) else: functionbutton = functionbutton + " | " + _(a[0]) if functionbutton == " [": space1 = " " space2 = " " functionbutton = " " else: space1 = " [" space2 = "]" globals()['functionbutton_%s' % button] = space1 + functionbutton + space2 except Exception, a: self.a = a else: globals()['functionbutton_%s' % button] = " " self.list = [] self.list.append(QuickButtonListEntry('',(_('Mute') + functionbutton_mute, 'mute'))) self.list.append(QuickButtonListEntry('',(_('F1 (Giga)') + functionbutton_f1, 'f1'))) self.list.append(QuickButtonListEntry('',((_('F1 (Giga)') + _(' long')) + functionbutton_f1_long, 'f1_long'))) self.list.append(QuickButtonListEntry('',(_('F2 (Giga)') + functionbutton_f2, 'f2'))) self.list.append(QuickButtonListEntry('',((_('F2 (Giga)') + _(' long')) + functionbutton_f2_long, 'f2_long'))) self.list.append(QuickButtonListEntry('',(_('F3 (Giga)') + functionbutton_f3, 'f3'))) self.list.append(QuickButtonListEntry('',((_('F3 (Giga)') + _(' long')) + functionbutton_f3_long, 'f3_long'))) self.list.append(QuickButtonListEntry('',(_('F4 (Giga)') + functionbutton_f4, 'f4'))) self.list.append(QuickButtonListEntry('',((_('F4 (Giga)') + _(' long')) + functionbutton_f4_long, 'f4_long'))) self.list.append(QuickButtonListEntry('',(_('FLIST') + functionbutton_flist, 'flist'))) self.list.append(QuickButtonListEntry('',(_('GLIST') + functionbutton_glist, 'glist'))) self.list.append(QuickButtonListEntry('',(_('FAV') + functionbutton_fav, 'fav'))) self.list.append(QuickButtonListEntry('',(_('ASPECT') + functionbutton_aspect, 'aspect'))) self.list.append(QuickButtonListEntry('',(_('PREVIOUS') + functionbutton_previous, 'previous'))) self.list.append(QuickButtonListEntry('',(_('REWIND') + functionbutton_rewind, 'rewind'))) self.list.append(QuickButtonListEntry('',(_('FASTFORWARD') + functionbutton_fforward, 'fforward'))) self.list.append(QuickButtonListEntry('',(_('NEXT') + functionbutton_next, 'next'))) self.list.append(QuickButtonListEntry('',(_('TIMESHIFT') + functionbutton_timeshift, 'timeshift'))) self.list.append(QuickButtonListEntry('',(_('STOP') + functionbutton_stop, 'stop'))) self.list.append(QuickButtonListEntry('',(_('PLAY/PAUSE') + functionbutton_playpause, 'playpause'))) self.list.append(QuickButtonListEntry('',(_('RECORD') + functionbutton_record, 'record'))) self.list.append(QuickButtonListEntry('',(_('VOLUME +') + functionbutton_volup, 'volup'))) self.list.append(QuickButtonListEntry('',(_('VOLUME -') + functionbutton_voldown, 'voldown'))) self.list.append(QuickButtonListEntry('',(_('GUIDE') + functionbutton_guide, 'guide'))) self.list.append(QuickButtonListEntry('',((_('GUIDE') + _(' long')) + functionbutton_guide_long, 'guide_long'))) self.list.append(QuickButtonListEntry('',(_('EXIT') + functionbutton_exit, 'exit'))) self.list.append(QuickButtonListEntry('',(_('CHANNEL +') + functionbutton_chnup, 'chnup'))) self.list.append(QuickButtonListEntry('',(_('CHANNEL -') + functionbutton_chndown, 'chndown'))) self.list.append(QuickButtonListEntry('',(_('INFO') + functionbutton_info, 'info'))) self.list.append(QuickButtonListEntry('',((_('INFO') + _(' long')) + functionbutton_info_long, 'info_long'))) self.list.append(QuickButtonListEntry('',(_('AUDIO') + functionbutton_audio, 'audio'))) self.list.append(QuickButtonListEntry('',((_('AUDIO') + _(' long')) + functionbutton_audio_long, 'audio_long'))) self.list.append(QuickButtonListEntry('',(_('INFO') + functionbutton_info, 'info'))) self.list.append(QuickButtonListEntry('',(_('UP') + functionbutton_up, 'up'))) self.list.append(QuickButtonListEntry('',(_('LEFT') + functionbutton_left, 'left'))) self.list.append(QuickButtonListEntry('',(_('DOWN') + functionbutton_down, 'down'))) self.list.append(QuickButtonListEntry('',(_('RIGHT') + functionbutton_right, 'right'))) self.list.append(QuickButtonListEntry('',(_('MENU') + functionbutton_menu, 'menu'))) self.list.append(QuickButtonListEntry('',((_('MENU') + _(' long')) + functionbutton_menu_long, 'menu_long'))) self.list.append(QuickButtonListEntry('',(_('VIDEO') + functionbutton_video, 'video'))) self.list.append(QuickButtonListEntry('',((_('VIDEO') + _(' long')) + functionbutton_video_long, 'video_long'))) self.list.append(QuickButtonListEntry('',(_('HISTORY') + functionbutton_history, 'history'))) self.list.append(QuickButtonListEntry('',((_('HISTORY') + _(' long')) + functionbutton_history_long, 'history_long'))) self.list.append(QuickButtonListEntry('',(_('OPT') + functionbutton_opt, 'opt'))) self.list.append(QuickButtonListEntry('',((_('OPT') + _(' long')) + functionbutton_opt_long, 'opt_long'))) self.list.append(QuickButtonListEntry('',(_('TEXT') + functionbutton_text, 'text'))) self.list.append(QuickButtonListEntry('',((_('TEXT') + _(' long')) + functionbutton_text_long, 'text_long'))) self.list.append(QuickButtonListEntry('',(_('red') + functionbutton_red, 'red'))) self.list.append(QuickButtonListEntry('',((_('red') + _(' long')) + functionbutton_red_long, 'red_long'))) self.list.append(QuickButtonListEntry('',(_('green') + functionbutton_green, 'green'))) self.list.append(QuickButtonListEntry('',((_('green') + _(' long')) + functionbutton_green_long, 'green_long'))) self.list.append(QuickButtonListEntry('',(_('yellow') + functionbutton_yellow, 'yellow'))) self.list.append(QuickButtonListEntry('',((_('yellow') + _(' long')) + functionbutton_yellow_long, 'yellow_long'))) self.list.append(QuickButtonListEntry('',(_('blue') + functionbutton_blue, 'blue'))) self.list.append(QuickButtonListEntry('',((_('blue') + _(' long')) + functionbutton_blue_long, 'blue_long')))