From 31683b307f1148b8c16fb25e458523d5da37d9ce Mon Sep 17 00:00:00 2001 From: Zsolt Foldvari Date: Tue, 9 Jan 2007 23:05:29 +0000 Subject: [PATCH] 2007-01-10 Zsolt Foldvari * src/Selectors/_BaseSelector.py (__init__, _on_row_activated): enable selection by Double-click or Enter svn: r7888 --- ChangeLog | 4 ++++ src/Selectors/_BaseSelector.py | 6 +++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index d35d3f0a8..2a5081bf7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +2007-01-10 Zsolt Foldvari + * src/Selectors/_BaseSelector.py (__init__, _on_row_activated): + enable selection by Double-click or Enter + 2007-01-09 Zsolt Foldvari * src/GrampsWidget.py: set_completion_mode() added, exact_completion fixed, cleanup diff --git a/src/Selectors/_BaseSelector.py b/src/Selectors/_BaseSelector.py index a1ca40889..2c2acf63f 100644 --- a/src/Selectors/_BaseSelector.py +++ b/src/Selectors/_BaseSelector.py @@ -70,6 +70,7 @@ class BaseSelector(ManagedWindow.ManagedWindow): window = self.glade.get_widget('select_person') title_label = self.glade.get_widget('title') self.tree = self.glade.get_widget('plist') + self.tree.connect('row-activated', self._on_row_activated) self.set_window(window,title_label,self.title) @@ -118,13 +119,16 @@ class BaseSelector(ManagedWindow.ManagedWindow): return_value = self.get_from_handle_func()(id_list[0]) else: return_value = None - return return_value + return return_value elif val != gtk.RESPONSE_DELETE_EVENT: self.close() return None else: return None + def _on_row_activated(self, treeview, path, view_col): + self.window.response(gtk.RESPONSE_OK) + def _local_init(self): # define selector-specific init routine pass