diff --git a/lib/python/Components/Renderer/RatingIconLabel.py b/lib/python/Components/Renderer/RatingIconLabel.py index 0f2dc188b9a..4cf32482491 100644 --- a/lib/python/Components/Renderer/RatingIconLabel.py +++ b/lib/python/Components/Renderer/RatingIconLabel.py @@ -14,26 +14,30 @@ def postWidgetCreate(self, instance): self.changed((self.CHANGED_DEFAULT,)) def applySkin(self, desktop, parent): - attribs = self.skinAttributes[:] + attribs = [] for (attrib, value) in self.skinAttributes: if attrib == "colors": self.colors = {int(k): parseColor(v) for k, v in (item.split(":") for item in value.split(","))} + else: + attribs.append((attrib, value)) self.skinAttributes = attribs rc = Renderer.applySkin(self, desktop, parent) self.changed((self.CHANGED_DEFAULT,)) return rc + def hideLabel(self): + self.instance.setText("") + self.instance.hide() + def changed(self, what): if self.source and hasattr(self.source, "text") and self.instance: if what[0] == self.CHANGED_CLEAR: - self.instance.setText("") - self.instance.setPixmap(None) + self.hideLabel() else: if self.source.text: age = int(self.source.text.replace("+", "")) if age == 0: - self.instance.setText("") - self.instance.hide() + self.hideLabel() return if age <= 15: age += 3 @@ -42,5 +46,4 @@ def changed(self, what): self.instance.setBackgroundColor(gRGB(self.colors.get(age, 0x10000000))) self.instance.show() else: - self.instance.setText("") - self.instance.hide() + self.hideLabel()