blue button as timer type shortcut for created timer
authorims <ims21@users.sourceforge.net>
Fri, 6 Sep 2013 15:27:19 +0000 (17:27 +0200)
committerLittlesat <littlesat99@yahoo.com>
Thu, 12 Sep 2013 10:26:05 +0000 (12:26 +0200)
Signed-off-by: Littlesat <littlesat99@yahoo.com>

data/skin_default.xml
lib/python/Screens/TimerEntry.py

index 24f1e3b..89925f7 100644 (file)
@@ -1140,6 +1140,7 @@ self.instance.move(ePoint(orgpos.x() + (orgwidth - newwidth)/2, orgpos.y() + (or
                <ePixmap pixmap="skin_default/buttons/blue.png" position="420,0" size="140,40" alphatest="on" />
                <widget name="canceltext" position="0,0" zPosition="2" size="140,40" halign="center" valign="center" font="Regular;21" backgroundColor="#9f1313" transparent="1" />
                <widget name="oktext" position="140,0" zPosition="2" size="140,40" halign="center" valign="center" font="Regular;21" backgroundColor="#1f771f" transparent="1" />
+               <widget name="key_blue" position="420,0" zPosition="2" size="140,40" halign="center" valign="center" font="Regular;21" backgroundColor="#18188b" transparent="1" />
                <widget name="config" position="10,45" size="540,385" scrollbarMode="showOnDemand" />
        </screen>
        <!-- Timer log -->
index 6649e76..3d83027 100644 (file)
@@ -31,10 +31,11 @@ class TimerEntry(Screen, ConfigListScreen):
                self["canceltext"] = Label(_("Cancel"))
                self["ok"] = Pixmap()
                self["cancel"] = Pixmap()
+               self["key_blue"] = Label(_("Timer type"))
 
                self.createConfig()
 
-               self["actions"] = NumberActionMap(["SetupActions", "GlobalActions", "PiPSetupActions"],
+               self["actions"] = NumberActionMap(["SetupActions", "GlobalActions", "PiPSetupActions", "ColorActions"],
                {
                        "ok": self.keySelect,
                        "save": self.keyGo,
@@ -42,7 +43,8 @@ class TimerEntry(Screen, ConfigListScreen):
                        "volumeUp": self.incrementStart,
                        "volumeDown": self.decrementStart,
                        "size+": self.incrementEnd,
-                       "size-": self.decrementEnd
+                       "size-": self.decrementEnd,
+                       "blue": self.changeTimerType
                }, -2)
 
                self.list = []
@@ -379,6 +381,11 @@ class TimerEntry(Screen, ConfigListScreen):
                self.saveTimer()
                self.close((True, self.timer))
 
+       def changeTimerType(self):
+               self.timerentry_justplay.selectNext()
+               self.timerJustplayEntry = getConfigListEntry(_("Timer type"), self.timerentry_justplay)
+               self["config"].invalidate(self.timerJustplayEntry)
+
        def incrementStart(self):
                self.timerentry_starttime.increment()
                self["config"].invalidate(self.entryStartTime)