X-Git-Url: http://code.vuplus.com/gitweb/?a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FButton.py;h=f1acb99d8c1ef5aef102a01d5967ec97b1cc7973;hb=dfdccbf874feecf333134d1901909ed15afcfdc0;hp=cb4b42139550fad53e2be63be7407480741166bc;hpb=9c22bd14f76cbc38c14d417dc185cdcdfc610665;p=vuplus_dvbapp diff --git a/lib/python/Components/Button.py b/lib/python/Components/Button.py index cb4b421..f1acb99 100644 --- a/lib/python/Components/Button.py +++ b/lib/python/Components/Button.py @@ -4,7 +4,7 @@ from VariableText import * from enigma import eButton -class Button(HTMLComponent, GUIComponent, VariableText): +class Button(VariableText, HTMLComponent, GUIComponent): def __init__(self, text="", onClick = [ ]): GUIComponent.__init__(self) VariableText.__init__(self) @@ -26,12 +26,8 @@ class Button(HTMLComponent, GUIComponent, VariableText): def produceHTML(self): return "\n" -# GUI: - def createWidget(self, parent): - g = eButton(parent) - g.selected.get().append(self.push) - return g - - def removeWidget(self, w): - w.selected.get().remove(self.push) + GUI_WIDGET = eButton + def postWidgetCreate(self, instance): + instance.setText(self.text) + instance.selected.get().append(self.push)