aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Screens
diff options
context:
space:
mode:
authorFraxinas <andreas.frisch@multimedia-labs.de>2008-11-10 10:12:53 +0100
committerFraxinas <andreas.frisch@multimedia-labs.de>2008-11-10 10:12:53 +0100
commitacbad24424304473f967b678bd9deb51f73acf27 (patch)
tree00489afaf9784c1009222cfb05b537009a4b5118 /lib/python/Screens
parentf5dc0e14397ef85ad77df165de061264dd2166fd (diff)
downloadenigma2-acbad24424304473f967b678bd9deb51f73acf27.tar.gz
enigma2-acbad24424304473f967b678bd9deb51f73acf27.zip
long keypress on INFO key either brings up single servie EPG view screen like right now or, if any plugins of new type WHERE_EVENTINFO are installed (e.g. GraphMultiEPG, IMDB, OFDB), a choicebox with the relevant plugins. consequence: GraphMultiEPG is no longer ran from extensions menu (blue button) but by long keypress on INFO button instead!
Diffstat (limited to 'lib/python/Screens')
-rw-r--r--lib/python/Screens/InfoBarGenerics.py22
1 files changed, 19 insertions, 3 deletions
diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py
index aab2b649..cdaa2c1e 100644
--- a/lib/python/Screens/InfoBarGenerics.py
+++ b/lib/python/Screens/InfoBarGenerics.py
@@ -403,8 +403,8 @@ class InfoBarEPG:
self.eventView = None
self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions",
{
- "showEventInfo": (self.openEventView, _("show EPG...")),
- "showSingleServiceEPG": (self.openSingleServiceEPG, _("show single service EPG...")),
+ "showEventView": (self.openEventView, _("show EPG...")),
+ "showEventInfoPlugin": (self.showEventInfoPlugins, _("show single service EPG...")),
"showInfobarOrEpgWhenInfobarAlreadyVisible": self.showEventInfoWhenNotVisible,
})
@@ -489,6 +489,23 @@ class InfoBarEPG:
ref=self.session.nav.getCurrentlyPlayingServiceReference()
self.session.open(EPGSelection, ref)
+ def showEventInfoPlugins(self):
+ list = []
+ for p in plugins.getPlugins(where = PluginDescriptor.WHERE_EVENTINFO):
+ list.append((p.name, boundFunction(self.runPlugin, p)))
+ if len(list):
+ list.append((_("show single service EPG..."), self.openSingleServiceEPG))
+ self.session.openWithCallback(self.EventInfoPluginChosen, ChoiceBox, title=_("Please choose an extension..."), list = list)
+ else:
+ self.openSingleServiceEPG()
+
+ def runPlugin(self, plugin):
+ plugin(session = self.session, servicelist = self.servicelist)
+
+ def EventInfoPluginChosen(self, answer):
+ if answer is not None:
+ answer[1]()
+
def openSimilarList(self, eventid, refstr):
self.session.open(EPGSelection, refstr, None, eventid)
@@ -1258,7 +1275,6 @@ class InfoBarExtensions:
from Tools.BoundFunction import boundFunction
# depends on InfoBarExtensions
-from Components.PluginComponent import plugins
class InfoBarPlugins:
def __init__(self):