Fixed window manager delete so that it queries before going down
svn: r286
This commit is contained in:
parent
ec0b558868
commit
fc1742d133
@ -584,30 +584,23 @@ def cancel_callback(a):
|
|||||||
if a==0:
|
if a==0:
|
||||||
utils.destroy_passed_object(quit)
|
utils.destroy_passed_object(quit)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#
|
|
||||||
#-------------------------------------------------------------------------
|
|
||||||
def save_callback(a):
|
|
||||||
if a==0:
|
|
||||||
save_person(quit)
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def on_delete_event(obj,b):
|
def on_delete_event(obj,b):
|
||||||
obj.hide()
|
|
||||||
if did_data_change(obj):
|
if did_data_change(obj):
|
||||||
global quit
|
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
|
quit = obj
|
||||||
GnomeQuestionDialog(q,save_callback)
|
GnomeQuestionDialog(q,cancel_callback)
|
||||||
|
return 1
|
||||||
else:
|
else:
|
||||||
utils.destroy_passed_object(obj)
|
utils.destroy_passed_object(obj)
|
||||||
|
return 0
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
# on_name_list_select_row - sets the row object attached to the passed
|
# on_name_list_select_row - sets the row object attached to the passed
|
||||||
|
Loading…
Reference in New Issue
Block a user