<map context="InfobarChannelSelection">
<key id="KEY_EXIT" mapto="zapHistory" flags="b" />
<key id="KEY_LEFT" mapto="zapUp" flags="mr" />
<key id="KEY_RIGHT" mapto="zapDown" flags="mr" />
<key id="KEY_UP" mapto="switchChannelUp" flags="mr" />
<key id="KEY_DOWN" mapto="switchChannelDown" flags="mr" />
<key id="KEY_PREVIOUS" mapto="historyBack" flags="mr" />
<key id="KEY_NEXT" mapto="historyNext" flags="mr" />
<key id="KEY_BACK" mapto="historyBack" flags="mr" />
<key id="KEY_FORWARD" mapto="historyNext" flags="mr" />
<key id="KEY_CHANNELUP" mapto="keyDown" flags="m" />
<key id="KEY_CHANNELDOWN" mapto="keyUp" flags="m" />
<key id="BTN_0" mapto="zapUp" flags="mr" />
<key id="BTN_1" mapto="zapDown" flags="mr" />
</map>
Zobrazení seznamu stanic tlačítkem TV
<map context="InfobarActions">
<key id="KEY_VIDEO" mapto="showMovies" flags="m" />
<key id="KEY_RADIO" mapto="showRadio" flags="m" />
<key id="KEY_TV" mapto="showFavourites" flags="m" />
<key id="KEY_SUBTITLE" mapto="showSubtitle" flags="m" />
</map>
class InfoBarSimpleEventView:
""" Opens the Eventview
for now/next """
def __init__(self):
self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions",
{
"showEventInfo": (self.openEventView, _("show
EPG...")),
"showEventInfoPlugin": (self.showEventInfoPlugins, _("show
single service EPG...")),
"showInfobarOrEpgWhenInfobarAlreadyVisible": self.showEventInfoWhenNotVisible,
"showSingleServiceEPG": (self.openSingleServiceEPG, _("show
single service EPG...")),
})
def showEventInfoWhenNotVisible(self):
if self.shown:
self.openEventView()
else:
self.toggleShow()
return 1
A dále si namapovat příslušnou událost na tlačítko, opět tedy v souboru keymap.xml
<map context="InfobarEPGActions">
<key id="KEY_INFO" mapto="showSingleServiceEPG" flags="b" />
<key id="KEY_INFO" mapto="showSingleServiceEPG" flags="l" />
</map>
Žádné komentáře:
Okomentovat