* 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
This commit is contained in:
Don Allingham 2004-05-31 03:50:06 +00:00
parent d094e38abf
commit bf5ad74a5d
8 changed files with 28 additions and 16 deletions

View File

@ -1,3 +1,8 @@
2004-05-30 Don Allingham <dallingham@users.sourceforge.net>
* 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 <dallingham@users.sourceforge.net> 2004-05-27 Don Allingham <dallingham@users.sourceforge.net>
* various: installation fixes * various: installation fixes

View File

@ -1,5 +1,5 @@
%define ver 1.1.0 %define ver 1.1.0
%define rel 0.CVS20040526 %define rel 0.CVS20040527
%define prefix /usr %define prefix /usr
%define localstatedir /var/lib %define localstatedir /var/lib
# Ensure that internal RPM macros for configure & makeinstall # Ensure that internal RPM macros for configure & makeinstall

View File

@ -1,5 +1,5 @@
%define ver 1.1.0 %define ver 1.1.0
%define rel 0.CVS20040526 %define rel 0.CVS20040527
%define prefix /usr %define prefix /usr
%define localstatedir /var/lib %define localstatedir /var/lib
# Ensure that internal RPM macros for configure & makeinstall # Ensure that internal RPM macros for configure & makeinstall

View File

@ -218,7 +218,7 @@ class EditSource:
if sref.get_base_id() == self.source.get_id(): if sref.get_base_id() == self.source.get_id():
p_addr_list.append((name,v.get_street())) p_addr_list.append((name,v.get_street()))
for object_id in self.db.get_object_keys(): 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() name = object.get_description()
for sref in object.get_source_references(): for sref in object.get_source_references():
if sref.get_base_id() == self.source.get_id(): if sref.get_base_id() == self.source.get_id():
@ -228,9 +228,9 @@ class EditSource:
f_id = family.get_father_id() f_id = family.get_father_id()
m_id = family.get_mother_id() m_id = family.get_mother_id()
if f_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: 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: if f_id and m_id:
name = _("%(father)s and %(mother)s") % { name = _("%(father)s and %(mother)s") % {
"father" : GrampsCfg.nameof(f), "father" : GrampsCfg.nameof(f),

View File

@ -366,13 +366,13 @@ class PedigreeView:
childlist = find_children(self.active_person) childlist = find_children(self.active_person)
if len(childlist) == 1: 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: if child:
self.load_canvas(child) self.load_canvas(child)
elif len(childlist) > 1: elif len(childlist) > 1:
myMenu = gtk.Menu() myMenu = gtk.Menu()
for child_id in childlist: 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) cname = GrampsCfg.nameof(child)
menuitem = gtk.MenuItem(None) menuitem = gtk.MenuItem(None)
if find_children(child): if find_children(child):
@ -485,11 +485,11 @@ class PedigreeView:
if family != None: if family != None:
father_id = family.get_father_id() father_id = family.get_father_id()
if father_id != None: 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) self.find_tree(father,(2*index)+1,depth+1,list,frel)
mother_id = family.get_mother_id() mother_id = family.get_mother_id()
if mother_id != None: 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) self.find_tree(mother,(2*index)+2,depth+1,list,mrel)
def on_canvas1_event(self,obj,event): def on_canvas1_event(self,obj,event):

View File

@ -123,8 +123,8 @@ def family_name(family,db):
"""Builds a name for the family from the parents names""" """Builds a name for the family from the parents names"""
father_id = family.get_father_id() father_id = family.get_father_id()
mother_id = family.get_mother_id() mother_id = family.get_mother_id()
father = db.try_to_find_person_from_id(father_id,None) father = db.try_to_find_person_from_id(father_id)
mother = db.try_to_find_person_from_id(mother_id,None) mother = db.try_to_find_person_from_id(mother_id)
if father and mother: if father and mother:
fname = father.get_primary_name().get_name() fname = father.get_primary_name().get_name()
mname = mother.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""" """Builds a name for the family from the parents names"""
father_id = family.get_father_id() father_id = family.get_father_id()
mother_id = family.get_mother_id() mother_id = family.get_mother_id()
father = db.try_to_find_person_from_id(father_id,None) father = db.try_to_find_person_from_id(father_id)
mother = db.try_to_find_person_from_id(mother_id,None) mother = db.try_to_find_person_from_id(mother_id)
if father and mother: if father and mother:
fname = father.get_primary_name().get_upper_name() fname = father.get_primary_name().get_upper_name()
mname = mother.get_primary_name().get_upper_name() mname = mother.get_primary_name().get_upper_name()

View File

@ -24,9 +24,9 @@ install-data-local:
$(INSTALL_DATA) gramps.applications $(DESTDIR)$(prefix)/share/application-registry $(INSTALL_DATA) gramps.applications $(DESTDIR)$(prefix)/share/application-registry
$(INSTALL) -d $(DESTDIR)$(prefix)/share/mime/packages $(INSTALL) -d $(DESTDIR)$(prefix)/share/mime/packages
$(INSTALL_DATA) gramps.xml $(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) -d $(DESTDIR)$(prefix)/share/mime-info
$(INSTALL_DATA) gramps.keys gramps.mime $(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: uninstall-local:
-rm $(DESTDIR)$(prefix)/share/pixmaps/gramps.png -rm $(DESTDIR)$(prefix)/share/pixmaps/gramps.png

View File

@ -141,8 +141,10 @@ pkgdata_DATA = gedcom.xml \
papersize.xml \ papersize.xml \
tips.xml \ tips.xml \
gnome-mime-application-x-gramps.png \ gnome-mime-application-x-gramps.png \
gramps.applications\ gramps.applications \
gramps.svg gramps.svg \
gramps.keys \
gramps.mime
EXTRA_DIST = $(pkgdata_DATA) EXTRA_DIST = $(pkgdata_DATA)
all: all-recursive all: all-recursive
@ -461,12 +463,17 @@ install-data-local:
$(INSTALL_DATA) gramps.applications $(DESTDIR)$(prefix)/share/application-registry $(INSTALL_DATA) gramps.applications $(DESTDIR)$(prefix)/share/application-registry
$(INSTALL) -d $(DESTDIR)$(prefix)/share/mime/packages $(INSTALL) -d $(DESTDIR)$(prefix)/share/mime/packages
$(INSTALL_DATA) gramps.xml $(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 update-mime-database $(DESTDIR)$(prefix)/share/mime
uninstall-local: uninstall-local:
-rm $(DESTDIR)$(prefix)/share/pixmaps/gramps.png -rm $(DESTDIR)$(prefix)/share/pixmaps/gramps.png
-rm $(DESTDIR)$(prefix)/share/gnome/apps/Applications/gramps.desktop -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/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. # 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. # Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT: .NOEXPORT: