aboutsummaryrefslogtreecommitdiff
path: root/lib/python/Components/Button.py
diff options
context:
space:
mode:
authorFelix Domke <tmbinc@elitedvb.net>2006-05-01 11:47:04 +0000
committerFelix Domke <tmbinc@elitedvb.net>2006-05-01 11:47:04 +0000
commitc0d78035b8c76e719bf7c05ff3812eb5a6ce9fe3 (patch)
tree22d7ac7e4f0aaf3b91574d81ac30fd6a9d97fdb7 /lib/python/Components/Button.py
parent9c5ae5bc6ef248b414e3153538936477cccfdd20 (diff)
downloadenigma2-c0d78035b8c76e719bf7c05ff3812eb5a6ce9fe3.tar.gz
enigma2-c0d78035b8c76e719bf7c05ff3812eb5a6ce9fe3.zip
simplify GUIcreate/createWidget, fix base class order
Diffstat (limited to 'lib/python/Components/Button.py')
-rw-r--r--lib/python/Components/Button.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/lib/python/Components/Button.py b/lib/python/Components/Button.py
index cb4b4213..2839a034 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,7 @@ class Button(HTMLComponent, GUIComponent, VariableText):
def produceHTML(self):
return "<input type=\"submit\" text=\"" + self.getText() + "\">\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.selected.get().append(self.push)