diff options
author | Benjamin Otte <otte@redhat.com> | 2022-12-22 22:17:45 +0100 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2022-12-24 07:56:57 -0500 |
commit | 8d8e83afa2dd8ab317fc9212fd291ec1095df18b (patch) | |
tree | 1eefc6932332df0a8d955cee407cc9d253cb1879 | |
parent | 381bb84f3dcf799c4ca1d450707e5aecbe804415 (diff) | |
download | gtk+-8d8e83afa2dd8ab317fc9212fd291ec1095df18b.tar.gz |
fontdialog: Handle Escape better
Closing the dialog by hitting Escape should
have the same effect as clicking the cancel
button. Make it so.
-rw-r--r-- | gtk/gtkfontdialog.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gtk/gtkfontdialog.c b/gtk/gtkfontdialog.c index fdf6b23107..878456d94d 100644 --- a/gtk/gtkfontdialog.c +++ b/gtk/gtkfontdialog.c @@ -562,7 +562,8 @@ response_cb (GTask *task, } else if (response == GTK_RESPONSE_CLOSE) g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED, "Cancelled by application"); - else if (response == GTK_RESPONSE_CANCEL) + else if (response == GTK_RESPONSE_CANCEL || + response == GTK_RESPONSE_DELETE_EVENT) g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_DISMISSED, "Dismissed by user"); else g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_FAILED, "Unknown failure (%d)", response); |