+
+ pic = LoadPixmap(cached=True, path=resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/folder.png"))
+ if pic:
+ self.l.setPixmap(self.l.picFolder, pic)
+
+ pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "skin_default/icons/marker.png"))
+ if pic:
+ self.l.setPixmap(self.l.picMarker, pic)
+
+ pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_dvb_s-fs8.png"))
+ if pic:
+ self.l.setPixmap(self.l.picDVB_S, pic)
+
+ pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_dvb_c-fs8.png"))
+ if pic:
+ self.l.setPixmap(self.l.picDVB_C, pic)
+
+ pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_dvb_t-fs8.png"))
+ if pic:
+ self.l.setPixmap(self.l.picDVB_T, pic)
+
+ pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, "ico_service_group-fs8.png"))
+ if pic:
+ self.l.setPixmap(self.l.picServiceGroup, pic)
+
+ self.root = None
+ self.mode = self.MODE_NORMAL
+ self.ItemHeight = 28
+ self.ServiceNameFont = parseFont("Regular;22", ((1,1),(1,1)))
+ self.ServiceInfoFont = parseFont("Regular;18", ((1,1),(1,1)))
+ self.ServiceNumberFont = parseFont("Regular;20", ((1,1),(1,1)))
+ self.onSelectionChanged = [ ]
+
+ def applySkin(self, desktop, parent):
+ attribs = [ ]
+ if self.skinAttributes is not None:
+ attribs = [ ]
+ for (attrib, value) in self.skinAttributes:
+ if attrib == "foregroundColorMarked":
+ self.l.setColor(eListboxServiceContent.markedForeground, parseColor(value))
+ elif attrib == "foregroundColorMarkedSelected":
+ self.l.setColor(eListboxServiceContent.markedForegroundSelected, parseColor(value))
+ elif attrib == "backgroundColorMarked":
+ self.l.setColor(eListboxServiceContent.markedBackground, parseColor(value))
+ elif attrib == "backgroundColorMarkedSelected":
+ self.l.setColor(eListboxServiceContent.markedBackgroundSelected, parseColor(value))
+ elif attrib == "foregroundColorServiceNotAvail":
+ self.l.setColor(eListboxServiceContent.serviceNotAvail, parseColor(value))
+ elif attrib == "colorEventProgressbar":
+ self.l.setColor(eListboxServiceContent.serviceEventProgressbarColor, parseColor(value))
+ elif attrib == "colorEventProgressbarSelected":
+ self.l.setColor(eListboxServiceContent.serviceEventProgressbarColorSelected, parseColor(value))
+ elif attrib == "colorEventProgressbarBorder":
+ self.l.setColor(eListboxServiceContent.serviceEventProgressbarBorderColor, parseColor(value))
+ elif attrib == "colorEventProgressbarBorderSelected":
+ self.l.setColor(eListboxServiceContent.serviceEventProgressbarBorderColorSelected, parseColor(value))
+ elif attrib == "colorServiceDescription":
+ self.l.setColor(eListboxServiceContent.serviceDescriptionColor, parseColor(value))
+ elif attrib == "colorServiceDescriptionSelected":
+ self.l.setColor(eListboxServiceContent.serviceDescriptionColorSelected, parseColor(value))
+ elif attrib == "picServiceEventProgressbar":
+ pic = LoadPixmap(resolveFilename(SCOPE_CURRENT_SKIN, value))
+ if pic:
+ self.l.setPixmap(self.l.picServiceEventProgressbar, pic)
+ elif attrib == "serviceItemHeight":
+ self.ItemHeight = int(value)
+ elif attrib == "serviceNameFont":
+ self.ServiceNameFont = parseFont(value, ((1,1),(1,1)))
+ elif attrib == "serviceInfoFont":
+ self.ServiceInfoFont = parseFont(value, ((1,1),(1,1)))
+ elif attrib == "serviceNumberFont":
+ self.ServiceNumberFont = parseFont(value, ((1,1),(1,1)))
+ else:
+ attribs.append((attrib, value))
+ self.skinAttributes = attribs
+ return GUIComponent.applySkin(self, desktop, parent)
+
+ 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)
+