[clocks] fixing timer hour arrows
- From: Seif Lotfy <seiflotfy src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clocks] fixing timer hour arrows
- Date: Mon, 30 Jul 2012 13:41:33 +0000 (UTC)
commit 91810e1b05af0e12d288c46ffba50b556483abe6
Author: Eslam Mostafa <cseslam gmail com>
Date: Sat Jul 28 21:06:55 2012 +0200
fixing timer hour arrows
Signed-off-by: Seif Lotfy <seif lotfy com>
timer.py | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/timer.py b/timer.py
index 64e2e9d..6294ac5 100644
--- a/timer.py
+++ b/timer.py
@@ -46,9 +46,7 @@ class Spinner(Gtk.Box):
#Down Button
self.down = Gtk.Button()
self.down.set_image(imageDown)
- self.down.set_relief(Gtk.ReliefStyle.NONE)
- if self.vType == 'hours':
- self.down.set_sensitive(False)
+ self.down.set_relief(Gtk.ReliefStyle.NONE)
#
self.pack_start(self.up, False, False, 0)
self.pack_start(self.value, True, True, 0)
@@ -66,8 +64,10 @@ class Spinner(Gtk.Box):
def _increase(self, widget):
value = self.get_value()
if self.vType == 'hours':
- value += 1
- self.down.set_sensitive(True)
+ if value == 24:
+ value = 0
+ else:
+ value += 1
elif self.vType == 'minutes':
if value == 59:
value = 0
@@ -85,7 +85,7 @@ class Spinner(Gtk.Box):
value = self.get_value()
if self.vType == 'hours':
if value == 0:
- self.down.set_sensitive(False)
+ value = 24
else:
value -= 1
elif self.vType == 'minutes':
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]