Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(0)  |  Call(0)  |  Derive(0)  |  Import(0)

src/g/r/gramps-3.4.2/src/gen/display/name.py   Gramps(Download)
        (Name.DEF, _("Default format (defined by Gramps preferences)"), '', _ACT),
        (Name.LNFN, _("Surname, Given Suffix"), '%l, %f %s', _ACT),
        (Name.FN, _("Given"), '%f', _ACT),
        (Name.FNLN, _("Given Surname Suffix"), '%f %l %s', _ACT),
            self.default_format = config.get('preferences.name-format')
            if self.default_format == 0:
                self.default_format = Name.LNFN
                config.set('preferences.name-format', self.default_format)
            #if only one surname, see if pa/ma should be considered as 
            # 'the' surname.
            PAT_AS_SURN = config.get('preferences.patronimic-surname')
            config.connect('preferences.patronimic-surname', self.change_pa_sur)
            self.default_format = Name.LNFN
    def set_name_format(self, formats):
        raw_func_dict = {
            Name.LNFN : self._raw_lnfn,
            Name.FNLN : self._raw_fnln,
    def set_default_format(self, num):
        if num not in self.name_formats:
            num = Name.LNFN
        # if user sets default format to the Gramps default format,
        # then we select LNFN as format.