summaryrefslogtreecommitdiffstats
path: root/gtk-gui.c
diff options
context:
space:
mode:
authorGravatar Sergey Starosek <sergey.starosek@gmail.com>2013-03-03 11:32:56 +0200
committerGravatar Dirk Hohndel <dirk@hohndel.org>2013-03-03 10:45:11 -0800
commit0e7f0cc1ed98633ae3e8b855fc7a5051d3e37d42 (patch)
tree90457d88816cdbe31522726546d55ed4af562348 /gtk-gui.c
parent950436eba96551552978fc89de2d6968ed7b9bd8 (diff)
downloadsubsurface-0e7f0cc1ed98633ae3e8b855fc7a5051d3e37d42.tar.gz
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 <Jan.Schubert@GMX.li> Signed-off-by: Sergey Starosek <sergey.starosek@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'gtk-gui.c')
-rw-r--r--gtk-gui.c2
1 files changed, 1 insertions, 1 deletions
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);