refs bug #429
[enigma2.git] / lib / python / Components / Renderer / Label.py
index 02acb93..e660de1 100644 (file)
@@ -1,19 +1,22 @@
 from Components.VariableText import VariableText
-from Components.GUIComponent import GUIComponent
+from Renderer import Renderer
 
 from enigma import eLabel
 
-class Label(VariableText, GUIComponent):
+class Label(VariableText, Renderer):
        def __init__(self):
-               GUIComponent.__init__(self)
+               Renderer.__init__(self)
                VariableText.__init__(self)
 
        GUI_WIDGET = eLabel
 
        def connect(self, source):
-               source.changed.listen(self.changed)
-               self.source = source
-               self.changed()
+               Renderer.connect(self, source)
+               self.changed((self.CHANGED_DEFAULT,))
+
+       def changed(self, what):
+               if what[0] == self.CHANGED_CLEAR:
+                       self.text = ""
+               else:
+                       self.text = self.source.text
 
-       def changed(self):
-               self.text = self.source.text