diff --git a/src/glade/editperson.glade b/src/glade/editperson.glade index e8d122197..d00b926d6 100644 --- a/src/glade/editperson.glade +++ b/src/glade/editperson.glade @@ -19,287 +19,166 @@ True - + True + 11 + 8 + 3 + 3 - + True - - - True - - - True - 0 - <b>Preferred name</b> - True - - - False - False - 0 - - - - - True - 0 - <b> - </b> - True - - - False - False - 1 - - - - - True - True - True - - - - True - gtk-edit - - - - - False - False - 2 - - - - - True - - - 3 - - - - - True - 1 - 4 - _Type: - True - center - ntype - - - False - 8 - 4 - - - - - True - - - 5 - - - - - - - - False - False - 3 - 0 - - - - - True - 0.029999999329447746 - - - True - 12 - - - True - 2 - 6 - 7 - 7 - - - True - 0 - _Given: - True - center - given_name - - - GTK_FILL - - - - - - True - 0 - T_itle: - True - title - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Suffi_x: - True - suffix - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - True - 0 - C_all Name: - True - call - - - 4 - 5 - GTK_FILL - - - - - - True - True - True - True - The person's given names - - - - - 1 - 4 - - - - - - True - 0 - _Nick Name: - True - nickname - - - 4 - 5 - 1 - 2 - GTK_FILL - - - - - - True - True - Part of the Given name that is the normally used name. - - - - 5 - 6 - - - - - True - True - A title used to refer to the person, such as 'Dr.' or 'Rev.' - - - - 1 - 2 - 1 - 2 - - - - - True - True - An optional suffix to the name, such as "Jr." or "III" - - - - 3 - 4 - 1 - 2 - - - - - True - True - A descriptive name given in place of or in addition to the official given name. - - - - 5 - 6 - 1 - 2 - - - - - - - - - True - <i>Given Name(s) </i> - True - - - - - False - False - 3 - 1 - - + 0 + _Given: + True + center + given_name - 0 + 1 + 2 + GTK_FILL + + + + + + True + True + True + True + The person's given names + + + + + 1 + 4 + 1 + 2 + + + + + + True + 0 + C_all Name: + True + call + + + 4 + 5 + 1 + 2 + GTK_FILL + + + + + + True + True + Part of the Given name that is normally used name. + + + + 5 + 6 + 1 + 2 + + + + + True + 0 + T_itle: + True + title + + + 2 + 3 + GTK_FILL + + + + + + True + True + A title used to refer to the person, such as 'Dr.' or 'Rev.' + + + + 1 + 2 + 2 + 3 + + + + + True + 0 + Suffi_x: + True + suffix + + + 2 + 3 + 2 + 3 + GTK_SHRINK | GTK_FILL + + + + + + True + True + An optional suffix to the name, such as "Jr." or "III" + + + + 3 + 4 + 2 + 3 + + + + + True + 0 + _Nick Name: + True + nickname + + + 4 + 5 + 2 + 3 + GTK_FILL + + + + + + True + True + A descriptive name given in place of or in addition to the official given name. + + + + 5 + 6 + 2 + 3 @@ -328,371 +207,105 @@ - 5 - 1 - - - - - False - 0 - - - - - True - 0.029999999329447746 - none - - - True - 12 - - - True - 5 - - - True - 2 - 4 - 7 - 4 - - - True - _Prefix - True - prefix - - - GTK_FILL - - - - - True - _Surname - True - surname - - - 1 - 2 - GTK_FILL - - - - - True - _Origin - True - cmborigin - - - 2 - 3 - GTK_FILL - - - - - True - True - part of a person's name indicating the family to which the person belongs - - - - 1 - 2 - 1 - 2 - - - - - - True - The origin of the family name of this family, eg 'Inherited' or 'Patronymic'. - - - 2 - 3 - 1 - 2 - GTK_FILL - - - - - - Use _Multiple Surnames - True - True - True - True - - - 3 - 4 - 1 - 2 - - - - - - - True - True - An optional prefix for the family that is not used in sorting, such as "de" or "van". - - - - 1 - 2 - GTK_FILL - - - - - True - - - 3 - 4 - - - - - - - False - False - 0 - - - - - - - - - True - <i>Family Name </i> - True - - - - - False - False - 2 - 1 - - - - - True - 0.029999999329447746 - none - - - True - 12 - - - True - - - - - - - - - - - - - True - <i>Family Names </i> - True - - - - - False - False - 2 - 2 - - - - - True - 3 - 6 - 9 - 4 - - - True - 12 - - - True - 0 - <b>General</b> - True - - - False - False - 0 - - - - - True - True - True - none - - - True - gramps-unlock - - - - - False - False - 1 - - - - - 4 - GTK_FILL - + 6 + 8 + 5 - - True - liststore2 - - - - 0 - - - - - 2 - 3 - 1 - 2 - GTK_FILL - GTK_FILL - - - - - True - 5 - - - True - 0 - _ID: - True - right - gid - - - False - False - 0 - - - - - True - True - A unique ID of the person. - - 6 - - - 1 - - - - - - - - - - - 3 - 6 - 1 - 2 - GTK_FILL - - - - - + True 0 - Tags: + _Prefix: + True + prefix + + + 4 + 5 + GTK_FILL + + + + + True + True + An optional prefix for the family that is not used in sorting, such as "de" or "van". + 1 2 - 2 - 3 + 4 + 5 + + + + + True + 0 + _Surname: + True + surname + + + 5 + 6 + GTK_FILL + + + + + True + True + Part of a person's name indicating the family to which the person belongs + + + + 1 + 4 + 5 + 6 GTK_FILL - + True - - - True - - - 0 - - - - - True - True - True - - - - - - False - False - 1 - - + 0 + _Type: + True + center + ntype - 2 - 6 - 2 - 3 - + 3 + 4 + GTK_FILL + + + + + True + An identification of what type of Name this is, eg Birth Name, Married Name. + + + 1 + 2 + 3 + 4 + + + + + True + + + 8 + 8 + 9 + GTK_FILL @@ -704,38 +317,288 @@ gender - 1 - 2 - 1 - 2 + 9 + 10 GTK_FILL - + True - 10 + True + A unique ID for the person. + + 6 - 1 - 2 - + 3 + 4 + 9 + 10 + + + + + True + 0 + _ID: + True + right + + + 2 + 3 + 9 + 10 + GTK_SHRINK | GTK_FILL + + + + + True + + + + 0 + + + + + 1 + 2 + 9 + 10 + GTK_FILL + GTK_FILL + + + + + True + + + + + + + + + 8 + 7 + 8 + GTK_FILL + + + + + True + + + 8 + 6 + 7 + GTK_FILL + + + + + True + 0 + O_rigin: + True + cmborigin + + + 4 + 5 + 5 + 6 + GTK_FILL - + True - 10 + The origin of this family name for this family, eg 'Inherited' or 'Patronymic'. - 2 - 3 - + 5 + 6 + 5 + 6 + + + Use _Multiple Surnames + True + True + True + True + + + 3 + 4 + 4 + 5 + + + + + + True + 0 + Tags: + + + 10 + 11 + GTK_FILL + + + + + + True + 0 + <b>Preferred Name </b> + True + + + 2 + GTK_FILL + + + + + + More Name Details + True + True + True + image1 + + + + 3 + 4 + 3 + 4 + + + + + True + + + 1 + 7 + 10 + 11 + GTK_FILL + + + + + True + + + + + + True + True + True + Set person as private data + none + 1 + + + False + False + end + 1 + + + + + 7 + 8 + 9 + 10 + + + + + True + + + + + + True + True + True + Edit the tag list + 1 + + + False + False + end + 1 + + + + + 7 + 8 + 10 + 11 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -744,11 +607,13 @@ - False - False - 3 + 2 + 0 + + + @@ -827,27 +692,8 @@ button134 - - - - - - - - - - - - - - Female - - - Male - - - Unknown - - + + True + gtk-edit diff --git a/src/gui/editors/editperson.py b/src/gui/editors/editperson.py index ce517b1b9..0168b3c23 100644 --- a/src/gui/editors/editperson.py +++ b/src/gui/editors/editperson.py @@ -78,6 +78,35 @@ _select_gender = ((True, False, False), (False, True, False), (False, False, True)) +class SingSurn(object): + """ + Managing the single surname components + """ + def __init__(self, gladeobj): + self.top = gladeobj + + def hide_all(self): + self.top.get_object('prefixlabel').hide() + self.top.get_object('prefix').hide() + self.top.get_object('surnamelabel').hide() + self.top.get_object('surname').hide() + self.top.get_object('originlabel').hide() + self.top.get_object('originlabel').hide() + self.top.get_object('cmborigin').hide() + self.top.get_object('multsurnamebtn').hide() + self.top.get_object('hseparatormult').show() + + def show_all(self): + self.top.get_object('prefixlabel').show() + self.top.get_object('prefix').show() + self.top.get_object('surnamelabel').show() + self.top.get_object('surname').show() + self.top.get_object('originlabel').show() + self.top.get_object('originlabel').show() + self.top.get_object('cmborigin').show() + self.top.get_object('multsurnamebtn').show() + self.top.get_object('hseparatormult').hide() + class EditPerson(EditPrimary): """ The EditPerson dialog is derived from the EditPrimary class. @@ -149,8 +178,8 @@ class EditPerson(EditPrimary): self.obj_photo = self.top.get_object("personPix") self.eventbox = self.top.get_object("eventbox1") - self.singsurnfr = self.top.get_object("surnamefr") - self.multsurnfr = self.top.get_object("multsurnamefr") + self.singsurnfr = SingSurn(self.top) + self.multsurnfr = self.top.get_object("hboxmultsurnames") self.singlesurn_active = True self.surntab = SurnameTab(self.dbstate, self.uistate, self.track, self.obj.get_primary_name()) @@ -173,9 +202,11 @@ class EditPerson(EditPrimary): if len(self.obj.get_primary_name().get_surname_list()) > 1: self.singsurnfr.hide_all() + self.multsurnfr.show_all() self.singlesurn_active = False else: self.multsurnfr.hide_all() + self.singsurnfr.show_all() self.singlesurn_active = True #if self.pname.get_surname() and not self.pname.get_first_name(): # self.given.grab_focus()