aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-reader-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-05-12 00:19:17 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-05-12 00:59:29 +0800
commitba8f1f78f4ec76aeaec6e2b55fcb9b2dec17ba65 (patch)
tree8ff0520b904abff75be0ed9a6002fbbcbb0b193b /mail/e-mail-reader-utils.c
parentc780b7d21255a5e6a0f15af12e02accbda088f3b (diff)
downloadgsoc2013-evolution-ba8f1f78f4ec76aeaec6e2b55fcb9b2dec17ba65.tar.gz
gsoc2013-evolution-ba8f1f78f4ec76aeaec6e2b55fcb9b2dec17ba65.tar.zst
gsoc2013-evolution-ba8f1f78f4ec76aeaec6e2b55fcb9b2dec17ba65.zip
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.
Diffstat (limited to 'mail/e-mail-reader-utils.c')
-rw-r--r--mail/e-mail-reader-utils.c4
1 files changed, 1 insertions, 3 deletions
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;