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. --- modules/mail/e-mail-shell-view-actions.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'modules/mail/e-mail-shell-view-actions.c') diff --git a/modules/mail/e-mail-shell-view-actions.c b/modules/mail/e-mail-shell-view-actions.c index f311246da7..80c8a92a7e 100644 --- a/modules/mail/e-mail-shell-view-actions.c +++ b/modules/mail/e-mail-shell-view-actions.c @@ -33,8 +33,7 @@ mail_folder_unsubscribe_done_cb (EMailSession *session, e_mail_session_unsubscribe_folder_finish (session, result, &error); - if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED)) { - e_activity_set_state (activity, E_ACTIVITY_CANCELLED); + if (e_activity_handle_cancellation (activity, error)) { g_error_free (error); } else if (error != NULL) { -- cgit v1.2.3