src/plugins/IndivComplete.py: Add event notes

svn: r6796
This commit is contained in:
Brian Matherly 2006-05-27 03:39:43 +00:00
parent 06f00c881c
commit 5060c054d4
2 changed files with 30 additions and 16 deletions

View File

@ -1,3 +1,6 @@
2006-05-26 Brian Matherly <brian@gramps-project.org>
* src/plugins/IndivComplete.py: Add event notes.
2006-05-26 Alex Roitman <shura@gramps-project.org> 2006-05-26 Alex Roitman <shura@gramps-project.org>
* src/BasicUtils.py (UpdateCallback.reset): Add method. * src/BasicUtils.py (UpdateCallback.reset): Add method.
* src/plugins/verify.glade: update interface. * src/plugins/verify.glade: update interface.

View File

@ -113,7 +113,9 @@ class IndivCompleteReport(Report.Report):
def write_fact(self,event): def write_fact(self,event):
if event == None: if event == None:
return return
text = ""
name = str(event.get_type()) name = str(event.get_type())
date = DateHandler.get_date(event) date = DateHandler.get_date(event)
place_handle = event.get_place_handle() place_handle = event.get_place_handle()
if place_handle: if place_handle:
@ -121,29 +123,38 @@ class IndivCompleteReport(Report.Report):
place_handle).get_title() place_handle).get_title()
else: else:
place = "" place = ""
description = event.get_description()
if not date: if place and date:
if not place: text = _('%(date)s in %(place)s. ') % { 'date' : date,
return 'place' : place }
else: elif place and not date:
text = '%s. %s' % (place,description) text = '%s. ' % place
else: elif date and not place:
if not place: text = '%s. ' % date
text = '%s. %s' % (date,description)
else: description = event.get_description()
text = _('%(date)s in %(place)s.') % { 'date' : date, text = '%s%s. ' % (text,description)
'place' : place }
text = '%s %s' % (text,description)
self.doc.start_row()
self.normal_cell(name)
if self.use_srcs: if self.use_srcs:
for s in event.get_source_references(): for s in event.get_source_references():
src_handle = s.get_reference_handle() src_handle = s.get_reference_handle()
src = self.database.get_source_from_handle(src_handle) src = self.database.get_source_from_handle(src_handle)
text = "%s [%s]" % (text,src.get_gramps_id()) text = "%s [%s]" % (text,src.get_gramps_id())
self.slist.append(s) self.slist.append(s)
self.normal_cell(text)
self.doc.start_row()
self.normal_cell(name)
self.doc.start_cell('IDS-NormalCell')
self.doc.start_paragraph('IDS-Normal')
self.doc.write_text(text)
self.doc.end_paragraph()
note = event.get_note()
if note:
format = event.get_note_format()
self.doc.write_note(note,format,'IDS-Normal')
self.doc.end_cell()
self.doc.end_row() self.doc.end_row()
def write_p_entry(self,label,parent,rel): def write_p_entry(self,label,parent,rel):