From 4e5e9af12934ab8176058ebd6feb7eedeb002a1f Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Tue, 2 Jul 2002 19:36:03 +0000 Subject: [PATCH] Fixed report bugs svn: r1066 --- src/plugins/DescendReport.py | 2 +- src/plugins/DetAncestralReport.py | 2 +- src/plugins/DetDescendantReport.py | 6 +++--- src/plugins/WebPage.py | 7 ++++--- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/plugins/DescendReport.py b/src/plugins/DescendReport.py index 17b154f10..082732717 100644 --- a/src/plugins/DescendReport.py +++ b/src/plugins/DescendReport.py @@ -116,7 +116,7 @@ class DescendantReport: # #------------------------------------------------------------------------ class DescendantReportDialog(TextReportDialog): - def __init__(self,person,database): + def __init__(self,database,person): TextReportDialog.__init__(self,database,person) #------------------------------------------------------------------------ diff --git a/src/plugins/DetAncestralReport.py b/src/plugins/DetAncestralReport.py index a9f09a9c2..5b0f935c9 100644 --- a/src/plugins/DetAncestralReport.py +++ b/src/plugins/DetAncestralReport.py @@ -168,7 +168,7 @@ class DetAncestorReport(Report): self.doc.write_text(_("- %s Born: %s Died: %s") % \ (name, birth.getPlaceName(), death.getDate())) # 6 elif death.getPlaceName() != "": - self.doc.write_text(_("- %s Born: %s %s Died: %s") % \ + self.doc.write_text(_("- %s Born: %s Died: %s") % \ (name, birth.getPlaceName(), death.getPlaceName())) # 5 else: self.doc.write_text(_("- %s Born: %s") % \ (name, birth.getPlaceName())) # 4 diff --git a/src/plugins/DetDescendantReport.py b/src/plugins/DetDescendantReport.py index 60900d94b..1d5a963fe 100644 --- a/src/plugins/DetDescendantReport.py +++ b/src/plugins/DetDescendantReport.py @@ -644,7 +644,8 @@ class DetDescendantReport(Report): generation = 0 need_header = 1 - for generation in xrange(self.max_generations): +# for generation in xrange(self.max_generations): + for generation in xrange(len(self.genKeys)): if self.pgbrk and generation > 0: self.doc.page_break() self.doc.start_paragraph("Generation") @@ -655,7 +656,6 @@ class DetDescendantReport(Report): self.prevGenIDs= self.genIDs.copy() self.genIDs.clear() - for key in self.genKeys[generation]: person = self.map[key] self.genIDs[person.getId()]= key @@ -799,7 +799,7 @@ class DetDescendantReportDialog(TextReportDialog): ReportDialog.parse_report_options_frame(self) # get values from the widgets - if self.use_link.get_active(): + if self.first_name_option.get_active(): self.firstName = reportOptions.Yes else: self.firstName = reportOptions.No diff --git a/src/plugins/WebPage.py b/src/plugins/WebPage.py index 1189b97a3..34d0ce5aa 100644 --- a/src/plugins/WebPage.py +++ b/src/plugins/WebPage.py @@ -234,9 +234,10 @@ class IndividualPage: object = photo_list[0].getReference() if object.getMimeType()[0:5] == "image": file = object.getPath() - self.doc.start_paragraph("Data") - self.doc.add_photo(file,"row",4.0,4.0) - self.doc.end_paragraph() + if os.path.isfile(file): + self.doc.start_paragraph("Data") + self.doc.add_photo(file,"row",4.0,4.0) + self.doc.end_paragraph() # Start the first table, which consists of basic information, including # name, gender, and parents