コード例 #1
0
    def add_menu_options(self, menu):
        """
        Add options to the menu for the ancestral fan chart report.
        """
        category_name = _("Ancestral Fan Chart Options")

        pid = PersonOption(_("Center Person"))
        pid.set_help(_("The center person for the report"))
        menu.add_option(category_name, "pid", pid)

        # We must figure out the value of the first option before we can
        # create the EnumeratedListOption
        fmt_list = global_name_display.get_name_format()
        name_format = EnumeratedListOption(_("Name format"), 0)
        name_format.add_item(0, _("Default"))
        for num, name, fmt_str, act in fmt_list:
            name_format.add_item(num, name)
        name_format.set_help(_("Select the format to display names"))
        menu.add_option(category_name, "name_format", name_format)

        self._maxgen = NumberOption(_("Include Generations"), 10, 1, 100)
        self._maxgen.set_help(
            _("The number of generations to include in " + "the report"))
        menu.add_option(category_name, "maxgen", self._maxgen)
        self._maxgen.connect('value-changed', self.validate_gen)

        pat_bg = ColorOption(_("Paternal Background Color"), "#ccddff")
        pat_bg.set_help(_("RGB-color for paternal box background."))
        menu.add_option(category_name, "pat_bg", pat_bg)

        mat_bg = ColorOption(_("Maternal Background"), "#ffb2a1")
        mat_bg.set_help(_("RGB-color for maternal box background."))
        menu.add_option(category_name, "mat_bg", mat_bg)

        dest_path = DestinationOption(_("Destination"),
                                      config.get('paths.website-directory'))
        dest_path.set_help(_("The destination path for generated files."))
        dest_path.set_directory_entry(True)
        menu.add_option(category_name, "dest_path", dest_path)

        dest_file = StringOption(_("Filename"), "AncestralFanchart.html")
        dest_file.set_help(_("The destination file name for html content."))
        menu.add_option(category_name, "dest_file", dest_file)
コード例 #2
0
    def add_menu_options(self, menu):
        """
        Add options to the menu for the ancestral fan chart report.
        """
        category_name = _("Ancestral Fan Chart Options")

        pid = PersonOption(_("Center Person"))
        pid.set_help(_("The center person for the report"))
        menu.add_option(category_name, "pid", pid)

        # We must figure out the value of the first option before we can
        # create the EnumeratedListOption
        fmt_list = global_name_display.get_name_format()
        name_format = EnumeratedListOption(_("Name format"), 0)
        name_format.add_item(0, _("Default"))
        for num, name, fmt_str, act in fmt_list:
            name_format.add_item(num, name)
        name_format.set_help(_("Select the format to display names"))
        menu.add_option(category_name, "name_format", name_format)

        self._maxgen = NumberOption(_("Include Generations"), 10, 1, 100)
        self._maxgen.set_help(_("The number of generations to include in " +
            "the report"))
        menu.add_option(category_name, "maxgen", self._maxgen)
        self._maxgen.connect('value-changed', self.validate_gen)

        pat_bg = ColorOption(_("Paternal Background Color"), "#ccddff")
        pat_bg.set_help(_("RGB-color for paternal box background."))
        menu.add_option(category_name, "pat_bg", pat_bg)

        mat_bg = ColorOption(_("Maternal Background"), "#ffb2a1")
        mat_bg.set_help(_("RGB-color for maternal box background."))
        menu.add_option(category_name, "mat_bg", mat_bg)

        dest_path = DestinationOption(_("Destination"),
            config.get('paths.website-directory'))
        dest_path.set_help(_("The destination path for generated files."))
        dest_path.set_directory_entry(True)
        menu.add_option(category_name, "dest_path", dest_path)

        dest_file = StringOption(_("Filename"), "AncestralFanchart.html")
        dest_file.set_help(_("The destination file name for html content."))
        menu.add_option(category_name, "dest_file", dest_file)
