X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/a7bc9fd319677465f0561773401ff0390ae3af9c..4f46a90d789f28eb0ca156caeb2bb55136d8ac85:/lib/python/Screens/ChannelSelection.py diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index cad99616..d4a1e7ce 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -8,6 +8,9 @@ from Components.config import config, configElement, ConfigSubsection, configTex from Screens.FixedMenu import FixedMenu from Tools.NumericalTextInput import NumericalTextInput from Components.NimManager import nimmanager +from Components.ServiceName import ServiceName +from Components.Clock import Clock +from Components.EventInfo import EventInfo import xml.dom.minidom @@ -542,6 +545,18 @@ class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit): if lastservice.valid() and self.getCurrentSelection() != lastservice: self.servicelist.setCurrent(lastservice) +class ServiceInfoWindow(Screen): + def __init__(self, session): + Screen.__init__(self, session) + self["Service_Name"] = ServiceName(self.session.nav) + self["Clock"] = Clock() + self["Event_Now_StartTime"] = EventInfo(self.session.nav, EventInfo.Now_StartTime) + self["Event_Next_StartTime"] = EventInfo(self.session.nav, EventInfo.Next_StartTime) + self["Event_Now"] = EventInfo(self.session.nav, EventInfo.Now) + self["Event_Next"] = EventInfo(self.session.nav, EventInfo.Next) + self["Event_Now_Duration"] = EventInfo(self.session.nav, EventInfo.Now_Duration) + self["Event_Next_Duration"] = EventInfo(self.session.nav, EventInfo.Next_Duration) + class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit): def __init__(self, session): ChannelSelectionBase.__init__(self, session) @@ -552,6 +567,8 @@ class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit): config.radio.lastroot = configElement("config.radio.lastroot", configText, "", 0); self.onLayoutFinish.append(self.onCreate) + self.info = session.instantiateDialog(ServiceInfoWindow) + class ChannelActionMap(NumberActionMap): def action(self, contexts, action): if not self.csel.enterBouquet(action): @@ -593,6 +610,7 @@ class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit): self.servicelist.setCurrent(lastservice) self.session.nav.playService(lastservice) self.servicelist.setPlayableIgnoreService(lastservice) + self.info.instance.show() def channelSelected(self): # just return selected service ref = self.getCurrentSelection() @@ -607,17 +625,14 @@ class ChannelSelectionRadio(ChannelSelectionBase, ChannelSelectionEdit): self.servicelist.setPlayableIgnoreService(ref) config.radio.lastservice.value = ref.toString() config.radio.lastservice.save() - + config.radio.lastroot.value = self.getRoot().toString() + config.radio.lastroot.save() + def setRoot(self, root, justSet=False): self.setRootBase(root, justSet) def closeRadio(self): - lastroot=eServiceReference(config.radio.lastroot.value) - lastservice=eServiceReference(config.radio.lastservice.value) - if lastroot.valid() and self.getRoot() != lastroot: - self.setRoot(lastroot) - if lastservice.valid() and self.getCurrentSelection() != lastservice: - self.servicelist.setCurrent(lastservice) + self.info.instance.hide() #set previous tv service lastservice=eServiceReference(config.tv.lastservice.value) self.session.nav.playService(lastservice)