コード例 #1
0
 def add_menu_options(self, menu):
     """
     Add options to the menu for this report.
     """
     category_name = _("Report Options")
     what_types = BooleanListOption(_('Select From'))
     what_types.add_button(_('People'), True)
     what_types.add_button(_('Families'), False)
     what_types.add_button(_('Places'), False)
     what_types.add_button(_('Events'), False)
     what_types.add_button(_('Media'), False)
     what_types.add_button(_('Sources'), False)
     menu.add_option(category_name, "what_types", what_types)
コード例 #2
0
    def add_menu_options(self, menu):
        ################################
        category_name = _("Report Options")
        ################################

        self.__filter = FilterOption(_("Filter"), 0)
        self.__filter.set_help(
                           _("Select the filter to be applied to the report."))
        menu.add_option(category_name, "filter", self.__filter)
        self.__filter.connect('value-changed', self.__filter_changed)

        self.__pid = PersonOption(_("Filter Person"))
        self.__pid.set_help(_("The center person for the filter."))
        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)

        sort = BooleanOption(_("List events chronologically"), True)
        sort.set_help(_("Whether to sort events into chronological order."))
        menu.add_option(category_name, "sort", sort)

        pageben = BooleanOption(_("Page break before end notes"),False)
        pageben.set_help(
                     _("Whether to start a new page before the end notes."))
        menu.add_option(category_name, "pageben", pageben)

        stdoptions.add_localization_option(menu, category_name)

        ################################
        category_name = _("Include")
        ################################

        cites = BooleanOption(_("Include Source Information"), True)
        cites.set_help(_("Whether to cite sources."))
        menu.add_option(category_name, "cites", cites)

        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."))
        menu.add_option(category_name, "incsrcnotes", incsrcnotes)

        images = BooleanOption(_("Include Photo/Images from Gallery"), True)
        images.set_help(_("Whether to include images."))
        menu.add_option(category_name, "images", images)

        grampsid = BooleanOption(_("Include Gramps ID"), False)
        grampsid.set_help(_("Whether to include Gramps ID next to names."))
        menu.add_option(category_name, "grampsid", grampsid)

        ################################
        category_name = _("Sections")
        ################################

        opt = BooleanListOption(_("Event groups"))
        opt.set_help(_("Check if a separate section is required."))
        for section in SECTION_LIST:
            if section != SECTION_LIST[0]:
                opt.add_button(_(section), True)

        menu.add_option(category_name, "sections", opt)
コード例 #3
0
 def add_menu_options(self, menu):
     """
     Add options to the menu for this report.
     """
     category_name = _("Report Options")
     what_types = BooleanListOption(_("Select From"))
     what_types.add_button(_("People"), True)
     what_types.add_button(_("Families"), False)
     what_types.add_button(_("Places"), False)
     what_types.add_button(_("Events"), False)
     what_types.add_button(_("Media"), False)
     what_types.add_button(_("Sources"), False)
     menu.add_option(category_name, "what_types", what_types)