From b1fc20f5b9bc56bba3a3964876f4ddad35568038 Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Sun, 24 Apr 2016 13:47:04 -0700 Subject: [PATCH] add "living people" option to the Detailed Ancestor Report --- gramps/plugins/textreport/detancestralreport.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/gramps/plugins/textreport/detancestralreport.py b/gramps/plugins/textreport/detancestralreport.py index 9199e5005..fec72fbdd 100644 --- a/gramps/plugins/textreport/detancestralreport.py +++ b/gramps/plugins/textreport/detancestralreport.py @@ -104,6 +104,8 @@ class DetAncestorReport(Report): pid - The Gramps ID of the center person for the report. name_format - Preferred format to display names incl_private - Whether to include private data + living_people - How to handle living people + years_past_death - Consider as living this many years after death """ Report.__init__(self, database, options, user) @@ -114,7 +116,11 @@ class DetAncestorReport(Report): get_option_by_name = menu.get_option_by_name get_value = lambda name: get_option_by_name(name).get_value() + lang = menu.get_option_by_name('trans').get_value() + self._locale = self.set_locale(lang) + stdoptions.run_private_data_option(self, menu) + stdoptions.run_living_people_option(self, menu, self._locale) self.db = self.database self.max_generations = get_value('gen') @@ -144,9 +150,6 @@ class DetAncestorReport(Report): if (self.center_person == None) : raise ReportError(_("Person %s is not in the Database") % pid ) - lang = menu.get_option_by_name('trans').get_value() - self._locale = self.set_locale(lang) - stdoptions.run_name_format_option(self, menu) self.gen_handles = {} @@ -764,6 +767,8 @@ class DetAncestorOptions(MenuReportOptions): stdoptions.add_private_data_option(menu, category) + stdoptions.add_living_people_option(menu, category) + gen = NumberOption(_("Generations"),10,1,100) gen.set_help(_("The number of generations to include in the report")) addopt("gen", gen)