From 0e7f0cc1ed98633ae3e8b855fc7a5051d3e37d42 Mon Sep 17 00:00:00 2001 From: Sergey Starosek Date: Sun, 3 Mar 2013 11:32:56 +0200 Subject: Fix ESC key handling in Save dialog. Closing unsaved dive raises Save dialog with Yes/No/Cancel buttons. Pressing ESC dismisses dialog without saving changes. This commit adds GTK_RESPONSE_DELETE_EVENT response code check in order to fix that behavior. Reported-by: Jan Schubert Signed-off-by: Sergey Starosek Signed-off-by: Dirk Hohndel --- gtk-gui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtk-gui.c b/gtk-gui.c index 53979034b..6125db3f5 100644 --- a/gtk-gui.c +++ b/gtk-gui.c @@ -238,7 +238,7 @@ static gboolean ask_save_changes() gint outcode = gtk_dialog_run(GTK_DIALOG(dialog)); if (outcode == GTK_RESPONSE_ACCEPT) { file_save(NULL,NULL); - } else if (outcode == GTK_RESPONSE_CANCEL) { + } else if (outcode == GTK_RESPONSE_CANCEL || outcode == GTK_RESPONSE_DELETE_EVENT) { quit = FALSE; } gtk_widget_destroy(dialog); -- cgit v1.2.3-70-g09d2