forked from AuroraMiddleware/gtk
fontdialog: 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
381bb84f3d
commit
8d8e83afa2
@ -562,7 +562,8 @@ response_cb (GTask *task,
|
|||||||
}
|
}
|
||||||
else if (response == GTK_RESPONSE_CLOSE)
|
else if (response == GTK_RESPONSE_CLOSE)
|
||||||
g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED, "Cancelled by application");
|
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");
|
g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_DISMISSED, "Dismissed by user");
|
||||||
else
|
else
|
||||||
g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_FAILED, "Unknown failure (%d)", response);
|
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