aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-mt.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/mail-mt.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/mail-mt.c')
-rw-r--r--mail/mail-mt.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index a65f6e3c9e..53ff132545 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -208,10 +208,8 @@ mail_msg_check_error (gpointer msg)
checkmem (m->priv);
#endif
- if (g_error_matches (m->error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) {
- e_activity_set_state (m->activity, E_ACTIVITY_CANCELLED);
+ if (e_activity_handle_cancellation (m->activity, m->error))
return;
- }
e_activity_set_state (m->activity, E_ACTIVITY_COMPLETED);