From 55d3a24d2efc8075a3c4c302266a7b210a0a86dc Mon Sep 17 00:00:00 2001 From: Paul Franklin Date: Sat, 18 Feb 2017 19:28:14 -0800 Subject: [PATCH] tweak some report options slightly (less height, re-tabify some) --- gramps/gui/plug/_guioptions.py | 2 +- gramps/plugins/drawreport/ancestortree.py | 169 +++++++------- gramps/plugins/drawreport/calendarreport.py | 57 ++--- gramps/plugins/drawreport/descendtree.py | 211 +++++++++--------- gramps/plugins/drawreport/fanchart.py | 16 +- gramps/plugins/drawreport/statisticschart.py | 36 +-- gramps/plugins/drawreport/timeline.py | 18 +- gramps/plugins/graph/gvfamilylines.py | 49 ++-- gramps/plugins/graph/gvhourglass.py | 72 +++--- gramps/plugins/graph/gvrelgraph.py | 59 ++--- gramps/plugins/textreport/ancestorreport.py | 14 +- gramps/plugins/textreport/birthdayreport.py | 68 +++--- gramps/plugins/textreport/descendreport.py | 20 +- .../plugins/textreport/detancestralreport.py | 163 +++++++------- .../plugins/textreport/detdescendantreport.py | 158 ++++++------- gramps/plugins/textreport/familygroup.py | 39 ++-- gramps/plugins/textreport/indivcomplete.py | 59 ++--- gramps/plugins/textreport/kinshipreport.py | 20 +- gramps/plugins/textreport/placereport.py | 20 +- gramps/plugins/textreport/recordsreport.py | 32 +-- gramps/plugins/webreport/webcal.py | 48 ++-- 21 files changed, 696 insertions(+), 634 deletions(-) diff --git a/gramps/gui/plug/_guioptions.py b/gramps/gui/plug/_guioptions.py index 59a4eaa1d..5af4a9c88 100644 --- a/gramps/gui/plug/_guioptions.py +++ b/gramps/gui/plug/_guioptions.py @@ -1158,7 +1158,7 @@ class GuiPersonListOption(Gtk.Box): self.__db = dbstate.get_database() self.__uistate = uistate self.__track = track - self.set_size_request(150, 150) + self.set_size_request(150, 100) self.__model = Gtk.ListStore(GObject.TYPE_STRING, GObject.TYPE_STRING) self.__tree_view = Gtk.TreeView(self.__model) diff --git a/gramps/plugins/drawreport/ancestortree.py b/gramps/plugins/drawreport/ancestortree.py index f75bc3a86..ad49a5fe8 100644 --- a/gramps/plugins/drawreport/ancestortree.py +++ b/gramps/plugins/drawreport/ancestortree.py @@ -794,12 +794,6 @@ class AncestorTreeOptions(MenuReportOptions): self.__pid.set_help(_("The center person for the tree")) menu.add_option(category_name, "pid", self.__pid) - stdoptions.add_name_format_option(menu, category_name) - - stdoptions.add_living_people_option(menu, category_name) - - stdoptions.add_private_data_option(menu, category_name) - siblings = BooleanOption( _('Include siblings of the center person'), False) siblings.set_help( @@ -854,55 +848,6 @@ class AncestorTreeOptions(MenuReportOptions): prnnum.set_help(_("Whether to print page numbers on each page.")) menu.add_option(category_name, "inc_pagenum", prnnum) - stdoptions.add_localization_option(menu, category_name) - - ################## - category_name = _("Display") - - disp = TextOption(_("Father\nDisplay Format"), - ["$n", - "%s $b" %_BORN, - "-{%s $d}" %_DIED]) - disp.set_help(_("Display format for the fathers box.")) - menu.add_option(category_name, "father_disp", disp) - - #Will add when libsubstkeyword supports it. - #missing = EnumeratedListOption(_("Replace missing\nplaces\\dates \ - # with"), 0) - #missing.add_item(0, _("Does not display anything")) - #missing.add_item(1, _("Displays '_____'")) - #missing.set_help(_("What will print when information is not known")) - #menu.add_option(category_name, "miss_val", missing) - - #category_name = _("Secondary") - - disp_mom = TextOption(_("Mother\nDisplay Format"), - ["$n", - "%s $b" %_BORN, - "%s $m" %_MARR, - "-{%s $d}" %_DIED]) - disp_mom.set_help(_("Display format for the mothers box.")) - menu.add_option(category_name, "mother_disp", disp_mom) - - center_disp = EnumeratedListOption(_("Center person uses\n" - "which format"), 0) - center_disp.add_item(0, _("Use Fathers Display format")) - center_disp.add_item(1, _("Use Mothers display format")) - center_disp.set_help(_("Which Display format to use the center person")) - menu.add_option(category_name, "center_uses", center_disp) - - incmarr = BooleanOption(_('Include Marriage box'), False) - incmarr.set_help( - _("Whether to include a separate marital box in the report")) - menu.add_option(category_name, "inc_marr", incmarr) - - marrdisp = StringOption(_("Marriage\nDisplay Format"), "%s $m" % _MARR) - marrdisp.set_help(_("Display format for the marital box.")) - menu.add_option(category_name, "marr_disp", marrdisp) - - ################## - category_name = _("Size") - self.scale = EnumeratedListOption(_("Scale tree to fit"), 0) self.scale.add_item(0, _("Do not scale tree")) self.scale.add_item(1, _("Scale tree to fit page width only")) @@ -941,20 +886,70 @@ class AncestorTreeOptions(MenuReportOptions): else: self.__onepage = None - self.box_Y_sf = NumberOption(_("inter-box scale factor"), - 1.00, 0.10, 2.00, 0.01) - self.box_Y_sf.set_help( - _("Make the inter-box spacing bigger or smaller")) - menu.add_option(category_name, "box_Yscale", self.box_Y_sf) - - self.box_shadow_sf = NumberOption(_("box shadow scale factor"), - 1.00, 0.00, 2.00, 0.01) # down to 0 - self.box_shadow_sf.set_help(_("Make the box shadow bigger or smaller")) - menu.add_option(category_name, "shadowscale", self.box_shadow_sf) + self.__blank = BooleanOption(_('Include Blank Pages'), True) + self.__blank.set_help(_("Whether to include pages that are blank.")) + menu.add_option(category_name, "inc_blank", self.__blank) + self.__check_blank() ################## - category_name = _("Replace") + category_name = _("Report Options (2)") + + stdoptions.add_name_format_option(menu, category_name) + + stdoptions.add_living_people_option(menu, category_name) + + stdoptions.add_private_data_option(menu, category_name) + + stdoptions.add_localization_option(menu, category_name) + + ################## + category_name = _("Display") + + disp = TextOption(_("Father\nDisplay Format"), + ["$n", + "%s $b" %_BORN, + "-{%s $d}" %_DIED]) + disp.set_help(_("Display format for the fathers box.")) + menu.add_option(category_name, "father_disp", disp) + + #Will add when libsubstkeyword supports it. + #missing = EnumeratedListOption(_("Replace missing\nplaces\\dates \ + # with"), 0) + #missing.add_item(0, _("Does not display anything")) + #missing.add_item(1, _("Displays '_____'")) + #missing.set_help(_("What will print when information is not known")) + #menu.add_option(category_name, "miss_val", missing) + + disp_mom = TextOption(_("Mother\nDisplay Format"), + ["$n", + "%s $b" %_BORN, + "%s $m" %_MARR, + "-{%s $d}" %_DIED]) + disp_mom.set_help(_("Display format for the mothers box.")) + menu.add_option(category_name, "mother_disp", disp_mom) + + center_disp = EnumeratedListOption(_("Center person uses\n" + "which format"), 0) + center_disp.add_item(0, _("Use Fathers Display format")) + center_disp.add_item(1, _("Use Mothers display format")) + center_disp.set_help(_("The display format for the center person")) + menu.add_option(category_name, "center_uses", center_disp) + + self.incmarr = BooleanOption(_('Include Marriage box'), False) + self.incmarr.set_help( + _("Whether to include a separate marital box in the report")) + menu.add_option(category_name, "inc_marr", self.incmarr) + self.incmarr.connect('value-changed', self._incmarr_changed) + + self.marrdisp = StringOption(_("Marriage\nDisplay Format"), + "%s $m" % _MARR) + self.marrdisp.set_help(_("Display format for the marital box.")) + menu.add_option(category_name, "marr_disp", self.marrdisp) + self._incmarr_changed() + + ################## + category_name = _("Advanced") repldisp = TextOption( _("Replace Display Format:\n'Replace this'/' with this'"), @@ -962,16 +957,6 @@ class AncestorTreeOptions(MenuReportOptions): repldisp.set_help(_("i.e.\nUnited States of America/U.S.A")) menu.add_option(category_name, "replace_list", repldisp) - - ################## - category_name = _("Include") - - self.__blank = BooleanOption(_('Include Blank Pages'), True) - self.__blank.set_help(_("Whether to include pages that are blank.")) - menu.add_option(category_name, "inc_blank", self.__blank) - - self.__check_blank() - # TODO this code is never used and so I conclude it is for future use # self.__include_images = BooleanOption( # _('Include thumbnail images of people'), False) @@ -979,12 +964,10 @@ class AncestorTreeOptions(MenuReportOptions): # _("Whether to include thumbnails of people.")) # menu.add_option(category_name, "includeImages", self.__include_images) - #category_name = _("Notes") - self.usenote = BooleanOption(_('Include a note'), False) - self.usenote.set_help(_("Whether to include a note on " - "the report.")) + self.usenote.set_help(_("Whether to include a note on the report.")) menu.add_option(category_name, "inc_note", self.usenote) + self.usenote.connect('value-changed', self._usenote_changed) self.notedisp = TextOption(_("Note"), []) self.notedisp.set_help(_("Add a note\n\n" @@ -997,6 +980,32 @@ class AncestorTreeOptions(MenuReportOptions): self.notelocal.add_item(num, text) self.notelocal.set_help(_("Where to place the note.")) menu.add_option(category_name, "note_place", self.notelocal) + self._usenote_changed() + + self.box_Y_sf = NumberOption(_("inter-box scale factor"), + 1.00, 0.10, 2.00, 0.01) + self.box_Y_sf.set_help( + _("Make the inter-box spacing bigger or smaller")) + menu.add_option(category_name, "box_Yscale", self.box_Y_sf) + + self.box_shadow_sf = NumberOption(_("box shadow scale factor"), + 1.00, 0.00, 2.00, 0.01) # down to 0 + self.box_shadow_sf.set_help(_("Make the box shadow bigger or smaller")) + menu.add_option(category_name, "shadowscale", self.box_shadow_sf) + + def _incmarr_changed(self): + """ + If Marriage box is not enabled, disable Marriage Display Format box + """ + value = self.incmarr.get_value() + self.marrdisp.set_available(value) + + def _usenote_changed(self): + """ + If Note box is not enabled, disable Note Location box + """ + value = self.usenote.get_value() + self.notelocal.set_available(value) def __check_blank(self): if self.__onepage: diff --git a/gramps/plugins/drawreport/calendarreport.py b/gramps/plugins/drawreport/calendarreport.py index f39bca27a..89cd9e821 100644 --- a/gramps/plugins/drawreport/calendarreport.py +++ b/gramps/plugins/drawreport/calendarreport.py @@ -477,6 +477,23 @@ class CalendarOptions(MenuReportOptions): menu.add_option(category_name, "pid", self.__pid) self.__pid.connect('value-changed', self.__update_filters) + text1 = StringOption(_("Text Area 1"), _(_TITLE1)) + text1.set_help(_("First line of text at bottom of calendar")) + add_option("text1", text1) + + text2 = StringOption(_("Text Area 2"), _(_TITLE2)) + text2.set_help(_("Second line of text at bottom of calendar")) + add_option("text2", text2) + + text3 = StringOption(_("Text Area 3"), URL_HOMEPAGE) + text3.set_help(_("Third line of text at bottom of calendar")) + add_option("text3", text3) + + ########################## + category_name = _("Report Options (2)") + add_option = partial(menu.add_option, category_name) + ########################## + self._nf = stdoptions.add_name_format_option(menu, category_name) self._nf.connect('value-changed', self.__update_filters) @@ -491,7 +508,7 @@ class CalendarOptions(MenuReportOptions): stdoptions.add_localization_option(menu, category_name) ########################## - category_name = _("Content Options") + category_name = _("Content") add_option = partial(menu.add_option, category_name) ########################## @@ -517,43 +534,33 @@ class CalendarOptions(MenuReportOptions): start_dow = EnumeratedListOption(_("First day of week"), 1) long_days = date_displayer.long_days for count in range(1, 8): - # conversion between gramps numbering (sun=1) and iso numbering (mon=1) of weekdays below - start_dow.add_item((count+5) % 7 + 1, long_days[count].capitalize()) - start_dow.set_help(_("Select the first day of the week for the calendar")) + # conversion between gramps numbering (sun=1) + # and iso numbering (mon=1) of weekdays below + start_dow.add_item((count + 5) % 7 + 1, + long_days[count].capitalize()) + start_dow.set_help( + _("Select the first day of the week for the calendar")) add_option("start_dow", start_dow) maiden_name = EnumeratedListOption(_("Birthday surname"), "own") - maiden_name.add_item("spouse_first", _("Wives use husband's surname (from first family listed)")) - maiden_name.add_item("spouse_last", _("Wives use husband's surname (from last family listed)")) + maiden_name.add_item( + "spouse_first", + _("Wives use husband's surname (from first family listed)")) + maiden_name.add_item( + "spouse_last", + _("Wives use husband's surname (from last family listed)")) maiden_name.add_item("own", _("Wives use their own surname")) maiden_name.set_help(_("Select married women's displayed surname")) add_option("maiden_name", maiden_name) birthdays = BooleanOption(_("Include birthdays"), True) - birthdays.set_help(_("Include birthdays in the calendar")) + birthdays.set_help(_("Whether to include birthdays")) add_option("birthdays", birthdays) anniversaries = BooleanOption(_("Include anniversaries"), True) - anniversaries.set_help(_("Include anniversaries in the calendar")) + anniversaries.set_help(_("Whether to include anniversaries")) add_option("anniversaries", anniversaries) - ########################## - category_name = _("Text Options") - add_option = partial(menu.add_option, _("Text Options")) - ########################## - - text1 = StringOption(_("Text Area 1"), _(_TITLE1)) - text1.set_help(_("First line of text at bottom of calendar")) - add_option("text1", text1) - - text2 = StringOption(_("Text Area 2"), _(_TITLE2)) - text2.set_help(_("Second line of text at bottom of calendar")) - add_option("text2", text2) - - text3 = StringOption(_("Text Area 3"), URL_HOMEPAGE) - text3.set_help(_("Third line of text at bottom of calendar")) - add_option("text3", text3) - def __update_filters(self): """ Update the filter list based on the selected person diff --git a/gramps/plugins/drawreport/descendtree.py b/gramps/plugins/drawreport/descendtree.py index 7b7bd1b98..aaaefa2a1 100644 --- a/gramps/plugins/drawreport/descendtree.py +++ b/gramps/plugins/drawreport/descendtree.py @@ -1517,7 +1517,7 @@ class DescendTreeOptions(MenuReportOptions): Add options to the menu for the descendant report. """ ################## - category_name = _("Report Options") + category_name = _("Tree Options") if self.name.split(",")[0] == _RPT_NAME: self.__pid = PersonOption(_("Report for")) @@ -1528,17 +1528,6 @@ class DescendTreeOptions(MenuReportOptions): self.__pid.set_help(_("The main family for the report")) menu.add_option(category_name, "pid", self.__pid) - stdoptions.add_name_format_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) - - ################## - category_name = _("Tree Options") - max_gen = NumberOption(_("Generations"), 10, 1, 50) max_gen.set_help(_("The number of generations to include in the tree")) menu.add_option(category_name, "maxgen", max_gen) @@ -1562,16 +1551,6 @@ class DescendTreeOptions(MenuReportOptions): "resulting in a smaller tree")) menu.add_option(category_name, "compress_tree", compresst) - ################## - category_name = _("Display") - - disp = TextOption(_("Descendant\nDisplay Format"), - ["$n", - "%s $b" %_BORN, - "-{%s $d}" %_DIED]) - disp.set_help(_("Display format for a descendant.")) - menu.add_option(category_name, "descend_disp", disp) - bold = BooleanOption(_('Bold direct descendants'), True) bold.set_help( _("Whether to bold those people that are direct " @@ -1579,44 +1558,33 @@ class DescendTreeOptions(MenuReportOptions): ) menu.add_option(category_name, "bolddirect", bold) - #bug 4767 - #diffspouse = BooleanOption( - # _("Use separate display format for spouses"), - # True) - #diffspouse.set_help(_("Whether spouses can have a different format.")) - #menu.add_option(category_name, "diffspouse", diffspouse) - indspouce = BooleanOption(_('Indent Spouses'), True) indspouce.set_help(_("Whether to indent the spouses in the tree.")) menu.add_option(category_name, "ind_spouse", indspouce) - sdisp = TextOption(_("Spousal\nDisplay Format"), - ["$n", - "%s $b" %_BORN, - "-{%s $d}" %_DIED]) - sdisp.set_help(_("Display format for a spouse.")) - menu.add_option(category_name, "spouse_disp", sdisp) - - incmarr = BooleanOption(_('Include Marriage box'), True) - incmarr.set_help( - _("Whether to include a separate marital box in the report")) - menu.add_option(category_name, "inc_marr", incmarr) - - marrdisp = StringOption(_("Marriage\nDisplay Format"), "%s $m" % _MARR) - marrdisp.set_help(_("Display format for the marital box.")) - menu.add_option(category_name, "marr_disp", marrdisp) - ################## - category_name = _("Replace") + category_name = _("Report Options") - repldisp = TextOption( - _("Replace Display Format:\n'Replace this'/' with this'"), - []) - repldisp.set_help(_("i.e.\nUnited States of America/U.S.A")) - menu.add_option(category_name, "replace_list", repldisp) + self.title = EnumeratedListOption(_("Report Title"), 0) + self.title.add_item(0, _("Do not include a title")) + self.title.add_item(1, _("Descendant Chart for [selected person(s)]")) + if self.name.split(",")[0] != _RPT_NAME: + self.title.add_item(2, + _("Family Chart for [names of chosen family]")) + if self.showparents.get_value(): + self.title.add_item(3, + _("Cousin Chart for [names of children]")) + self.title.set_help(_("Choose a title for the report")) + menu.add_option(category_name, "report_title", self.title) + self.showparents.connect('value-changed', self.__Title_enum) - ################## - category_name = _("Size") + border = BooleanOption(_('Include a border'), False) + border.set_help(_("Whether to make a border around the report.")) + menu.add_option(category_name, "inc_border", border) + + prnnum = BooleanOption(_('Include Page Numbers'), False) + prnnum.set_help(_("Whether to include page numbers on each page.")) + menu.add_option(category_name, "inc_pagenum", prnnum) self.scale = EnumeratedListOption(_("Scale tree to fit"), 0) self.scale.add_item(0, _("Do not scale tree")) @@ -1656,6 +1624,84 @@ class DescendTreeOptions(MenuReportOptions): else: self.__onepage = None + self.__blank = BooleanOption(_('Include Blank Pages'), True) + self.__blank.set_help(_("Whether to include pages that are blank.")) + menu.add_option(category_name, "inc_blank", self.__blank) + + ################## + category_name = _("Report Options (2)") + + stdoptions.add_name_format_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) + + ################## + category_name = _("Display") + + disp = TextOption(_("Descendant\nDisplay Format"), + ["$n", + "%s $b" %_BORN, + "-{%s $d}" %_DIED]) + disp.set_help(_("Display format for a descendant.")) + menu.add_option(category_name, "descend_disp", disp) + + #bug 4767 + #diffspouse = BooleanOption( + # _("Use separate display format for spouses"), + # True) + #diffspouse.set_help(_("Whether spouses can have a different format.")) + #menu.add_option(category_name, "diffspouse", diffspouse) + + sdisp = TextOption(_("Spousal\nDisplay Format"), + ["$n", + "%s $b" %_BORN, + "-{%s $d}" %_DIED]) + sdisp.set_help(_("Display format for a spouse.")) + menu.add_option(category_name, "spouse_disp", sdisp) + + self.incmarr = BooleanOption(_('Include Marriage box'), True) + self.incmarr.set_help( + _("Whether to include a separate marital box in the report")) + menu.add_option(category_name, "inc_marr", self.incmarr) + self.incmarr.connect('value-changed', self._incmarr_changed) + + self.marrdisp = StringOption(_("Marriage\nDisplay Format"), + "%s $m" % _MARR) + self.marrdisp.set_help(_("Display format for the marital box.")) + menu.add_option(category_name, "marr_disp", self.marrdisp) + self._incmarr_changed() + + ################## + category_name = _("Advanced") + + repldisp = TextOption( + _("Replace Display Format:\n'Replace this'/' with this'"), + []) + repldisp.set_help(_("i.e.\nUnited States of America/U.S.A")) + menu.add_option(category_name, "replace_list", repldisp) + + self.usenote = BooleanOption(_('Include a note'), False) + self.usenote.set_help(_("Whether to include a note on the report.")) + menu.add_option(category_name, "inc_note", self.usenote) + self.usenote.connect('value-changed', self._usenote_changed) + + self.notedisp = TextOption(_("Note"), []) + self.notedisp.set_help(_("Add a note\n\n" + "$T inserts today's date")) + menu.add_option(category_name, "note_disp", self.notedisp) + + locales = NoteType(0) + self.notelocal = EnumeratedListOption(_("Note Location"), 2) + for num, text in locales.note_locals(): + self.notelocal.add_item(num, text) + self.notelocal.set_help(_("Where to place the note.")) + menu.add_option(category_name, "note_place", self.notelocal) + self._usenote_changed() + self.box_Y_sf = NumberOption(_("inter-box Y scale factor"), 1.00, 0.10, 2.00, 0.01) self.box_Y_sf.set_help(_("Make the inter-box Y bigger or smaller")) @@ -1666,54 +1712,19 @@ class DescendTreeOptions(MenuReportOptions): self.box_shadow_sf.set_help(_("Make the box shadow bigger or smaller")) menu.add_option(category_name, "shadowscale", self.box_shadow_sf) + def _incmarr_changed(self): + """ + If Marriage box is not enabled, disable Marriage Display Format box + """ + value = self.incmarr.get_value() + self.marrdisp.set_available(value) - ################## - category_name = _("Include") - - self.title = EnumeratedListOption(_("Report Title"), 0) - self.title.add_item(0, _("Do not include a title")) - self.title.add_item(1, _("Descendant Chart for [selected person(s)]")) - if self.name.split(",")[0] != _RPT_NAME: - self.title.add_item(2, - _("Family Chart for [names of chosen family]")) - if self.showparents.get_value(): - self.title.add_item(3, - _("Cousin Chart for [names of children]")) - self.title.set_help(_("Choose a title for the report")) - menu.add_option(category_name, "report_title", self.title) - self.showparents.connect('value-changed', self.__Title_enum) - - border = BooleanOption(_('Include a border'), False) - border.set_help(_("Whether to make a border around the report.")) - menu.add_option(category_name, "inc_border", border) - - prnnum = BooleanOption(_('Include Page Numbers'), False) - prnnum.set_help(_("Whether to include page numbers on each page.")) - menu.add_option(category_name, "inc_pagenum", prnnum) - - self.__blank = BooleanOption(_('Include Blank Pages'), True) - self.__blank.set_help(_("Whether to include pages that are blank.")) - menu.add_option(category_name, "inc_blank", self.__blank) - - #category_name = _("Notes") - - self.usenote = BooleanOption(_('Include a note'), False) - self.usenote.set_help( - _("Whether to include a note on the report.") - ) - menu.add_option(category_name, "inc_note", self.usenote) - - self.notedisp = TextOption(_("Note"), []) - self.notedisp.set_help(_("Add a note" - "\n\n$T inserts today's date")) - menu.add_option(category_name, "note_disp", self.notedisp) - - locals = NoteType(0) - notelocal = EnumeratedListOption(_("Note Location"), 2) - for num, text in locals.note_locals(): - notelocal.add_item(num, text) - notelocal.set_help(_("Where to place the note.")) - menu.add_option(category_name, "note_place", notelocal) + def _usenote_changed(self): + """ + If Note box is not enabled, disable Note Location box + """ + value = self.usenote.get_value() + self.notelocal.set_available(value) def __check_blank(self): """dis/enables the 'print blank pages' checkbox""" diff --git a/gramps/plugins/drawreport/fanchart.py b/gramps/plugins/drawreport/fanchart.py index d0d9be195..9465f5b66 100644 --- a/gramps/plugins/drawreport/fanchart.py +++ b/gramps/plugins/drawreport/fanchart.py @@ -689,14 +689,6 @@ class FanChartOptions(MenuReportOptions): self.__pid.set_help(_("The center person for the report")) menu.add_option(category_name, "pid", self.__pid) - stdoptions.add_private_data_option(menu, category_name) - - stdoptions.add_living_people_option(menu, category_name) - - stdoptions.add_localization_option(menu, category_name) - - category_name = _("Content") - max_gen = NumberOption(_("Generations"), 5, 1, self.max_generations) max_gen.set_help(_("The number of generations " "to include in the report")) @@ -734,6 +726,14 @@ class FanChartOptions(MenuReportOptions): "for each generation in the style editor")) menu.add_option(category_name, "same_style", same_style) + category_name = _("Report Options (2)") + + stdoptions.add_private_data_option(menu, category_name) + + stdoptions.add_living_people_option(menu, category_name) + + stdoptions.add_localization_option(menu, category_name) + def make_default_style(self, default_style): """Make the default output style for the Fan Chart report.""" background_colors = [(255, 63, 0), diff --git a/gramps/plugins/drawreport/statisticschart.py b/gramps/plugins/drawreport/statisticschart.py index 09c380a9b..c7775f9b3 100644 --- a/gramps/plugins/drawreport/statisticschart.py +++ b/gramps/plugins/drawreport/statisticschart.py @@ -998,22 +998,6 @@ class StatisticsChartOptions(MenuReportOptions): menu.add_option(category_name, "pid", self.__pid) self.__pid.connect('value-changed', self.__update_filters) - self._nf = stdoptions.add_name_format_option(menu, category_name) - self._nf.connect('value-changed', self.__update_filters) - - self.__update_filters() - - stdoptions.add_private_data_option(menu, category_name) - - stdoptions.add_living_people_option(menu, category_name) - - stdoptions.add_localization_option(menu, category_name) - - ################################ - category_name = _("Report Details") - add_option = partial(menu.add_option, category_name) - ################################ - sortby = EnumeratedListOption(_('Sort chart items by'), _options.SORT_VALUE) for item_idx in range(len(_options.opt_sorts)): @@ -1057,8 +1041,26 @@ class StatisticsChartOptions(MenuReportOptions): "used instead of a bar chart.")) add_option("bar_items", bar_items) - # ------------------------------------------------- + ################################ + category_name = _("Report Options (2)") + add_option = partial(menu.add_option, category_name) + ################################ + + self._nf = stdoptions.add_name_format_option(menu, category_name) + self._nf.connect('value-changed', self.__update_filters) + + self.__update_filters() + + stdoptions.add_private_data_option(menu, category_name) + + stdoptions.add_living_people_option(menu, category_name) + + stdoptions.add_localization_option(menu, category_name) + + ################################ # List of available charts on separate option tabs + ################################ + idx = 0 third = (len(_Extract.extractors) + 1) // 3 chart_types = [] diff --git a/gramps/plugins/drawreport/timeline.py b/gramps/plugins/drawreport/timeline.py index 8e1111bf1..34e2cd320 100644 --- a/gramps/plugins/drawreport/timeline.py +++ b/gramps/plugins/drawreport/timeline.py @@ -423,6 +423,16 @@ class TimeLineOptions(MenuReportOptions): menu.add_option(category_name, "pid", self.__pid) self.__pid.connect('value-changed', self.__update_filters) + sortby = EnumeratedListOption(_('Sort by'), 0) + idx = 0 + for item in _get_sort_functions(Sort(self.__db)): + sortby.add_item(idx, _(item[0])) + idx += 1 + sortby.set_help(_("Sorting method to use")) + menu.add_option(category_name, "sortby", sortby) + + category_name = _("Report Options (2)") + self._nf = stdoptions.add_name_format_option(menu, category_name) self._nf.connect('value-changed', self.__update_filters) @@ -432,14 +442,6 @@ class TimeLineOptions(MenuReportOptions): stdoptions.add_living_people_option(menu, category_name) - sortby = EnumeratedListOption(_('Sort by'), 0) - idx = 0 - for item in _get_sort_functions(Sort(self.__db)): - sortby.add_item(idx, _(item[0])) - idx += 1 - sortby.set_help(_("Sorting method to use")) - menu.add_option(category_name, "sortby", sortby) - stdoptions.add_localization_option(menu, category_name) def __update_filters(self): diff --git a/gramps/plugins/graph/gvfamilylines.py b/gramps/plugins/graph/gvfamilylines.py index 1cb662091..f85b16102 100644 --- a/gramps/plugins/graph/gvfamilylines.py +++ b/gramps/plugins/graph/gvfamilylines.py @@ -116,10 +116,6 @@ class FamilyLinesOptions(MenuReportOptions): add_option = partial(menu.add_option, category_name) # --------------------- - stdoptions.add_name_format_option(menu, category_name) - - stdoptions.add_private_data_option(menu, category_name, default=False) - followpar = BooleanOption(_('Follow parents to determine ' '"family lines"'), True) followpar.set_help(_('Parents and their ancestors will be ' @@ -140,10 +136,11 @@ class FamilyLinesOptions(MenuReportOptions): '"family lines".')) add_option('removeextra', remove_extra_people) - use_roundedcorners = BooleanOption(_('Use rounded corners'), False) - use_roundedcorners.set_help(_('Use rounded corners to differentiate ' - 'between women and men.')) - add_option("useroundedcorners", use_roundedcorners) + arrow = EnumeratedListOption(_("Arrowhead direction"), 'd') + for i in range( 0, len(_ARROWS) ): + arrow.add_item(_ARROWS[i]["value"], _ARROWS[i]["name"]) + arrow.set_help(_("Choose the direction that the arrows point.")) + add_option("arrow", arrow) color = EnumeratedListOption(_("Graph coloring"), "filled") for i in range(len(_COLORS)): @@ -154,11 +151,28 @@ class FamilyLinesOptions(MenuReportOptions): "is unknown it will be shown with gray.")) add_option("color", color) - arrow = EnumeratedListOption(_("Arrowhead direction"), 'd') - for i in range( 0, len(_ARROWS) ): - arrow.add_item(_ARROWS[i]["value"], _ARROWS[i]["name"]) - arrow.set_help(_("Choose the direction that the arrows point.")) - add_option("arrow", arrow) + roundedcorners = BooleanOption(_('Use rounded corners'), False) + roundedcorners.set_help( + _("Use rounded corners to differentiate between women and men.")) + add_option("useroundedcorners", roundedcorners) + + include_id = EnumeratedListOption(_('Gramps ID'), 0) + include_id.add_item(0, _('Do not include')) + include_id.add_item(1, _('Share an existing line')) + include_id.add_item(2, _('On a line of its own')) + include_id.set_help(_("Whether (and where) to include Gramps IDs")) + add_option("incid", include_id) + + # --------------------- + category_name = _('Report Options (2)') + add_option = partial(menu.add_option, category_name) + # --------------------- + + stdoptions.add_name_format_option(menu, category_name) + + stdoptions.add_private_data_option(menu, category_name, default=False) + + stdoptions.add_living_people_option(menu, category_name) stdoptions.add_localization_option(menu, category_name) @@ -201,15 +215,6 @@ class FamilyLinesOptions(MenuReportOptions): 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.add_item(0, _('Do not include')) - include_id.add_item(1, _('Share an existing line')) - include_id.add_item(2, _('On a line of its own')) - include_id.set_help(_("Whether (and where) to include Gramps IDs")) - add_option("incid", include_id) - self.include_dates = BooleanOption(_('Include dates'), True) self.include_dates.set_help(_('Whether to include dates for people ' 'and families.')) diff --git a/gramps/plugins/graph/gvhourglass.py b/gramps/plugins/graph/gvhourglass.py index 6f46cc278..2207ab75b 100644 --- a/gramps/plugins/graph/gvhourglass.py +++ b/gramps/plugins/graph/gvhourglass.py @@ -315,34 +315,21 @@ class HourGlassOptions(MenuReportOptions): pid.set_help(_("The Center person for the graph")) menu.add_option(category_name, "pid", pid) - stdoptions.add_name_format_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.set_help(_("The number of generations of descendants to " + max_gen_d = NumberOption(_('Max Descendant Generations'), 10, 1, 15) + max_gen_d.set_help(_("The number of generations of descendants to " "include in the graph")) - menu.add_option(category_name, "maxdescend", max_gen) + menu.add_option(category_name, "maxdescend", max_gen_d) - max_gen = NumberOption(_('Max Ancestor Generations'), 10, 1, 15) - max_gen.set_help(_("The number of generations of ancestors to " + max_gen_a = NumberOption(_('Max Ancestor Generations'), 10, 1, 15) + max_gen_a.set_help(_("The number of generations of ancestors to " "include in the graph")) - menu.add_option(category_name, "maxascend", max_gen) + menu.add_option(category_name, "maxascend", max_gen_a) - include_id = EnumeratedListOption(_('Include Gramps ID'), 0) - include_id.add_item(0, _('Do not include')) - include_id.add_item(1, _('Share an existing line')) - include_id.add_item(2, _('On a line of its own')) - include_id.set_help(_("Whether (and where) to include Gramps IDs")) - menu.add_option(category_name, "incid", include_id) - - stdoptions.add_localization_option(menu, category_name) - - ################################ - category_name = _("Graph Style") - ################################ + arrow = EnumeratedListOption(_("Arrowhead direction"), 'o') + for i in range( 0, len(_ARROWS) ): + arrow.add_item(_ARROWS[i]["value"], _ARROWS[i]["name"]) + arrow.set_help(_("Choose the direction that the arrows point.")) + menu.add_option(category_name, "arrow", arrow) color = EnumeratedListOption(_("Graph coloring"), "filled") for i in range(0, len(_COLORS)): @@ -352,6 +339,32 @@ class HourGlassOptions(MenuReportOptions): "is unknown it will be shown with gray.")) menu.add_option(category_name, "color", color) + roundedcorners = BooleanOption(_("Use rounded corners"), False) # 2180 + roundedcorners.set_help( + _("Use rounded corners to differentiate between women and men.")) + menu.add_option(category_name, "roundcorners", roundedcorners) + + include_id = EnumeratedListOption(_('Gramps ID'), 0) + include_id.add_item(0, _('Do not include')) + include_id.add_item(1, _('Share an existing line')) + include_id.add_item(2, _('On a line of its own')) + include_id.set_help(_("Whether (and where) to include Gramps IDs")) + menu.add_option(category_name, "incid", include_id) + + category_name = _("Report Options (2)") + + stdoptions.add_name_format_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) + + ################################ + category_name = _("Graph Style") + ################################ + color_males = ColorOption(_('Males'), '#e0e0ff') color_males.set_help(_('The color to use to display men.')) menu.add_option(category_name, 'colormales', color_males) @@ -368,14 +381,3 @@ class HourGlassOptions(MenuReportOptions): color_family = ColorOption(_('Families'), '#ffffe0') color_family.set_help(_('The color to use to display families.')) menu.add_option(category_name, 'colorfamilies', color_family) - - arrow = EnumeratedListOption(_("Arrowhead direction"), 'o') - for i in range( 0, len(_ARROWS) ): - arrow.add_item(_ARROWS[i]["value"], _ARROWS[i]["name"]) - arrow.set_help(_("Choose the direction that the arrows point.")) - menu.add_option(category_name, "arrow", arrow) - - roundedcorners = BooleanOption(_("Use rounded corners"), False) # 2180 - roundedcorners.set_help( - _("Use rounded corners to differentiate between women and men.")) - menu.add_option(category_name, "roundcorners", roundedcorners) diff --git a/gramps/plugins/graph/gvrelgraph.py b/gramps/plugins/graph/gvrelgraph.py index ffa42ed06..9c491a0fd 100644 --- a/gramps/plugins/graph/gvrelgraph.py +++ b/gramps/plugins/graph/gvrelgraph.py @@ -758,6 +758,38 @@ class RelGraphOptions(MenuReportOptions): menu.add_option(category_name, "pid", self.__pid) self.__pid.connect('value-changed', self.__update_filters) + arrow = EnumeratedListOption(_("Arrowhead direction"), 'd') + for i in range(0, len(_ARROWS)): + arrow.add_item(_ARROWS[i]["value"], _ARROWS[i]["name"]) + arrow.set_help(_("Choose the direction that the arrows point.")) + add_option("arrow", arrow) + + color = EnumeratedListOption(_("Graph coloring"), 'filled') + for i in range(0, len(_COLORS)): + color.add_item(_COLORS[i]["value"], _COLORS[i]["name"]) + color.set_help(_("Males will be shown with blue, females " + "with red. If the sex of an individual " + "is unknown it will be shown with gray.")) + add_option("color", color) + + # see bug report #2180 + roundedcorners = BooleanOption(_("Use rounded corners"), False) + roundedcorners.set_help(_("Use rounded corners to differentiate " + "between women and men.")) + add_option("useroundedcorners", roundedcorners) + + include_id = EnumeratedListOption(_('Gramps ID'), 0) + include_id.add_item(0, _('Do not include')) + include_id.add_item(1, _('Share an existing line')) + include_id.add_item(2, _('On a line of its own')) + include_id.set_help(_("Whether (and where) to include Gramps IDs")) + add_option("incid", include_id) + + ################################ + category_name = _("Report Options (2)") + add_option = partial(menu.add_option, category_name) + ################################ + self._nf = stdoptions.add_name_format_option(menu, category_name) self._nf.connect('value-changed', self.__update_filters) @@ -801,13 +833,6 @@ class RelGraphOptions(MenuReportOptions): "Web Site' report.")) add_option("url", url) - include_id = EnumeratedListOption(_('Include Gramps ID'), 0) - include_id.add_item(0, _('Do not include')) - include_id.add_item(1, _('Share an existing line')) - include_id.add_item(2, _('On a line of its own')) - include_id.set_help(_("Whether (and where) to include Gramps IDs")) - add_option("incid", include_id) - self.__show_relships = BooleanOption( _("Include relationship to center person"), False) self.__show_relships.set_help(_("Whether to show every person's " @@ -853,14 +878,6 @@ class RelGraphOptions(MenuReportOptions): add_option = partial(menu.add_option, _("Graph Style")) ################################ - color = EnumeratedListOption(_("Graph coloring"), 'filled') - for i in range(0, len(_COLORS)): - color.add_item(_COLORS[i]["value"], _COLORS[i]["name"]) - color.set_help(_("Males will be shown with blue, females " - "with red. If the sex of an individual " - "is unknown it will be shown with gray.")) - add_option("color", color) - color_males = ColorOption(_('Males'), '#e0e0ff') color_males.set_help(_('The color to use to display men.')) add_option('colormales', color_males) @@ -879,18 +896,6 @@ class RelGraphOptions(MenuReportOptions): color_family.set_help(_('The color to use to display families.')) add_option('colorfamilies', color_family) - arrow = EnumeratedListOption(_("Arrowhead direction"), 'd') - for i in range(0, len(_ARROWS)): - arrow.add_item(_ARROWS[i]["value"], _ARROWS[i]["name"]) - arrow.set_help(_("Choose the direction that the arrows point.")) - add_option("arrow", arrow) - - # see bug report #2180 - roundedcorners = BooleanOption(_("Use rounded corners"), False) - roundedcorners.set_help(_("Use rounded corners to differentiate " - "between women and men.")) - add_option("useroundedcorners", roundedcorners) - dashed = BooleanOption( _("Indicate non-birth relationships with dotted lines"), True) dashed.set_help(_("Non-birth relationships will show up " diff --git a/gramps/plugins/textreport/ancestorreport.py b/gramps/plugins/textreport/ancestorreport.py index bce11b67a..48b01605e 100644 --- a/gramps/plugins/textreport/ancestorreport.py +++ b/gramps/plugins/textreport/ancestorreport.py @@ -284,12 +284,6 @@ class AncestorOptions(MenuReportOptions): self.__pid.set_help(_("The center person for the report")) menu.add_option(category_name, "pid", self.__pid) - stdoptions.add_name_format_option(menu, category_name) - - stdoptions.add_private_data_option(menu, category_name) - - stdoptions.add_living_people_option(menu, category_name) - maxgen = NumberOption(_("Generations"), 10, 1, 100) maxgen.set_help(_("The number of generations to include in the report")) menu.add_option(category_name, "maxgen", maxgen) @@ -303,6 +297,14 @@ class AncestorOptions(MenuReportOptions): namebrk.set_help(_("Indicates if a line break should follow the name.")) menu.add_option(category_name, "namebrk", namebrk) + category_name = _("Report Options (2)") + + stdoptions.add_name_format_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) def make_default_style(self, default_style): diff --git a/gramps/plugins/textreport/birthdayreport.py b/gramps/plugins/textreport/birthdayreport.py index daf0c42f6..a8e5a9e82 100644 --- a/gramps/plugins/textreport/birthdayreport.py +++ b/gramps/plugins/textreport/birthdayreport.py @@ -92,7 +92,6 @@ class BirthdayReport(Report): self.year = mgobn('year') self.country = mgobn('country') self.anniversaries = mgobn('anniversaries') - self.start_dow = mgobn('start_dow') self.maiden_name = mgobn('maiden_name') self.alive = mgobn('alive') self.birthdays = mgobn('birthdays') @@ -421,6 +420,24 @@ class BirthdayOptions(MenuReportOptions): menu.add_option(category_name, "pid", self.__pid) self.__pid.connect('value-changed', self.__update_filters) + titletext = StringOption(_("Title text"), _(_TITLE0)) + titletext.set_help(_("Title of report")) + menu.add_option(category_name, "titletext", titletext) + + text1 = StringOption(_("Text Area 1"), _(_TITLE1)) + text1.set_help(_("First line of text at bottom of report")) + menu.add_option(category_name, "text1", text1) + + text2 = StringOption(_("Text Area 2"), _(_TITLE2)) + text2.set_help(_("Second line of text at bottom of report")) + menu.add_option(category_name, "text2", text2) + + text3 = StringOption(_("Text Area 3"), URL_HOMEPAGE,) + text3.set_help(_("Third line of text at bottom of report")) + menu.add_option(category_name, "text3", text3) + + category_name = _("Report Options (2)") + self._nf = stdoptions.add_name_format_option(menu, category_name) self._nf.connect('value-changed', self.__update_filters) @@ -449,57 +466,36 @@ class BirthdayOptions(MenuReportOptions): (len(countries) > 0 and countries[0] != '')): countries.insert(0, '') count = 0 - for c in holiday_table.get_countries(): + for c in countries: country.add_item(count, c) count += 1 country.set_help(_("Select the country to see associated holidays")) menu.add_option(category_name, "country", country) - start_dow = EnumeratedListOption(_("First day of week"), 1) - long_days = date_displayer.long_days - for count in range(1, 8): - # conversion between gramps numbering (sun=1) and iso numbering (mon=1) of weekdays below - start_dow.add_item((count+5) % 7 + 1, long_days[count].capitalize()) - start_dow.set_help(_("Select the first day of the week for the report")) - menu.add_option(category_name, "start_dow", start_dow) - maiden_name = EnumeratedListOption(_("Birthday surname"), "own") - maiden_name.add_item("spouse_first", _("Wives use husband's surname (from first family listed)")) - maiden_name.add_item("spouse_last", _("Wives use husband's surname (from last family listed)")) + maiden_name.add_item( + "spouse_first", + _("Wives use husband's surname (from first family listed)")) + maiden_name.add_item( + "spouse_last", + _("Wives use husband's surname (from last family listed)")) maiden_name.add_item("own", _("Wives use their own surname")) maiden_name.set_help(_("Select married women's displayed surname")) menu.add_option(category_name, "maiden_name", maiden_name) birthdays = BooleanOption(_("Include birthdays"), True) - birthdays.set_help(_("Include birthdays in the report")) + birthdays.set_help(_("Whether to include birthdays")) menu.add_option(category_name, "birthdays", birthdays) anniversaries = BooleanOption(_("Include anniversaries"), True) - anniversaries.set_help(_("Include anniversaries in the report")) + anniversaries.set_help(_("Whether to include anniversaries")) menu.add_option(category_name, "anniversaries", anniversaries) - option = BooleanOption(_("Include relationships to center person"), - False) - option.set_help(_("Include relationships to center person (slower)")) - menu.add_option(category_name, "relationships", option) - - category_name = _("Text Options") - - titletext = StringOption(_("Title text"), _(_TITLE0)) - titletext.set_help(_("Title of report")) - menu.add_option(category_name, "titletext", titletext) - - text1 = StringOption(_("Text Area 1"), _(_TITLE1)) - text1.set_help(_("First line of text at bottom of report")) - menu.add_option(category_name, "text1", text1) - - text2 = StringOption(_("Text Area 2"), _(_TITLE2)) - text2.set_help(_("Second line of text at bottom of report")) - menu.add_option(category_name, "text2", text2) - - text3 = StringOption(_("Text Area 3"), URL_HOMEPAGE,) - text3.set_help(_("Third line of text at bottom of report")) - menu.add_option(category_name, "text3", text3) + show_relships = BooleanOption( + _("Include relationship to center person"), False) + show_relships.set_help( + _("Whether to include relationships to the center person")) + menu.add_option(category_name, "relationships", show_relships) def __update_filters(self): """ diff --git a/gramps/plugins/textreport/descendreport.py b/gramps/plugins/textreport/descendreport.py index 623ff0301..1709ab316 100644 --- a/gramps/plugins/textreport/descendreport.py +++ b/gramps/plugins/textreport/descendreport.py @@ -507,16 +507,6 @@ class DescendantOptions(MenuReportOptions): self.__pid.set_help(_("The center person for the report")) menu.add_option(category_name, "pid", self.__pid) - stdoptions.add_name_format_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) - - category_name = _("Content") - numbering = EnumeratedListOption(_("Numbering system"), "Simple") numbering.set_items([ ("Simple", _("Simple numbering")), @@ -546,6 +536,16 @@ class DescendantOptions(MenuReportOptions): _("Whether to show duplicate Family Trees in the report.")) menu.add_option(category_name, "dups", dups) + category_name = _("Report Options (2)") + + stdoptions.add_name_format_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) + def make_default_style(self, default_style): """Make the default output style for the Descendant Report.""" fstyle = FontStyle() diff --git a/gramps/plugins/textreport/detancestralreport.py b/gramps/plugins/textreport/detancestralreport.py index 2170479cd..8865771a9 100644 --- a/gramps/plugins/textreport/detancestralreport.py +++ b/gramps/plugins/textreport/detancestralreport.py @@ -816,60 +816,10 @@ class DetAncestorOptions(MenuReportOptions): _('The Sosa-Stradonitz number of the central person.')) addopt("initial_sosa", start_number) - stdoptions.add_name_format_option(menu, category) - - 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) - stdoptions.add_localization_option(menu, category) - - # Content options - - addopt = partial(menu.add_option, _("Content")) - - usecall = BooleanOption(_("Use callname for common name"), False) - usecall.set_help(_("Whether to use the call name as the first name.")) - addopt("usecall", usecall) - - fulldates = BooleanOption( - _("Use full dates instead of only the year"), True) - fulldates.set_help( - _("Whether to use full dates instead of just year.")) - addopt("fulldates", fulldates) - - listc = BooleanOption(_("List children"), True) - listc.set_help(_("Whether to list children.")) - addopt("listc", listc) - - listc_spouses = BooleanOption(_("List Spouses of Children"), False) - listc_spouses.set_help( - _("Whether to list the spouses of the children.")) - addopt("listc_spouses", listc_spouses) - - computeage = BooleanOption(_("Compute death age"), True) - computeage.set_help(_("Whether to compute a person's age at death.")) - addopt("computeage", computeage) - - omitda = BooleanOption(_("Omit duplicate ancestors"), True) - omitda.set_help(_("Whether to omit duplicate ancestors.")) - addopt("omitda", omitda) - - verbose = BooleanOption(_("Use Complete Sentences"), True) - verbose.set_help( - _("Whether to use complete sentences or succinct language.")) - addopt("verbose", verbose) - - desref = BooleanOption( - _("Add descendant reference in child list"), True) - desref.set_help( - _("Whether to add descendant references in child list.")) - addopt("desref", desref) - pagebbg = BooleanOption(_("Page break between generations"), False) pagebbg.set_help( _("Whether to start a new page after each generation.")) @@ -880,51 +830,106 @@ class DetAncestorOptions(MenuReportOptions): _("Whether to start a new page before the end notes.")) addopt("pageben", pageben) + category = _("Report Options (2)") + addopt = partial(menu.add_option, category) + + stdoptions.add_name_format_option(menu, category) + + stdoptions.add_private_data_option(menu, category) + + stdoptions.add_living_people_option(menu, category) + + stdoptions.add_localization_option(menu, category) + + # Content options + + addopt = partial(menu.add_option, _("Content")) + + verbose = BooleanOption(_("Use complete sentences"), True) + verbose.set_help( + _("Whether to use complete sentences or succinct language.")) + addopt("verbose", verbose) + + fulldates = BooleanOption( + _("Use full dates instead of only the year"), True) + fulldates.set_help( + _("Whether to use full dates instead of just year.")) + addopt("fulldates", fulldates) + + computeage = BooleanOption(_("Compute death age"), True) + computeage.set_help(_("Whether to compute a person's age at death.")) + addopt("computeage", computeage) + + omitda = BooleanOption(_("Omit duplicate ancestors"), True) + omitda.set_help(_("Whether to omit duplicate ancestors.")) + addopt("omitda", omitda) + + usecall = BooleanOption(_("Use callname for common name"), False) + usecall.set_help(_("Whether to use the call name as the first name.")) + addopt("usecall", usecall) + # What to include addopt = partial(menu.add_option, _("Include")) - incnotes = BooleanOption(_("Include notes"), True) - incnotes.set_help(_("Whether to include notes.")) - addopt("incnotes", incnotes) + listc = BooleanOption(_("Include children"), True) + listc.set_help(_("Whether to list children.")) + addopt("listc", listc) - incattrs = BooleanOption(_("Include attributes"), False) - incattrs.set_help(_("Whether to include attributes.")) - addopt("incattrs", incattrs) - - incphotos = BooleanOption(_("Include Photo/Images from Gallery"), False) - incphotos.set_help(_("Whether to include images.")) - addopt("incphotos", incphotos) - - incnames = BooleanOption(_("Include alternative names"), False) - incnames.set_help(_("Whether to include other names.")) - addopt("incnames", incnames) + listc_spouses = BooleanOption(_("Include spouses of children"), False) + listc_spouses.set_help( + _("Whether to list the spouses of the children.")) + addopt("listc_spouses", listc_spouses) incevents = BooleanOption(_("Include events"), False) incevents.set_help(_("Whether to include events.")) addopt("incevents", incevents) - incaddresses = BooleanOption(_("Include addresses"), False) - incaddresses.set_help(_("Whether to include addresses.")) - addopt("incaddresses", incaddresses) - - incsources = BooleanOption(_("Include sources"), False) - incsources.set_help(_("Whether to include source references.")) - addopt("incsources", incsources) - - incsrcnotes = BooleanOption(_("Include sources notes"), False) - incsrcnotes.set_help(_("Whether to include source notes in the " - "Endnotes section. Only works if " - "Include sources is selected.")) - addopt("incsrcnotes", incsrcnotes) - incotherevents = BooleanOption(_("Include other events"), False) incotherevents.set_help(_("Whether to include other events " "people participated in.")) addopt("incotherevents", incotherevents) - # How to handle missing information + desref = BooleanOption( + _("Include descendant reference in child list"), True) + desref.set_help( + _("Whether to add descendant references in child list.")) + addopt("desref", desref) + incphotos = BooleanOption( + _("Include Photo/Images from Gallery"), False) + incphotos.set_help(_("Whether to include images.")) + addopt("incphotos", incphotos) + + addopt = partial(menu.add_option, _("Include (2)")) + + incnotes = BooleanOption(_("Include notes"), True) + incnotes.set_help(_("Whether to include notes.")) + addopt("incnotes", incnotes) + + incsources = BooleanOption(_("Include sources"), False) + incsources.set_help(_("Whether to include source references.")) + addopt("incsources", incsources) + + incsrcnotes = BooleanOption(_("Include sources notes"), False) + incsrcnotes.set_help( + _("Whether to include source notes in the " + "Endnotes section. Only works if Include sources is selected.")) + addopt("incsrcnotes", incsrcnotes) + + incattrs = BooleanOption(_("Include attributes"), False) + incattrs.set_help(_("Whether to include attributes.")) + addopt("incattrs", incattrs) + + incaddresses = BooleanOption(_("Include addresses"), False) + incaddresses.set_help(_("Whether to include addresses.")) + addopt("incaddresses", incaddresses) + + incnames = BooleanOption(_("Include alternative names"), False) + incnames.set_help(_("Whether to include other names.")) + addopt("incnames", incnames) + + # How to handle missing information addopt = partial(menu.add_option, _("Missing information")) repplace = BooleanOption(_("Replace missing places with ______"), False) diff --git a/gramps/plugins/textreport/detdescendantreport.py b/gramps/plugins/textreport/detdescendantreport.py index 2566a918f..feedcb535 100644 --- a/gramps/plugins/textreport/detdescendantreport.py +++ b/gramps/plugins/textreport/detdescendantreport.py @@ -1003,12 +1003,6 @@ class DetDescendantOptions(MenuReportOptions): self.__pid.set_help(_("The center person for the report")) add_option("pid", self.__pid) - stdoptions.add_name_format_option(menu, category) - - stdoptions.add_private_data_option(menu, category) - - stdoptions.add_living_people_option(menu, category) - numbering = EnumeratedListOption(_("Numbering system"), "Henry") numbering.set_items([ ("Henry", _("Henry numbering")), @@ -1027,55 +1021,9 @@ class DetDescendantOptions(MenuReportOptions): structure.set_help(_("How people are organized in the report")) add_option("structure", structure) - generations = NumberOption(_("Generations"), 10, 1, 100) - generations.set_help( - _("The number of generations to include in the report")) - add_option("gen", generations) - - stdoptions.add_localization_option(menu, category) - - # Content - - add_option = partial(menu.add_option, _("Content")) - - usecall = BooleanOption(_("Use callname for common name"), False) - usecall.set_help( - _("Whether to use the call name as the first name.")) - add_option("usecall", usecall) - - fulldates = BooleanOption( - _("Use full dates instead of only the year"), True) - fulldates.set_help( - _("Whether to use full dates instead of just year.")) - add_option("fulldates", fulldates) - - listc = BooleanOption(_("List children"), True) - listc.set_help(_("Whether to list children.")) - add_option("listc", listc) - - listc_spouses = BooleanOption(_("List Spouses of Children"), False) - listc_spouses.set_help( - _("Whether to list the spouses of the children.")) - add_option("listc_spouses", listc_spouses) - - computeage = BooleanOption(_("Compute death age"), True) - computeage.set_help(_("Whether to compute a person's age at death.")) - add_option("computeage", computeage) - - omitda = BooleanOption(_("Omit duplicate ancestors"), True) - omitda.set_help(_("Whether to omit duplicate ancestors.")) - add_option("omitda", omitda) - - verbose = BooleanOption(_("Use complete sentences"), True) - verbose.set_help( - _("Whether to use complete sentences or succinct language.")) - add_option("verbose", verbose) - - desref = BooleanOption(_("Add descendant reference in child list"), - True) - desref.set_help( - _("Whether to add descendant references in child list.")) - add_option("desref", desref) + gen = NumberOption(_("Generations"), 10, 1, 100) + gen.set_help(_("The number of generations to include in the report")) + add_option("gen", gen) pagebbg = BooleanOption(_("Page break between generations"), False) pagebbg.set_help( @@ -1087,20 +1035,56 @@ class DetDescendantOptions(MenuReportOptions): _("Whether to start a new page before the end notes.")) add_option("pageben", pageben) - add_option = partial(menu.add_option, _("Include") + " 1") + category = _("Report Options (2)") + add_option = partial(menu.add_option, category) - incphotos = BooleanOption( - _("Include Photo/Images from Gallery"), False) - incphotos.set_help(_("Whether to include images.")) - add_option("incphotos", incphotos) + stdoptions.add_name_format_option(menu, category) - incevents = BooleanOption(_("Include events"), False) - incevents.set_help(_("Whether to include events.")) - add_option("incevents", incevents) + stdoptions.add_private_data_option(menu, category) - incnotes = BooleanOption(_("Include notes"), True) - incnotes.set_help(_("Whether to include notes.")) - add_option("incnotes", incnotes) + stdoptions.add_living_people_option(menu, category) + + stdoptions.add_localization_option(menu, category) + + # Content + + add_option = partial(menu.add_option, _("Content")) + + verbose = BooleanOption(_("Use complete sentences"), True) + verbose.set_help( + _("Whether to use complete sentences or succinct language.")) + add_option("verbose", verbose) + + fulldates = BooleanOption( + _("Use full dates instead of only the year"), True) + fulldates.set_help( + _("Whether to use full dates instead of just year.")) + add_option("fulldates", fulldates) + + computeage = BooleanOption(_("Compute death age"), True) + computeage.set_help(_("Whether to compute a person's age at death.")) + add_option("computeage", computeage) + + omitda = BooleanOption(_("Omit duplicate ancestors"), True) + omitda.set_help(_("Whether to omit duplicate ancestors.")) + add_option("omitda", omitda) + + usecall = BooleanOption(_("Use callname for common name"), False) + usecall.set_help(_("Whether to use the call name as the first name.")) + add_option("usecall", usecall) + + # What to include + + add_option = partial(menu.add_option, _("Include")) + + listc = BooleanOption(_("Include children"), True) + listc.set_help(_("Whether to list children.")) + add_option("listc", listc) + + listc_spouses = BooleanOption(_("Include spouses of children"), False) + listc_spouses.set_help( + _("Whether to list the spouses of the children.")) + add_option("listc_spouses", listc_spouses) incmates = BooleanOption(_("Include spouses"), False) incmates.set_help( @@ -1111,19 +1095,26 @@ class DetDescendantOptions(MenuReportOptions): incmateref.set_help(_("Whether to include reference to spouse.")) add_option("incmateref", incmateref) - add_option = partial(menu.add_option, _("Include") + " 2") + incevents = BooleanOption(_("Include events"), False) + incevents.set_help(_("Whether to include events.")) + add_option("incevents", incevents) - incaddresses = BooleanOption(_("Include addresses"), False) - incaddresses.set_help(_("Whether to include addresses.")) - add_option("incaddresses", incaddresses) + desref = BooleanOption( + _("Include descendant reference in child list"), True) + desref.set_help( + _("Whether to add descendant references in child list.")) + add_option("desref", desref) - incattrs = BooleanOption(_("Include attributes"), False) - incattrs.set_help(_("Whether to include attributes.")) - add_option("incattrs", incattrs) + incphotos = BooleanOption( + _("Include Photo/Images from Gallery"), False) + incphotos.set_help(_("Whether to include images.")) + add_option("incphotos", incphotos) - incnames = BooleanOption(_("Include alternative names"), False) - incnames.set_help(_("Whether to include other names.")) - add_option("incnames", incnames) + add_option = partial(menu.add_option, _("Include (2)")) + + incnotes = BooleanOption(_("Include notes"), True) + incnotes.set_help(_("Whether to include notes.")) + add_option("incnotes", incnotes) incsources = BooleanOption(_("Include sources"), False) incsources.set_help(_("Whether to include source references.")) @@ -1135,6 +1126,18 @@ class DetDescendantOptions(MenuReportOptions): "Endnotes section. Only works if Include sources is selected.")) add_option("incsrcnotes", incsrcnotes) + incattrs = BooleanOption(_("Include attributes"), False) + incattrs.set_help(_("Whether to include attributes.")) + add_option("incattrs", incattrs) + + incaddresses = BooleanOption(_("Include addresses"), False) + incaddresses.set_help(_("Whether to include addresses.")) + add_option("incaddresses", incaddresses) + + incnames = BooleanOption(_("Include alternative names"), False) + incnames.set_help(_("Whether to include other names.")) + add_option("incnames", incnames) + incssign = BooleanOption( _("Include sign of succession ('+') in child-list"), True) incssign.set_help(_("Whether to include a sign ('+') before the" @@ -1147,8 +1150,7 @@ class DetDescendantOptions(MenuReportOptions): "from the start-person to each descendant.")) add_option("incpaths", incpaths) - # Missing information - + # How to handle missing information add_option = partial(menu.add_option, _("Missing information")) repplace = BooleanOption( diff --git a/gramps/plugins/textreport/familygroup.py b/gramps/plugins/textreport/familygroup.py index 457c59539..4bd24eed1 100644 --- a/gramps/plugins/textreport/familygroup.py +++ b/gramps/plugins/textreport/familygroup.py @@ -713,6 +713,16 @@ class FamilyGroupOptions(MenuReportOptions): add_option("family_id", self.__fid) self.__fid.connect('value-changed', self.__update_filters) + self.__recursive = BooleanOption(_('Recursive (down)'), False) + self.__recursive.set_help(_("Create reports for all descendants " + "of this family.")) + add_option("recursive", self.__recursive) + + ########################## + category_name = _("Report Options (2)") + add_option = partial(menu.add_option, category_name) + ########################## + self._nf = stdoptions.add_name_format_option(menu, category_name) self._nf.connect('value-changed', self.__update_filters) @@ -722,20 +732,16 @@ class FamilyGroupOptions(MenuReportOptions): stdoptions.add_living_people_option(menu, category_name) - self.__recursive = BooleanOption(_('Recursive (down)'), False) - self.__recursive.set_help(_("Create reports for all descendants " - "of this family.")) - add_option("recursive", self.__recursive) - stdoptions.add_localization_option(menu, category_name) ########################## - add_option = partial(menu.add_option, _("Include 1")) + add_option = partial(menu.add_option, _("Include")) ########################## - gramps_ids = BooleanOption(_('Gramps ID'), False) - gramps_ids.set_help(_("Whether to include Gramps ID next to names.")) - add_option("gramps_ids", gramps_ids) + inc_par_mar = BooleanOption(_("Parent Marriage"), True) + inc_par_mar.set_help( + _("Whether to include marriage information for parents.")) + add_option("incParMar", inc_par_mar) inc_par_events = BooleanOption(_("Parent Events"), False) inc_par_events.set_help(_("Whether to include events for parents.")) @@ -758,13 +764,8 @@ class FamilyGroupOptions(MenuReportOptions): _("Whether to include alternate names for parents.")) add_option("incParNames", inc_par_names) - inc_par_mar = BooleanOption(_("Parent Marriage"), True) - inc_par_mar.set_help( - _("Whether to include marriage information for parents.")) - add_option("incParMar", inc_par_mar) - ########################## - add_option = partial(menu.add_option, _("Include 2")) + add_option = partial(menu.add_option, _("Include (2)")) ########################## inc_fam_notes = BooleanOption(_("Family Notes"), False) @@ -781,16 +782,16 @@ class FamilyGroupOptions(MenuReportOptions): _("Whether to include marriage information for children.")) add_option("incChiMar", inc_chi_mar) + gramps_ids = BooleanOption(_('Gramps ID'), False) + gramps_ids.set_help(_("Whether to include Gramps ID next to names.")) + add_option("gramps_ids", gramps_ids) + generations = BooleanOption(_("Generation numbers " "(recursive only)"), False) generations.set_help(_("Whether to include the generation on each " "report (recursive only).")) add_option("generations", generations) # TODO make insensitive if ... - ########################## - add_option = partial(menu.add_option, _("Missing Information")) - ########################## - missinginfo = BooleanOption(_("Print fields for missing " "information"), True) missinginfo.set_help(_("Whether to include fields for missing " diff --git a/gramps/plugins/textreport/indivcomplete.py b/gramps/plugins/textreport/indivcomplete.py index 0c043ef68..cc2bd62e7 100644 --- a/gramps/plugins/textreport/indivcomplete.py +++ b/gramps/plugins/textreport/indivcomplete.py @@ -1052,15 +1052,6 @@ class IndivCompleteOptions(MenuReportOptions): menu.add_option(category_name, "pid", self.__pid) self.__pid.connect('value-changed', self.__update_filters) - self._nf = stdoptions.add_name_format_option(menu, category_name) - self._nf.connect('value-changed', self.__update_filters) - - self.__update_filters() - - stdoptions.add_private_data_option(menu, category_name) - - stdoptions.add_living_people_option(menu, category_name) - sort = BooleanOption(_("List events chronologically"), True) sort.set_help(_("Whether to sort events into chronological order.")) menu.add_option(category_name, "sort", sort) @@ -1070,12 +1061,29 @@ class IndivCompleteOptions(MenuReportOptions): _("Whether to start a new page before the end notes.")) menu.add_option(category_name, "pageben", pageben) + ################################ + category_name = _("Report Options (2)") + ################################ + + self._nf = stdoptions.add_name_format_option(menu, category_name) + self._nf.connect('value-changed', self.__update_filters) + + self.__update_filters() + + stdoptions.add_private_data_option(menu, category_name) + + stdoptions.add_living_people_option(menu, category_name) + stdoptions.add_localization_option(menu, category_name) ################################ category_name = _("Include") ################################ + incl_notes = BooleanOption(_("Include Notes"), True) + incl_notes.set_help(_("Whether to include Person and Family Notes.")) + menu.add_option(category_name, "incl_notes", incl_notes) + self.__cites = BooleanOption(_("Include Source Information"), True) self.__cites.set_help(_("Whether to cite sources.")) menu.add_option(category_name, "cites", self.__cites) @@ -1093,6 +1101,18 @@ class IndivCompleteOptions(MenuReportOptions): images.set_help(_("Whether to include images.")) menu.add_option(category_name, "images", images) + ################################ + category_name = _("Include (2)") + ################################ + + grampsid = BooleanOption(_("Gramps ID"), False) + grampsid.set_help(_("Whether to include Gramps ID next to names.")) + menu.add_option(category_name, "grampsid", grampsid) + + tags = BooleanOption(_("Include Tags"), True) + tags.set_help(_("Whether to include tags.")) + menu.add_option(category_name, "incl_tags", tags) + attributes = BooleanOption(_("Include Attributes"), True) attributes.set_help(_("Whether to include attributes.")) menu.add_option(category_name, "incl_attrs", attributes) @@ -1101,22 +1121,10 @@ class IndivCompleteOptions(MenuReportOptions): census.set_help(_("Whether to include Census Events.")) menu.add_option(category_name, "incl_census", census) - grampsid = BooleanOption(_("Include Gramps ID"), False) - grampsid.set_help(_("Whether to include Gramps ID next to names.")) - menu.add_option(category_name, "grampsid", grampsid) - - incl_notes = BooleanOption(_("Include Notes"), True) - incl_notes.set_help(_("Whether to include Person and Family Notes.")) - menu.add_option(category_name, "incl_notes", incl_notes) - - tags = BooleanOption(_("Include Tags"), True) - tags.set_help(_("Whether to include tags.")) - menu.add_option(category_name, "incl_tags", tags) - self.__show_relships = BooleanOption( _("Include relationship to center person"), False) - self.__show_relships.set_help(_("Whether to show every person's " - "relationship to the center person")) + self.__show_relships.set_help( + _("Whether to include relationships to the center person")) menu.add_option(category_name, "incl_relname", self.__show_relships) ################################ @@ -1160,10 +1168,7 @@ class IndivCompleteOptions(MenuReportOptions): If Endnotes are not enabled, disable sources in the Endnotes. """ cites_value = self.__cites.get_value() - if cites_value: - self.__incsrcnotes.set_available(True) - else: - self.__incsrcnotes.set_available(False) + self.__incsrcnotes.set_available(cites_value) def make_default_style(self, default_style): """Make the default output style for the Individual Complete Report.""" diff --git a/gramps/plugins/textreport/kinshipreport.py b/gramps/plugins/textreport/kinshipreport.py index f0423c0e8..88272a640 100644 --- a/gramps/plugins/textreport/kinshipreport.py +++ b/gramps/plugins/textreport/kinshipreport.py @@ -358,16 +358,6 @@ class KinshipOptions(MenuReportOptions): self.__pid.set_help(_("The center person for the report")) menu.add_option(category_name, "pid", self.__pid) - stdoptions.add_name_format_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) - - category_name = _("Content") - maxdescend = NumberOption(_("Max Descendant Generations"), 2, 1, 20) maxdescend.set_help(_("The maximum number of descendant generations")) menu.add_option(category_name, "maxdescend", maxdescend) @@ -388,6 +378,16 @@ class KinshipOptions(MenuReportOptions): incaunts.set_help(_("Whether to include aunts/uncles/nephews/nieces")) menu.add_option(category_name, "incaunts", incaunts) + category_name = _("Report Options (2)") + + stdoptions.add_name_format_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) + def make_default_style(self, default_style): """Make the default output style for the Kinship Report.""" font = FontStyle() diff --git a/gramps/plugins/textreport/placereport.py b/gramps/plugins/textreport/placereport.py index 25243c902..f35d75c2e 100644 --- a/gramps/plugins/textreport/placereport.py +++ b/gramps/plugins/textreport/placereport.py @@ -432,16 +432,6 @@ class PlaceOptions(MenuReportOptions): """ category_name = _("Report Options") - stdoptions.add_name_format_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) - - category_name = _("Content") - # Reload filters to pick any new ones CustomFilters = None from gramps.gen.filters import CustomFilters, GenericFilter @@ -463,6 +453,16 @@ class PlaceOptions(MenuReportOptions): center.set_help(_("If report is event or person centered")) menu.add_option(category_name, "center", center) + category_name = _("Report Options (2)") + + stdoptions.add_name_format_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) + def make_default_style(self, default_style): """ Make the default output style for the Place report. diff --git a/gramps/plugins/textreport/recordsreport.py b/gramps/plugins/textreport/recordsreport.py index 4222666a0..633ee7c2b 100644 --- a/gramps/plugins/textreport/recordsreport.py +++ b/gramps/plugins/textreport/recordsreport.py @@ -226,19 +226,6 @@ class RecordsReportOptions(MenuReportOptions): menu.add_option(category_name, "pid", self.__pid) self.__pid.connect('value-changed', self.__update_filters) - self._nf = stdoptions.add_name_format_option(menu, category_name) - self._nf.connect('value-changed', self.__update_filters) - - self.__update_filters() - - stdoptions.add_private_data_option(menu, category_name) - - stdoptions.add_living_people_option(menu, category_name) - - stdoptions.add_localization_option(menu, category_name) - - category_name = _("Content") - top_size = NumberOption(_("Number of ranks to display"), 3, 1, 100) menu.add_option(category_name, "top_size", top_size) @@ -254,6 +241,19 @@ class RecordsReportOptions(MenuReportOptions): footer = StringOption(_("Footer text"), "") menu.add_option(category_name, "footer", footer) + category_name = _("Report Options (2)") + + self._nf = stdoptions.add_name_format_option(menu, category_name) + self._nf.connect('value-changed', self.__update_filters) + + self.__update_filters() + + stdoptions.add_private_data_option(menu, category_name) + + stdoptions.add_living_people_option(menu, category_name) + + stdoptions.add_localization_option(menu, category_name) + p_count = 0 for (text, varname, default) in RECORDS: if varname.startswith('person'): @@ -264,12 +264,12 @@ class RecordsReportOptions(MenuReportOptions): option = BooleanOption(_(text), default) if varname.startswith('person'): if p_idx >= p_half: - category_name = _("Person Records 2") + category_name = _("Person 2") else: - category_name = _("Person Records 1") + category_name = _("Person 1") p_idx += 1 elif varname.startswith('family'): - category_name = _("Family Records") + category_name = _("Family") menu.add_option(category_name, varname, option) def __update_filters(self): diff --git a/gramps/plugins/webreport/webcal.py b/gramps/plugins/webreport/webcal.py index 3ad6bc7d0..db20635a1 100644 --- a/gramps/plugins/webreport/webcal.py +++ b/gramps/plugins/webreport/webcal.py @@ -1595,6 +1595,7 @@ class WebCalOptions(MenuReportOptions): Add options to the menu for the web calendar. """ self.__add_report_options(menu) + self.__add_report2_options(menu) self.__add_content_options(menu) self.__add_notes_options(menu) self.__add_advanced_options(menu) @@ -1631,6 +1632,33 @@ class WebCalOptions(MenuReportOptions): self.__update_filters() + ext = EnumeratedListOption(_("File extension"), ".html") + for etype in _WEB_EXT: + ext.add_item(etype, etype) + ext.set_help(_("The extension to be used for the web files")) + menu.add_option(category_name, "ext", ext) + + cright = EnumeratedListOption(_('Copyright'), 0) + for index, copt in enumerate(_COPY_OPTIONS): + cright.add_item(index, copt) + cright.set_help(_("The copyright to be used for the web files")) + menu.add_option(category_name, "cright", cright) + + css_list = sorted([(CSS[key]["translation"], CSS[key]["id"]) + for key in list(CSS.keys()) + if CSS[key]["user"]]) + css = EnumeratedListOption(_('StyleSheet'), css_list[0][1]) + for css_item in css_list: + css.add_item(css_item[1], css_item[0]) + css.set_help(_('The stylesheet to be used for the web pages')) + menu.add_option(category_name, "css", css) + + def __add_report2_options(self, menu): + """ + Options on the "Report Options (2)" tab. + """ + category_name = _("Report Options (2)") + # We must figure out the value of the first option before we can # create the EnumeratedListOption fmt_list = _nd.get_name_format() @@ -1653,26 +1681,6 @@ class WebCalOptions(MenuReportOptions): alive.set_help(_("Include only living people in the calendar")) menu.add_option(category_name, "alive", alive) - ext = EnumeratedListOption(_("File extension"), ".html") - for etype in _WEB_EXT: - ext.add_item(etype, etype) - ext.set_help(_("The extension to be used for the web files")) - menu.add_option(category_name, "ext", ext) - - cright = EnumeratedListOption(_('Copyright'), 0) - for index, copt in enumerate(_COPY_OPTIONS): - cright.add_item(index, copt) - cright.set_help(_("The copyright to be used for the web files")) - menu.add_option(category_name, "cright", cright) - - css_list = sorted([(CSS[key]["translation"], CSS[key]["id"]) - for key in list(CSS.keys()) - if CSS[key]["user"]]) - css = EnumeratedListOption(_('StyleSheet'), css_list[0][1]) - for css_item in css_list: - css.add_item(css_item[1], css_item[0]) - css.set_help(_('The stylesheet to be used for the web pages')) - menu.add_option(category_name, "css", css) stdoptions.add_localization_option(menu, category_name) def __add_content_options(self, menu):