コード例 #3
0
    def add_menu_options(self, menu):

        # ---------------------
        category_name = _('Report Options')
        add_option = partial(menu.add_option, category_name)
        # ---------------------

        followpar = BooleanOption(_('Follow parents to determine '
                                    '"family lines"'), True)
        followpar.set_help(_('Parents and their ancestors will be '
                             'considered when determining "family lines".'))
        add_option('followpar', followpar)

        followchild = BooleanOption(_('Follow children to determine '
                                      '"family lines"'), True)
        followchild.set_help(_('Children will be considered when '
                               'determining "family lines".'))
        add_option('followchild', followchild)

        remove_extra_people = BooleanOption(_('Try to remove extra '
                                              'people and families'), True)
        remove_extra_people.set_help(_('People and families not directly '
                                       'related to people of interest will '
                                       'be removed when determining '
                                       '"family lines".'))
        add_option('removeextra', remove_extra_people)

        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)):
            color.add_item(_COLORS[i]["value"], _COLORS[i]["name"])
        color.set_help(_("Males will be shown with blue, females "
                         "with red, unless otherwise set above for filled. "
                         "If the sex of an individual "
                         "is unknown it will be shown with gray."))
        add_option("color", color)

        roundedcorners = EnumeratedListOption(_("Rounded corners"), '')
        for i in range( 0, len(_CORNERS) ):
            roundedcorners.add_item(_CORNERS[i]["value"], _CORNERS[i]["name"])
        roundedcorners.set_help(_("Use rounded corners e.g. to differentiate "
                         "between women and men."))
        add_option("useroundedcorners", roundedcorners)

        stdoptions.add_gramps_id_option(menu, category_name, ownline=True)

        # ---------------------
        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)

        locale_opt = stdoptions.add_localization_option(menu, category_name)

        stdoptions.add_date_format_option(menu, category_name, locale_opt)

        # --------------------------------
        add_option = partial(menu.add_option, _('People of Interest'))
        # --------------------------------

        person_list = PersonListOption(_('People of interest'))
        person_list.set_help(_('People of interest are used as a starting '
                               'point when determining "family lines".'))
        add_option('gidlist', person_list)

        self.limit_parents = BooleanOption(_('Limit the number of ancestors'),
                                           False)
        self.limit_parents.set_help(_('Whether to '
                                      'limit the number of ancestors.'))
        add_option('limitparents', self.limit_parents)
        self.limit_parents.connect('value-changed', self.limit_changed)

        self.max_parents = NumberOption('', 50, 10, 9999)
        self.max_parents.set_help(_('The maximum number '
                                    'of ancestors to include.'))
        add_option('maxparents', self.max_parents)

        self.limit_children = BooleanOption(_('Limit the number '
                                              'of descendants'),
                                            False)
        self.limit_children.set_help(_('Whether to '
                                       'limit the number of descendants.'))
        add_option('limitchildren', self.limit_children)
        self.limit_children.connect('value-changed', self.limit_changed)

        self.max_children = NumberOption('', 50, 10, 9999)
        self.max_children.set_help(_('The maximum number '
                                     'of descendants to include.'))
        add_option('maxchildren', self.max_children)

        # --------------------
        category_name = _('Include')
        add_option = partial(menu.add_option, category_name)
        # --------------------

        self.include_dates = BooleanOption(_('Include dates'), True)
        self.include_dates.set_help(_('Whether to include dates for people '
                                      'and families.'))
        add_option('incdates', self.include_dates)
        self.include_dates.connect('value-changed', self.include_dates_changed)

        self.justyears = BooleanOption(_("Limit dates to years only"), False)
        self.justyears.set_help(_("Prints just dates' year, neither "
                                  "month or day nor date approximation "
                                  "or interval are shown."))
        add_option("justyears", self.justyears)

        include_places = BooleanOption(_('Include places'), True)
        include_places.set_help(_('Whether to include placenames for people '
                                  'and families.'))
        add_option('incplaces', include_places)

        include_num_children = BooleanOption(_('Include the number of '
                                               'children'), True)
        include_num_children.set_help(_('Whether to include the number of '
                                        'children for families with more '
                                        'than 1 child.'))
        add_option('incchildcnt', include_num_children)

        self.include_images = BooleanOption(_('Include '
                                              'thumbnail images of people'),
                                            True)
        self.include_images.set_help(_('Whether to '
                                       'include thumbnail images of people.'))
        add_option('incimages', self.include_images)
        self.include_images.connect('value-changed', self.images_changed)

        self.image_location = EnumeratedListOption(_('Thumbnail location'), 0)
        self.image_location.add_item(0, _('Above the name'))
        self.image_location.add_item(1, _('Beside the name'))
        self.image_location.set_help(_('Where the thumbnail image '
                                       'should appear relative to the name'))
        add_option('imageonside', self.image_location)

        self.image_size = EnumeratedListOption(_('Thumbnail size'), SIZE_NORMAL)
        self.image_size.add_item(SIZE_NORMAL, _('Normal'))
        self.image_size.add_item(SIZE_LARGE, _('Large'))
        self.image_size.set_help(_('Size of the thumbnail image'))
        add_option('imagesize', self.image_size)

        # ----------------------------
        add_option = partial(menu.add_option, _('Family Colors'))
        # ----------------------------

        surname_color = SurnameColorOption(_('Family colors'))
        surname_color.set_help(_('Colors to use for various family lines.'))
        add_option('surnamecolors', surname_color)

        # -------------------------
        add_option = partial(menu.add_option, _('Individuals'))
        # -------------------------

        color_males = ColorOption(_('Males'), '#e0e0ff')
        color_males.set_help(_('The color to use to display men.'))
        add_option('colormales', color_males)

        color_females = ColorOption(_('Females'), '#ffe0e0')
        color_females.set_help(_('The color to use to display women.'))
        add_option('colorfemales', color_females)

        color_unknown = ColorOption(_('Unknown'), '#e0e0e0')
        color_unknown.set_help(_('The color to use '
                                 'when the gender is unknown.'))
        add_option('colorunknown', color_unknown)

        color_family = ColorOption(_('Families'), '#ffffe0')
        color_family.set_help(_('The color to use to display families.'))
        add_option('colorfamilies', color_family)

        self.limit_changed()
        self.images_changed()
