gnome-games r9003 - trunk/gnome-sudoku/src/lib
- From: thomashpa svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-games r9003 - trunk/gnome-sudoku/src/lib
- Date: Tue, 7 Apr 2009 00:17:26 +0000 (UTC)
Author: thomashpa
Date: Tue Apr 7 00:17:26 2009
New Revision: 9003
URL: http://svn.gnome.org/viewvc/gnome-games?rev=9003&view=rev
Log:
Clean up and simplification of get_focused_entry. Patch by Zhang Sen. From bug #530171
Modified:
trunk/gnome-sudoku/src/lib/gsudoku.py
Modified: trunk/gnome-sudoku/src/lib/gsudoku.py
==============================================================================
--- trunk/gnome-sudoku/src/lib/gsudoku.py (original)
+++ trunk/gnome-sudoku/src/lib/gsudoku.py Tue Apr 7 00:17:26 2009
@@ -661,9 +661,7 @@
self.table.set_border_width(self.big_spacing)
def get_focused_entry (self):
- for e in self.__entries__.values():
- if e.is_focus():
- return e
+ return self.table.focus_child
def set_bg_color (self, color):
if type(color)==str:
@@ -1093,7 +1091,7 @@
def auto_fill_current_entry (self):
e = self.get_focused_entry()
if not e: return
- filled = self.grid.auto_fill_for_xy(e.x,e.y)
+ filled = self.grid.auto_fill_for_xy(e.x,e.y)
if filled and filled!=-1:
e.set_text_interactive('')
e.set_text_interactive(str(filled[1]))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]