# | <start> <end> |
#
def TimerEntry(timer, processed):
- res = [ ]
+ res = [ timer ]
res.append((0, 0, 400, 30, 0, RT_HALIGN_LEFT, timer.service_ref.getServiceName()))
res.append((0, 30, 200, 20, 1, RT_HALIGN_LEFT, "%s, %s" % FuzzyTime(timer.begin)))
from Components.TimeInput import TimeInput
from Components.Label import Label
from Components.Button import Button
+from Components.TextInput import TextInput
class TimerEdit(Screen):
def __init__(self, session, entry):
self["shortcuts"] = ActionMap(["ShortcutActions"],
{
"red": self.beginFocus,
- "yellow": self.endFocus
+ "yellow": self.endFocus,
+ "green": self.descFocus
})
self.entry = entry
self["lbegin"] = Label("Begin")
self["lend"] = Label("End")
- self["description"] = Label("bla")
-# TextInput()
+ self["description"] = TextInput()
self["apply"] = Button("Apply")
self["service"] = Button()
+
+ self["description"].setText(entry.description);
def beginFocus(self):
self.setFocus(self["begin"])
def endFocus(self):
self.setFocus(self["end"])
+ def descFocus(self):
+ self.setFocus(self["description"])
+
def apply(self):
print "applied!"
})
def openEdit(self):
- self.session.open(TimerEdit, self["timerlist"].getCurrent())
+ self.session.open(TimerEdit, self["timerlist"].getCurrent()[0])