From fb38ed0bf5891b343afd30a5621d0008cd1e687d Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Wed, 11 May 2011 12:19:17 -0400 Subject: Add e_activity_handle_cancellation(). Convenience function for use in GAsyncReadyCallback functions. This acknowledges the cancellation, so that the activity's description changes from "(cancelling)" to "(cancelled)" and the description appears crossed out in the UI for a moment before disappearing. --- mail/e-mail-reader-utils.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'mail/e-mail-reader-utils.c') diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c index 81712b82f0..0311b3d429 100644 --- a/mail/e-mail-reader-utils.c +++ b/mail/e-mail-reader-utils.c @@ -369,10 +369,8 @@ mail_reader_remove_duplicates_cb (CamelFolder *folder, duplicates = e_mail_folder_find_duplicate_messages_finish ( folder, result, &error); - /* Ignore cancellations. */ - if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { + if (e_activity_handle_cancellation (context->activity, error)) { g_warn_if_fail (duplicates == NULL); - e_activity_set_state (context->activity, E_ACTIVITY_CANCELLED); async_context_free (context); g_error_free (error); return; -- cgit v1.2.3