* src/FamilyView.py (new_spouse_after_edit): Rename function (used
to be called spouse_after_edit); (add_spouse): Call new_spouse_after_edit. (spouse_after_edit): Add function to be called after editing existing spouse's personal data. Takes care of display issues only; (new_child_after_edit): Rename function (used to be called child_after_edit); (add_child_clicked): Call new_child_after_edit. (edit_relationship): Change callback to get consistent behavior. svn: r2245
This commit is contained in:
parent
a5d336fc1f
commit
9e56adc006
@ -13,6 +13,15 @@
|
|||||||
* src/gramps_main.py: Likewise.
|
* src/gramps_main.py: Likewise.
|
||||||
* src/Makefile.am, src/Makefile.in: Ship src/ArgHandler.py.
|
* src/Makefile.am, src/Makefile.in: Ship src/ArgHandler.py.
|
||||||
* NEWS: More items.
|
* NEWS: More items.
|
||||||
|
* src/FamilyView.py (new_spouse_after_edit): Rename function (used
|
||||||
|
to be called spouse_after_edit);
|
||||||
|
(add_spouse): Call new_spouse_after_edit.
|
||||||
|
(spouse_after_edit): Add function to be called after editing existing
|
||||||
|
spouse's personal data. Takes care of display issues only;
|
||||||
|
(new_child_after_edit): Rename function (used to be called
|
||||||
|
child_after_edit);
|
||||||
|
(add_child_clicked): Call new_child_after_edit.
|
||||||
|
(edit_relationship): Change callback to get consistent behavior.
|
||||||
|
|
||||||
2003-10-12 Don Allingham <dallingham@users.sourceforge.net>
|
2003-10-12 Don Allingham <dallingham@users.sourceforge.net>
|
||||||
* src/RelLib.py : support for capitalized name formats
|
* src/RelLib.py : support for capitalized name formats
|
||||||
|
@ -403,9 +403,10 @@ class FamilyView:
|
|||||||
|
|
||||||
def edit_relationship(self,obj,event):
|
def edit_relationship(self,obj,event):
|
||||||
if event.state & gtk.gdk.SHIFT_MASK and \
|
if event.state & gtk.gdk.SHIFT_MASK and \
|
||||||
event.type == gtk.gdk.BUTTON_PRESS and \
|
event.type == gtk.gdk.BUTTON_PRESS and \
|
||||||
event.button == 1 and self.selected_spouse:
|
event.button == 1 and self.selected_spouse:
|
||||||
self.parent.load_person(self.selected_spouse)
|
self.edit_spouse_callback(None)
|
||||||
|
|
||||||
elif event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
|
elif event.type == gtk.gdk.BUTTON_PRESS and event.button == 3:
|
||||||
if self.selected_spouse:
|
if self.selected_spouse:
|
||||||
self.build_spouse_menu()
|
self.build_spouse_menu()
|
||||||
@ -443,11 +444,23 @@ class FamilyView:
|
|||||||
else:
|
else:
|
||||||
person.setGender(RelLib.Person.male)
|
person.setGender(RelLib.Person.male)
|
||||||
try:
|
try:
|
||||||
EditPerson.EditPerson(person, self.parent.db, self.spouse_after_edit)
|
EditPerson.EditPerson(person, self.parent.db, self.new_spouse_after_edit)
|
||||||
except:
|
except:
|
||||||
DisplayTrace.DisplayTrace()
|
DisplayTrace.DisplayTrace()
|
||||||
|
|
||||||
def spouse_after_edit(self,epo,plist):
|
def spouse_after_edit(self,epo,plist):
|
||||||
|
ap = self.parent.active_person
|
||||||
|
if epo:
|
||||||
|
self.parent.db.buildPersonDisplay(epo.person.getId(),epo.original_id)
|
||||||
|
self.parent.people_view.remove_from_person_list(epo.person,epo.original_id)
|
||||||
|
self.parent.people_view.redisplay_person_list(epo.person)
|
||||||
|
for p in plist:
|
||||||
|
self.parent.place_view.new_place_after_edit(p)
|
||||||
|
|
||||||
|
self.parent.active_person = ap
|
||||||
|
self.load_family(self.family)
|
||||||
|
|
||||||
|
def new_spouse_after_edit(self,epo,plist):
|
||||||
if epo.person.getId() == "":
|
if epo.person.getId() == "":
|
||||||
self.parent.db.addPerson(epo.person)
|
self.parent.db.addPerson(epo.person)
|
||||||
else:
|
else:
|
||||||
@ -491,7 +504,7 @@ class FamilyView:
|
|||||||
person.getPrimaryName().setSurnamePrefix(name[0])
|
person.getPrimaryName().setSurnamePrefix(name[0])
|
||||||
|
|
||||||
try:
|
try:
|
||||||
EditPerson.EditPerson(person, self.parent.db, self.child_after_edit)
|
EditPerson.EditPerson(person, self.parent.db, self.new_child_after_edit)
|
||||||
except:
|
except:
|
||||||
DisplayTrace.DisplayTrace()
|
DisplayTrace.DisplayTrace()
|
||||||
|
|
||||||
@ -509,7 +522,7 @@ class FamilyView:
|
|||||||
self.parent.update_person_list(person)
|
self.parent.update_person_list(person)
|
||||||
self.load_family(self.family)
|
self.load_family(self.family)
|
||||||
|
|
||||||
def child_after_edit(self,epo,plist):
|
def new_child_after_edit(self,epo,plist):
|
||||||
|
|
||||||
if epo.person.getId() == "":
|
if epo.person.getId() == "":
|
||||||
self.parent.db.addPerson(epo.person)
|
self.parent.db.addPerson(epo.person)
|
||||||
|
Loading…
Reference in New Issue
Block a user