X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/f412f2579647e5b4b9857acaa4a1b29ff191533e..03840de4f14dbbbbb6d4d38c862a0a1cceba5ea7:/lib/python/Screens/ChannelSelection.py diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index eb6f9059..3f3c4de4 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -7,11 +7,11 @@ from Components.ServiceEventTracker import ServiceEventTracker from EpgSelection import EPGSelection from enigma import eServiceReference, eEPGCache, eServiceCenter, eTimer, eDVBDB, iPlayableService, iServiceInformation from Components.config import config, ConfigSubsection, ConfigText -from Screens.FixedMenu import FixedMenu 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 @@ -21,13 +21,11 @@ from Screens.ServiceInfo import ServiceInfo from Screens.RdsDisplay import RassInteractive from ServiceReference import ServiceReference from Tools.BoundFunction import boundFunction -from re import * +from re import compile from os import remove FLAG_SERVICE_NEW_FOUND = 64 #define in lib/dvb/idvb.h as dxNewFound = 64 -import xml.dom.minidom - class BouquetSelector(Screen): def __init__(self, session, bouquets, selectedFunc, enableWrapAround=False): Screen.__init__(self, session) @@ -272,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"], @@ -1021,11 +1035,14 @@ 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["CurrentTime"] = Clock() self["actions"] = ActionMap(["OkCancelActions", "TvRadioActions"], {