From cdb76d6209f90d65916916201377fbbefb762e45 Mon Sep 17 00:00:00 2001 From: Martin Hawlisch Date: Tue, 2 Jan 2007 16:16:11 +0000 Subject: [PATCH] * src/DisplayTabs/_PersonBackRefList.py: new file * src/DisplayTabs/__init__.py: add PersonBackRefList * src/DisplayTabs/Makefile.am: ship new file * src/Editors/_EditPerson.py: show PersonBackRefList svn: r7864 --- ChangeLog | 6 +++++ src/DisplayTabs/Makefile.am | 1 + src/DisplayTabs/_PersonBackRefList.py | 38 +++++++++++++++++++++++++++ src/DisplayTabs/__init__.py | 1 + src/Editors/_EditPerson.py | 7 ++++- 5 files changed, 52 insertions(+), 1 deletion(-) create mode 100644 src/DisplayTabs/_PersonBackRefList.py diff --git a/ChangeLog b/ChangeLog index 50ee9c205..f9137a820 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2007-01-02 Martin Hawlisch + * src/DisplayTabs/_PersonBackRefList.py: new file + * src/DisplayTabs/__init__.py: add PersonBackRefList + * src/DisplayTabs/Makefile.am: ship new file + * src/Editors/_EditPerson.py: show PersonBackRefList + 2006-12-31 Don Allingham * src/ReportBase/_ReportDialog.py: add HELP button support * src/ReportBase/_BareReportDialog.py: add HELP button support diff --git a/src/DisplayTabs/Makefile.am b/src/DisplayTabs/Makefile.am index 5d0abce7b..b71b60d7d 100644 --- a/src/DisplayTabs/Makefile.am +++ b/src/DisplayTabs/Makefile.am @@ -30,6 +30,7 @@ pkgdata_PYTHON = \ _NameModel.py \ _NoteTab.py \ _TextTab.py \ + _PersonBackRefList.py \ _PersonEventEmbedList.py \ _PersonRefEmbedList.py \ _PersonRefModel.py \ diff --git a/src/DisplayTabs/_PersonBackRefList.py b/src/DisplayTabs/_PersonBackRefList.py new file mode 100644 index 000000000..d9d35acc1 --- /dev/null +++ b/src/DisplayTabs/_PersonBackRefList.py @@ -0,0 +1,38 @@ +# +# Gramps - a GTK+/GNOME based genealogy program +# +# Copyright (C) 2000-2006 Donald N. Allingham +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +# + +# $Id: _PlaceBackRefList.py 7068 2006-07-24 23:06:49Z rshura $ + +#------------------------------------------------------------------------- +# +# GRAMPS classes +# +#------------------------------------------------------------------------- +from _BackRefModel import BackRefModel +from _BackRefList import BackRefList + +class PersonBackRefList(BackRefList): + + def __init__(self, dbstate, uistate, track, obj, callback=None): + BackRefList.__init__(self, dbstate, uistate, track, obj, + BackRefModel, callback=callback) + + def get_icon_name(self): + return 'gramps-family' diff --git a/src/DisplayTabs/__init__.py b/src/DisplayTabs/__init__.py index 036207318..c37d9ec10 100644 --- a/src/DisplayTabs/__init__.py +++ b/src/DisplayTabs/__init__.py @@ -51,6 +51,7 @@ from _NoteTab import NoteTab from _TextTab import TextTab from _PersonEventEmbedList import PersonEventEmbedList from _PersonRefEmbedList import PersonRefEmbedList +from _PersonBackRefList import PersonBackRefList from _PlaceBackRefList import PlaceBackRefList from _RepoEmbedList import RepoEmbedList from _SourceBackRefList import SourceBackRefList diff --git a/src/Editors/_EditPerson.py b/src/Editors/_EditPerson.py index cd7df27f9..c4733ada9 100644 --- a/src/Editors/_EditPerson.py +++ b/src/Editors/_EditPerson.py @@ -67,7 +67,7 @@ from QuestionDialog import * from DisplayTabs import \ PersonEventEmbedList,NameEmbedList,SourceEmbedList,AttrEmbedList,\ AddrEmbedList,NoteTab,GalleryTab,WebEmbedList,PersonRefEmbedList, \ - LdsEmbedList + LdsEmbedList,PersonBackRefList #------------------------------------------------------------------------- # @@ -315,6 +315,11 @@ class EditPerson(EditPrimary): LdsEmbedList(self.dbstate, self.uistate, self.track, self.obj.get_lds_ord_list())) + self.backref_tab = self._add_tab( + notebook, + PersonBackRefList(self.dbstate, self.uistate, self.track, + self.db.find_backlink_handles(self.obj.handle))) + notebook.show_all() self.top.get_widget('vbox').pack_start(notebook, True)