mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2025-01-12 13:30:19 +00:00
color dialog: Handle Escape better
Closing the dialog by hitting Escape should have the same effect as clicking the cancel button. Make it so.
This commit is contained in:
parent
4fa53bd041
commit
ff14c51950
@ -388,7 +388,8 @@ G_GNUC_END_IGNORE_DEPRECATIONS
|
||||
}
|
||||
else if (response == GTK_RESPONSE_CLOSE)
|
||||
g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_ABORTED, "Aborted 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_CANCELLED, "Cancelled by user");
|
||||
else
|
||||
g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_FAILED, "Unknown failure (%d)", response);
|
||||
|
Loading…
Reference in New Issue
Block a user