aboutsummaryrefslogtreecommitdiffstats
path: root/modules
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 /modules
parentc780b7d21255a5e6a0f15af12e02accbda088f3b (diff)
downloadgsoc2013-evolution-ba8f1f78f4ec76aeaec6e2b55fcb9b2dec17ba65.tar
gsoc2013-evolution-ba8f1f78f4ec76aeaec6e2b55fcb9b2dec17ba65.tar.gz
gsoc2013-evolution-ba8f1f78f4ec76aeaec6e2b55fcb9b2dec17ba65.tar.bz2
gsoc2013-evolution-ba8f1f78f4ec76aeaec6e2b55fcb9b2dec17ba65.tar.lz
gsoc2013-evolution-ba8f1f78f4ec76aeaec6e2b55fcb9b2dec17ba65.tar.xz
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 'modules')
-rw-r--r--modules/mail/e-mail-shell-view-actions.c3
-rw-r--r--modules/mail/e-mail-shell-view-private.c3
2 files changed, 2 insertions, 4 deletions
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) {
diff --git a/modules/mail/e-mail-shell-view-private.c b/modules/mail/e-mail-shell-view-private.c
index c5f555d757..d99b643d38 100644
--- a/modules/mail/e-mail-shell-view-private.c
+++ b/modules/mail/e-mail-shell-view-private.c
@@ -62,8 +62,7 @@ mail_shell_view_got_folder_cb (CamelStore *store,
folder = camel_store_get_folder_finish (store, 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 (folder == NULL);
async_context_free (context);
g_error_free (error);