+ 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 == "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()