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



Author: thomashpa
Date: Wed Apr  8 13:39:53 2009
New Revision: 9018
URL: http://svn.gnome.org/viewvc/gnome-games?rev=9018&view=rev

Log:
Use timeout_add_seconds in sudoku. Also makes this actually work by adding return True

Modified:
   trunk/gnome-sudoku/src/lib/main.py

Modified: trunk/gnome-sudoku/src/lib/main.py
==============================================================================
--- trunk/gnome-sudoku/src/lib/main.py	(original)
+++ trunk/gnome-sudoku/src/lib/main.py	Wed Apr  8 13:39:53 2009
@@ -174,7 +174,7 @@
                 self.quit = False
                 # Generate puzzles in background...
                 if self.gconf['generate_puzzles_in_background']:
-                    gobject.timeout_add(1000,lambda *args: self.start_worker_thread() and True)
+                    gobject.timeout_add_seconds(1,lambda *args: self.start_worker_thread() and True)
 
 
     @inactivate_new_game_etc
@@ -337,7 +337,7 @@
         if bgcol: self.gsd.set_bg_color(bgcol)
 
     def setup_autosave (self):
-        gobject.timeout_add(1000*(self.gconf['auto_save_interval'] or 60), # in seconds...
+        gobject.timeout_add_seconds(self.gconf['auto_save_interval'] or 60, # in seconds...
                             self.autosave)
 
     def setup_main_boxes (self):
@@ -389,6 +389,7 @@
                 self.timer.connect('timing-stopped',self.sudoku_maker.pause)
                 ]
             self.worker.start()
+        return True
 
     @simple_debug
     def stop_worker_thread (self, *args):
@@ -713,6 +714,7 @@
         # have reason to...
         if self.gsd.grid and self.gsd.grid.is_changed() and not self.won:
             self.sudoku_tracker.save_game(self)
+        return True
 
     @simple_debug
     def show_about (self, *args):



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