2003-12-16 Tim Waugh <twaugh@redhat.com>

* src/plugins/Aneestors.py: Use write_note() when appropriate.


svn: r2532
This commit is contained in:
Tim Waugh 2003-12-16 17:06:52 +00:00
parent b60316634d
commit 92af879c15
2 changed files with 17 additions and 6 deletions

View File

@ -1,3 +1,6 @@
2003-12-16 Tim Waugh <twaugh@redhat.com>
* src/plugins/Aneestors.py: Use write_note() when appropriate.
2003-12-15 Don Allingham <dallingham@users.sourceforge.net>
* src/GrampsCfg.py: change the default prefixes so that they
sort nicely numerically.

View File

@ -150,10 +150,14 @@ class ComprehensiveAncestorsReport (Report.Report):
self.doc.end_paragraph ()
note = source.getNote ()
format = source.getNoteFormat ()
if note:
self.doc.start_paragraph ("AR-Details")
self.doc.write_text (note)
self.doc.end_paragraph ()
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")
i += 1
@ -697,7 +701,8 @@ class ComprehensiveAncestorsReport (Report.Report):
if not (name_note == '' or name_note.find ('\n') != -1):
return _(' Note about their name: ') + name_note
note = person.getNote ()
if not (note == '' or note.find ('\n') != -1):
if not (person.getNoteFormat () != 0 or
note == '' or note.find ('\n') != -1):
return ' ' + note
return ''
@ -706,7 +711,7 @@ class ComprehensiveAncestorsReport (Report.Report):
para_end = note.find ('\n')
if para_end != -1:
paras = self.long_details (note[note.find ('\n') + 1:], paras)
else:
else:
para_end = len (note)
paras.insert (0, (self.doc.end_paragraph, []))
@ -717,7 +722,10 @@ class ComprehensiveAncestorsReport (Report.Report):
def long_notes (self, person, suppress_children = 0,
already_described = []):
note = person.getNote ()
if note != '' and note.find ('\n') != -1:
format = person.getNoteFormat ()
if format != 0:
paras = [ (self.doc.write_note, [note, format, 'AR-Details']) ]
elif note != '' and note.find ('\n') != -1:
paras = self.long_details (note, [])
else:
paras = []