From fc1742d133b61a4f73c5154a0c9c9dbabce1e93e Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Fri, 3 Aug 2001 12:58:56 +0000 Subject: [PATCH] Fixed window manager delete so that it queries before going down svn: r286 --- src/EditPerson.py | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/src/EditPerson.py b/src/EditPerson.py index 40e2c79c1..becea3b99 100644 --- a/src/EditPerson.py +++ b/src/EditPerson.py @@ -584,30 +584,23 @@ def cancel_callback(a): if a==0: utils.destroy_passed_object(quit) -#------------------------------------------------------------------------- -# -# -# -#------------------------------------------------------------------------- -def save_callback(a): - if a==0: - save_person(quit) - #------------------------------------------------------------------------- # # # #------------------------------------------------------------------------- def on_delete_event(obj,b): - obj.hide() + if did_data_change(obj): global quit - q = _("Data was modified. Do you wish to save your changes?") + q = _("Data was modified. Are you sure you want to abandon your changes?") quit = obj - GnomeQuestionDialog(q,save_callback) + GnomeQuestionDialog(q,cancel_callback) + return 1 else: utils.destroy_passed_object(obj) - + return 0 + #------------------------------------------------------------------------- # # on_name_list_select_row - sets the row object attached to the passed