mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
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>
This commit is contained in:
parent
950436eba9
commit
0e7f0cc1ed
1 changed files with 1 additions and 1 deletions
|
@ -238,7 +238,7 @@ static gboolean ask_save_changes()
|
||||||
gint outcode = gtk_dialog_run(GTK_DIALOG(dialog));
|
gint outcode = gtk_dialog_run(GTK_DIALOG(dialog));
|
||||||
if (outcode == GTK_RESPONSE_ACCEPT) {
|
if (outcode == GTK_RESPONSE_ACCEPT) {
|
||||||
file_save(NULL,NULL);
|
file_save(NULL,NULL);
|
||||||
} else if (outcode == GTK_RESPONSE_CANCEL) {
|
} else if (outcode == GTK_RESPONSE_CANCEL || outcode == GTK_RESPONSE_DELETE_EVENT) {
|
||||||
quit = FALSE;
|
quit = FALSE;
|
||||||
}
|
}
|
||||||
gtk_widget_destroy(dialog);
|
gtk_widget_destroy(dialog);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue