From 36940d42cf3cc58b40a5a6f5fe86bad50ff48ad7 Mon Sep 17 00:00:00 2001 From: Andreas Monzner Date: Sat, 3 Dec 2005 15:53:37 +0000 Subject: fix marking non playable services in channellist --- lib/python/Components/ServiceList.py | 3 +++ lib/python/Screens/ChannelSelection.py | 12 ++++++++++++ 2 files changed, 15 insertions(+) (limited to 'lib/python') diff --git a/lib/python/Components/ServiceList.py b/lib/python/Components/ServiceList.py index 84e9e82e..d008c475 100644 --- a/lib/python/Components/ServiceList.py +++ b/lib/python/Components/ServiceList.py @@ -70,6 +70,9 @@ class ServiceList(HTMLComponent, GUIComponent): def setNumberOffset(self, offset): self.l.setNumberOffset(offset) + def setPlayableIgnoreService(self, ref): + self.l.setIgnoreService(ref) + def setRoot(self, root): self.root = root self.l.setRoot(root) diff --git a/lib/python/Screens/ChannelSelection.py b/lib/python/Screens/ChannelSelection.py index ae344dcc..03182ab8 100644 --- a/lib/python/Screens/ChannelSelection.py +++ b/lib/python/Screens/ChannelSelection.py @@ -364,6 +364,14 @@ class ChannelSelection(ChannelSelectionBase, ChannelSelectionEdit): "0": self.keyNumberGlobal }) self["actions"].csel = self + self.onShown.append(self.onShow) + + def onShow(self): + ref = self.session.nav.getCurrentlyPlayingServiceReference() + if ref.valid() and ref.getPath() == "": + self.servicelist.setPlayableIgnoreService(ref) + else: + self.servicelist.setPlayableIgnoreService(eServiceReference()) def showEPGList(self): ref=self.servicelist.getCurrent() @@ -430,6 +438,9 @@ class SimpleChannelSelection(ChannelSelectionBase): "cancel": self.cancel, "ok": self.channelSelected, "showFavourites": self.showFavourites, + "showAllServices": self.showAllServices, + "showProviders": self.showProviders, + "showSatellites": self.showSatellites, "1": self.keyNumberGlobal, "2": self.keyNumberGlobal, "3": self.keyNumberGlobal, @@ -445,6 +456,7 @@ class SimpleChannelSelection(ChannelSelectionBase): def onExecCallback(self): print "onExecCallback" + self.showFavourites() self.session.currentDialog.instance.setTitle(self.title) def channelSelected(self): # just return selected service -- cgit v1.2.3