add the "living people" option to the three Graphviz reports
This commit is contained in:
parent
269f9e7626
commit
9c045c63c9
@ -181,9 +181,12 @@ class FamilyLinesOptions(MenuReportOptions):
|
|||||||
add_option('maxchildren', self.max_children)
|
add_option('maxchildren', self.max_children)
|
||||||
|
|
||||||
# --------------------
|
# --------------------
|
||||||
add_option = partial(menu.add_option, _('Include'))
|
category_name = _('Include')
|
||||||
|
add_option = partial(menu.add_option, category_name)
|
||||||
# --------------------
|
# --------------------
|
||||||
|
|
||||||
|
stdoptions.add_living_people_option(menu, category_name)
|
||||||
|
|
||||||
include_id = EnumeratedListOption(_('Include Gramps ID'), 0)
|
include_id = EnumeratedListOption(_('Include Gramps ID'), 0)
|
||||||
include_id.add_item(0, _('Do not include'))
|
include_id.add_item(0, _('Do not include'))
|
||||||
include_id.add_item(1, _('Share an existing line'))
|
include_id.add_item(1, _('Share an existing line'))
|
||||||
@ -302,6 +305,8 @@ class FamilyLinesReport(Report):
|
|||||||
name_format - Preferred format to display names
|
name_format - Preferred format to display names
|
||||||
incl_private - Whether to include private data
|
incl_private - Whether to include private data
|
||||||
incid - Whether to include IDs.
|
incid - Whether to include IDs.
|
||||||
|
living_people - How to handle living people
|
||||||
|
years_past_death - Consider as living this many years after death
|
||||||
"""
|
"""
|
||||||
Report.__init__(self, database, options, user)
|
Report.__init__(self, database, options, user)
|
||||||
|
|
||||||
@ -309,7 +314,11 @@ class FamilyLinesReport(Report):
|
|||||||
get_option_by_name = menu.get_option_by_name
|
get_option_by_name = menu.get_option_by_name
|
||||||
get_value = lambda name: get_option_by_name(name).get_value()
|
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_private_data_option(self, menu)
|
||||||
|
stdoptions.run_living_people_option(self, menu, self._locale)
|
||||||
self._db = self.database
|
self._db = self.database
|
||||||
|
|
||||||
# initialize several convenient variables
|
# initialize several convenient variables
|
||||||
@ -354,9 +363,6 @@ class FamilyLinesReport(Report):
|
|||||||
#option can be from another family tree, so person can be None
|
#option can be from another family tree, so person can be None
|
||||||
self._interest_set.add(person.get_handle())
|
self._interest_set.add(person.get_handle())
|
||||||
|
|
||||||
lang = menu.get_option_by_name('trans').get_value()
|
|
||||||
self._locale = self.set_locale(lang)
|
|
||||||
|
|
||||||
stdoptions.run_name_format_option(self, menu)
|
stdoptions.run_name_format_option(self, menu)
|
||||||
|
|
||||||
# convert the 'surnamecolors' string to a dictionary of names and colors
|
# convert the 'surnamecolors' string to a dictionary of names and colors
|
||||||
|
@ -75,11 +75,17 @@ class HourGlassReport(Report):
|
|||||||
name_format - Preferred format to display names
|
name_format - Preferred format to display names
|
||||||
incl_private - Whether to include private data
|
incl_private - Whether to include private data
|
||||||
incid - Whether to include IDs.
|
incid - Whether to include IDs.
|
||||||
|
living_people - How to handle living people
|
||||||
|
years_past_death - Consider as living this many years after death
|
||||||
"""
|
"""
|
||||||
Report.__init__(self, database, options, user)
|
Report.__init__(self, database, options, user)
|
||||||
menu = options.menu
|
menu = options.menu
|
||||||
|
|
||||||
|
lang = menu.get_option_by_name('trans').get_value()
|
||||||
|
locale = self.set_locale(lang)
|
||||||
|
|
||||||
stdoptions.run_private_data_option(self, menu)
|
stdoptions.run_private_data_option(self, menu)
|
||||||
|
stdoptions.run_living_people_option(self, menu, locale)
|
||||||
self.__db = self.database
|
self.__db = self.database
|
||||||
|
|
||||||
self.__used_people = []
|
self.__used_people = []
|
||||||
@ -119,8 +125,6 @@ class HourGlassReport(Report):
|
|||||||
|
|
||||||
self.includeid = menu.get_option_by_name('incid').get_value()
|
self.includeid = menu.get_option_by_name('incid').get_value()
|
||||||
|
|
||||||
self.set_locale(menu.get_option_by_name('trans').get_value())
|
|
||||||
|
|
||||||
stdoptions.run_name_format_option(self, menu)
|
stdoptions.run_name_format_option(self, menu)
|
||||||
|
|
||||||
def write_report(self):
|
def write_report(self):
|
||||||
@ -309,6 +313,8 @@ class HourGlassOptions(MenuReportOptions):
|
|||||||
|
|
||||||
stdoptions.add_private_data_option(menu, category_name)
|
stdoptions.add_private_data_option(menu, category_name)
|
||||||
|
|
||||||
|
stdoptions.add_living_people_option(menu, category_name)
|
||||||
|
|
||||||
max_gen = NumberOption(_('Max Descendant Generations'), 10, 1, 15)
|
max_gen = NumberOption(_('Max Descendant Generations'), 10, 1, 15)
|
||||||
max_gen.set_help(_("The number of generations of descendants to "
|
max_gen.set_help(_("The number of generations of descendants to "
|
||||||
"include in the graph"))
|
"include in the graph"))
|
||||||
|
@ -116,6 +116,8 @@ class RelGraphReport(Report):
|
|||||||
incl_private - Whether to include private data
|
incl_private - Whether to include private data
|
||||||
event_choice - Whether to include dates and/or places
|
event_choice - Whether to include dates and/or places
|
||||||
occupation - Whether to include occupations
|
occupation - Whether to include occupations
|
||||||
|
living_people - How to handle living people
|
||||||
|
years_past_death - Consider as living this many years after death
|
||||||
"""
|
"""
|
||||||
Report.__init__(self, database, options, user)
|
Report.__init__(self, database, options, user)
|
||||||
|
|
||||||
@ -123,7 +125,11 @@ class RelGraphReport(Report):
|
|||||||
get_option_by_name = options.menu.get_option_by_name
|
get_option_by_name = options.menu.get_option_by_name
|
||||||
get_value = lambda name: get_option_by_name(name).get_value()
|
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_private_data_option(self, menu)
|
||||||
|
stdoptions.run_living_people_option(self, menu, self._locale)
|
||||||
|
|
||||||
self.includeid = get_value('incid')
|
self.includeid = get_value('incid')
|
||||||
self.includeurl = get_value('url')
|
self.includeurl = get_value('url')
|
||||||
@ -160,9 +166,6 @@ class RelGraphReport(Report):
|
|||||||
filter_option = get_option_by_name('filter')
|
filter_option = get_option_by_name('filter')
|
||||||
self._filter = filter_option.get_filter()
|
self._filter = filter_option.get_filter()
|
||||||
|
|
||||||
lang = menu.get_option_by_name('trans').get_value()
|
|
||||||
self._locale = self.set_locale(lang)
|
|
||||||
|
|
||||||
stdoptions.run_name_format_option(self, menu)
|
stdoptions.run_name_format_option(self, menu)
|
||||||
|
|
||||||
pid = get_value('pid')
|
pid = get_value('pid')
|
||||||
@ -665,6 +668,8 @@ class RelGraphOptions(MenuReportOptions):
|
|||||||
|
|
||||||
stdoptions.add_private_data_option(menu, category_name)
|
stdoptions.add_private_data_option(menu, category_name)
|
||||||
|
|
||||||
|
stdoptions.add_living_people_option(menu, category_name)
|
||||||
|
|
||||||
stdoptions.add_localization_option(menu, category_name)
|
stdoptions.add_localization_option(menu, category_name)
|
||||||
|
|
||||||
################################
|
################################
|
||||||
|
Loading…
Reference in New Issue
Block a user