[Xword-commits] r129 - trunk
terrencegf at garage.maemo.org
terrencegf at garage.maemo.org
Fri May 30 07:28:28 EEST 2008
Author: terrencegf
Date: 2008-05-30 07:28:27 +0300 (Fri, 30 May 2008)
New Revision: 129
Modified:
trunk/xword
Log:
Stop the clock only when it isn't already running.
Modified: trunk/xword
===================================================================
--- trunk/xword 2008-05-28 21:48:38 UTC (rev 128)
+++ trunk/xword 2008-05-30 04:28:27 UTC (rev 129)
@@ -2236,17 +2236,18 @@
return True
def activate_clock(self, active=True):
- self.clock_running = active
- if self.clock_running:
- self.clock_start = time.time()
- else:
- self.clock_time += (time.time() - self.clock_start)
- for index in range(len(self.clock_buttons)):
- self.clock_buttons[index].handler_block(
- self.clock_buttons_handler_ids[index])
- self.clock_buttons[index].set_active(active)
- self.clock_buttons[index].handler_unblock(
- self.clock_buttons_handler_ids[index])
+ if self.clock_running != active:
+ self.clock_running = active
+ if self.clock_running:
+ self.clock_start = time.time()
+ else:
+ self.clock_time += (time.time() - self.clock_start)
+ for index in range(len(self.clock_buttons)):
+ self.clock_buttons[index].handler_block(
+ self.clock_buttons_handler_ids[index])
+ self.clock_buttons[index].set_active(active)
+ self.clock_buttons[index].handler_unblock(
+ self.clock_buttons_handler_ids[index])
def toolbar_event(self, widget, event):
if event == 'Quit':
More information about the Xword-commits
mailing list