From 1b93bf11ea16e759e67e1341f86c68808e31be7a Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Tue, 20 Mar 2007 12:05:58 +0000 Subject: [PATCH] src/plugins/IndivComplete.py: handle multiple notes svn: r8306 --- ChangeLog | 3 +++ src/plugins/IndivComplete.py | 29 +++++++++++++++++------------ 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index a48191807..cd274f50f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2007-03-20 Brian Matherly + * src/plugins/IndivComplete.py: handle multiple notes + 2007-03-19 Brian Matherly * src/plugins/GraphViz.py: fix NameDisplay include diff --git a/src/plugins/IndivComplete.py b/src/plugins/IndivComplete.py index 368a6b817..fe6c4c4f5 100644 --- a/src/plugins/IndivComplete.py +++ b/src/plugins/IndivComplete.py @@ -153,10 +153,11 @@ class IndivCompleteReport(Report): self.doc.end_superscript() self.doc.end_paragraph() - note = event.get_note() - if note: - format = event.get_note_format() - self.doc.write_note(note,format,'IDS-Normal') + for notehandle in event.get_note_list(): + note = self.database.get_note_from_handle(notehandle) + text = note.get() + format = note.get_format() + self.doc.write_note(text,format,'IDS-Normal') self.doc.end_cell() self.doc.end_row() @@ -173,8 +174,8 @@ class IndivCompleteReport(Report): self.doc.end_row() def write_note(self): - note = self.start_person.get_note() - if note == '': + notelist = self.start_person.get_note_list() + if not notelist: return self.doc.start_table('note','IDS-IndTable') self.doc.start_row() @@ -185,12 +186,16 @@ class IndivCompleteReport(Report): self.doc.end_cell() self.doc.end_row() - self.doc.start_row() - self.doc.start_cell('IDS-NormalCell',2) - format = self.start_person.get_note_format() - self.doc.write_note(note,format,'IDS-Normal') - self.doc.end_cell() - self.doc.end_row() + for notehandle in notelist: + note = self.database.get_note_from_handle(notehandle) + text = note.get() + format = note.get_format() + self.doc.start_row() + self.doc.start_cell('IDS-NormalCell',2) + format = self.start_person.get_note_format() + self.doc.write_note(text,format,'IDS-Normal') + self.doc.end_cell() + self.doc.end_row() self.doc.end_table() self.doc.start_paragraph("IDS-Normal")