[gnome-games/sudoku-tube] Clear notes on game close
- From: Zhang Sen <zhangsen src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnome-games/sudoku-tube] Clear notes on game close
- Date: Wed, 5 Aug 2009 02:52:33 +0000 (UTC)
commit 37566968825fb81994427606172818657148c5ef
Author: Zhang Sen <zh jesse gmail com>
Date: Wed Aug 5 10:07:59 2009 +0800
Clear notes on game close
gnome-sudoku/src/lib/view.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/view.py b/gnome-sudoku/src/lib/view.py
index 5cd183a..8003b4f 100644
--- a/gnome-sudoku/src/lib/view.py
+++ b/gnome-sudoku/src/lib/view.py
@@ -235,6 +235,7 @@ class SudokuView(SudokuNumberGrid):
self.set_readonly_appearance(x, y, False)
self.set_color(x, y, None)
self._tracker.reset()
+ self._reset_notes()
def connect_to_model(self, model):
if not model:
@@ -300,6 +301,10 @@ class SudokuView(SudokuNumberGrid):
x, y, top_note, bottom_note = notes
self.__entries__[(x, y)].set_notes((top_note, bottom_note))
+ def _reset_notes(self):
+ for e in self.__entries__.values():
+ e.set_notes(("", ""))
+
def _number_changed_cb(self, widget, new_number):
x, y = widget.x, widget.y
# Use the displayed value, instead of that from the grid;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]