X-Git-Url: https://git.cweiske.de/enigma2.git/blobdiff_plain/193333b7bc72ab13d4dee5750b31c3c33041c696..b17019f43527d615589ce2083fb3d2a9058f2c3c:/lib/python/Screens/TimerEdit.py diff --git a/lib/python/Screens/TimerEdit.py b/lib/python/Screens/TimerEdit.py index 4a4185c3..681d3a25 100644 --- a/lib/python/Screens/TimerEdit.py +++ b/lib/python/Screens/TimerEdit.py @@ -1,6 +1,5 @@ from Screen import Screen from Components.TimerList import TimerList, TimerEntryComponent -from Components.ConfigList import ConfigList from Components.MenuList import MenuList from Components.ActionMap import ActionMap from Components.Label import Label @@ -10,7 +9,6 @@ from TimerEntry import TimerEntry, TimerLog from RecordTimer import RecordTimerEntry, parseEvent, AFTEREVENT from time import * from ServiceReference import ServiceReference -from Components.config import * from Components.TimerSanityCheck import TimerSanityCheck class TimerEditList(Screen): @@ -32,7 +30,7 @@ class TimerEditList(Screen): { "ok": self.openEdit, "cancel": self.leave, - "red": self.removeTimer, + "red": self.removeTimerQuestion, "green": self.addCurrentTimer, "blue": self.cleanupQuestion, "yellow": self.toggleDisabledState, @@ -110,8 +108,13 @@ class TimerEditList(Screen): if delete: self.session.nav.RecordTimer.cleanup() self.refill() + + def removeTimerQuestion(self): + self.session.openWithCallback(self.removeTimer, MessageBox, _("Really delete this timer?")) - def removeTimer(self): + def removeTimer(self, result): + if not result: + return list = self["timerlist"] cur = list.getCurrent() if cur: