From 934a763ae24d9943ca7c6b76ebc099b90bd68bad Mon Sep 17 00:00:00 2001 From: Alex Roitman Date: Mon, 23 Aug 2004 16:59:13 +0000 Subject: [PATCH] * src/plugins/DetAncestralReport.py (write_children): Check whether event exists (#1014414). * src/plugins/IndivComplete.py (write_alt_names): Correct the use of handle (#1014411); (write_fact, write_sources, write_person): Use gramps id, not handle, for displaying source references. svn: r3488 --- ChangeLog | 6 ++++++ src/plugins/DetAncestralReport.py | 4 ++-- src/plugins/IndivComplete.py | 20 ++++++++++++-------- 3 files changed, 20 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 2138d04ba..3818a399a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,6 +3,12 @@ * src/NameEdit.py: Proper use of ComboBoxEntry widgets (#1014238). * src/EdirPerson.py (__init__): Use handle instead of ID (#1014224). + * src/plugins/DetAncestralReport.py (write_children): + Check whether event exists (#1014414). + * src/plugins/IndivComplete.py (write_alt_names): Correct the + use of handle (#1014411); (write_fact, write_sources, write_person): + Use gramps id, not handle, for displaying source references. + 2004-08-23 Tim Waugh * install-sh: Removed this generated file. diff --git a/src/plugins/DetAncestralReport.py b/src/plugins/DetAncestralReport.py index 1ef1db25c..dff1a29ed 100644 --- a/src/plugins/DetAncestralReport.py +++ b/src/plugins/DetAncestralReport.py @@ -221,7 +221,7 @@ class DetAncestorReport(Report.Report): else: self.doc.write_text(_("- %s Died: %s") % \ (name, death.get_date())) # 2 - elif death.get_place_handle(): + elif death and death.get_place_handle(): dplace = self.database.get_place_from_handle(death.get_place_handle()).get_title() self.doc.write_text(_("- %s Died: %s") % \ (name, dplace)) # 1 @@ -270,7 +270,7 @@ class DetAncestorReport(Report.Report): if birth_handle: self.write_birth(person, rptOptions) if person.get_death_handle(): - self.write_death(person, firstName, rptOptions) + self.write_death(person, firstName, rptOptions) self.write_parents(person, firstName) self.write_marriage(person, rptOptions) self.doc.end_paragraph() diff --git a/src/plugins/IndivComplete.py b/src/plugins/IndivComplete.py index 2f2b2a1e1..2d647a971 100644 --- a/src/plugins/IndivComplete.py +++ b/src/plugins/IndivComplete.py @@ -145,9 +145,9 @@ class IndivComplete(Report.Report): self.normal_cell(name) if self.use_srcs: for s in event.get_source_references(): - #src_id = s.get_base_handle() - #src = self.database.find_source_from_handle(src_id) - text = "%s [%s]" % (text,s.get_base_handle()) + src_handle = s.get_base_handle() + src = self.database.get_source_from_handle(src_handle) + text = "%s [%s]" % (text,src.get_gramps_id()) self.slist.append(s) self.normal_cell(text) self.d.end_row() @@ -249,7 +249,9 @@ class IndivComplete(Report.Report): text = name.get_regular_name() if self.use_srcs: for s in name.get_source_references(): - text = "%s [%s]" % (text,s.get_base_handle().get_handle()) + src_handle = s.get_base_handle() + src = self.database.get_source_from_handle(src_handle) + text = "%s [%s]" % (text,src.get_gramps_id()) self.slist.append(s) self.normal_cell(text) self.d.end_row() @@ -334,9 +336,9 @@ class IndivComplete(Report.Report): for source in self.slist: self.d.start_row() - s_id = source.get_base_handle() - self.normal_cell(s_id) - src = self.database.get_source_from_handle(s_id) + s_handle = source.get_base_handle() + src = self.database.get_source_from_handle(s_handle) + self.normal_cell(src.get_gramps_id()) self.normal_cell(src.get_title()) self.d.end_row() self.d.end_table() @@ -418,7 +420,9 @@ class IndivComplete(Report.Report): if self.use_srcs: for s in name.get_source_references(): self.slist.append(s) - text = "%s [%s]" % (text,s.get_base_handle()) + src_handle = s.get_base_handle() + src = self.database.get_source_from_handle(src_handle) + text = "%s [%s]" % (text,src.get_gramps_id()) self.normal_cell(text) self.d.end_row()