コード例 #4
0
ファイル: gvrelgraph.py プロジェクト: QuLogic/gramps
    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(
            _("Determines what people are included in the graph"))
        add_option("filter", self.__filter)
        self.__filter.connect('value-changed', self.__filter_changed)

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

        ################################
        add_option = partial(menu.add_option, _("Include"))
        ################################

        self.event_choice = EnumeratedListOption(_('Dates and/or Places'), 0)
        self.event_choice.add_item(0, _('Do not include any dates or places'))
        self.event_choice.add_item(
            1, _('Include (birth, marriage, death) '
                 'dates, but no places'))
        self.event_choice.add_item(
            2, _('Include (birth, marriage, death) '
                 'dates, and places'))
        self.event_choice.add_item(
            3,
            _('Include (birth, marriage, death) '
              'dates, and places if no dates'))
        self.event_choice.add_item(
            4, _('Include (birth, marriage, death) '
                 'years, but no places'))
        self.event_choice.add_item(
            5, _('Include (birth, marriage, death) '
                 'years, and places'))
        self.event_choice.add_item(
            6, _('Include (birth, marriage, death) '
                 'places, but no dates'))
        self.event_choice.add_item(
            7,
            _('Include (birth, marriage, death) '
              'dates and places on same line'))
        self.event_choice.set_help(_("Whether to include dates and/or places"))
        add_option("event_choice", self.event_choice)

        url = BooleanOption(_("Include URLs"), False)
        url.set_help(
            _("Include a URL in each graph node so "
              "that PDF and imagemap files can be "
              "generated that contain active links "
              "to the files generated by the 'Narrated "
              "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 "
              "relationship to the center person"))
        add_option("increlname", self.__show_relships)
        self.__show_relships.connect('value-changed',
                                     self.__show_relships_changed)

        self.__include_images = BooleanOption(
            _('Include thumbnail images of people'), False)
        self.__include_images.set_help(
            _("Whether to include thumbnails of people."))
        add_option("includeImages", self.__include_images)
        self.__include_images.connect('value-changed', self.__image_changed)

        self.__image_on_side = EnumeratedListOption(_("Thumbnail Location"), 0)
        self.__image_on_side.add_item(0, _('Above the name'))
        self.__image_on_side.add_item(1, _('Beside the name'))
        self.__image_on_side.set_help(
            _("Where the thumbnail image should appear relative to the name"))
        add_option("imageOnTheSide", self.__image_on_side)

        #occupation = BooleanOption(_("Include occupation"), False)
        occupation = EnumeratedListOption(_('Include occupation'), 0)
        occupation.add_item(0, _('Do not include any occupation'))
        occupation.add_item(
            1, _('Include description '
                 'of most recent occupation'))
        occupation.add_item(
            2, _('Include date, description and place '
                 'of all occupations'))
        occupation.set_help(_("Whether to include the last occupation"))
        add_option("occupation", occupation)

        if __debug__:
            self.__show_ga_gb = BooleanOption(
                _("Include relationship "
                  "debugging numbers also"), False)
            self.__show_ga_gb.set_help(
                _("Whether to include 'Ga' and 'Gb' "
                  "also, to debug the relationship "
                  "calculator"))
            add_option("advrelinfo", self.__show_ga_gb)

        ################################
        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)

        color_females = ColorOption(_('Females'), '#ffe0e0')
        color_females.set_help(_('The color to use to display women.'))
        add_option('colorfemales', color_females)

        color_unknown = ColorOption(_('Unknown'), '#e0e0e0')
        color_unknown.set_help(
            _('The color to use when the gender is unknown.'))
        add_option('colorunknown', color_unknown)

        color_family = ColorOption(_('Families'), '#ffffe0')
        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 "
              "as dotted lines in the graph."))
        add_option("dashed", dashed)

        showfamily = BooleanOption(_("Show family nodes"), True)
        showfamily.set_help(
            _("Families will show up as ellipses, linked "
              "to parents and children."))
        add_option("showfamily", showfamily)
