This is done via the GCancellable, so let's call it cancelling.
send_close (data);
g_task_return_new_error (task,
- GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_ABORTED,
- "The OpenURI portal call was cancelled programmatically");
+ GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED,
+ "The OpenURI portal call was cancelled by the application");
g_object_unref (task);
}
{
g_error_free (error);
g_task_return_new_error (data->task,
- GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_ABORTED,
- "The operation was aborted programmatically");
+ GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED,
+ "The operation was cancelled by the application");
}
else
g_task_return_error (data->task, error);
if (cancellable)
g_signal_handlers_disconnect_by_func (cancellable, cancelled_cb, task);
- if (response >= 0)
+ if (response == GTK_RESPONSE_CLOSE)
+ {
+ g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED, "Cancelled by application");
+ }
+ else if (response >= 0)
{
g_task_return_int (task, response);
}
g_task_return_pointer (task, gdk_rgba_copy (&color), (GDestroyNotify) gdk_rgba_free);
}
else if (response == GTK_RESPONSE_CLOSE)
- g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_ABORTED, "Aborted by application");
+ g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED, "Cancelled 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_DISMISSED, "Dismissed by user");
* GtkDialogError:
* @GTK_DIALOG_ERROR_FAILED: Generic error condition for when
* 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 function call was cancelled
+ * via its `GCancellable`
* @GTK_DIALOG_ERROR_DISMISSED: The operation was cancelled
* by the user (via a Cancel or Close button)
*
typedef enum
{
GTK_DIALOG_ERROR_FAILED,
- GTK_DIALOG_ERROR_ABORTED,
+ GTK_DIALOG_ERROR_CANCELLED,
GTK_DIALOG_ERROR_DISMISSED
} GtkDialogError;
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");
+ g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED, "Cancelled 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_DISMISSED, "Dismissed by user");
}
}
else if (response == GTK_RESPONSE_CLOSE)
- g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_ABORTED, "Aborted by application");
+ g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_CANCELLED, "Cancelled by application");
else if (response == GTK_RESPONSE_CANCEL)
g_task_return_new_error (task, GTK_DIALOG_ERROR, GTK_DIALOG_ERROR_DISMISSED, "Dismissed by user");
else