diff options
| author | Felix Domke <tmbinc@elitedvb.net> | 2005-05-14 15:23:23 +0000 |
|---|---|---|
| committer | Felix Domke <tmbinc@elitedvb.net> | 2005-05-14 15:23:23 +0000 |
| commit | 7bc4a59528ab13f3062dc1520e76f9ecedd87400 (patch) | |
| tree | 9d6e91be12147eee77d82ec5b49c24ae44f85bd3 /lib/python/Screens/TimerEdit.py | |
| parent | ab8d418f82b2835c267d88ded5d748a6f0e8a852 (diff) | |
| download | enigma2-7bc4a59528ab13f3062dc1520e76f9ecedd87400.tar.gz enigma2-7bc4a59528ab13f3062dc1520e76f9ecedd87400.zip | |
- work on timers
- add eInput widget
- add python/Tools
- add flexible listbox content
Diffstat (limited to 'lib/python/Screens/TimerEdit.py')
| -rw-r--r-- | lib/python/Screens/TimerEdit.py | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/lib/python/Screens/TimerEdit.py b/lib/python/Screens/TimerEdit.py new file mode 100644 index 00000000..41b6a12e --- /dev/null +++ b/lib/python/Screens/TimerEdit.py @@ -0,0 +1,54 @@ +from Screen import Screen +from Components.TimerList import TimerList, TimerEntry +from Components.ActionMap import ActionMap +from Components.TimeInput import TimeInput +from Components.Label import Label +from Components.Button import Button + +class TimerEdit(Screen): + def __init__(self, session, entry): + Screen.__init__(self, session) + + self["actions"] = ActionMap(["OkCancelActions"], + { + "ok": self.apply, + "cancel": self.close + }) + + self.entry = entry + # begin, end, description, service + self["begin"] = TimeInput() + self["end"] = TimeInput() + + self["lbegin"] = Label("Begin") + self["lend"] = Label("End") + + self["description"] = Label("bla") +# TextInput() + self["apply"] = Button("Apply") + self["service"] = Button() + + def apply(self): + print "applied!" + +class TimerEditList(Screen): + def __init__(self, session): + Screen.__init__(self, session) + + list = [ ] + for timer in session.nav.RecordTimer.timer_list: + list.append(TimerEntry(timer, 0)) + + for timer in session.nav.RecordTimer.processed_timers: + list.append(TimerEntry(timer, 1)) + + self["timerlist"] = TimerList(list) + + self["actions"] = ActionMap(["OkCancelActions"], + { + "ok": self.openEdit, + "cancel": self.close + }) + + def openEdit(self): + self.session.open(TimerEdit, self["timerlist"].getCurrent()) |
