X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/67b53c1cb06988394c35a6e965c99b72b67fe1be..1109344c9409572f9829e46971b71a7fe1d3c8cc:/lib/python/Components/ServiceList.py diff --git a/lib/python/Components/ServiceList.py b/lib/python/Components/ServiceList.py index b255cd99..4a27c768 100644 --- a/lib/python/Components/ServiceList.py +++ b/lib/python/Components/ServiceList.py @@ -35,8 +35,25 @@ class ServiceList(HTMLComponent, GUIComponent): if pic: self.l.setPixmap(self.l.picDVB_T, pic) + pic = loadPNG(resolveFilename(SCOPE_SKIN_IMAGE, "ico_service_group-fs8.png")) + if pic: + self.l.setPixmap(self.l.picServiceGroup, pic) + 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) @@ -89,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): @@ -118,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()