[gnome-games/sudoku-tube] Remove a somewhat unneeded signal
- From: Zhang Sen <zhangsen src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnome-games/sudoku-tube] Remove a somewhat unneeded signal
- Date: Wed, 8 Jul 2009 14:57:36 +0000 (UTC)
commit ce0398a292fe4a6ae153edb560dac5f2c7d50f94
Author: Zhang Sen <zh jesse gmail com>
Date: Wed Jul 8 21:26:22 2009 +0800
Remove a somewhat unneeded signal
This doesn't have to be a signal
gnome-sudoku/src/lib/gsudoku.py | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/gsudoku.py b/gnome-sudoku/src/lib/gsudoku.py
index 9417768..71c4e06 100644
--- a/gnome-sudoku/src/lib/gsudoku.py
+++ b/gnome-sudoku/src/lib/gsudoku.py
@@ -149,7 +149,6 @@ class ParallelDict (dict):
class SudokuGameDisplay (SudokuNumberGrid, gobject.GObject):
__gsignals__ = {
- 'focus-changed':(gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ()),
'puzzle-finished':(gobject.SIGNAL_RUN_LAST, gobject.TYPE_NONE, ())
}
@@ -176,7 +175,6 @@ class SudokuGameDisplay (SudokuNumberGrid, gobject.GObject):
e.connect('changed', self._entry_callback)
e.connect('focus-in-event', self._focus_callback)
e.connect('key-press-event', self._key_press_cb)
- self.connect('focus-changed', self._highlight_cells)
def _key_press_cb(self, widget, event):
key = gtk.gdk.keyval_name(event.keyval)
@@ -202,7 +200,7 @@ class SudokuGameDisplay (SudokuNumberGrid, gobject.GObject):
def _focus_callback(self, e, event):
self.focused = e
- self.emit('focus-changed')
+ self._highlight_cells()
def _get_highlight_colors(self):
entry = self.__entries__.values()[0]
@@ -234,7 +232,7 @@ class SudokuGameDisplay (SudokuNumberGrid, gobject.GObject):
for e in self.__entries__.values():
e.set_background_color(None)
- def _highlight_cells(self, *args):
+ def _highlight_cells(self):
if not self.do_highlight_cells:
return
self.unhighlight_cells()
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]