diff --git a/ChangeLog b/ChangeLog index b93909322..490a70df5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,13 @@ * src/gramps_main.py: Corrections. * src/Bookmarks.py: Corrections. + * src/plugins/DetDescendantReport.py (write_person): Write + images before the paragraph start; (insert_images): Don't start + and end pargraphs. + * src/plugins/DetAncestralReport.py: (write_person): Write + images before the paragraph start; (insert_images): Don't start + and end pargraphs. + 2004-02-20 Alex Roitman * src/EditPerson.py: Corrections. * src/EditSource.py: Use parent class. Use windows menu. diff --git a/src/plugins/DetAncestralReport.py b/src/plugins/DetAncestralReport.py index de9b766fc..c3eab4acb 100644 --- a/src/plugins/DetAncestralReport.py +++ b/src/plugins/DetAncestralReport.py @@ -198,12 +198,12 @@ class DetAncestorReport(Report.Report): def write_person(self, key, rptOptions): """Output birth, death, parentage, marriage and notes information """ - self.doc.start_paragraph("DAR-First-Entry","%s." % str(key)) - person = self.map[key] if rptOptions.addImages == reportOptions.Yes: self.insert_images(person) + self.doc.start_paragraph("DAR-First-Entry","%s." % str(key)) + name = person.get_primary_name().get_regular_name() if rptOptions.firstName == reportOptions.Yes: @@ -533,11 +533,11 @@ class DetAncestorReport(Report.Report): firstName= fam.get_father_id().get_primary_name().get_first_name() if person != "": - self.doc.start_paragraph("DAR-Entry") - if rptOptions.addImages == reportOptions.Yes: self.insert_images(ind) + self.doc.start_paragraph("DAR-Entry") + if rptOptions.firstName == reportOptions.No: firstName= heshe @@ -563,16 +563,11 @@ class DetAncestorReport(Report.Report): def insert_images(self, person): photos = person.get_media_list() - paragraph_started = 0 for photo in photos : object = photo.get_reference() if object.get_mime_type()[0:5] == "image": file = object.get_path() - if not paragraph_started: - self.doc.start_paragraph("DAR-Entry") - paragraph_started = 1 self.doc.add_media_object(file,"row",4.0,4.0) - self.doc.end_paragraph() #-------------------------------------------------------------------- # diff --git a/src/plugins/DetDescendantReport.py b/src/plugins/DetDescendantReport.py index 1424ad113..7b7454e27 100644 --- a/src/plugins/DetDescendantReport.py +++ b/src/plugins/DetDescendantReport.py @@ -205,12 +205,12 @@ class DetDescendantReport(Report.Report): def write_person(self, key, rptOptions): """Output birth, death, parentage, marriage and notes information """ - self.doc.start_paragraph("DDR-First-Entry","%s." % str(key)) - person = self.map[key] if rptOptions.addImages == reportOptions.Yes: self.insert_images(person) + self.doc.start_paragraph("DDR-First-Entry","%s." % str(key)) + name = person.get_primary_name().get_regular_name() if rptOptions.firstName == reportOptions.Yes: @@ -530,11 +530,11 @@ class DetDescendantReport(Report.Report): mateFirstName = mate.get_primary_name().get_first_name() if mate: - self.doc.start_paragraph("DDR-Entry") - if rptOptions.addImages == reportOptions.Yes: self.insert_images(mate) + self.doc.start_paragraph("DDR-Entry") + if rptOptions.firstName == reportOptions.No: mateFirstName = heshe @@ -556,16 +556,11 @@ class DetDescendantReport(Report.Report): def insert_images(self, person): photos = person.get_media_list() - paragraph_started = 0 for photo in photos : object = photo.get_reference() if object.get_mime_type()[0:5] == "image": file = object.get_path() - if not paragraph_started: - self.doc.start_paragraph("DDR-Entry") - paragraph_started = 1 self.doc.add_media_object(file,"row",4.0,4.0) - self.doc.end_paragraph() #-------------------------------------------------------------------- #