From ada8c3095570a6dfb584c09b7f38d60afbbc7593 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Mon, 18 Oct 2010 13:32:19 +0000 Subject: [PATCH] usibility tweak on surname columns svn: r16008 --- src/gui/editors/displaytabs/surnametab.py | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/gui/editors/displaytabs/surnametab.py b/src/gui/editors/displaytabs/surnametab.py index 516ffb2d4..25b82dd89 100644 --- a/src/gui/editors/displaytabs/surnametab.py +++ b/src/gui/editors/displaytabs/surnametab.py @@ -93,6 +93,8 @@ class SurnameTab(EmbeddedList): renderer.set_property('editable', not self.dbstate.db.readonly) renderer.connect('editing_started', self.edit_start, colno) renderer.connect('edited', self.edit_inline, colno) + #no sorting + self.columns[colno].set_sort_column_id(-1) # now we add the two special columns # TODO @@ -175,14 +177,14 @@ class SurnameTab(EmbeddedList): if not EmbeddedList.key_pressed(self, obj, event): if event.type == gtk.gdk.KEY_PRESS and event.keyval in (_TAB,): if event.state not in (gtk.gdk.SHIFT_MASK, gtk.gdk.CONTROL_MASK): - self.next_cell() + return self.next_cell() elif event.state in (gtk.gdk.SHIFT_MASK, gtk.gdk.CONTROL_MASK): - self.prev_cell() + return self.prev_cell() else: return else: return - return True + return True def next_cell(self): """ @@ -208,6 +210,9 @@ class SurnameTab(EmbeddedList): else: #stop editing self.curr_celle.editing_done() + return + return True + def prev_cell(self): """ @@ -233,3 +238,5 @@ class SurnameTab(EmbeddedList): else: #stop editing self.curr_celle.editing_done() + return + return True