From a485ed030309f1908dfec742a5cf22d347d97f0f Mon Sep 17 00:00:00 2001 From: Tim Waugh Date: Sat, 1 Nov 2003 15:01:10 +0000 Subject: [PATCH] 2003-11-01 Tim Waugh * src/PeopleStore.py: Fixed double-click behaviour (bug #834104). svn: r2303 --- gramps2/ChangeLog | 3 +++ gramps2/src/PeopleStore.py | 12 ++++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index b2f3ca508..3d5091daf 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,6 @@ +2003-11-01 Tim Waugh + * src/PeopleStore.py: Fixed double-click behaviour (bug #834104). + 2003-10-31 Tim Waugh * src/Makefile.am: Remove DrawDoc.py, TextDoc.py. diff --git a/gramps2/src/PeopleStore.py b/gramps2/src/PeopleStore.py index 2089558d8..60776f958 100644 --- a/gramps2/src/PeopleStore.py +++ b/gramps2/src/PeopleStore.py @@ -98,7 +98,10 @@ class PeopleStore: self.selection.connect('changed',select_func) if event_func: self.double_click = event_func - self.tree.connect('event',self.button_press) + self.tree.connect('row_activated', self.row_activated) + + def row_activated (self, treeview, path, column): + self.double_click (treeview) def enable_sort(self): if self.cids[0] != -1: @@ -306,10 +309,3 @@ class PeopleStore: if iter: path = model.get_path(iter) self.tree.scroll_to_cell(path,None,gtk.TRUE,0.5,0.5) - - def button_press(self,obj,event): - if event.type == gtk.gdk._2BUTTON_PRESS and event.button == 1: - self.double_click(obj) - return 1 - return 0 -