From 1109344c9409572f9829e46971b71a7fe1d3c8cc Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Sun, 22 Jul 2007 17:38:25 +0000 Subject: show event information of current selected event in channelselection --- lib/python/Screens/ChannelSelection.py | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) (limited to 'lib/python/Screens') diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index 0fe625bb..94cf1ae2 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -11,6 +11,7 @@ from Tools.NumericalTextInput import NumericalTextInput from Components.NimManager import nimmanager from Components.Sources.Clock import Clock from Components.Sources.RdsDecoder import RdsDecoder +from Components.Sources.ServiceEvent import ServiceEvent from Components.Input import Input from Components.ParentalControl import parentalControl from Components.Pixmap import Pixmap @@ -269,6 +270,22 @@ class ChannelContextMenu(Screen): self.csel.startMarkedEdit(EDIT_ALTERNATIVES) self.close() +class SelectionEventInfo: + def __init__(self): + self["ServiceEvent"] = ServiceEvent() + self.servicelist.connectSelChanged(self.__selectionChanged) + self.timer = eTimer() + self.timer.timeout.get().append(self.updateEventInfo) + self.onShown.append(self.__selectionChanged) + + def __selectionChanged(self): + if self.execing: + self.timer.start(100, True) + + def updateEventInfo(self): + cur = self.getCurrentSelection() + self["ServiceEvent"].newService(cur) + class ChannelSelectionEPG: def __init__(self): self["ChannelSelectEPGActions"] = ActionMap(["ChannelSelectEPGActions"], @@ -1018,11 +1035,12 @@ config.radio.lastroot = ConfigText() config.servicelist = ConfigSubsection() config.servicelist.lastmode = ConfigText(default = "tv") -class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelectionEPG): +class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit, ChannelSelectionEPG, SelectionEventInfo): def __init__(self, session): ChannelSelectionBase.__init__(self,session) ChannelSelectionEdit.__init__(self) ChannelSelectionEPG.__init__(self) + SelectionEventInfo.__init__(self) self["actions"] = ActionMap(["OkCancelActions", "TvRadioActions"], { -- cgit v1.2.3