gnome-games r8119 - trunk/gnome-sudoku/src/lib



Author: thomashpa
Date: Mon Oct 20 17:54:57 2008
New Revision: 8119
URL: http://svn.gnome.org/viewvc/gnome-games?rev=8119&view=rev

Log:
Add, not overwrite, time and also remember to actually save the time in the file. Fixes bug #556155

Modified:
   trunk/gnome-sudoku/src/lib/saver.py
   trunk/gnome-sudoku/src/lib/timer.py

Modified: trunk/gnome-sudoku/src/lib/saver.py
==============================================================================
--- trunk/gnome-sudoku/src/lib/saver.py	(original)
+++ trunk/gnome-sudoku/src/lib/saver.py	Mon Oct 20 17:54:57 2008
@@ -8,6 +8,7 @@
                    ('gsd.auto_fills'),
                    ('timer.__absolute_start_time__'),
                    ('timer.tot_time'),
+                   ('timer.tot_time_complete'),
                    ]
 
 def super_getattr (obj, attr):

Modified: trunk/gnome-sudoku/src/lib/timer.py
==============================================================================
--- trunk/gnome-sudoku/src/lib/timer.py	(original)
+++ trunk/gnome-sudoku/src/lib/timer.py	Mon Oct 20 17:54:57 2008
@@ -151,7 +151,7 @@
             end_time = time.time()
             self.timing_running = False
             self.tot_time += (end_time - self.timing_started_at)
-            self.tot_time_complete = end_time - self.__absolute_start_time__
+            self.tot_time_complete += end_time - self.__absolute_start_time__
             self.emit('timing-stopped')
 
     def start_timing (self):
@@ -169,7 +169,6 @@
         # dirty hack: never let total time be less than active time
         if self.tot_time > self.tot_time_complete:
             self.tot_time_complete = self.tot_time;
-        self.__absolute_start_time__ = 0
 
     # make sure to call finish_timing before using this function
     def active_time_string (self):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]