gnome-games r8118 - branches/gnome-2-24/gnome-sudoku/src/lib



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

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

Modified:
   branches/gnome-2-24/gnome-sudoku/src/lib/saver.py
   branches/gnome-2-24/gnome-sudoku/src/lib/timer.py

Modified: branches/gnome-2-24/gnome-sudoku/src/lib/saver.py
==============================================================================
--- branches/gnome-2-24/gnome-sudoku/src/lib/saver.py	(original)
+++ branches/gnome-2-24/gnome-sudoku/src/lib/saver.py	Mon Oct 20 17:51:48 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: branches/gnome-2-24/gnome-sudoku/src/lib/timer.py
==============================================================================
--- branches/gnome-2-24/gnome-sudoku/src/lib/timer.py	(original)
+++ branches/gnome-2-24/gnome-sudoku/src/lib/timer.py	Mon Oct 20 17:51:48 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]