From: Andreas Monzner Date: Sun, 22 Jul 2007 17:37:10 +0000 (+0000) Subject: show single service epg on long info keypress X-Git-Tag: 2.6.0~2060 X-Git-Url: https://git.cweiske.de/enigma2.git/commitdiff_plain/e69fde464582ffb74d03510f7ba45542af17d730 show single service epg on long info keypress --- diff --git a/data/border_eventinfo-fs8.png b/data/border_eventinfo-fs8.png new file mode 100644 index 00000000..e69de29b diff --git a/data/keymap.xml b/data/keymap.xml index 808ed417..3b2185da 100644 --- a/data/keymap.xml +++ b/data/keymap.xml @@ -67,7 +67,8 @@ - + + diff --git a/lib/python/Components/Sources/ServiceEvent.py b/lib/python/Components/Sources/ServiceEvent.py new file mode 100644 index 00000000..8a1c7ffe --- /dev/null +++ b/lib/python/Components/Sources/ServiceEvent.py @@ -0,0 +1,30 @@ +from Components.VariableText import VariableText +from Components.Element import cached +from Components.GUIComponent import GUIComponent +from enigma import eEPGCache, eServiceReference as Ref, eLabel +from Source import Source + +class ServiceEvent(VariableText, GUIComponent, Source, object): + def __init__(self): + Source.__init__(self) + GUIComponent.__init__(self) + VariableText.__init__(self) + self.cur_ref = None + + GUI_WIDGET = eLabel + +#TODO Add a timer to get every minute the actual event.. +#but this just make sense when the Servicelist do the same thing.. + @cached + def getCurrentEvent(self): + epg = eEPGCache.getInstance() + return epg and self.cur_ref and epg.startTimeQuery(self.cur_ref) != -1 and epg.getNextTimeEntry() or None + + event = property(getCurrentEvent) + + def newService(self, ref): + self.cur_ref = ref + if not ref or (ref.flags & Ref.flagDirectory) == Ref.flagDirectory or ref.flags & Ref.isMarker: + self.changed((self.CHANGED_CLEAR,)) + else: + self.changed((self.CHANGED_ALL,)) diff --git a/lib/python/Screens/InfoBarGenerics.py b/lib/python/Screens/InfoBarGenerics.py index 8aeb7677..ca697ae8 100644 --- a/lib/python/Screens/InfoBarGenerics.py +++ b/lib/python/Screens/InfoBarGenerics.py @@ -405,6 +405,7 @@ class InfoBarEPG: self["EPGActions"] = HelpableActionMap(self, "InfobarEPGActions", { "showEventInfo": (self.openEventView, _("show EPG...")), + "showSingleServiceEPG": (self.openSingleServiceEPG, _("show single service EPG...")), "showInfobarOrEpgWhenInfobarAlreadyVisible": self.showEventInfoWhenNotVisible, })