コード例 #5
0
ファイル: gvrelgraph.py プロジェクト: cz172638/gramps
    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(
            _("Determines what people are included in the graph"))
        add_option("filter", self.__filter)
        self.__filter.connect('value-changed', self.__filter_changed)

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

        stdoptions.add_gramps_id_option(menu, category_name, ownline=True)

        ################################
        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)

        locale_opt = stdoptions.add_localization_option(menu, category_name)

        stdoptions.add_date_format_option(menu, category_name, locale_opt)

        ################################
        add_option = partial(menu.add_option, _("Include"))
        ################################

        self.event_choice = EnumeratedListOption(_('Dates and/or Places'), 0)
        self.event_choice.add_item(0, _('Do not include any dates or places'))
        self.event_choice.add_item(1, _('Include (birth, marriage, death) '
                                        'dates, but no places'))
        self.event_choice.add_item(2, _('Include (birth, marriage, death) '
                                        'dates, and places'))
        self.event_choice.add_item(3, _('Include (birth, marriage, death) '
                                        'dates, and places if no dates'))
        self.event_choice.add_item(4, _('Include (birth, marriage, death) '
                                        'years, but no places'))
        self.event_choice.add_item(5, _('Include (birth, marriage, death) '
                                        'years, and places'))
        self.event_choice.add_item(6, _('Include (birth, marriage, death) '
                                        'places, but no dates'))
        self.event_choice.add_item(7, _('Include (birth, marriage, death) '
                                        'dates and places on same line'))
        self.event_choice.set_help(
            _("Whether to include dates and/or places"))
        add_option("event_choice", self.event_choice)

        url = BooleanOption(_("Include URLs"), False)
        url.set_help(_("Include a URL in each graph node so "
                       "that PDF and imagemap files can be "
                       "generated that contain active links "
                       "to the files generated by the 'Narrated "
                       "Web Site' report."))
        add_option("url", url)

        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"))
        add_option("increlname", self.__show_relships)
        self.__show_relships.connect('value-changed',
                                     self.__show_relships_changed)

        self.__include_images = BooleanOption(
            _('Include thumbnail images of people'), False)
        self.__include_images.set_help(
            _("Whether to include thumbnails of people."))
        add_option("includeImages", self.__include_images)
        self.__include_images.connect('value-changed', self.__image_changed)

        self.__image_on_side = EnumeratedListOption(_("Thumbnail Location"), 0)
        self.__image_on_side.add_item(0, _('Above the name'))
        self.__image_on_side.add_item(1, _('Beside the name'))
        self.__image_on_side.set_help(
            _("Where the thumbnail image should appear relative to the name"))
        add_option("imageOnTheSide", self.__image_on_side)

        #occupation = BooleanOption(_("Include occupation"), False)
        occupation = EnumeratedListOption(_('Include occupation'), 0)
        occupation.add_item(0, _('Do not include any occupation'))
        occupation.add_item(1, _('Include description '
                                 'of most recent occupation'))
        occupation.add_item(2, _('Include date, description and place '
                                 'of all occupations'))
        occupation.set_help(_("Whether to include the last occupation"))
        add_option("occupation", occupation)

        if __debug__:
            self.__show_ga_gb = BooleanOption(_("Include relationship "
                                                "debugging numbers also"),
                                              False)
            self.__show_ga_gb.set_help(_("Whether to include 'Ga' and 'Gb' "
                                         "also, to debug the relationship "
                                         "calculator"))
            add_option("advrelinfo", self.__show_ga_gb)

        ################################
        add_option = partial(menu.add_option, _("Graph Style"))
        ################################

        color_males = ColorOption(_('Males'), '#e0e0ff')
        color_males.set_help(_('The color to use to display men.'))
        add_option('colormales', color_males)

        color_females = ColorOption(_('Females'), '#ffe0e0')
        color_females.set_help(_('The color to use to display women.'))
        add_option('colorfemales', color_females)

        color_unknown = ColorOption(_('Unknown'), '#e0e0e0')
        color_unknown.set_help(
            _('The color to use when the gender is unknown.')
            )
        add_option('colorunknown', color_unknown)

        color_family = ColorOption(_('Families'), '#ffffe0')
        color_family.set_help(_('The color to use to display families.'))
        add_option('colorfamilies', color_family)

        dashed = BooleanOption(
            _("Indicate non-birth relationships with dotted lines"), True)
        dashed.set_help(_("Non-birth relationships will show up "
                          "as dotted lines in the graph."))
        add_option("dashed", dashed)

        showfamily = BooleanOption(_("Show family nodes"), True)
        showfamily.set_help(_("Families will show up as ellipses, linked "
                              "to parents and children."))
        add_option("showfamily", showfamily)
コード例 #6
0
    def add_menu_options(self, menu):
        """
        Add options to the menu for the ancestral collapsible tree report.
        """
        category_name = _("Ancestral Collapsible Tree Options")

        pid = PersonOption(_("Center Person"))
        pid.set_help(_("The center person for the report"))
        menu.add_option(category_name, "pid", pid)

        pid = menu.get_option_by_name('pid').get_value()
        center_person = self._dbase.get_person_from_gramps_id(
            menu.get_option_by_name('pid').get_value())
        if center_person :
            name_str = global_name_display.display_formal(center_person)
        else:
            name_str = ""

        # We must figure out the value of the first option before we can
        # create the EnumeratedListOption
        fmt_list = global_name_display.get_name_format()
        name_format = EnumeratedListOption(_("Name format"), 0)
        name_format.add_item(0, _("Default"))
        for num, name, fmt_str, act in fmt_list:
            name_format.add_item(num, name)
        name_format.set_help(_("Select the format to display names"))
        menu.add_option(category_name, "name_format", name_format)

        self.maxgen = NumberOption(_("Include Generations"), 10, 1, 100)
        self.maxgen.set_help(_("The number of generations to include in the " +
            "report"))
        menu.add_option(category_name, "maxgen", self.maxgen)
        self.maxgen.connect('value-changed', self.validate_gen)

        male_bg = ColorOption(_("Male Background Color"), "#ffffff")
        male_bg.set_help(_("RGB-color for male box background."))
        menu.add_option(category_name, "male_bg", male_bg)

        exp_male_bg = ColorOption(_("Male Expandable Background Color"),
            "#B4C4D9")
        exp_male_bg.set_help(_("RGB-color for male expandable box background."))
        menu.add_option(category_name, "exp_male_bg", exp_male_bg)

        female_bg = ColorOption(_("Female Background"), "#ffffff")
        female_bg.set_help(_("RGB-color for female box background."))
        menu.add_option(category_name, "female_bg", female_bg)

        exp_female_bg = ColorOption(_("Female Expandable Background"),
            "#F0D5D7")
        exp_female_bg.set_help(_("RGB-color for female expandable box " +
            "background."))
        menu.add_option(category_name, "exp_female_bg", exp_female_bg)

        dest_path = DestinationOption(_("Destination"),
            config.get('paths.website-directory'))
        dest_path.set_help(_("The destination path for generated files."))
        dest_path.set_directory_entry(True)
        menu.add_option(category_name, "dest_path", dest_path)

        dest_file = StringOption(_("Filename"), "AncestralCollapsible.html")
        dest_file.set_help(_("The destination file name for html content."))
        menu.add_option(category_name, "dest_file", dest_file)
