diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2006-05-01 11:47:04 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2006-05-01 11:47:04 +0000 |
| commit | c0d78035b8c76e719bf7c05ff3812eb5a6ce9fe3 (patch) | |
| tree | 22d7ac7e4f0aaf3b91574d81ac30fd6a9d97fdb7 /lib/python/Components/TimerList.py | |
| parent | 9c5ae5bc6ef248b414e3153538936477cccfdd20 (diff) | |
| download | enigma2-c0d78035b8c76e719bf7c05ff3812eb5a6ce9fe3.tar.gz enigma2-c0d78035b8c76e719bf7c05ff3812eb5a6ce9fe3.zip | |
simplify GUIcreate/createWidget, fix base class order
Diffstat (limited to 'lib/python/Components/TimerList.py')
| -rw-r--r-- | lib/python/Components/TimerList.py | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/python/Components/TimerList.py b/lib/python/Components/TimerList.py index d3774cfa..2f60fcfb 100644 --- a/lib/python/Components/TimerList.py +++ b/lib/python/Components/TimerList.py @@ -75,7 +75,7 @@ def TimerEntryComponent(timer, processed): return res -class TimerList(HTMLComponent, GUIComponent): +class TimerList(HTMLComponent, GUIComponent, object): def __init__(self, list): GUIComponent.__init__(self) self.l = eListboxPythonMultiContent() @@ -86,10 +86,11 @@ class TimerList(HTMLComponent, GUIComponent): def getCurrent(self): return self.l.getCurrentSelection() - def GUIcreate(self, parent): - self.instance = eListbox(parent) - self.instance.setContent(self.l) - self.instance.setItemHeight(70) + GUI_WIDGET = eListbox + + def postWidgetCreate(self, instance): + instance.setContent(self.l) + instance.setItemHeight(70) def moveToIndex(self, index): self.instance.moveSelectionTo(index) @@ -97,13 +98,11 @@ class TimerList(HTMLComponent, GUIComponent): def getCurrentIndex(self): return self.instance.getCurrentIndex() + currentIndex = property(moveToIndex, getCurrentIndex) + currentSelection = property(getCurrent) + def moveDown(self): self.instance.moveSelection(self.instance.moveDown) - def GUIdelete(self): - self.instance.setContent(None) - self.instance = None - def invalidate(self): self.l.invalidate() - |
