diff --git a/gramps/src/EditPerson.py b/gramps/src/EditPerson.py
index 7f2a336ee..49469720e 100644
--- a/gramps/src/EditPerson.py
+++ b/gramps/src/EditPerson.py
@@ -1139,6 +1139,7 @@ def save_person(obj):
del m[person.getId()]
m[idval] = person
person.setId(idval)
+ utils.modified()
else:
n = Config.nameof(m[idval])
msg1 = _("GRAMPS ID value was not changed.")
diff --git a/gramps/src/Marriage.py b/gramps/src/Marriage.py
index 60308213d..f57eadce2 100644
--- a/gramps/src/Marriage.py
+++ b/gramps/src/Marriage.py
@@ -107,6 +107,7 @@ class Marriage:
self.descr_field = self.get_widget("marriageDescription")
self.type_field = self.get_widget("marriage_type")
self.notes_field = self.get_widget("marriageNotes")
+ self.gid = self.get_widget("gid")
self.attr_list = self.get_widget("attr_list")
self.attr_type = self.get_widget("attr_type")
self.attr_value = self.get_widget("attr_value")
@@ -126,6 +127,8 @@ class Marriage:
self.type_field.set_popdown_strings(const.familyRelations)
frel = const.display_frel(family.getRelationship())
self.type_field.entry.set_text(frel)
+ self.gid.set_text(family.getId())
+ self.gid.set_editable(Config.id_edit)
# stored object data
top_window.set_data(MARRIAGE,self)
@@ -232,6 +235,10 @@ def did_data_change(obj):
if family_obj.lists_changed:
changed = 1
+ idval = family_obj.gid.get_text()
+ if family_obj.family.getId() != idval:
+ changed = 1
+
return changed
#-------------------------------------------------------------------------
@@ -283,6 +290,20 @@ def on_delete_event(obj,b):
def on_close_marriage_editor(obj):
family_obj = obj.get_data(MARRIAGE)
+ idval = family_obj.gid.get_text()
+ family = family_obj.family
+ if idval != family.getId():
+ m = family_obj.db.getFamilyMap()
+ if not m.has_key(idval):
+ if m.has_key(family.getId()):
+ del m[family.getId()]
+ m[idval] = family
+ family.setId(idval)
+ utils.modified()
+ else:
+ msg1 = _("GRAMPS ID value was not changed.")
+ GnomeWarningDialog("%s" % msg1)
+
relation = family_obj.type_field.entry.get_text()
if const.save_frel(relation) != family_obj.family.getRelationship():
father = family_obj.family.getFather()
diff --git a/gramps/src/gramps.glade b/gramps/src/gramps.glade
index 7272b92e3..b1b29aadc 100644
--- a/gramps/src/gramps.glade
+++ b/gramps/src/gramps.glade
@@ -2934,6 +2934,7 @@
GtkVBox
vbox13
+ 475
False
0
@@ -2983,7 +2984,6 @@
GtkLabel
mlabel
- 100
GTK_JUSTIFY_CENTER
False
@@ -3013,6 +3013,25 @@
True
+
+
+ GtkButton
+ button123
+ True
+
+ clicked
+ on_addmother_clicked
+
+ Thu, 27 Sep 2001 23:08:17 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+ 5
+ False
+ False
+
+
@@ -3158,7 +3177,6 @@ Unknown
GtkLabel
flabel
- 100
GTK_JUSTIFY_CENTER
False
@@ -3187,6 +3205,25 @@ Unknown
True
+
+
+ GtkButton
+ button124
+ True
+
+ clicked
+ on_addfather_clicked
+
+ Thu, 27 Sep 2001 23:08:33 GMT
+
+
+ GTK_RELIEF_NORMAL
+
+ 5
+ False
+ False
+
+
@@ -5705,4 +5742,311 @@ Unknown
+
+ GnomeDialog
+ addperson
+ Gramps - Edit Person
+ GTK_WINDOW_TOPLEVEL
+ GTK_WIN_POS_NONE
+ True
+ False
+ True
+ False
+ False
+ False
+
+
+ GtkVBox
+ GnomeDialog:vbox
+ vbox42
+ False
+ 0
+
+ 4
+ True
+ True
+
+
+
+ GtkHButtonBox
+ GnomeDialog:action_area
+ hbuttonbox25
+ GTK_BUTTONBOX_END
+ 8
+ 85
+ 27
+ 7
+ 0
+
+ 0
+ True
+ True
+ GTK_PACK_END
+
+
+
+ GtkButton
+ button121
+ True
+ True
+ True
+
+ clicked
+ on_addfather_close
+
+ Thu, 27 Sep 2001 23:21:01 GMT
+
+ GNOME_STOCK_BUTTON_OK
+
+
+
+ GtkButton
+ button122
+ True
+ True
+
+ clicked
+ destroy_passed_object
+
+ Wed, 14 Feb 2001 02:53:18 GMT
+
+ GNOME_STOCK_BUTTON_CANCEL
+
+
+
+
+ GtkVBox
+ vbox43
+ False
+ 0
+
+ 0
+ True
+ True
+
+
+
+ GtkLabel
+ label239
+
+ GTK_JUSTIFY_CENTER
+ False
+ 0.5
+ 0.5
+ 0
+ 0
+
+ 5
+ False
+ False
+
+
+
+
+ GtkHSeparator
+ hseparator23
+
+ 10
+ False
+ True
+
+
+
+
+ GtkTable
+ table26
+ 3
+ 2
+ False
+ 0
+ 0
+
+ 0
+ True
+ True
+
+
+
+ GtkLabel
+ label240
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 0
+ 1
+ 1
+ 2
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkLabel
+ label241
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 0
+ 1
+ 2
+ 3
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkEntry
+ given
+ 250
+ True
+ True
+ True
+ True
+ 0
+
+
+ 1
+ 2
+ 0
+ 1
+ 5
+ 0
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkEntry
+ surname
+ True
+ True
+ True
+ 0
+
+
+ 1
+ 2
+ 1
+ 2
+ 5
+ 0
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkHBox
+ hbox32
+ True
+ 0
+
+ 1
+ 2
+ 2
+ 3
+ 5
+ 0
+ False
+ False
+ False
+ False
+ True
+ True
+
+
+
+ GtkRadioButton
+ male
+ True
+
+ False
+ True
+ childGender
+
+ 0
+ False
+ True
+
+
+
+
+ GtkRadioButton
+ female
+ True
+
+ True
+ True
+ childGender
+
+ 0
+ False
+ True
+
+
+
+
+
+ GtkLabel
+ label242
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 0
+ 1
+ 0
+ 1
+ 5
+ 5
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+
+
+
diff --git a/gramps/src/gramps_main.py b/gramps/src/gramps_main.py
index 5703db8c3..4037cd6fd 100755
--- a/gramps/src/gramps_main.py
+++ b/gramps/src/gramps_main.py
@@ -679,6 +679,8 @@ def on_choose_parents_clicked(obj):
"on_motherList_select_row" : on_mother_list_select_row,
"on_fatherList_select_row" : on_father_list_select_row,
"on_save_parents_clicked" : on_save_parents_clicked,
+ "on_addmother_clicked" : on_addmother_clicked,
+ "on_addfather_clicked" : on_addfather_clicked,
"on_prel_changed" : on_prel_changed,
"destroy_passed_object" : utils.destroy_passed_object
})
@@ -1476,6 +1478,53 @@ def load_new_person(obj):
active_person = Person()
EditPerson.EditPerson(active_person,database,new_after_edit)
+def on_addfather_clicked(obj):
+ xml = libglade.GladeXML(const.gladeFile,"addperson")
+ top = xml.get_widget("addperson")
+ xml.get_widget("male").set_active(1)
+ xml.signal_autoconnect({
+ "on_addfather_close": on_addparent_close,
+ "destroy_passed_object" : utils.destroy_passed_object
+ })
+ top.set_data("o",obj)
+ top.set_data("xml",xml)
+
+def on_addmother_clicked(obj):
+ xml = libglade.GladeXML(const.gladeFile,"addperson")
+ top = xml.get_widget("addperson")
+ xml.get_widget("female").set_active(1)
+ xml.signal_autoconnect({
+ "on_addfather_close": on_addparent_close,
+ "destroy_passed_object" : utils.destroy_passed_object
+ })
+ top.set_data("o",obj)
+ top.set_data("xml",xml)
+
+def on_addparent_close(obj):
+ global select_father
+ global select_mother
+
+ prel = obj.get_data("o")
+ xml = obj.get_data("xml")
+ surname = xml.get_widget("surname").get_text()
+ given = xml.get_widget("given").get_text()
+ person = Person()
+ database.addPerson(person)
+ name = Name()
+ name.setSurname(surname)
+ name.setFirstName(given)
+ person.setPrimaryName(name)
+ if xml.get_widget("male").get_active():
+ person.setGender(Person.male)
+ select_father = person
+ else:
+ person.setGender(Person.female)
+ select_mother = person
+ utils.modified()
+
+ on_prel_changed(prel)
+ utils.destroy_passed_object(obj)
+
#-------------------------------------------------------------------------
#
#
diff --git a/gramps/src/marriage.glade b/gramps/src/marriage.glade
index bf9bb3c67..99829d3ac 100644
--- a/gramps/src/marriage.glade
+++ b/gramps/src/marriage.glade
@@ -130,7 +130,7 @@
GtkHBox
- hbox15
+ hbox16
False
0
@@ -140,47 +140,130 @@
- GtkLabel
- label202
-
- GTK_JUSTIFY_CENTER
- False
- 0.5
- 0.5
- 0
- 10
-
- 4
- False
- False
-
-
-
-
- GtkCombo
- marriage_type
- False
- True
- False
- True
- False
-
+ GtkTable
+ table10
+ 2
+ 2
+ False
+ 0
+ 0
5
True
True
+
+ GtkLabel
+ label202
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 0
+ 1
+ 0
+ 1
+ 0
+ 0
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
+
+ GtkCombo
+ marriage_type
+ False
+ True
+ False
+ True
+ False
+
+
+ 1
+ 2
+ 0
+ 1
+ 0
+ 0
+ True
+ False
+ False
+ False
+ True
+ False
+
+
+
+ GtkEntry
+ GtkCombo:entry
+ combo-entry1
+ True
+ True
+ True
+ True
+ 0
+
+
+
+
+
+ GtkLabel
+ label229
+
+ GTK_JUSTIFY_CENTER
+ False
+ 1
+ 0.5
+ 5
+ 5
+
+ 0
+ 1
+ 1
+ 2
+ 0
+ 0
+ False
+ False
+ False
+ False
+ True
+ False
+
+
+
GtkEntry
- GtkCombo:entry
- combo-entry1
+ gid
True
- True
- True
+ False
True
0
+
+ 1
+ 2
+ 1
+ 2
+ 0
+ 0
+ True
+ False
+ False
+ False
+ True
+ False
+
diff --git a/gramps/src/plugins/gedcomexport.glade b/gramps/src/plugins/gedcomexport.glade
index 512951bbc..16bcf0c06 100644
--- a/gramps/src/plugins/gedcomexport.glade
+++ b/gramps/src/plugins/gedcomexport.glade
@@ -249,7 +249,7 @@
private
3
True
-
+
True
True
diff --git a/gramps/src/plugins/pafexport.glade b/gramps/src/plugins/pafexport.glade
index ee6b24729..00e83b56b 100644
--- a/gramps/src/plugins/pafexport.glade
+++ b/gramps/src/plugins/pafexport.glade
@@ -293,7 +293,7 @@
private
3
True
-
+
True
True
diff --git a/gramps/src/plugins/webpage.glade b/gramps/src/plugins/webpage.glade
index f85d9f9bb..cb816eab4 100644
--- a/gramps/src/plugins/webpage.glade
+++ b/gramps/src/plugins/webpage.glade
@@ -427,7 +427,7 @@
private
3
True
-
+
True
True