X-Git-Url: http://code.vuplus.com/gitweb/?p=vuplus_dvbapp;a=blobdiff_plain;f=lib%2Fpython%2FComponents%2FButton.py;h=2a60a98fa9a241e1f1083653127505442cb4e7cb;hp=d773b2c10d16c2b81213f9a12969e28e0e0b7e1c;hb=a9984df92fc78bd4955b24502724b74b935dcc3f;hpb=aa3e781f31a04223416f0a34b25ab95fc0bef429 diff --git a/lib/python/Components/Button.py b/lib/python/Components/Button.py index d773b2c..2a60a98 100644 --- a/lib/python/Components/Button.py +++ b/lib/python/Components/Button.py @@ -1,10 +1,10 @@ -from HTMLComponent import * -from GUIComponent import * -from VariableText import * +from HTMLComponent import HTMLComponent +from GUIComponent import GUIComponent +from VariableText import VariableText 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) @@ -17,23 +17,20 @@ class Button(HTMLComponent, GUIComponent, VariableText): return 0 def disable(self): -# self.instance.hide() pass def enable(self): -# self.instance.show() pass # html: def produceHTML(self): return "\n" -# GUI: - def createWidget(self, parent, skindata): - g = eButton(parent) - g.selected.get().append(self.push) - return g + GUI_WIDGET = eButton - def removeWidget(self, w): - w.selected.get().remove(self.push) + def postWidgetCreate(self, instance): + instance.setText(self.text) + instance.selected.get().append(self.push) + def preWidgetRemove(self, instance): + instance.selected.get().remove(self.push)