dialog: GTK_DIALOG_ERROR_CANCELLED => GTK_DIALOG_ERROR_DISMISSED

The term "cancelling" is used with GCancellable, a user clicking a close
button is not that.
User input is usually described as "dismissing", so we use that term.
This commit is contained in:
Benjamin Otte 2022-11-23 23:32:19 +01:00 committed by Matthias Clasen
parent 8a7f739f9f
commit 8957302bd4
5 changed files with 7 additions and 7 deletions

View File

@ -151,7 +151,7 @@ response_received (GDBusConnection *connection,
g_task_return_boolean (task, TRUE);
break;
case XDG_DESKTOP_PORTAL_CANCELLED:
g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED, "The portal dialog was closed");
g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_DISMISSED, "The portal dialog was dismissed by the user");
break;
case XDG_DESKTOP_PORTAL_FAILED:
default:

View File

@ -390,7 +390,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_ABORTED, "Aborted by application");
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");
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);

View File

@ -41,8 +41,8 @@ G_BEGIN_DECLS
* an operation fails and no more specific code is applicable
* @GTK_DIALOG_ERROR_ABORTED: The async function call was aborted
* programmatically (via its `GCancellable`)
* @GTK_DIALOG_ERROR_CANCELLED: The async operation was cancelled
* by the user (via a Close button)
* @GTK_DIALOG_ERROR_DISMISSED: The operation was cancelled
* by the user (via a Cancel or Close button)
*
* Error codes in the `GTK_DIALOG_ERROR` domain that can be returned
* by async dialog functions.
@ -53,7 +53,7 @@ typedef enum
{
GTK_DIALOG_ERROR_FAILED,
GTK_DIALOG_ERROR_ABORTED,
GTK_DIALOG_ERROR_CANCELLED
GTK_DIALOG_ERROR_DISMISSED
} GtkDialogError;
GDK_AVAILABLE_IN_4_10

View File

@ -655,7 +655,7 @@ G_GNUC_END_IGNORE_DEPRECATIONS
g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_ABORTED, "Aborted by application");
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");
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);

View File

@ -563,7 +563,7 @@ response_cb (GTask *task,
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)
g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED, "Cancelled by user");
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);