[gnome-games/applygsoc2009: 6/76] Extract method of running background-generator
- From: Pablo Castellano <pablog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/applygsoc2009: 6/76] Extract method of running background-generator
- Date: Mon, 6 Sep 2010 02:47:44 +0000 (UTC)
commit a616ec65a410b7358bc4c29d33eca9703180ceee
Author: Pablo Castellano <pablog src gnome org>
Date: Thu Aug 26 04:32:13 2010 +0200
Extract method of running background-generator
gnome-sudoku/src/lib/main.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index 7affa80..42b59ac 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -130,12 +130,20 @@ class UI (gconf_wrapper.GConfWrapper):
self.sudoku_tracker = saver.SudokuTracker()
# generate puzzles while our use is working...
self.show()
+ self.quit = False
if run_selector:
if self.select_game():
# If this return True, the user closed...
self.quit = True
else:
self.quit = False
+ self._run_background_generator()
+
+ def _run_background_generator (self):
+ """Generate puzzles in background"""
+ if self.gconf['generate_puzzles_in_background']:
+ gobject.timeout_add_seconds(1,
+ lambda *args: self.start_worker_thread() and True)
# Generate puzzles in background...
gobject.timeout_add_seconds(1, lambda *args: self.start_worker_thread() and True)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]