From 5561f5ec4f0a55d9256c3eab0ce121ae82ee5c90 Mon Sep 17 00:00:00 2001 From: Felix Domke Date: Thu, 19 May 2005 22:55:45 +0000 Subject: [PATCH] - add shortcuts - shortcuts are used for focus in TimerEdit (sucks yet) --- keymap.xml | 14 ++++++++++++++ lib/python/Screens/TimerEdit.py | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/keymap.xml b/keymap.xml index e4e51ea..fa7cd6e 100644 --- a/keymap.xml +++ b/keymap.xml @@ -27,6 +27,8 @@ + + @@ -74,4 +76,16 @@ + + + + + + + + + + + + diff --git a/lib/python/Screens/TimerEdit.py b/lib/python/Screens/TimerEdit.py index 41b6a12..2fe389e 100644 --- a/lib/python/Screens/TimerEdit.py +++ b/lib/python/Screens/TimerEdit.py @@ -15,6 +15,12 @@ class TimerEdit(Screen): "cancel": self.close }) + self["shortcuts"] = ActionMap(["ShortcutActions"], + { + "red": self.beginFocus, + "yellow": self.endFocus + }) + self.entry = entry # begin, end, description, service self["begin"] = TimeInput() @@ -28,6 +34,12 @@ class TimerEdit(Screen): self["apply"] = Button("Apply") self["service"] = Button() + def beginFocus(self): + self.setFocus(self["begin"]) + + def endFocus(self): + self.setFocus(self["end"]) + def apply(self): print "applied!" -- 2.7.4