self["timerlist"] = TimerList(list)
- self["key_red"] = Button("Delete")
- self["key_green"] = Button("Add")
+ self["key_red"] = Button(_("Delete"))
+ self["key_green"] = Button(_("Add"))
self["key_yellow"] = Button("")
self["key_blue"] = Button("")
self["actions"] = ActionMap(["OkCancelActions", "ShortcutActions"],
{
"ok": self.openEdit,
- "cancel": self.close,
+ "cancel": self.leave,
"red": self.removeTimer,
"green": self.addCurrentTimer
})
# FIXME doesn't work...
self.session.nav.RecordTimer.removeEntry(self["timerlist"].getCurrent()[0])
self.fillTimerList()
- self["timerlist"].l.invalidate()
+ self["timerlist"].invalidate()
def addCurrentTimer(self):
begin = time()
def finishedEdit(self, answer):
if (answer[0]):
print "Edited timer"
+ self.session.nav.RecordTimer.timeChanged(answer[1])
self.fillTimerList()
else:
print "Timeredit aborted"
self.fillTimerList()
else:
print "Timeredit aborted"
+
+ def leave(self):
+ self.session.nav.RecordTimer.saveTimer()
+ self.close()
\ No newline at end of file