add ugly buttons to the TimerEntry and change behaviour on pressing OK
authorStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Tue, 22 Nov 2005 13:18:50 +0000 (13:18 +0000)
committerStefan Pluecken <stefan.pluecken@multimedia-labs.de>
Tue, 22 Nov 2005 13:18:50 +0000 (13:18 +0000)
data/skin.xml
lib/python/Screens/TimerEntry.py

index bf6465c..7dafd68 100644 (file)
@@ -99,6 +99,8 @@
                </screen>
                <screen name="TimerEntry" position="100,100" size="500,400" title="Timer entry">
                        <widget name="config" position="5,10" size="480,350" />
                </screen>
                <screen name="TimerEntry" position="100,100" size="500,400" title="Timer entry">
                        <widget name="config" position="5,10" size="480,350" />
+                       <widget name="ok" position="140,365" size="38,20" font="Arial;20" backgroundColor="green" />
+                       <widget name="cancel" position="240,365" size="70,20" font="Arial;20" backgroundColor="red" />
                </screen>
                <screen name="NetworkSetup" position="140,125" size="460,280" title="Network Setup">
                        <widget name="config" position="10,50" size="420,175" />
                </screen>
                <screen name="NetworkSetup" position="140,125" size="460,280" title="Network Setup">
                        <widget name="config" position="10,50" size="420,175" />
index b00d16d..467f851 100644 (file)
@@ -12,12 +12,16 @@ class TimerEntry(Screen):
        def __init__(self, session, timer):
                Screen.__init__(self, session)
                self.timer = timer;
        def __init__(self, session, timer):
                Screen.__init__(self, session)
                self.timer = timer;
+               
+               self["ok"] = Label("OK")
+               self["cancel"] = Label("Cancel")
 
                self.createConfig()
 
                self["actions"] = NumberActionMap(["SetupActions"],
                {
 
                self.createConfig()
 
                self["actions"] = NumberActionMap(["SetupActions"],
                {
-                       "ok": self.keyGo,
+                       "ok": self.keySelect,
+                       "save": self.keyGo,
                        "cancel": self.keyCancel,
                        "left": self.keyLeft,
                        "right": self.keyRight,
                        "cancel": self.keyCancel,
                        "left": self.keyLeft,
                        "right": self.keyRight,
@@ -167,6 +171,9 @@ class TimerEntry(Screen):
        def keyRight(self):
                self["config"].handleKey(config.key["nextElement"])
                self.newConfig()
        def keyRight(self):
                self["config"].handleKey(config.key["nextElement"])
                self.newConfig()
+               
+       def keySelect(self):
+               pass
 
        def keyNumberGlobal(self, number):
                print "You pressed number " + str(number)
 
        def keyNumberGlobal(self, number):
                print "You pressed number " + str(number)