1 from HTMLComponent import *
2 from GUIComponent import *
4 from Tools.FuzzyDate import FuzzyTime
6 from enigma import eListboxPythonMultiContent, eListbox, gFont
22 # | <Service> <Name of the Timer> |
25 def TimerEntryComponent(timer, processed):
29 res.append((0, 0, 400, 30, 0, RT_HALIGN_LEFT, timer.service_ref.getServiceName()))
30 res.append((0, 30, 200, 20, 1, RT_HALIGN_LEFT, "%s, %s" % FuzzyTime(timer.begin)))
32 res.append((300, 0, 200, 20, 1, RT_HALIGN_RIGHT, timer.description))
34 res.append((300, 30, 200, 20, 1, RT_HALIGN_RIGHT, FuzzyTime(timer.end)[1]))
36 res.append((300, 30, 200, 20, 1, RT_HALIGN_RIGHT, "done"))
39 class TimerList(HTMLComponent, GUIComponent):
40 def __init__(self, list):
41 GUIComponent.__init__(self)
42 self.l = eListboxPythonMultiContent()
44 self.l.setFont(0, gFont("Arial", 20))
45 self.l.setFont(1, gFont("Arial", 18))
48 return self.l.getCurrentSelection()
50 def GUIcreate(self, parent):
51 self.instance = eListbox(parent)
52 self.instance.setContent(self.l)
53 self.instance.setItemHeight(50)
56 self.instance.setContent(None)