A new person editor
svn: r15951
This commit is contained in:
@@ -211,7 +211,6 @@ register('interface.note-height', 500)
|
||||
register('interface.note-sel-height', 450)
|
||||
register('interface.note-sel-width', 600)
|
||||
register('interface.note-width', 700)
|
||||
register('interface.patro-title', 0)
|
||||
register('interface.pedview-layout', 0)
|
||||
register('interface.pedview-show-images', True)
|
||||
register('interface.pedview-show-marriage', False)
|
||||
@@ -228,7 +227,6 @@ register('interface.place-height', 450)
|
||||
register('interface.place-sel-height', 450)
|
||||
register('interface.place-sel-width', 600)
|
||||
register('interface.place-width', 650)
|
||||
register('interface.prefix-suffix', 0)
|
||||
register('interface.repo-height', 450)
|
||||
register('interface.repo-ref-height', 450)
|
||||
register('interface.repo-ref-width', 600)
|
||||
|
@@ -361,6 +361,13 @@ class DbReadBase(object):
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def get_origin_types(self):
|
||||
"""
|
||||
Return a list of all custom origin types associated with Person/Surname
|
||||
instances in the database.
|
||||
"""
|
||||
raise NotImplementedError
|
||||
|
||||
def get_note_bookmarks(self):
|
||||
"""
|
||||
Return the list of Note handles in the bookmarks.
|
||||
|
@@ -297,6 +297,7 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
self.family_rel_types = set()
|
||||
self.event_role_names = set()
|
||||
self.name_types = set()
|
||||
self.origin_types = set()
|
||||
self.repository_types = set()
|
||||
self.note_types = set()
|
||||
self.source_media_types = set()
|
||||
@@ -1267,6 +1268,13 @@ class DbBsddbRead(DbReadBase, Callback):
|
||||
"""
|
||||
return list(self.name_types)
|
||||
|
||||
def get_origin_types(self):
|
||||
"""
|
||||
Return a list of all custom origin types assocated with Person/Surname
|
||||
instances in the database.
|
||||
"""
|
||||
return list(self.origin_types)
|
||||
|
||||
def get_repository_types(self):
|
||||
"""
|
||||
Return a list of all custom repository types assocated with Repository
|
||||
|
@@ -555,6 +555,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
self.family_rel_types = set(meta('family_rels'))
|
||||
self.event_role_names = set(meta('event_roles'))
|
||||
self.name_types = set(meta('name_types'))
|
||||
self.origin_types = set(meta('origin_types'))
|
||||
self.repository_types = set(meta('repo_types'))
|
||||
self.note_types = set(meta('note_types'))
|
||||
self.source_media_types = set(meta('sm_types'))
|
||||
@@ -980,6 +981,7 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
txn.put('family_rels', list(self.family_rel_types))
|
||||
txn.put('event_roles', list(self.event_role_names))
|
||||
txn.put('name_types', list(self.name_types))
|
||||
txn.put('origin_types', list(self.origin_types))
|
||||
txn.put('repo_types', list(self.repository_types))
|
||||
txn.put('note_types', list(self.note_types))
|
||||
txn.put('sm_types', list(self.source_media_types))
|
||||
@@ -1426,6 +1428,12 @@ class DbBsddb(DbBsddbRead, DbWriteBase, UpdateCallback):
|
||||
+ person.alternate_names)
|
||||
if name.type.is_custom()])
|
||||
|
||||
all_surn = person.primary_name.get_surname_list()
|
||||
for asurname in person.alternate_names:
|
||||
all_surn += asurname.get_surname_list()
|
||||
self.origin_types.update([str(surn.origintype) for surn in all_surn
|
||||
if surn.origintype.is_custom()])
|
||||
|
||||
self.url_types.update([str(url.type) for url in person.urls
|
||||
if url.type.is_custom()])
|
||||
|
||||
|
@@ -581,6 +581,11 @@ class ProxyDbBase(DbReadBase):
|
||||
instances in the database"""
|
||||
return self.db.get_name_types()
|
||||
|
||||
def get_origin_types(self):
|
||||
"""returns a list of all custom origin types associated with Person/Surname
|
||||
instances in the database"""
|
||||
return self.db.get_origin_types()
|
||||
|
||||
def get_repository_types(self):
|
||||
"""returns a list of all custom repository types associated with
|
||||
Repository instances in the database"""
|
||||
|
@@ -16,65 +16,14 @@
|
||||
<object class="GtkEventBox" id="eventboxtop">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkTable" id="table15">
|
||||
<object class="GtkVBox" id="vbox1">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">7</property>
|
||||
<property name="n_columns">6</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<property name="row_spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label22">
|
||||
<object class="GtkHBox" id="hbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">_Family:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="mnemonic_widget">surname</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label21">
|
||||
<object class="GtkVBox" id="vbox2">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Gi_ven:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="mnemonic_widget">given_name</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label436">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">_Gender:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">gender</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="bottom_attach">6</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox110">
|
||||
<property name="visible">True</property>
|
||||
@@ -105,11 +54,10 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="button177">
|
||||
<object class="GtkButton" id="editnamebtn">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Edit the preferred name</property>
|
||||
<property name="receives_default">True</property>
|
||||
<signal name="clicked" handler="on_edit_name_clicked"/>
|
||||
<child>
|
||||
<object class="GtkImage" id="image2261">
|
||||
@@ -124,59 +72,28 @@
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label9">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label269">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="xalign">1</property>
|
||||
<property name="xpad">4</property>
|
||||
<property name="label" translatable="yes">_Type:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="mnemonic_widget">ntype</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="UndoableEntry" id="surname">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">part of a person's name indicating the family to which the person belongs</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="UndoableEntry" id="given_name">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="has_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">The person's given name</property>
|
||||
<signal name="focus_out_event" handler="on_given_focus_out"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="y_options"></property>
|
||||
<property name="expand">False</property>
|
||||
<property name="padding">8</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -184,65 +101,79 @@
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="gender">
|
||||
<property name="visible">True</property>
|
||||
<property name="model">liststore2</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext2"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="bottom_attach">6</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox112">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="prefixcmb">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label446">
|
||||
<property name="visible">True</property>
|
||||
<property name="label"> :</property>
|
||||
<property name="mnemonic_widget">prefixentry</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">1</property>
|
||||
<property name="padding">3</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="givenframe">
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0.029999999329447746</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment2">
|
||||
<property name="visible">True</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkTable" id="table2">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_columns">6</property>
|
||||
<property name="column_spacing">7</property>
|
||||
<property name="row_spacing">7</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label21">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Gi_ven:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="justify">center</property>
|
||||
<property name="mnemonic_widget">given_name</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="titlelabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">_Title:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">title</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label4">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">Suffi_x:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">suffix</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -254,26 +185,115 @@
|
||||
<property name="mnemonic_widget">call</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="left_attach">4</property>
|
||||
<property name="right_attach">5</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox113">
|
||||
<object class="UndoableEntry" id="given_name">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">The person's given names</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<signal name="focus_out_event" handler="on_given_focus_out"/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBox" id="patrocmb">
|
||||
<object class="GtkLabel" id="label6">
|
||||
<property name="visible">True</property>
|
||||
<property name="model">liststore1</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">N_ick Name:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">nickname</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">4</property>
|
||||
<property name="right_attach">5</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext1"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
<object class="ValidatableMaskedEntry" id="call">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Part of the Given name that is the normally used name.</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">5</property>
|
||||
<property name="right_attach">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="UndoableEntry" id="title">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">A title used to refer to the person, such as 'Dr.' or 'Rev.'</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="UndoableEntry" id="suffix">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">An optional suffix to the name, such as "Jr." or "III"</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="UndoableEntry" id="nickname">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">A descriptive name given in place of or in addition to the official given name.</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">5</property>
|
||||
<property name="right_attach">6</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label3">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><i>Given Name(s) </i></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="padding">3</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
@@ -281,27 +301,238 @@
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label447">
|
||||
<object class="GtkFrame" id="frame5">
|
||||
<property name="width_request">124</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label"> :</property>
|
||||
<property name="mnemonic_widget">patroentry</property>
|
||||
<property name="label_xalign">2.2351741291171123e-10</property>
|
||||
<child>
|
||||
<object class="GtkEventBox" id="eventbox1">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="personPix">
|
||||
<property name="width_request">120</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label270">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Image</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="padding">5</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="surnamefr">
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0.029999999329447746</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment1">
|
||||
<property name="visible">True</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkVBox" id="vbox3">
|
||||
<property name="visible">True</property>
|
||||
<property name="spacing">5</property>
|
||||
<child>
|
||||
<object class="GtkTable" id="table1">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">2</property>
|
||||
<property name="n_columns">4</property>
|
||||
<property name="column_spacing">7</property>
|
||||
<property name="row_spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkLabel" id="prefixlabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Prefix</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">prefix</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="surnamelabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Surname</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">surname</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="originlabel">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Origin</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">cmborigin</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="UndoableEntry" id="surname">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">part of a person's name indicating the family to which the person belongs</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkComboBoxEntry" id="cmborigin">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip_text" translatable="yes">The origin of the family name of this family, eg 'Inherited' or 'Patronymic'.</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkButton" id="multsurnamebtn">
|
||||
<property name="label" translatable="yes">Use _Multiple Surnames</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_underline">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options"></property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="UndoableEntry" id="prefix">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">An optional prefix for the family that is not used in sorting, such as "de" or "van".</property>
|
||||
<property name="invisible_char">●</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label10">
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="x_options"></property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label2">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><i>Family Name </i></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="padding">2</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="multsurnamefr">
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0.029999999329447746</property>
|
||||
<property name="shadow_type">none</property>
|
||||
<child>
|
||||
<object class="GtkAlignment" id="alignment3">
|
||||
<property name="visible">True</property>
|
||||
<property name="left_padding">12</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hboxmultsurnames">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label5">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><i>Family Names </i></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="padding">2</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkTable" id="table15">
|
||||
<property name="visible">True</property>
|
||||
<property name="n_rows">3</property>
|
||||
<property name="n_columns">6</property>
|
||||
<property name="column_spacing">9</property>
|
||||
<property name="row_spacing">4</property>
|
||||
<child>
|
||||
<object class="GtkHBox" id="hbox114">
|
||||
<property name="visible">True</property>
|
||||
@@ -323,8 +554,7 @@
|
||||
<object class="GtkToggleButton" id="private">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="tooltip_text" translatable="yes">Indicates if the record is private</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="relief">none</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="image2262">
|
||||
@@ -342,58 +572,28 @@
|
||||
</object>
|
||||
<packing>
|
||||
<property name="right_attach">4</property>
|
||||
<property name="top_attach">4</property>
|
||||
<property name="bottom_attach">5</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="UndoableEntry" id="prefixentry">
|
||||
<object class="GtkComboBox" id="gender">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">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"</property>
|
||||
<property name="width_chars">6</property>
|
||||
<property name="model">liststore2</property>
|
||||
<child>
|
||||
<object class="GtkCellRendererText" id="cellrenderertext2"/>
|
||||
<attributes>
|
||||
<attribute name="text">0</attribute>
|
||||
</attributes>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">4</property>
|
||||
<property name="right_attach">5</property>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">3</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="UndoableEntry" id="call">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Part of the Given name that is the normally used name. </property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="width_chars">8</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">4</property>
|
||||
<property name="right_attach">5</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="UndoableEntry" id="patroentry">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">Patronimic: component of a personal name based on the name of one's father, grandfather, ....
|
||||
Title: A title used to refer to the person, such as 'Dr.' or 'Rev.'</property>
|
||||
<property name="width_chars">8</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">4</property>
|
||||
<property name="right_attach">5</property>
|
||||
<property name="top_attach">3</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="y_options"></property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -419,6 +619,7 @@ Title: A title used to refer to the person, such as 'Dr.' or 'Rev.'</property>
|
||||
<object class="UndoableEntry" id="gid">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes">A unique ID of the person.</property>
|
||||
<property name="invisible_char">●</property>
|
||||
<property name="width_chars">6</property>
|
||||
</object>
|
||||
@@ -452,43 +653,10 @@ Title: A title used to refer to the person, such as 'Dr.' or 'Rev.'</property>
|
||||
<packing>
|
||||
<property name="left_attach">3</property>
|
||||
<property name="right_attach">6</property>
|
||||
<property name="top_attach">5</property>
|
||||
<property name="bottom_attach">6</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkFrame" id="frame5">
|
||||
<property name="width_request">124</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="label_xalign">0</property>
|
||||
<child>
|
||||
<object class="GtkEventBox" id="eventbox1">
|
||||
<property name="visible">True</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="personPix">
|
||||
<property name="width_request">120</property>
|
||||
<property name="height_request">100</property>
|
||||
<property name="visible">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<child type="label">
|
||||
<object class="GtkLabel" id="label270">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes"><b>Image</b></property>
|
||||
<property name="use_markup">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">5</property>
|
||||
<property name="right_attach">6</property>
|
||||
<property name="bottom_attach">4</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -501,8 +669,10 @@ Title: A title used to refer to the person, such as 'Dr.' or 'Rev.'</property>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="bottom_attach">7</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -524,7 +694,6 @@ Title: A title used to refer to the person, such as 'Dr.' or 'Rev.'</property>
|
||||
<child>
|
||||
<object class="GtkImage" id="tag_image">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gramps-tag</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
@@ -538,8 +707,26 @@ Title: A title used to refer to the person, such as 'Dr.' or 'Rev.'</property>
|
||||
<packing>
|
||||
<property name="left_attach">2</property>
|
||||
<property name="right_attach">6</property>
|
||||
<property name="top_attach">6</property>
|
||||
<property name="bottom_attach">7</property>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="label436">
|
||||
<property name="visible">True</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="label" translatable="yes">_Gender:</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="mnemonic_widget">gender</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="right_attach">2</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options">GTK_FILL</property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@@ -549,22 +736,35 @@ Title: A title used to refer to the person, such as 'Dr.' or 'Rev.'</property>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
<object class="GtkLabel" id="label7">
|
||||
<property name="visible">True</property>
|
||||
<property name="xpad">10</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="bottom_attach">2</property>
|
||||
<property name="x_options"></property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
<object class="GtkLabel" id="label8">
|
||||
<property name="visible">True</property>
|
||||
<property name="xpad">10</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="top_attach">2</property>
|
||||
<property name="bottom_attach">3</property>
|
||||
<property name="x_options"></property>
|
||||
<property name="y_options"></property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child>
|
||||
<placeholder/>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
@@ -572,7 +772,6 @@ Title: A title used to refer to the person, such as 'Dr.' or 'Rev.'</property>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="padding">10</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
@@ -142,10 +142,12 @@ 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.singlesurn_active = True
|
||||
|
||||
self.set_contexteventbox(self.top.get_object("eventboxtop"))
|
||||
|
||||
|
||||
def _post_init(self):
|
||||
"""
|
||||
Handle any initialization that needs to be done after the interface is
|
||||
@@ -157,10 +159,13 @@ class EditPerson(EditPrimary):
|
||||
|
||||
"""
|
||||
self.load_person_image()
|
||||
if self.pname.get_surname() and not self.pname.get_first_name():
|
||||
self.given.grab_focus()
|
||||
else:
|
||||
self.surname_field.grab_focus()
|
||||
|
||||
self.multsurnfr.hide_all()
|
||||
#if self.pname.get_surname() and not self.pname.get_first_name():
|
||||
# self.given.grab_focus()
|
||||
#else:
|
||||
# self.surname_field.grab_focus()
|
||||
|
||||
def _connect_signals(self):
|
||||
"""
|
||||
@@ -172,7 +177,7 @@ class EditPerson(EditPrimary):
|
||||
self.define_help_button(self.top.get_object("button134"))
|
||||
|
||||
self.given.connect("focus_out_event", self._given_focus_out_event)
|
||||
self.top.get_object("button177").connect("clicked",
|
||||
self.top.get_object("editnamebtn").connect("clicked",
|
||||
self._edit_name_clicked)
|
||||
|
||||
self.eventbox.connect('button-press-event',
|
||||
@@ -228,6 +233,11 @@ class EditPerson(EditPrimary):
|
||||
# we just rebuild the view always
|
||||
self.event_list.rebuild_callback()
|
||||
|
||||
def _validate_call(self, widget, text):
|
||||
""" a callname must be a part of the given name, see if this is the
|
||||
case """
|
||||
return text in self.given.obj.get_text().split()
|
||||
|
||||
def _setup_fields(self):
|
||||
"""
|
||||
Connect the GrampsWidget objects to field in the interface.
|
||||
@@ -268,43 +278,55 @@ class EditPerson(EditPrimary):
|
||||
self.db.readonly,
|
||||
self.db.get_name_types())
|
||||
|
||||
self.prefix_suffix = widgets.MonitoredComboSelectedEntry(
|
||||
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],
|
||||
default = config.get('interface.prefix-suffix'),
|
||||
read_only = self.db.readonly)
|
||||
|
||||
self.patro_title = widgets.MonitoredComboSelectedEntry(
|
||||
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],
|
||||
default = config.get('interface.patro-title'),
|
||||
read_only = self.db.readonly)
|
||||
|
||||
self.call = widgets.MonitoredEntry(
|
||||
self.top.get_object("call"),
|
||||
self.pname.set_call_name,
|
||||
self.pname.get_call_name,
|
||||
self.db.readonly)
|
||||
|
||||
#part of Given Name section
|
||||
self.given = widgets.MonitoredEntry(
|
||||
self.top.get_object("given_name"),
|
||||
self.pname.set_first_name,
|
||||
self.pname.get_first_name,
|
||||
self.db.readonly)
|
||||
|
||||
self.call = widgets.MonitoredEntry(
|
||||
self.top.get_object("call"),
|
||||
self.pname.set_call_name,
|
||||
self.pname.get_call_name,
|
||||
self.db.readonly)
|
||||
self.call.connect("validate", self._validate_call)
|
||||
|
||||
self.title = widgets.MonitoredEntry(
|
||||
self.top.get_object("title"),
|
||||
self.pname.set_title,
|
||||
self.pname.get_title,
|
||||
self.db.readonly)
|
||||
|
||||
self.suffix = widgets.MonitoredEntry(
|
||||
self.top.get_object("suffix"),
|
||||
self.pname.set_suffix,
|
||||
self.pname.get_suffix,
|
||||
self.db.readonly)
|
||||
|
||||
#part of Single Surname section
|
||||
self.surname_field = widgets.MonitoredEntry(
|
||||
self.top.get_object("surname"),
|
||||
self.pname.set_surname,
|
||||
self.pname.get_surname,
|
||||
self.pname.get_primary_surname().set_surname,
|
||||
self.pname.get_primary_surname().get_surname,
|
||||
self.db.readonly,
|
||||
autolist=self.db.get_surname_list() if not self.db.readonly else [])
|
||||
|
||||
self.prefix = widgets.MonitoredEntry(
|
||||
self.top.get_object("prefix"),
|
||||
self.pname.get_primary_surname().set_prefix,
|
||||
self.pname.get_primary_surname().get_prefix,
|
||||
self.db.readonly)
|
||||
|
||||
self.ortype_field = widgets.MonitoredDataType(
|
||||
self.top.get_object("cmborigin"),
|
||||
self.pname.get_primary_surname().set_origintype,
|
||||
self.pname.get_primary_surname().get_origintype,
|
||||
self.db.readonly,
|
||||
self.db.get_origin_types())
|
||||
|
||||
#other fields
|
||||
|
||||
self.tags = widgets.MonitoredTagList(
|
||||
self.top.get_object("tag_label"),
|
||||
self.top.get_object("tag_button"),
|
||||
@@ -321,11 +343,11 @@ class EditPerson(EditPrimary):
|
||||
self.db.readonly)
|
||||
|
||||
#make sure title updates automatically
|
||||
for obj in [self.top.get_object("surname"),
|
||||
self.top.get_object("given_name"),
|
||||
self.top.get_object("patroentry"),
|
||||
for obj in [self.top.get_object("given_name"),
|
||||
self.top.get_object("call"),
|
||||
self.top.get_object("prefixentry"),
|
||||
self.top.get_object("suffix"),
|
||||
self.top.get_object("prefix"),
|
||||
self.top.get_object("surname"),
|
||||
]:
|
||||
obj.connect('changed', self._changed_name)
|
||||
|
||||
@@ -894,9 +916,8 @@ class EditPerson(EditPrimary):
|
||||
return child_ref_list
|
||||
|
||||
def _cleanup_on_exit(self):
|
||||
config.set('interface.prefix-suffix', self.prefix_suffix.active_key)
|
||||
config.set('interface.patro-title', self.patro_title.active_key)
|
||||
config.save()
|
||||
pass
|
||||
#config.save()
|
||||
|
||||
|
||||
class GenderDialog(gtk.MessageDialog):
|
||||
|
@@ -211,6 +211,7 @@ class DbGrdb(Callback):
|
||||
self.family_rel_types = set()
|
||||
self.event_role_names = set()
|
||||
self.name_types = set()
|
||||
self.origin_types = set()
|
||||
self.repository_types = set()
|
||||
self.note_types = set()
|
||||
self.source_media_types = set()
|
||||
|
Reference in New Issue
Block a user