From 6651f17ace1d7ecc4cdfa257b347de47f1f710d3 Mon Sep 17 00:00:00 2001 From: Brian Matherly Date: Sat, 22 Apr 2006 06:56:48 +0000 Subject: [PATCH] misc reports: keep up with RelLib changes svn: r6414 --- gramps2/ChangeLog | 6 ++++++ gramps2/src/PluginUtils/_ReportUtils.py | 2 +- gramps2/src/plugins/DescendChart.py | 4 ++-- gramps2/src/plugins/DetAncestralReport.py | 6 +++--- gramps2/src/plugins/DetDescendantReport.py | 4 ++-- 5 files changed, 14 insertions(+), 8 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 14b24323b..309862afc 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,9 @@ +2006-04-21 Brian Matherly + * src/PluginUtils/_ReportUtils.py: keep up with RelLib changes + * src/plugins/DetDescendantReport.py: keep up with RelLib changes + * src/plugins/DescendChart.py: keep up with RelLib changes + * src/plugins/DetAncestralReport.py: keep up with RelLib changes + 2006-04-21 Alex Roitman * src/PluginUtils/_ReportUtils.py (buried_str): Typo. * src/plugins/DetDescendantReport.py (write_children): Use child_refs. diff --git a/gramps2/src/PluginUtils/_ReportUtils.py b/gramps2/src/PluginUtils/_ReportUtils.py index 8f488263d..afedddc7b 100644 --- a/gramps2/src/PluginUtils/_ReportUtils.py +++ b/gramps2/src/PluginUtils/_ReportUtils.py @@ -1677,7 +1677,7 @@ def married_rel_str(database,person,family,is_first=True): 'spouse' :_nd.display(spouse) } - relationship = family.get_relationship()[0] + relationship = family.get_relationship() if is_first: if relationship == RelLib.FamilyRelType.MARRIED: diff --git a/gramps2/src/plugins/DescendChart.py b/gramps2/src/plugins/DescendChart.py index 2aa7797d5..86e3b9bc3 100644 --- a/gramps2/src/plugins/DescendChart.py +++ b/gramps2/src/plugins/DescendChart.py @@ -179,8 +179,8 @@ class DescendChart(Report.Report): family = self.database.get_family_from_handle(family_handle) - for child_handle in family.get_child_handle_list(): - sub = self.apply_filter(child_handle, x+2, new_y) + for child_ref in family.get_child_ref_list(): + sub = self.apply_filter(child_ref.ref, x+2, new_y) index += sub new_y += sub diff --git a/gramps2/src/plugins/DetAncestralReport.py b/gramps2/src/plugins/DetAncestralReport.py index 3eecae67a..5c3ca0c9d 100644 --- a/gramps2/src/plugins/DetAncestralReport.py +++ b/gramps2/src/plugins/DetAncestralReport.py @@ -275,10 +275,10 @@ class DetAncestorReport(Report.Report): self.doc.end_paragraph() first = False self.doc.start_paragraph('DAR-MoreDetails') - atype = alt_name.get_type() + atype = str( alt_name.get_type() ) self.doc.write_text( _('%(name_kind)s: %(name)s%(endnotes)s') % { - 'name_kind' : Utils.format_name_type( atype ), + 'name_kind' : atype, 'name' : alt_name.get_regular_name(), 'endnotes' : self.endnotes(alt_name), }) @@ -303,7 +303,7 @@ class DetAncestorReport(Report.Report): self.doc.start_paragraph('DAR-MoreDetails') - evtName = Utils.format_event( event.get_type() ) + evtName = str( event.get_type() ) if date and place: self.doc.write_text( _('%(event_name)s: %(date)s, %(place)s%(endnotes)s. ') % { diff --git a/gramps2/src/plugins/DetDescendantReport.py b/gramps2/src/plugins/DetDescendantReport.py index b39da9743..05c8bde7e 100644 --- a/gramps2/src/plugins/DetDescendantReport.py +++ b/gramps2/src/plugins/DetDescendantReport.py @@ -306,7 +306,7 @@ class DetDescendantReport(Report.Report): self.doc.end_paragraph() first = False self.doc.start_paragraph('DDR-MoreDetails') - atype = Utils.format_name_type( alt_name.get_type() ) + atype = str( alt_name.get_type() ) aname = alt_name.get_regular_name() self.doc.write_text(_('%(name_kind)s: %(name)s%(endnotes)s') % { 'name_kind' : atype, @@ -319,7 +319,7 @@ class DetDescendantReport(Report.Report): for event_ref in person.get_event_ref_list(): event = self.database.get_event_from_handle(event_ref.ref) date = DateHandler.get_date(event) - ename = Utils.format_event( event.get_type() ) + ename = str( event.get_type() ) place_handle = event.get_place_handle() if place_handle: place = self.database.get_place_from_handle(place_handle).get_title()