def add_menu_options(self, menu): category_name = _("Report Options") if self.name.split(",")[0] == _PERSON_RPT_NAME: self.__pid = PersonOption(_("Center Person")) self.__pid.set_help(_("The center person for the report")) menu.add_option(category_name, "pid", self.__pid) else: self.__pid = FamilyOption(_("Center Family")) self.__pid.set_help(_("The center family for the report")) menu.add_option(category_name, "pid", self.__pid) genup = NumberOption(_("Generations up"), 10, 0, 100) genup.set_help(_("The number of generations to include in the tree")) menu.add_option(category_name, "genup", genup) gendown = NumberOption(_("Generations down"), 10, 0, 100) gendown.set_help(_("The number of generations to include in the tree")) menu.add_option(category_name, "gendown", gendown) siblings = BooleanOption(_("Include siblings"), True) siblings.set_help(_("Include siblings of ancestors.")) menu.add_option(category_name, "siblings", siblings) images = BooleanOption(_("Include images"), False) images.set_help(_("Include images of people in the nodes.")) menu.add_option(category_name, "images", images) locale_opt = stdoptions.add_localization_option(menu, category_name)
def __add_family_options(self, menu): """ Menu Options for family category. Menu Option 'family_filter' is used to choose a generic or custom family filter. Menu Option 'fid' selects the center family, which is needed for some filters. """ self.__family_filter = FilterOption(_("Family Filter"), 0) self.__family_filter.set_help(_("Select filter to restrict families")) menu.add_option(_("Configuration"), "family_filter", self.__family_filter) self.__family_filter.connect('value-changed', self.__family_filter_changed) self.__fid = FamilyOption(_("Center Family")) self.__fid.set_help(_("The center person for the filter")) menu.add_option(_("Configuration"), "fid", self.__fid) self.__fid.connect('value-changed', self.__update_family_filters)
def add_menu_options(self, menu): ########################## category_name = _("Report Options") add_option = partial(menu.add_option, category_name) ########################## family_id = FamilyOption(_("Center Family")) family_id.set_help(_("The center family for the report")) add_option("family_id", family_id) stdoptions.add_name_format_option(menu, category_name) recursive = BooleanOption(_('Recursive'), False) recursive.set_help( _("Create reports for all descendants " "of this family.")) add_option("recursive", recursive) stdoptions.add_private_data_option(menu, category_name) stdoptions.add_localization_option(menu, category_name) ########################## add_option = partial(menu.add_option, _("Include")) ########################## generations = BooleanOption( _("Generation numbers " "(recursive only)"), True) generations.set_help( _("Whether to include the generation on each " "report (recursive only).")) add_option("generations", generations) incParEvents = BooleanOption(_("Parent Events"), False) incParEvents.set_help(_("Whether to include events for parents.")) add_option("incParEvents", incParEvents) incParAddr = BooleanOption(_("Parent Addresses"), False) incParAddr.set_help(_("Whether to include addresses for parents.")) add_option("incParAddr", incParAddr) incParNotes = BooleanOption(_("Parent Notes"), False) incParNotes.set_help(_("Whether to include notes for parents.")) add_option("incParNotes", incParNotes) incattrs = BooleanOption(_("Parent Attributes"), False) incattrs.set_help(_("Whether to include attributes.")) add_option("incattrs", incattrs) incParNames = BooleanOption(_("Alternate Parent Names"), False) incParNames.set_help( _("Whether to include alternate " "names for parents.")) add_option("incParNames", incParNames) incParMar = BooleanOption(_("Parent Marriage"), False) incParMar.set_help( _("Whether to include marriage information " "for parents.")) add_option("incParMar", incParMar) incRelDates = BooleanOption(_("Dates of Relatives"), False) incRelDates.set_help( _("Whether to include dates for relatives " "(father, mother, spouse).")) add_option("incRelDates", incRelDates) incChiMar = BooleanOption(_("Children Marriages"), True) incChiMar.set_help( _("Whether to include marriage information " "for children.")) add_option("incChiMar", incChiMar) ########################## 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 " "information.")) add_option("missinginfo", missinginfo)
def add_menu_options(self, menu): ########################## category_name = _("Report Options") add_option = partial(menu.add_option, category_name) ########################## self.__filter = FilterOption(_("Filter"), 0) self.__filter.set_help( _("Select the filter to be applied to the report.")) add_option("filter", self.__filter) self.__filter.connect('value-changed', self.__filter_changed) self.__fid = FamilyOption(_("Center Family")) self.__fid.set_help(_("The center family for the filter")) add_option("family_id", self.__fid) self.__fid.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) 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")) ########################## 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)"), True) generations.set_help( _("Whether to include the generation on each " "report (recursive only).")) add_option("generations", generations) inc_par_events = BooleanOption(_("Parent Events"), False) inc_par_events.set_help(_("Whether to include events for parents.")) add_option("incParEvents", inc_par_events) inc_par_addr = BooleanOption(_("Parent Addresses"), False) inc_par_addr.set_help(_("Whether to include addresses for parents.")) add_option("incParAddr", inc_par_addr) inc_par_notes = BooleanOption(_("Parent Notes"), False) inc_par_notes.set_help(_("Whether to include notes for parents.")) add_option("incParNotes", inc_par_notes) incattrs = BooleanOption(_("Parent Attributes"), False) incattrs.set_help(_("Whether to include attributes.")) add_option("incattrs", incattrs) inc_par_names = BooleanOption(_("Alternate Parent Names"), False) inc_par_names.set_help( _("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) inc_fam_notes = BooleanOption(_("Family Notes"), False) inc_fam_notes.set_help(_("Whether to include notes for families.")) add_option("incFamNotes", inc_fam_notes) inc_rel_dates = BooleanOption(_("Dates of Relatives"), False) inc_rel_dates.set_help( _("Whether to include dates for relatives " "(father, mother, spouse).")) add_option("incRelDates", inc_rel_dates) inc_chi_mar = BooleanOption(_("Children Marriages"), True) inc_chi_mar.set_help( _("Whether to include marriage information for children.")) add_option("incChiMar", inc_chi_mar) ########################## 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 " "information.")) add_option("missinginfo", missinginfo)