[gnome-games/applygsoc2009: 44/76] XXX: Make clear-grid work
- From: Pablo Castellano <pablog src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-games/applygsoc2009: 44/76] XXX: Make clear-grid work
- Date: Mon, 6 Sep 2010 02:50:55 +0000 (UTC)
commit 8a9a4d6cb5570118a5394daaf694f9b849c31ac6
Author: Pablo Castellano <pablog src gnome org>
Date: Thu Aug 26 16:14:51 2010 +0200
XXX: Make clear-grid work
gnome-sudoku/src/lib/gsudoku.py | 2 ++
gnome-sudoku/src/lib/main.py | 13 +++++++++++++
2 files changed, 15 insertions(+), 0 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/gsudoku.py b/gnome-sudoku/src/lib/gsudoku.py
index 4cef1af..9bd4b2a 100644
--- a/gnome-sudoku/src/lib/gsudoku.py
+++ b/gnome-sudoku/src/lib/gsudoku.py
@@ -332,6 +332,8 @@ class SudokuModel:
self.show_impossible_implications = False
self.impossible_hints = 0
self.impossibilities = []
+ self.__trackers_tracking__ = {}
+ self.group_size = group_size
self._setup_grid(grid, group_size)
self._observers = []
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index 83b1860..49a3aba 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -240,6 +240,19 @@ class UI (gconf_wrapper.GConfWrapper):
action = self.builder.get_object(action_name)
action.connect("activate", callback)
+ edit_actions = [
+ ("Clear", self.clear_cb),
+ ("ClearNotes", self.clear_notes_cb),
+ ]
+ for action_name, callback in edit_actions:
+ action = self.builder.get_object(action_name)
+ action.connect("activate", callback)
+
+ def clear_cb (self, *args)
+ self._main_model.reset_grid()
+
+# def clear_notes_cb (self, *args): #?!?!?
+
def setup_undo (self):
#TODO
return
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]