diff --git a/ChangeLog b/ChangeLog index bd59dc03b..f7b7f9433 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2003-12-17 Tim Waugh + * src/plugins/Ancestors.py + (ComprehensiveAncestorsReport.write_report): No need for separate + clauses when using write_note, since output is not delayed here. + (ComprehensiveAncestorsReport.long_notes): Handle pre-formatted + notes on events. + 2003-12-16 Don Allingham * src/PlaceView.py: Make sure to add new place after edit * src/AddMedia.py: unicode conversion from gtk.Entry diff --git a/src/plugins/Ancestors.py b/src/plugins/Ancestors.py index 9802aaa4d..9ef9b3cd9 100644 --- a/src/plugins/Ancestors.py +++ b/src/plugins/Ancestors.py @@ -152,12 +152,7 @@ class ComprehensiveAncestorsReport (Report.Report): note = source.getNote () format = source.getNoteFormat () if note: - if format == 0: - self.doc.start_paragraph ("AR-Details") - self.doc.write_text (note) - self.doc.end_paragraph () - else: - self.doc.write_note (note, format, "AR-Details") + self.doc.write_note (note, format, "AR-Details") i += 1 @@ -439,7 +434,9 @@ class ComprehensiveAncestorsReport (Report.Report): if placename: info += _(' in %(place)s') % {'place': placename} note = event.getNote () - if note or description: + note_format = event.getNoteFormat () + inline_note = note and (note_format == 0) + if inline_note or description: info += ' (' if description: info += description @@ -747,10 +744,22 @@ class ComprehensiveAncestorsReport (Report.Report): ': ' + name.getRegularName ()])) paras.append ((self.doc.end_paragraph, [])) + for event in [person.getBirth (), person.getDeath ()]: + note = event.getNote () + note_format = event.getNoteFormat () + if note and (note_format != 0): + paras.append ((self.doc.write_note, [note, format, + 'AR-Details'])) + for event in events: paras.append ((self.doc.start_paragraph, ['AR-Details'])) paras.append ((self.doc.write_text, [self.event_info (event)])) paras.append ((self.doc.end_paragraph, [])) + note = event.getNote () + note_format = event.getNoteFormat () + if note and (note_format != 0): + paras.append ((self.doc.write_note, [note, format, + 'AR-Details'])) for address in addresses: paras.append ((self.doc.start_paragraph, ['AR-Details']))