diff --git a/src/Editors/_EditPerson.py b/src/Editors/_EditPerson.py
index 682dd0e91..481bb86bf 100644
--- a/src/Editors/_EditPerson.py
+++ b/src/Editors/_EditPerson.py
@@ -40,7 +40,6 @@ from TransUtils import sgettext as _
#
#-------------------------------------------------------------------------
import gtk
-from gtk import glade
#-------------------------------------------------------------------------
#
@@ -137,15 +136,16 @@ class EditPerson(EditPrimary):
self.load_obj = None
self.load_rect = None
- self.top = glade.XML(const.PERSON_GLADE, "edit_person", "gramps")
+ self.top = gtk.Builder()
+ self.top.add_from_file(const.PERSON_GLADE)
- self.set_window(self.top.get_widget("edit_person"), None,
+ self.set_window(self.top.get_object("edit_person"), None,
self.get_menu_title())
- self.obj_photo = self.top.get_widget("personPix")
- self.eventbox = self.top.get_widget("eventbox1")
+ self.obj_photo = self.top.get_object("personPix")
+ self.eventbox = self.top.get_object("eventbox1")
- self.set_contexteventbox(self.top.get_widget("eventboxtop"))
+ self.set_contexteventbox(self.top.get_object("eventboxtop"))
def _post_init(self):
@@ -171,12 +171,12 @@ class EditPerson(EditPrimary):
Called by the init routine of the base class (_EditPrimary).
"""
- self.define_cancel_button(self.top.get_widget("button15"))
- self.define_ok_button(self.top.get_widget("ok"), self.save)
- self.define_help_button(self.top.get_widget("button134"))
+ self.define_cancel_button(self.top.get_object("button15"))
+ self.define_ok_button(self.top.get_object("ok"), self.save)
+ self.define_help_button(self.top.get_object("button134"))
self.given.connect("focus_out_event", self._given_focus_out_event)
- self.top.get_widget("button177").connect("clicked",
+ self.top.get_object("button177").connect("clicked",
self._edit_name_clicked)
self.eventbox.connect('button-press-event',
@@ -224,12 +224,12 @@ class EditPerson(EditPrimary):
"""
self.private = widgets.PrivacyButton(
- self.top.get_widget('private'),
+ self.top.get_object('private'),
self.obj,
self.db.readonly)
self.gender = widgets.MonitoredMenu(
- self.top.get_widget('gender'),
+ self.top.get_object('gender'),
self.obj.set_gender,
self.obj.get_gender,
(
@@ -240,7 +240,7 @@ class EditPerson(EditPrimary):
self.db.readonly)
self.marker = widgets.MonitoredDataType(
- self.top.get_widget('marker'),
+ self.top.get_object('marker'),
self.obj.set_marker,
self.obj.get_marker,
self.db.readonly,
@@ -248,15 +248,15 @@ class EditPerson(EditPrimary):
)
self.ntype_field = widgets.MonitoredDataType(
- self.top.get_widget("ntype"),
+ self.top.get_object("ntype"),
self.pname.set_type,
self.pname.get_type,
self.db.readonly,
self.db.get_name_types())
self.prefix_suffix = widgets.MonitoredComboSelectedEntry(
- self.top.get_widget("prefixcmb"),
- self.top.get_widget("prefixentry"),
+ self.top.get_object("prefixcmb"),
+ self.top.get_object("prefixentry"),
[_('Prefix'), _('Suffix')],
[self.pname.set_surname_prefix, self.pname.set_suffix],
[self.pname.get_surname_prefix, self.pname.get_suffix],
@@ -264,8 +264,8 @@ class EditPerson(EditPrimary):
read_only = self.db.readonly)
self.patro_title = widgets.MonitoredComboSelectedEntry(
- self.top.get_widget("patrocmb"),
- self.top.get_widget("patroentry"),
+ self.top.get_object("patrocmb"),
+ self.top.get_object("patroentry"),
[_('Patronymic'), _('Person|Title')],
[self.pname.set_patronymic, self.pname.set_title],
[self.pname.get_patronymic, self.pname.get_title],
@@ -273,36 +273,36 @@ class EditPerson(EditPrimary):
read_only = self.db.readonly)
self.call = widgets.MonitoredEntry(
- self.top.get_widget("call"),
+ self.top.get_object("call"),
self.pname.set_call_name,
self.pname.get_call_name,
self.db.readonly)
self.given = widgets.MonitoredEntry(
- self.top.get_widget("given_name"),
+ self.top.get_object("given_name"),
self.pname.set_first_name,
self.pname.get_first_name,
self.db.readonly)
self.surname_field = widgets.MonitoredEntry(
- self.top.get_widget("surname"),
+ self.top.get_object("surname"),
self.pname.set_surname,
self.pname.get_surname,
self.db.readonly,
autolist=self.db.get_surname_list())
self.gid = widgets.MonitoredEntry(
- self.top.get_widget("gid"),
+ self.top.get_object("gid"),
self.obj.set_gramps_id,
self.obj.get_gramps_id,
self.db.readonly)
#make sure title updates automatically
- for obj in [self.top.get_widget("surname"),
- self.top.get_widget("given_name"),
- self.top.get_widget("patroentry"),
- self.top.get_widget("call"),
- self.top.get_widget("prefixentry"),
+ for obj in [self.top.get_object("surname"),
+ self.top.get_object("given_name"),
+ self.top.get_object("patroentry"),
+ self.top.get_object("call"),
+ self.top.get_object("prefixentry"),
]:
obj.connect('changed', self._changed_title)
@@ -396,7 +396,7 @@ class EditPerson(EditPrimary):
self._setup_notebook_tabs(notebook)
notebook.show_all()
- self.top.get_widget('vbox').pack_start(notebook, True)
+ self.top.get_object('vbox').pack_start(notebook, True)
def _changed_title(self, obj):
diff --git a/src/glade/edit_person.glade b/src/glade/edit_person.glade
index 9a0200639..3c807e8dc 100644
--- a/src/glade/edit_person.glade
+++ b/src/glade/edit_person.glade
@@ -1,852 +1,619 @@
-
-
-
-
-
-
- True
-
- GTK_WINDOW_TOPLEVEL
- GTK_WIN_POS_NONE
- False
- 500
- True
- False
- True
- False
- False
- GDK_WINDOW_TYPE_HINT_DIALOG
- GDK_GRAVITY_NORTH_WEST
- True
- False
- False
-
-
-
-
- True
- False
- 0
-
-
-
- True
- GTK_BUTTONBOX_END
-
-
-
- True
- Abandon changes and close window
- True
- True
- gtk-cancel
- True
- GTK_RELIEF_NORMAL
- True
- 0
-
-
-
-
-
-
- True
- Accept changes and close window
- True
- True
- True
- gtk-ok
- True
- GTK_RELIEF_NORMAL
- True
- 0
-
-
-
-
-
-
- True
- True
- True
- gtk-help
- True
- GTK_RELIEF_NORMAL
- True
- -11
-
-
-
-
-
- 0
- False
- True
- GTK_PACK_END
-
-
-
-
-
- True
- True
- False
-
-
-
- True
- 6
- 6
- False
- 6
- 12
-
-
-
- True
- _Family:
- True
- False
- GTK_JUSTIFY_CENTER
- False
- False
- 0
- 0.5
- 0
- 0
- surname
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 1
- 2
- fill
-
-
-
-
-
-
- True
- Gi_ven:
- True
- False
- GTK_JUSTIFY_CENTER
- False
- False
- 0
- 0.5
- 0
- 0
- given_name
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 2
- 3
- fill
-
-
-
-
-
-
- True
- _Gender:
- True
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- gender
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 5
- 6
- fill
-
-
-
-
-
-
- True
- False
- 0
-
-
-
- True
- <b>Preferred name</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- False
- False
-
-
-
-
-
- True
- <b> - </b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- False
- False
-
-
-
-
-
- True
- Edit the preferred name
- True
- GTK_RELIEF_NORMAL
- True
-
-
-
-
- True
- gtk-edit
- 4
- 0.5
- 0.5
- 0
- 0
-
-
-
-
- 0
- False
- False
-
-
-
-
- 0
- 4
- 0
- 1
- fill
- fill
-
-
-
-
-
- True
- _Type:
- True
- False
- GTK_JUSTIFY_CENTER
- False
- False
- 0
- 0.5
- 0
- 0
- ntype
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 1
- 2
- 3
- 4
- fill
-
-
-
-
-
-
- True
- part of a person's name indicating the family to which the person belongs
- True
- True
- True
- 0
-
- True
- *
- False
-
-
- 2
- 3
- 1
- 2
-
-
-
-
-
-
- True
- The person's given name
- True
- True
- True
- True
- 0
-
- True
- *
- False
-
-
-
- 2
- 3
- 2
- 3
-
-
-
-
-
-
- True
- False
- True
- True
-
-
- 2
- 3
- 3
- 4
- fill
- fill
-
-
-
-
-
- True
- Female
-Male
-Unknown
- False
- True
-
-
- 2
- 3
- 5
- 6
- fill
- fill
-
-
-
-
-
- True
- False
- 0
-
-
-
- True
- False
- True
-
-
- 0
- True
- True
-
-
-
-
-
- True
- :
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- prefixentry
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- False
- False
-
-
-
-
- 3
- 4
- 1
- 2
- fill
- fill
-
-
-
-
-
- True
- Call _Name:
- True
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- call
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 3
- 4
- 2
- 3
- fill
-
-
-
-
-
-
- True
- False
- 0
-
-
-
- True
-
- False
- True
-
-
- 0
- True
- True
-
-
-
-
-
- True
- :
- False
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- patroentry
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- False
- False
-
-
-
-
- 3
- 4
- 3
- 4
- fill
- fill
-
-
-
-
-
- True
- False
- 12
-
-
-
- True
- <b>General</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- False
- False
-
-
-
-
-
- True
- Indicates if the record is private
- True
- GTK_RELIEF_NONE
- True
- False
- False
-
-
-
- True
- 4
- gramps-unlock
- 0.5
- 0.5
- 0
- 0
-
-
-
-
- 0
- False
- False
-
-
-
-
- 0
- 4
- 4
- 5
- fill
- fill
-
-
-
-
-
- True
- Prefix: An optional prefix for the family name that is not used in sorting, such as "de" or "van"
-Suffix: An optional suffix to the name, such as "Jr." or "III"
- True
- True
- True
- 0
-
- True
- *
- False
- 6
-
-
- 4
- 5
- 1
- 2
-
-
-
-
-
-
- True
- Part of the Given name that is the normally used name.
- True
- True
- True
- 0
-
- True
- ●
- False
- 8
-
-
- 4
- 5
- 2
- 3
-
-
-
-
-
-
- True
- Patronimic: component of a personal name based on the name of one's father, grandfather, ....
+
+
+
+
+
-
- 4
- 5
- 3
- 4
-
-
-
-
-
-
- True
- False
- 5
-
-
-
- True
- _ID:
- True
- False
- GTK_JUSTIFY_RIGHT
- False
- False
- 0
- 0.5
- 0
- 0
- gid
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- False
- False
-
-
-
-
-
- True
- True
- True
- True
- 0
-
- True
- ●
- False
- 6
-
-
- 0
- True
- True
-
-
-
-
-
- True
- _Marker:
- True
- False
- GTK_JUSTIFY_LEFT
- False
- False
- 0
- 0.5
- 0
- 0
- marker
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- 0
- False
- False
-
-
-
-
-
- True
- False
- True
- True
-
-
- 0
- True
- True
-
-
-
-
- 3
- 6
- 5
- 6
- fill
- fill
-
-
-
-
-
- 124
- True
- 0
- 0.5
- GTK_SHADOW_ETCHED_IN
-
-
-
- True
- True
- False
-
-
-
- 120
- 100
- True
- 0.5
- 0.5
- 0
- 0
-
-
-
-
-
-
-
- True
- <b>Image</b>
- False
- True
- GTK_JUSTIFY_LEFT
- False
- False
- 0.5
- 0.5
- 0
- 0
- PANGO_ELLIPSIZE_NONE
- -1
- False
- 0
-
-
- label_item
-
-
-
-
- 5
- 6
- 0
- 4
- fill
- fill
-
-
-
-
-
-
- 10
- False
- False
-
-
-
-
-
-
-
+ 8
+
+
+ 4
+ 5
+ 3
+ 4
+
+
+
+
+
+ True
+ 5
+
+
+ True
+ 0
+ _ID:
+ True
+ right
+ gid
+
+
+ False
+ False
+ 0
+
+
+
+
+ True
+ True
+ ●
+ 6
+
+
+ 1
+
+
+
+
+ True
+ 0
+ _Marker:
+ True
+ marker
+
+
+ False
+ False
+ 2
+
+
+
+
+ True
+
+
+ 3
+
+
+
+
+ 3
+ 6
+ 5
+ 6
+ GTK_FILL
+ GTK_FILL
+
+
+
+
+ 124
+ True
+ 0
+
+
+ True
+
+
+ 120
+ 100
+ True
+
+
+
+
+
+
+ True
+ <b>Image</b>
+ True
+
+
+
+
+ 5
+ 6
+ 4
+ GTK_FILL
+ GTK_FILL
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ False
+ False
+ 10
+ 1
+
+
+
+
+ True
+ end
+
+
+ gtk-cancel
+ True
+ True
+ True
+ False
+ Abandon changes and close window
+ True
+
+
+
+ False
+ False
+ 0
+
+
+
+
+ gtk-ok
+ True
+ True
+ True
+ True
+ False
+ Accept changes and close window
+ True
+
+
+
+ False
+ False
+ 1
+
+
+
+
+ gtk-help
+ True
+ True
+ True
+ False
+ True
+
+
+
+ False
+ False
+ 2
+
+
+
+
+ False
+ end
+ 0
+
+
+
+
+
+ button15
+ ok
+ button134
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Female
+
+
+ Male
+
+
+ Unknown
+
+
+
+