git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
better fix
[enigma2.git]
/
lib
/
python
/
Components
/
TimerList.py
diff --git
a/lib/python/Components/TimerList.py
b/lib/python/Components/TimerList.py
index d3774cfad56cb32e9cf1e71d57d928b5b81c2d5a..d2ccbb9c688ac960e1102ac5ba04b08da8cd8675 100644
(file)
--- a/
lib/python/Components/TimerList.py
+++ b/
lib/python/Components/TimerList.py
@@
-4,22
+4,11
@@
from GUIComponent import *
from Tools.FuzzyDate import FuzzyTime
import time
from Tools.FuzzyDate import FuzzyTime
import time
-from enigma import eListboxPythonMultiContent, eListbox, gFont, loadPNG
+from enigma import eListboxPythonMultiContent, eListbox, gFont, loadPNG, \
+ RT_HALIGN_CENTER, RT_HALIGN_LEFT, RT_HALIGN_RIGHT, RT_VALIGN_CENTER
from timer import TimerEntry
from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE
from timer import TimerEntry
from Tools.Directories import resolveFilename, SCOPE_SKIN_IMAGE
-RT_HALIGN_LEFT = 0
-RT_HALIGN_RIGHT = 1
-RT_HALIGN_CENTER = 2
-RT_HALIGN_BLOCK = 4
-
-RT_VALIGN_TOP = 0
-RT_VALIGN_CENTER = 8
-RT_VALIGN_BOTTOM = 16
-
-RT_WRAP = 32
-
-
#
# | <Service> <Name of the Timer> |
# | <start, end> <state> |
#
# | <Service> <Name of the Timer> |
# | <start, end> <state> |
@@
-75,7
+64,7
@@
def TimerEntryComponent(timer, processed):
return res
return res
-class TimerList(HTMLComponent, GUIComponent):
+class TimerList(HTMLComponent, GUIComponent
, object
):
def __init__(self, list):
GUIComponent.__init__(self)
self.l = eListboxPythonMultiContent()
def __init__(self, list):
GUIComponent.__init__(self)
self.l = eListboxPythonMultiContent()
@@
-86,10
+75,11
@@
class TimerList(HTMLComponent, GUIComponent):
def getCurrent(self):
return self.l.getCurrentSelection()
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)
def moveToIndex(self, index):
self.instance.moveSelectionTo(index)
@@
-97,13
+87,11
@@
class TimerList(HTMLComponent, GUIComponent):
def getCurrentIndex(self):
return self.instance.getCurrentIndex()
def getCurrentIndex(self):
return self.instance.getCurrentIndex()
+ currentIndex = property(moveToIndex, getCurrentIndex)
+ currentSelection = property(getCurrent)
+
def moveDown(self):
self.instance.moveSelection(self.instance.moveDown)
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()
def invalidate(self):
self.l.invalidate()
-