From fdc5bca6d5ffcf90b43cd2e11264d9f441b886b2 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Mon, 21 Jul 2003 02:49:25 +0000 Subject: [PATCH] * src/GrampsParser.py: use findFamilyNoConflicts * src/RelLib.py: remove findFamilyNoConflict * src/docgen/LaTeXDoc.py: Fixed typo in latex generated comment svn: r1909 --- gramps2/src/GrampsParser.py | 4 ++-- gramps2/src/RelLib.py | 21 --------------------- gramps2/src/docgen/LaTeXDoc.py | 2 +- 3 files changed, 3 insertions(+), 24 deletions(-) diff --git a/gramps2/src/GrampsParser.py b/gramps2/src/GrampsParser.py index d92358c6f..db180b462 100644 --- a/gramps2/src/GrampsParser.py +++ b/gramps2/src/GrampsParser.py @@ -880,7 +880,7 @@ class GrampsImportParser(GrampsParser): self.func_map["parentin"] = (self.start_parentin,None) def start_childof(self,attrs): - family = self.db.findFamilyNoConflict(attrs["ref"],self.fmap) + family = self.db.findFamilyNoConflicts(attrs["ref"],self.fmap) if attrs.has_key("mrel"): mrel = attrs["mrel"] else: @@ -892,7 +892,7 @@ class GrampsImportParser(GrampsParser): self.person.AltFamilyList.append((family,mrel,frel)) def start_parentin(self,attrs): - self.person.FamilyList.append(self.db.findFamilyNoConflict(attrs["ref"],self.fmap)) + self.person.FamilyList.append(self.db.findFamilyNoConflicts(attrs["ref"],self.fmap)) def start_bmark(self,attrs): person = self.db.findPersonNoConflicts(attrs["ref"],self.pmap) diff --git a/gramps2/src/RelLib.py b/gramps2/src/RelLib.py index c4a4cce7c..231159d9d 100644 --- a/gramps2/src/RelLib.py +++ b/gramps2/src/RelLib.py @@ -2654,27 +2654,6 @@ class GrampsDB(Persistent): map[idVal] = family.getId() return family - def findFamilyNoConflict(self,idVal,map): - """finds a Family in the database using the idVal and map - variables to translate between the external ID and gramps' - internal ID. If no such Family exists, a new Family instance - is created. - - idVal - external ID number - map - map build by findFamily of external to gramp's IDs""" - - if map.has_key(idVal): - family = self.familyMap[map[idVal]] - else: - family = self.familyMap.get(idVal) - if not family: - family = Family() - family.id = idVal - self.familyMap[idVal] = family - self.fmapIndex = self.fmapIndex + 1 - map[idVal] = family.getId() - return family - def findFamilyNoMap(self,val): """finds a Family in the database from the passed gramps' ID. If no such Family exists, a new Family is added to the database.""" diff --git a/gramps2/src/docgen/LaTeXDoc.py b/gramps2/src/docgen/LaTeXDoc.py index b2e55f8b4..c5b13b574 100644 --- a/gramps2/src/docgen/LaTeXDoc.py +++ b/gramps2/src/docgen/LaTeXDoc.py @@ -111,7 +111,7 @@ class LaTeXDoc(TextDoc.TextDoc): # that we should use Latin1 and unicode character encodings. self.f.write('\\documentclass[%s]{article}\n' % options) self.f.write('\\usepackage[T1]{fontenc}\n') - self.f.write('%\n% We use latin1 encoding at a minimum by default\n.') + self.f.write('%\n% We use latin1 encoding at a minimum by default.\n') self.f.write('% GRAMPS uses unicode UTF-8 encoding for its\n') self.f.write('% international support. LaTeX can deal gracefully\n') self.f.write('% with unicode encoding by using the ucs style invoked\n')