From 9cb2a3afc3a6b15b66d20f90daa9679a47501e47 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 31 May 2004 03:50:06 +0000 Subject: [PATCH] * src/EditSource.py: try_to_find_person_from_id fix * src/PedView.py: try_to_find_person_from_id fix * src/Utils.py: try_to_find_person_from_id fix svn: r3197 --- gramps2/ChangeLog | 5 +++++ gramps2/gramps-mdk.spec | 2 +- gramps2/gramps.spec | 2 +- gramps2/src/EditSource.py | 6 +++--- gramps2/src/PedView.py | 8 ++++---- gramps2/src/Utils.py | 8 ++++---- gramps2/src/data/Makefile.am | 2 +- gramps2/src/data/Makefile.in | 11 +++++++++-- 8 files changed, 28 insertions(+), 16 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 2e7a8737b..c660a90ec 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,8 @@ +2004-05-30 Don Allingham + * src/EditSource.py: try_to_find_person_from_id fix + * src/PedView.py: try_to_find_person_from_id fix + * src/Utils.py: try_to_find_person_from_id fix + 2004-05-27 Don Allingham * various: installation fixes diff --git a/gramps2/gramps-mdk.spec b/gramps2/gramps-mdk.spec index 09d7097c3..25f110def 100644 --- a/gramps2/gramps-mdk.spec +++ b/gramps2/gramps-mdk.spec @@ -1,5 +1,5 @@ %define ver 1.1.0 -%define rel 0.CVS20040526 +%define rel 0.CVS20040527 %define prefix /usr %define localstatedir /var/lib # Ensure that internal RPM macros for configure & makeinstall diff --git a/gramps2/gramps.spec b/gramps2/gramps.spec index 995c8c7b3..fa5c40820 100644 --- a/gramps2/gramps.spec +++ b/gramps2/gramps.spec @@ -1,5 +1,5 @@ %define ver 1.1.0 -%define rel 0.CVS20040526 +%define rel 0.CVS20040527 %define prefix /usr %define localstatedir /var/lib # Ensure that internal RPM macros for configure & makeinstall diff --git a/gramps2/src/EditSource.py b/gramps2/src/EditSource.py index 35f3e6f99..67af073d0 100644 --- a/gramps2/src/EditSource.py +++ b/gramps2/src/EditSource.py @@ -218,7 +218,7 @@ class EditSource: if sref.get_base_id() == self.source.get_id(): p_addr_list.append((name,v.get_street())) for object_id in self.db.get_object_keys(): - object = self.db.try_to_find_object_from_id(object_id,None) + object = self.db.try_to_find_object_from_id(object_id) name = object.get_description() for sref in object.get_source_references(): if sref.get_base_id() == self.source.get_id(): @@ -228,9 +228,9 @@ class EditSource: f_id = family.get_father_id() m_id = family.get_mother_id() if f_id: - f = self.db.try_to_find_person_from_id(f_id,None) + f = self.db.try_to_find_person_from_id(f_id) if m_id: - m = self.db.try_to_find_person_from_id(m_id,None) + m = self.db.try_to_find_person_from_id(m_id) if f_id and m_id: name = _("%(father)s and %(mother)s") % { "father" : GrampsCfg.nameof(f), diff --git a/gramps2/src/PedView.py b/gramps2/src/PedView.py index dd0aab6e7..9a0d412fb 100644 --- a/gramps2/src/PedView.py +++ b/gramps2/src/PedView.py @@ -366,13 +366,13 @@ class PedigreeView: childlist = find_children(self.active_person) if len(childlist) == 1: - child = self.parent.db.try_to_find_person_from_id(childlist[0],None) + child = self.parent.db.try_to_find_person_from_id(childlist[0]) if child: self.load_canvas(child) elif len(childlist) > 1: myMenu = gtk.Menu() for child_id in childlist: - child = self.parent.db.try_to_find_person_from_id(child_id,None) + child = self.parent.db.try_to_find_person_from_id(child_id) cname = GrampsCfg.nameof(child) menuitem = gtk.MenuItem(None) if find_children(child): @@ -485,11 +485,11 @@ class PedigreeView: if family != None: father_id = family.get_father_id() if father_id != None: - father = self.parent.db.try_to_find_person_from_id(father_id,None) + father = self.parent.db.try_to_find_person_from_id(father_id) self.find_tree(father,(2*index)+1,depth+1,list,frel) mother_id = family.get_mother_id() if mother_id != None: - mother = self.parent.db.try_to_find_person_from_id(mother_id,None) + mother = self.parent.db.try_to_find_person_from_id(mother_id) self.find_tree(mother,(2*index)+2,depth+1,list,mrel) def on_canvas1_event(self,obj,event): diff --git a/gramps2/src/Utils.py b/gramps2/src/Utils.py index f8bec0199..b7197935f 100644 --- a/gramps2/src/Utils.py +++ b/gramps2/src/Utils.py @@ -123,8 +123,8 @@ def family_name(family,db): """Builds a name for the family from the parents names""" father_id = family.get_father_id() mother_id = family.get_mother_id() - father = db.try_to_find_person_from_id(father_id,None) - mother = db.try_to_find_person_from_id(mother_id,None) + father = db.try_to_find_person_from_id(father_id) + mother = db.try_to_find_person_from_id(mother_id) if father and mother: fname = father.get_primary_name().get_name() mname = mother.get_primary_name().get_name() @@ -139,8 +139,8 @@ def family_upper_name(family,db): """Builds a name for the family from the parents names""" father_id = family.get_father_id() mother_id = family.get_mother_id() - father = db.try_to_find_person_from_id(father_id,None) - mother = db.try_to_find_person_from_id(mother_id,None) + father = db.try_to_find_person_from_id(father_id) + mother = db.try_to_find_person_from_id(mother_id) if father and mother: fname = father.get_primary_name().get_upper_name() mname = mother.get_primary_name().get_upper_name() diff --git a/gramps2/src/data/Makefile.am b/gramps2/src/data/Makefile.am index 000ca8142..64464bca2 100644 --- a/gramps2/src/data/Makefile.am +++ b/gramps2/src/data/Makefile.am @@ -24,9 +24,9 @@ install-data-local: $(INSTALL_DATA) gramps.applications $(DESTDIR)$(prefix)/share/application-registry $(INSTALL) -d $(DESTDIR)$(prefix)/share/mime/packages $(INSTALL_DATA) gramps.xml $(DESTDIR)$(prefix)/share/mime/packages - update-mime-database $(DESTDIR)$(prefix)/share/mime $(INSTALL) -d $(DESTDIR)$(prefix)/share/mime-info $(INSTALL_DATA) gramps.keys gramps.mime $(DESTDIR)$(prefix)/share/mime-info + update-mime-database $(DESTDIR)$(prefix)/share/mime uninstall-local: -rm $(DESTDIR)$(prefix)/share/pixmaps/gramps.png diff --git a/gramps2/src/data/Makefile.in b/gramps2/src/data/Makefile.in index 9ee3aeb01..a1df01ca9 100644 --- a/gramps2/src/data/Makefile.in +++ b/gramps2/src/data/Makefile.in @@ -141,8 +141,10 @@ pkgdata_DATA = gedcom.xml \ papersize.xml \ tips.xml \ gnome-mime-application-x-gramps.png \ - gramps.applications\ - gramps.svg + gramps.applications \ + gramps.svg \ + gramps.keys \ + gramps.mime EXTRA_DIST = $(pkgdata_DATA) all: all-recursive @@ -461,12 +463,17 @@ install-data-local: $(INSTALL_DATA) gramps.applications $(DESTDIR)$(prefix)/share/application-registry $(INSTALL) -d $(DESTDIR)$(prefix)/share/mime/packages $(INSTALL_DATA) gramps.xml $(DESTDIR)$(prefix)/share/mime/packages + $(INSTALL) -d $(DESTDIR)$(prefix)/share/mime-info + $(INSTALL_DATA) gramps.keys gramps.mime $(DESTDIR)$(prefix)/share/mime-info update-mime-database $(DESTDIR)$(prefix)/share/mime uninstall-local: -rm $(DESTDIR)$(prefix)/share/pixmaps/gramps.png -rm $(DESTDIR)$(prefix)/share/gnome/apps/Applications/gramps.desktop -rm $(DESTDIR)$(prefix)/share/icons/gnome/48x48/mimetypes/gnome-mime-application-x-gramps.png + -rm $(DESTDIR)$(prefix)/share/mime-info/gramps.keys + -rm $(DESTDIR)$(prefix)/share/mime-info/gramps.mime + -rm $(DESTDIR)$(prefix)/share/mime/packages/gramps.xml # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: