aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/ServiceList.py
diff options
context:
space:
mode:
authorAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-07-22 17:38:25 +0000
committerAndreas Monzner <andreas.monzner@multimedia-labs.de>2007-07-22 17:38:25 +0000
commit1109344c9409572f9829e46971b71a7fe1d3c8cc (patch)
tree2f183531f479e6b94e1bff596b6a84036149296a /lib/python/Components/ServiceList.py
parente69fde464582ffb74d03510f7ba45542af17d730 (diff)
downloadenigma2-1109344c9409572f9829e46971b71a7fe1d3c8cc.tar.gz
enigma2-1109344c9409572f9829e46971b71a7fe1d3c8cc.zip
show event information of current selected event in channelselection
Diffstat (limited to 'lib/python/Components/ServiceList.py')
-rw-r--r--lib/python/Components/ServiceList.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/python/Components/ServiceList.py b/lib/python/Components/ServiceList.py
index a113eb9b..4a27c768 100644
--- a/lib/python/Components/ServiceList.py
+++ b/lib/python/Components/ServiceList.py
@@ -41,6 +41,19 @@ class ServiceList(HTMLComponent, GUIComponent):
self.root = None
self.mode = self.MODE_NORMAL
+ self.onSelectionChanged = [ ]
+
+ def connectSelChanged(self, fnc):
+ if not fnc in self.onSelectionChanged:
+ self.onSelectionChanged.append(fnc)
+
+ def disconnectSelChanged(self, fnc):
+ if fnc in self.onSelectionChanged:
+ self.onSelectionChanged.remove(fnc)
+
+ def selectionChanged(self):
+ for x in self.onSelectionChanged:
+ x()
def setCurrent(self, ref):
self.l.setCurrent(ref)
@@ -93,6 +106,7 @@ class ServiceList(HTMLComponent, GUIComponent):
def postWidgetCreate(self, instance):
instance.setWrapAround(True)
instance.setContent(self.l)
+ instance.selectionChanged.get().append(self.selectionChanged)
self.setMode(self.mode)
def getRoot(self):
@@ -122,6 +136,7 @@ class ServiceList(HTMLComponent, GUIComponent):
self.l.setRoot(root, justSet)
if not justSet:
self.l.sort()
+ self.selectionChanged()
def removeCurrent(self):
self.l.removeCurrent()