[gnome-games/applygsoc2009] How to replace the job that dialog_swaller did before?
- From: Pablo Castellano <pablog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/applygsoc2009] How to replace the job that dialog_swaller did before?
- Date: Wed, 8 Sep 2010 19:02:42 +0000 (UTC)
commit 7a077605082d3900395db7c7c938b6b4126ce9b7
Author: Pablo Castellano <pablog src gnome org>
Date: Wed Sep 8 20:59:53 2010 +0200
How to replace the job that dialog_swaller did before?
gnome-sudoku/data/main.ui | 9 ++++-----
gnome-sudoku/src/lib/main.py | 17 ++++++++++++-----
2 files changed, 16 insertions(+), 10 deletions(-)
---
diff --git a/gnome-sudoku/data/main.ui b/gnome-sudoku/data/main.ui
index fc2032f..619e431 100644
--- a/gnome-sudoku/data/main.ui
+++ b/gnome-sudoku/data/main.ui
@@ -272,7 +272,6 @@
<object class="GtkToolButton" id="tb_undo">
<property name="visible">True</property>
<property name="related_action">Undo</property>
- <property name="is_important">True</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -284,8 +283,6 @@
<object class="GtkToolButton" id="tb_redo">
<property name="visible">True</property>
<property name="related_action">Redo</property>
- <property name="is_important">True</property>
- <property name="use_underline">True</property>
</object>
<packing>
<property name="expand">False</property>
@@ -304,7 +301,6 @@
<object class="GtkToolButton" id="tb_show_possible">
<property name="visible">True</property>
<property name="related_action">ShowPossible</property>
- <property name="is_important">True</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -324,7 +320,6 @@
<object class="GtkToggleToolButton" id="tb_toggle_tracker">
<property name="visible">True</property>
<property name="related_action">ToggleTracker</property>
- <property name="is_important">True</property>
<property name="use_underline">True</property>
</object>
<packing>
@@ -431,6 +426,7 @@
<property name="label">_Hint</property>
<property name="tooltip">Show which numbers could go in the current square</property>
<property name="stock_id">gtk-dialog-info</property>
+ <property name="is_important">True</property>
</object>
<object class="GtkAction" id="ClearTopNotes">
<property name="label">Clear _Top Notes</property>
@@ -461,11 +457,13 @@
<property name="label">_Undo</property>
<property name="tooltip">Undo last action</property>
<property name="stock_id">gtk-undo</property>
+ <property name="is_important">True</property>
</object>
<object class="GtkAction" id="Redo">
<property name="label">_Redo</property>
<property name="tooltip">Redo last action</property>
<property name="stock_id">gtk-redo</property>
+ <property name="is_important">True</property>
</object>
<object class="GtkToggleAction" id="AlwaysShowPossible">
<property name="label">_Always show hint</property>
@@ -480,6 +478,7 @@
<property name="label">_Track additions</property>
<property name="tooltip">Mark new additions in a separate color so you can keep track of them</property>
<property name="stock_id">tracks</property>
+ <property name="is_important">True</property>
</object>
<object class="GtkToggleAction" id="ToggleToolbar">
<property name="label">Show _Toolbar</property>
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index 09b5e9d..d4fadee 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -62,15 +62,15 @@ class SudokuGame (gconf_wrapper.GConfWrapper):
)
self.sudoku_maker = sudoku_maker.SudokuMaker()
self.sudoku_tracker = saver.SudokuTracker()
-
+
self._main_model = None
self._notes_model = None
self._main_grid_vew = None
-
+
self._history_manager = None
-
+
self.setup_gui()
-
+
self.timer = timer.ActiveTimer(self.w)
self.won = False
self.worker_connections = []
@@ -79,6 +79,10 @@ class SudokuGame (gconf_wrapper.GConfWrapper):
self._auto_open_game()
self.show()
+
+ #if run_selector: #FIXME
+ self._select_game()
+
# generate puzzles while our use is working...
self._run_background_generator()
@@ -194,9 +198,11 @@ class SudokuGame (gconf_wrapper.GConfWrapper):
Return None if user cancels."""
# self.update_statusbar() # make the statusbar empty # FIXME
self.toolbar.hide()
+
selector = game_selector.NewOrSavedGameSelector()
choice = selector.run_dialog()
selector.dialog.destroy()
+
return choice
def show (self):
@@ -316,7 +322,7 @@ class SudokuGame (gconf_wrapper.GConfWrapper):
self.builder.get_object('ToggleHighlight')),
('show_tracker',
self.builder.get_object('ToggleTracker'))]]
-
+
def start_worker_thread (self):
n_new_puzzles = self.sudoku_maker.n_puzzles(new = True)
try:
@@ -383,6 +389,7 @@ class SudokuGame (gconf_wrapper.GConfWrapper):
def new_cb (self, *args):
if self._close_current_game():
self._auto_open_game()
+ self._select_game()
return
def _close_current_game (self):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]