[gnome-games] sudoku: Fixed mark timing
- From: Thomas Hindoe Paaboel Andersen <thomashpa src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games] sudoku: Fixed mark timing
- Date: Tue, 6 Apr 2010 19:36:20 +0000 (UTC)
commit f235e03e98e960a69627f5b4afacb9f14d599bad
Author: Jim Ross <jimbo dimensia com>
Date: Wed Mar 31 03:53:55 2010 -0400
sudoku: Fixed mark timing
The problem is, when the main window is not active(timer paused) and
the auto-save kicks in - the timer always gets restarted in mark_timing().
This patch fixes it by storing the current value of self.is_timing at the start
of mark_timing() and then checking it before calling resume_timing().
Fixes bug #562782
gnome-sudoku/src/lib/timer.py | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/timer.py b/gnome-sudoku/src/lib/timer.py
index bd5e2de..c37511a 100644
--- a/gnome-sudoku/src/lib/timer.py
+++ b/gnome-sudoku/src/lib/timer.py
@@ -132,13 +132,15 @@ class ActiveTimer (gobject.GObject):
self.resume_timing()
def mark_timing(self):
+ currently_timing = self.is_timing
self.pause_timing()
if self.active_time < 1:
self.active_time = 1
# dirty hack: never let total time be less than active time
if self.active_time > self.total_time:
self.total_time = self.active_time
- self.resume_timing()
+ if currently_timing:
+ self.resume_timing()
def finish_timing (self):
self.mark_timing()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]