* src/ChooseParents.py (ChooseParents.__init__): Revert the dialog

back to being non-modal (otherwise adding new people is impossible).


svn: r2363
This commit is contained in:
Alex Roitman 2003-11-23 20:32:40 +00:00
parent 574eecb679
commit 247b04c2e1
2 changed files with 9 additions and 9 deletions

View File

@ -1,3 +1,7 @@
2003-11-23 Alex Roitman <shura@alex.neuro.umn.edu>
* src/ChooseParents.py (ChooseParents.__init__): Revert the dialog
back to being non-modal (otherwise adding new people is impossible).
2003-11-21 Alex Roitman <shura@alex.neuro.umn.edu> 2003-11-21 Alex Roitman <shura@alex.neuro.umn.edu>
* src/po/fr.po: Fix format line. * src/po/fr.po: Fix format line.

View File

@ -66,7 +66,7 @@ class ChooseParents:
Displays the Choose Parents dialog box, allowing the parents Displays the Choose Parents dialog box, allowing the parents
to be edited. to be edited.
""" """
def __init__(self,db,person,family,family_update,full_update,parent_window=None): def __init__(self,db,person,family,family_update,full_update):
""" """
Creates a ChoosePerson dialog box. Creates a ChoosePerson dialog box.
@ -139,20 +139,15 @@ class ChooseParents:
self.redrawm() self.redrawm()
self.glade.signal_autoconnect({ self.glade.signal_autoconnect({
"on_save_parents_clicked" : self.save_parents_clicked,
"on_add_parent_clicked" : self.add_parent_clicked, "on_add_parent_clicked" : self.add_parent_clicked,
"on_prel_changed" : self.parent_relation_changed, "on_prel_changed" : self.parent_relation_changed,
"on_showallf_toggled" : self.showallf_toggled, "on_showallf_toggled" : self.showallf_toggled,
"on_showallm_toggled" : self.showallm_toggled, "on_showallm_toggled" : self.showallm_toggled,
"destroy_passed_object" : Utils.destroy_passed_object,
"on_help_familyDialog_clicked" : self.on_help_clicked, "on_help_familyDialog_clicked" : self.on_help_clicked,
}) })
if parent_window:
self.top.set_transient_for(parent_window)
self.val = self.top.run()
if self.val == gtk.RESPONSE_OK:
self.save_parents_clicked()
self.top.destroy()
def on_help_clicked(self,obj): def on_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','gramps-spec-par') gnome.help_display('gramps-manual','gramps-spec-par')
@ -383,7 +378,7 @@ class ChooseParents:
self.mmodel.find(mother.getId()) self.mmodel.find(mother.getId())
self.mmodel.center_selected() self.mmodel.center_selected()
def save_parents_clicked(self): def save_parents_clicked(self,obj):
""" """
Called with the OK button nis pressed. Saves the selected people as parents Called with the OK button nis pressed. Saves the selected people as parents
of the main perosn. of the main perosn.
@ -423,6 +418,7 @@ class ChooseParents:
else: else:
self.family = None self.family = None
Utils.destroy_passed_object(obj)
if self.family: if self.family:
self.family.setRelationship(self.type) self.family.setRelationship(self.type)
self.change_family_type(self.family,mother_rel,father_rel) self.change_family_type(self.family,mother_rel,father_rel)