aboutsummaryrefslogtreecommitdiffstats
path: root/mail/e-mail-folder-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2011-10-06 21:35:14 +0800
committerMatthew Barnes <mbarnes@redhat.com>2011-10-06 21:37:01 +0800
commit126aa2398abc1bbab0fd0cd76fda5042cc83fe76 (patch)
treea56dac4e77d7fad6901468564caa09644a1a806b /mail/e-mail-folder-utils.c
parent938505da180727fbc56b68b80851adc3cf676523 (diff)
downloadgsoc2013-evolution-126aa2398abc1bbab0fd0cd76fda5042cc83fe76.tar.gz
gsoc2013-evolution-126aa2398abc1bbab0fd0cd76fda5042cc83fe76.tar.zst
gsoc2013-evolution-126aa2398abc1bbab0fd0cd76fda5042cc83fe76.zip
Prefer g_simple_async_result_take_error().
Slightly more efficient and convenient than: g_simple_async_result_set_from_error (simple, error); g_error_free (error); One less GError to copy and destroy.
Diffstat (limited to 'mail/e-mail-folder-utils.c')
-rw-r--r--mail/e-mail-folder-utils.c42
1 files changed, 14 insertions, 28 deletions
diff --git a/mail/e-mail-folder-utils.c b/mail/e-mail-folder-utils.c
index 77a9708e5f..fe093adb21 100644
--- a/mail/e-mail-folder-utils.c
+++ b/mail/e-mail-folder-utils.c
@@ -84,10 +84,8 @@ mail_folder_append_message_thread (GSimpleAsyncResult *simple,
context->info, &context->message_uid,
cancellable, &error);
- if (error != NULL) {
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
- }
+ if (error != NULL)
+ g_simple_async_result_take_error (simple, error);
}
gboolean
@@ -199,10 +197,8 @@ mail_folder_build_attachment_thread (GSimpleAsyncResult *simple,
CAMEL_FOLDER (object), context->ptr_array,
&context->fwd_subject, cancellable, &error);
- if (error != NULL) {
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
- }
+ if (error != NULL)
+ g_simple_async_result_take_error (simple, error);
}
CamelMimePart *
@@ -359,10 +355,8 @@ mail_folder_find_duplicate_messages_thread (GSimpleAsyncResult *simple,
CAMEL_FOLDER (object), context->ptr_array,
cancellable, &error);
- if (error != NULL) {
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
- }
+ if (error != NULL)
+ g_simple_async_result_take_error (simple, error);
}
GHashTable *
@@ -559,10 +553,8 @@ mail_folder_get_multiple_messages_thread (GSimpleAsyncResult *simple,
CAMEL_FOLDER (object), context->ptr_array,
cancellable, &error);
- if (error != NULL) {
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
- }
+ if (error != NULL)
+ g_simple_async_result_take_error (simple, error);
}
GHashTable *
@@ -685,10 +677,8 @@ mail_folder_remove_thread (GSimpleAsyncResult *simple,
e_mail_folder_remove_sync (
CAMEL_FOLDER (object), cancellable, &error);
- if (error != NULL) {
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
- }
+ if (error != NULL)
+ g_simple_async_result_take_error (simple, error);
}
static gboolean
@@ -912,10 +902,8 @@ mail_folder_remove_attachments_thread (GSimpleAsyncResult *simple,
CAMEL_FOLDER (object), context->ptr_array,
cancellable, &error);
- if (error != NULL) {
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
- }
+ if (error != NULL)
+ g_simple_async_result_take_error (simple, error);
}
/* Helper for e_mail_folder_remove_attachments_sync() */
@@ -1128,10 +1116,8 @@ mail_folder_save_messages_thread (GSimpleAsyncResult *simple,
CAMEL_FOLDER (object), context->ptr_array,
context->destination, cancellable, &error);
- if (error != NULL) {
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
- }
+ if (error != NULL)
+ g_simple_async_result_take_error (simple, error);
}
/* Helper for e_mail_folder_save_messages_sync() */