コード例 #7
0
    def add_menu_options(self, menu):
        """ Add options to the menu for the ancestral fan chart report. """
        # ---------------------------- *
        category_general = _("General")

        pid = PersonOption(_("Center Person"))
        pid.set_help(_("The center person for the report"))
        menu.add_option(category_general, "pid", pid)

        pid_year = NumberOption(_("Year of Birth of Center Person"),
            0, -9999, 9999
        )
        pid_year.set_help(_("The year of birth of the center person. "
                            "Estimate a year if unknown")
                         )
        menu.add_option(category_general, "pid_year", pid_year)

        dest_path = DestinationOption(_("Destination directory"),
                                      config.get('paths.website-directory')
                                     )
        dest_path.set_help(_("Path for generated files"))
        dest_path.set_directory_entry(True)
        menu.add_option(category_general, "dest_path", dest_path)

        dest_file = StringOption(_("Filename"), "index.html")
        dest_file.set_help(_("The destination file name for html content."))
        menu.add_option(category_general, "dest_file", dest_file)

        age_diff = StringOption(_("Default Age"), "25")
        age_diff.set_help(_("Default age of parent when child is born "
            "with unknown year of birth")
        )
        menu.add_option(category_general, "age_diff", age_diff)

        locale_opt = stdoptions.add_localization_option(menu, category_general)
        stdoptions.add_date_format_option(menu, category_general, locale_opt)

        # ---------------------------- *
        category_what   = _("What to show")

        show_id = BooleanOption(_("Show GrampsID"), True)
        show_id.set_help(_("Show GrampsID on top right of the box"))
        menu.add_option(category_what, "show_id", show_id)

        optimize = BooleanOption(_("Optimize"), True)
        optimize.set_help(_("Use as little space in horizontal "
            "direction as possible")
        )
        menu.add_option(category_what, "optimize", optimize)

        # ---------------------------- *
        category_color  = _("Color")

        m_bg = ColorOption(_("Male Box Color"), "#cda476")
        m_bg.set_help(_("Box background color for male person"))
        menu.add_option(category_color, "m_bg", m_bg)

        w_bg = ColorOption(_("Female Box Color"), "#efdfcf")
        w_bg.set_help(_("Box background color for female person"))
        menu.add_option(category_color, "w_bg", w_bg)

        # ---------------------------- *
        category_size   = _("Size")

        year_to_pixel_factor = StringOption(_("Number of pixel per year"), "8")
        year_to_pixel_factor.set_help(_("How many pixel height is one year?"))
        menu.add_option(category_size, "year_to_pixel_factor",
            year_to_pixel_factor
        )

        offset_x = StringOption(_("Offset X Coordinate"), "60")
        offset_x.set_help(
            _("How many pixel are unused besides the "
            "most left and most right boxes?")
        )
        menu.add_option(category_size, "offset_x", offset_x)

        offset_y = StringOption(_("Offset Y Coordinate"), "75")
        offset_y.set_help(_("How many pixel are unused above first box?"))
        menu.add_option(category_size, "offset_y", offset_y)

        box_width = StringOption(_("Width of a box in pixel"), "140")
        box_width.set_help(_("Width of the box of a person in pixel"))
        menu.add_option(category_size, "box_width", box_width)

        box_offset_x = StringOption(_("Horizontal space "
            "between boxes in pixel"), "20"
        )
        box_offset_x.set_help(_("Minimum horizontal space "
            "between 2 boxes in pixel")
        )
        menu.add_option(category_size, "box_offset_x", box_offset_x)

        vert_length = StringOption(
            _("Length of vertical part of a line in pixel"), "100"
        )
        vert_length.set_help(_("Parent and child boxes are connected "
            "with lines. This is the length of the vertical part of "
            "the lines in pixel")
        )
        menu.add_option(category_size, "vert_length", vert_length)

        scale_x = StringOption(
            _("Number of pixel between left border and scale"), "10"
        )
        scale_x.set_help(_("Number of pixel between left border and scale"))
        menu.add_option(category_size, "scale_x", scale_x)
