diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-12 00:19:17 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-12 00:59:29 +0800 |
commit | ba8f1f78f4ec76aeaec6e2b55fcb9b2dec17ba65 (patch) | |
tree | 8ff0520b904abff75be0ed9a6002fbbcbb0b193b /composer | |
parent | c780b7d21255a5e6a0f15af12e02accbda088f3b (diff) | |
download | gsoc2013-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 'composer')
-rw-r--r-- | composer/e-msg-composer.c | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 98d1e6f295..74a36cce44 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -3548,8 +3548,7 @@ msg_composer_send_cb (EMsgComposer *composer, message = e_msg_composer_get_message_finish (composer, 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 (message == NULL); async_context_free (context); g_error_free (error); @@ -3639,8 +3638,7 @@ msg_composer_save_to_drafts_cb (EMsgComposer *composer, message = e_msg_composer_get_message_draft_finish ( composer, 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 (message == NULL); async_context_free (context); g_error_free (error); @@ -3722,8 +3720,7 @@ msg_composer_save_to_outbox_cb (EMsgComposer *composer, message = e_msg_composer_get_message_finish (composer, 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 (message == NULL); async_context_free (context); g_error_free (error); @@ -3812,8 +3809,7 @@ msg_composer_print_cb (EMsgComposer *composer, message = e_msg_composer_get_message_print_finish ( composer, 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 (message == NULL); async_context_free (context); g_error_free (error); |