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

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

src/g/r/gramps-3.4.2/src/gui/editors/editfamily.py   Gramps(Download)
            preset_name(mother, mothername)
            preset_name(father, name)
            mothersurname = mothername.get_surname_list()[0]
            mothersurname.set_primary(False)
            name.set_surname_list([name.get_surname_list()[0], mothersurname])
                pname = child.get_primary_name()
                preset_name(child, name)
                if len(name.get_surname_list()) < 2:
                    return name
                else:
                    #return first for the father, and last for the mother
                    if parent == 'father':
                        name.set_surname_list(name.get_surname_list()[0])
                        return name
                    else:
                        name.set_surname_list(name.get_surname_list()[-1])
                        return name
        return name