コード例 #8
0
    def add_menu_options(self, menu):
        """
        Create all the menu options for this report.
        """
        category_name = _("Report Options")

        pid = PersonOption(_("Center Person"))
        pid.set_help(_("The Center person for the graph"))
        menu.add_option(category_name, "pid", pid)

        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_d)

        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_a)

        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)):
            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."))
        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)

        stdoptions.add_gramps_id_option(menu, category_name, ownline=True)

        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)

        locale_opt = stdoptions.add_localization_option(menu, category_name)

        stdoptions.add_date_format_option(menu, category_name, locale_opt)

        ################################
        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)

        color_females = ColorOption(_('Females'), '#ffe0e0')
        color_females.set_help(_('The color to use to display women.'))
        menu.add_option(category_name, 'colorfemales', color_females)

        color_unknown = ColorOption(_('Unknown'), '#e0e0e0')
        color_unknown.set_help(_('The color to use '
                                 'when the gender is unknown.'))
        menu.add_option(category_name, 'colorunknown', color_unknown)

        color_family = ColorOption(_('Families'), '#ffffe0')
        color_family.set_help(_('The color to use to display families.'))
        menu.add_option(category_name, 'colorfamilies', color_family)
コード例 #9
0
ファイル: gvhourglass.py プロジェクト: romjerome/gramps
    def add_menu_options(self, menu):
        """
        Create all the menu options for this report.
        """
        category_name = _("Report Options")

        pid = PersonOption(_("Center Person"))
        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 "
                           "include in the graph"))
        menu.add_option(category_name, "maxdescend", max_gen)

        max_gen = NumberOption(_('Max Ancestor Generations'), 10, 1, 15)
        max_gen.set_help(_("The number of generations of ancestors to "
                           "include in the graph"))
        menu.add_option(category_name, "maxascend", max_gen)

        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")
        ################################

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

        color_males = ColorOption(_('Males'), '#e0e0ff')
        color_males.set_help(_('The color to use to display men.'))
        menu.add_option(category_name, 'colormales', color_males)

        color_females = ColorOption(_('Females'), '#ffe0e0')
        color_females.set_help(_('The color to use to display women.'))
        menu.add_option(category_name, 'colorfemales', color_females)

        color_unknown = ColorOption(_('Unknown'), '#e0e0e0')
        color_unknown.set_help(_('The color to use '
                                 'when the gender is unknown.'))
        menu.add_option(category_name, 'colorunknown', color_unknown)

        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)
コード例 #10
0
    def add_menu_options(self, menu):
        """
        Add options to the menu for the ancestral collapsible tree report.
        """
        category_name = _("Ancestral Collapsible Tree Options")

        pid = PersonOption(_("Center Person"))
        pid.set_help(_("The center person for the report"))
        menu.add_option(category_name, "pid", pid)

        pid = menu.get_option_by_name('pid').get_value()
        center_person = self._dbase.get_person_from_gramps_id(
            menu.get_option_by_name('pid').get_value())
        if center_person:
            name_str = global_name_display.display_formal(center_person)
        else:
            name_str = ""

        # We must figure out the value of the first option before we can
        # create the EnumeratedListOption
        fmt_list = global_name_display.get_name_format()
        name_format = EnumeratedListOption(_("Name format"), 0)
        name_format.add_item(0, _("Default"))
        for num, name, fmt_str, act in fmt_list:
            name_format.add_item(num, name)
        name_format.set_help(_("Select the format to display names"))
        menu.add_option(category_name, "name_format", name_format)

        self.maxgen = NumberOption(_("Include Generations"), 10, 1, 100)
        self.maxgen.set_help(
            _("The number of generations to include in the " + "report"))
        menu.add_option(category_name, "maxgen", self.maxgen)
        self.maxgen.connect('value-changed', self.validate_gen)

        male_bg = ColorOption(_("Male Background Color"), "#ffffff")
        male_bg.set_help(_("RGB-color for male box background."))
        menu.add_option(category_name, "male_bg", male_bg)

        exp_male_bg = ColorOption(_("Male Expandable Background Color"),
                                  "#B4C4D9")
        exp_male_bg.set_help(
            _("RGB-color for male expandable box background."))
        menu.add_option(category_name, "exp_male_bg", exp_male_bg)

        female_bg = ColorOption(_("Female Background"), "#ffffff")
        female_bg.set_help(_("RGB-color for female box background."))
        menu.add_option(category_name, "female_bg", female_bg)

        exp_female_bg = ColorOption(_("Female Expandable Background"),
                                    "#F0D5D7")
        exp_female_bg.set_help(
            _("RGB-color for female expandable box " + "background."))
        menu.add_option(category_name, "exp_female_bg", exp_female_bg)

        dest_path = DestinationOption(_("Destination"),
                                      config.get('paths.website-directory'))
        dest_path.set_help(_("The destination path for generated files."))
        dest_path.set_directory_entry(True)
        menu.add_option(category_name, "dest_path", dest_path)

        dest_file = StringOption(_("Filename"), "AncestralCollapsible.html")
        dest_file.set_help(_("The destination file name for html content."))
        menu.add_option(category_name, "dest_file", dest_file)
