From 614d4c2b2cf21b863a076078654f0dfa4b8464f2 Mon Sep 17 00:00:00 2001 From: Doug Blank Date: Wed, 31 Dec 2008 03:44:11 +0000 Subject: [PATCH] Fixed #2544: added Family link type in gramplets svn: r11546 --- src/DataViews/GrampletView.py | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/DataViews/GrampletView.py b/src/DataViews/GrampletView.py index 4a6d40799..78df29be7 100644 --- a/src/DataViews/GrampletView.py +++ b/src/DataViews/GrampletView.py @@ -467,6 +467,29 @@ class Gramplet(object): if event.button == 1: # left mouse GrampsDisplay.help(handle.replace(" ", "_")) return True + elif link_type == 'Family': + family = self.dbstate.db.get_family_from_handle(handle) + if family is not None: + if event.button == 1: # left mouse + if event.type == gtk.gdk._2BUTTON_PRESS: # double + try: + from Editors import EditFamily + EditFamily(self.gui.dbstate, + self.gui.uistate, + [], family) + return True # handled event + except Errors.WindowActiveError: + pass + elif event.button == 3: # right mouse + #FIXME: add a popup menu with options + try: + from Editors import EditFamily + EditFamily(self.gui.dbstate, + self.gui.uistate, + [], family) + return True # handled event + except Errors.WindowActiveError: + pass elif link_type == 'PersonList': if event.button == 1: # left mouse if event.type == gtk.gdk._2BUTTON_PRESS: # double