コード例 #11
0
ファイル: gvrelgraph.py プロジェクト: balrok/gramps_addon
    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(
            _("Determines what people are included in the graph"))
        add_option("filter", self.__filter)
        self.__filter.connect('value-changed', self.__filter_changed)

        self.__pid = PersonOption(_("Center Person"))
        self.__pid.set_help(_("The center person for the report"))
        add_option("pid", self.__pid)
        self.__pid.connect('value-changed', self.__update_filters)

        stdoptions.add_name_format_option(menu, category_name)

        self.__update_filters()

        self.incdate = BooleanOption(
            _("Include Birth, Marriage and Death dates"), True)
        self.incdate.set_help(
            _("Include the dates that the individual was "
              "born, got married and/or died in the graph labels."))
        add_option("incdate", self.incdate)
        self.incdate.connect('value-changed', self.__include_dates_changed)

        self.justyears = BooleanOption(_("Limit dates to years only"), False)
        self.justyears.set_help(
            _("Prints just dates' year, neither "
              "month or day nor date approximation "
              "or interval are shown."))
        add_option("justyears", self.justyears)

        use_place = BooleanOption(_("Use place when no date"), True)
        use_place.set_help(
            _("When no birth, marriage, or death date is "
              "available, the correspondent place field "
              "will be used."))
        add_option("use_place", use_place)

        url = BooleanOption(_("Include URLs"), False)
        url.set_help(
            _("Include a URL in each graph node so "
              "that PDF and imagemap files can be "
              "generated that contain active links "
              "to the files generated by the 'Narrated "
              "Web Site' report."))
        add_option("url", url)

        incid = BooleanOption(_("Include IDs"), False)
        incid.set_help(_("Include individual and family IDs."))
        add_option("incid", incid)

        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"))
        add_option("increlname", self.__show_relships)
        self.__show_relships.connect('value-changed',
                                     self.__show_relships_changed)

        if __debug__:
            self.__show_GaGb = BooleanOption(
                _("Include relationship "
                  "debugging numbers also"), False)
            self.__show_GaGb.set_help(
                _("Whether to include 'Ga' and 'Gb' "
                  "also, to debug the relationship calculator"))
            add_option("advrelinfo", self.__show_GaGb)

        self.__include_images = BooleanOption(
            _('Include thumbnail images of people'), False)
        self.__include_images.set_help(
            _("Whether to include thumbnails of people."))
        add_option("includeImages", self.__include_images)
        self.__include_images.connect('value-changed', self.__image_changed)

        self.__image_on_side = EnumeratedListOption(_("Thumbnail Location"), 0)
        self.__image_on_side.add_item(0, _('Above the name'))
        self.__image_on_side.add_item(1, _('Beside the name'))
        self.__image_on_side.set_help(
            _("Where the thumbnail image should appear "
              "relative to the name"))
        add_option("imageOnTheSide", self.__image_on_side)

        stdoptions.add_localization_option(menu, category_name)

        ################################
        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)

        color_females = ColorOption(_('Females'), '#ffe0e0')
        color_females.set_help(_('The color to use to display women.'))
        add_option('colorfemales', color_females)

        color_unknown = ColorOption(_('Unknown'), '#e0e0e0')
        color_unknown.set_help(
            _('The color to use when the gender is unknown.'))
        add_option('colorunknown', color_unknown)

        color_family = ColorOption(_('Families'), '#ffffe0')
        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)

        roundedcorners = BooleanOption(  # see bug report #2180
            _("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 "
              "as dotted lines in the graph."))
        add_option("dashed", dashed)

        showfamily = BooleanOption(_("Show family nodes"), True)
        showfamily.set_help(
            _("Families will show up as ellipses, linked "
              "to parents and children."))
        add_option("showfamily", showfamily)
コード例 #12
0
ファイル: NobleTitles.py プロジェクト: nickwhitt/nobletitles
    def add_menu_options(self, menu):
        person_list = PersonListOption('People of interest')
        menu.add_option('People of Interest', 'gidlist', person_list)

        withparents = BooleanOption(('Include ancestors'), False)
        menu.add_option('People of Interest', 'withparents', withparents)

        withchildren = BooleanOption(('Include descendents'), False)
        menu.add_option('People of Interest', 'withchildren', withchildren)

        withspouses = BooleanOption(('Include spouses'), False)
        menu.add_option('People of Interest', 'withspouses', withspouses)

        color_males = ColorOption('Males', '#e0e0ff')
        color_males.set_help('The color to use to display men')
        menu.add_option('Report Options', 'colormales', color_males)

        color_females = ColorOption('Females', '#ffe0e0')
        color_females.set_help('The color to use to display women')
        menu.add_option('Report Options', 'colorfemales', color_females)

        color_unknown = ColorOption('Unknown', '#e0e0e0')
        color_unknown.set_help('The color to use when the gender is unknown')
        menu.add_option('Report Options', 'colorunknown', color_unknown)

        locale_opt = stdoptions.add_localization_option(menu, 'Report Options')
        stdoptions.add_date_format_option(menu, 'Report Options', locale_opt)
        stdoptions.add_name_format_option(menu, 'Report Options')
コード例 #13
0
ファイル: gvrelgraph.py プロジェクト: tiansworld/gramps
    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(
            _("Determines what people are included in the graph"))
        add_option("filter", self.__filter)
        self.__filter.connect('value-changed', self.__filter_changed)

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

        # see bug report #11112
        hexagons = BooleanOption(_("Use hexagons"), False)
        hexagons.set_help(
            _("Use hexagons to differentiate "
              "those of unknown gender."))
        add_option("usehexagons", hexagons)

        stdoptions.add_gramps_id_option(menu, category_name, ownline=True)

        ################################
        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)

        locale_opt = stdoptions.add_localization_option(menu, category_name)

        stdoptions.add_date_format_option(menu, category_name, locale_opt)

        ################################
        add_option = partial(menu.add_option, _("Include"))
        ################################

        self.event_choice = EnumeratedListOption(_('Dates and/or Places'), 0)
        self.event_choice.add_item(0, _('Do not include any dates or places'))
        self.event_choice.add_item(
            1, _('Include (birth, marriage, death) '
                 'dates, but no places'))
        self.event_choice.add_item(
            2, _('Include (birth, marriage, death) '
                 'dates, and places'))
        self.event_choice.add_item(
            3,
            _('Include (birth, marriage, death) '
              'dates, and places if no dates'))
        self.event_choice.add_item(
            4, _('Include (birth, marriage, death) '
                 'years, but no places'))
        self.event_choice.add_item(
            5, _('Include (birth, marriage, death) '
                 'years, and places'))
        self.event_choice.add_item(
            6, _('Include (birth, marriage, death) '
                 'places, but no dates'))
        self.event_choice.add_item(
            7,
            _('Include (birth, marriage, death) '
              'dates and places on same line'))
        self.event_choice.set_help(_("Whether to include dates and/or places"))
        add_option("event_choice", self.event_choice)

        show_family_leaves = BooleanOption(_("Show all family nodes"), True)
        show_family_leaves.set_help(
            _("Show family nodes even if the output "
              "contains only one member of the family."))
        add_option("show_family_leaves", show_family_leaves)

        url = BooleanOption(_("Include URLs"), False)
        url.set_help(
            _("Include a URL in each graph node so "
              "that PDF and imagemap files can be "
              "generated that contain active links "
              "to the files generated by the 'Narrated "
              "Web Site' report."))
        add_option("url", url)

        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"))
        add_option("increlname", self.__show_relships)
        self.__show_relships.connect('value-changed',
                                     self.__show_relships_changed)

        self.__include_images = BooleanOption(
            _('Include thumbnail images of people'), False)
        self.__include_images.set_help(
            _("Whether to include thumbnails of people."))
        add_option("includeImages", self.__include_images)
        self.__include_images.connect('value-changed', self.__image_changed)

        self.__image_on_side = EnumeratedListOption(_("Thumbnail Location"), 0)
        self.__image_on_side.add_item(0, _('Above the name'))
        self.__image_on_side.add_item(1, _('Beside the name'))
        self.__image_on_side.set_help(
            _("Where the thumbnail image should appear relative to the name"))
        add_option("imageOnTheSide", self.__image_on_side)

        #occupation = BooleanOption(_("Include occupation"), False)
        occupation = EnumeratedListOption(_('Include occupation'), 0)
        occupation.add_item(0, _('Do not include any occupation'))
        occupation.add_item(
            1, _('Include description '
                 'of most recent occupation'))
        occupation.add_item(
            2, _('Include date, description and place '
                 'of all occupations'))
        occupation.set_help(_("Whether to include the last occupation"))
        add_option("occupation", occupation)

        if __debug__:
            self.__show_ga_gb = BooleanOption(
                _("Include relationship "
                  "debugging numbers also"), False)
            self.__show_ga_gb.set_help(
                _("Whether to include 'Ga' and 'Gb' "
                  "also, to debug the relationship "
                  "calculator"))
            add_option("advrelinfo", self.__show_ga_gb)

        ################################
        add_option = partial(menu.add_option, _("Graph Style"))
        ################################

        color_males = ColorOption(_('Males'), '#e0e0ff')
        color_males.set_help(_('The color to use to display men.'))
        add_option('colormales', color_males)

        color_females = ColorOption(_('Females'), '#ffe0e0')
        color_females.set_help(_('The color to use to display women.'))
        add_option('colorfemales', color_females)

        color_unknown = ColorOption(_('Unknown'), '#e0e0e0')
        color_unknown.set_help(
            _('The color to use when the gender is unknown.'))
        add_option('colorunknown', color_unknown)

        color_family = ColorOption(_('Families'), '#ffffe0')
        color_family.set_help(_('The color to use to display families.'))
        add_option('colorfamilies', color_family)

        dashed = BooleanOption(
            _("Indicate non-birth relationships with dotted lines"), True)
        dashed.set_help(
            _("Non-birth relationships will show up "
              "as dotted lines in the graph."))
        add_option("dashed", dashed)

        showfamily = BooleanOption(_("Show family nodes"), True)
        showfamily.set_help(
            _("Families will show up as ellipses, linked "
              "to parents and children."))
        add_option("showfamily", showfamily)

        use_subgraphs = EnumeratedListOption(_('Parent grouping'), 0)
        use_subgraphs.add_item(0, _('Normal'))
        use_subgraphs.add_item(1, _('Parents together'))
        use_subgraphs.add_item(2, _('Parents offset'))
        use_subgraphs.set_help(
            _("In the 'Normal' setting parents will be located to keep most "
              "lines short.\n"
              "The 'Parents together' setting can help position "
              "spouses next to each other, but with non-trivial graphs will "
              "result in longer lines and larger graphs.\n"
              "The Parents offset setting will also try to put spouses near "
              "each other, however they will be offset from each other.  This "
              "will tend to make graphs with many people in a generation more "
              "square."))
        add_option("usesubgraphs", use_subgraphs)