aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
Diffstat (limited to 'widgets')
-rw-r--r--widgets/misc/e-attachment-store.c18
-rw-r--r--widgets/misc/e-attachment.c15
2 files changed, 11 insertions, 22 deletions
diff --git a/widgets/misc/e-attachment-store.c b/widgets/misc/e-attachment-store.c
index 2670369a51..8c808d9731 100644
--- a/widgets/misc/e-attachment-store.c
+++ b/widgets/misc/e-attachment-store.c
@@ -654,10 +654,8 @@ attachment_store_get_uris_save_cb (EAttachment *attachment,
if (error == NULL)
g_simple_async_result_set_op_res_gpointer (simple, uris, NULL);
- else {
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
- }
+ else
+ g_simple_async_result_take_error (simple, error);
g_simple_async_result_complete (simple);
@@ -877,10 +875,8 @@ attachment_store_load_ready_cb (EAttachment *attachment,
if (error == NULL)
g_simple_async_result_set_op_res_gboolean (simple, TRUE);
- else {
- g_simple_async_result_set_from_error (simple, error);
- g_error_free (error);
- }
+ else
+ g_simple_async_result_take_error (simple, error);
g_simple_async_result_complete (simple);
@@ -1158,21 +1154,19 @@ attachment_store_save_cb (EAttachment *attachment,
save_context->error = NULL;
simple = save_context->simple;
- g_simple_async_result_set_from_error (simple, error);
+ g_simple_async_result_take_error (simple, error);
g_simple_async_result_complete (simple);
attachment_store_save_context_free (save_context);
- g_error_free (error);
return;
}
if (error != NULL) {
simple = save_context->simple;
- g_simple_async_result_set_from_error (simple, error);
+ g_simple_async_result_take_error (simple, error);
g_simple_async_result_complete (simple);
attachment_store_save_context_free (save_context);
- g_error_free (error);
return;
}
diff --git a/widgets/misc/e-attachment.c b/widgets/misc/e-attachment.c
index ccd135e5a0..4174fe92a5 100644
--- a/widgets/misc/e-attachment.c
+++ b/widgets/misc/e-attachment.c
@@ -1517,9 +1517,8 @@ attachment_load_check_for_error (LoadContext *load_context,
return FALSE;
simple = load_context->simple;
- g_simple_async_result_set_from_error (simple, error);
+ g_simple_async_result_take_error (simple, error);
g_simple_async_result_complete (simple);
- g_error_free (error);
attachment_load_context_free (load_context);
@@ -2021,9 +2020,8 @@ attachment_open_check_for_error (OpenContext *open_context,
return FALSE;
simple = open_context->simple;
- g_simple_async_result_set_from_error (simple, error);
+ g_simple_async_result_take_error (simple, error);
g_simple_async_result_complete (simple);
- g_error_free (error);
attachment_open_context_free (open_context);
@@ -2064,10 +2062,8 @@ attachment_open_file (GFile *file,
g_simple_async_result_set_op_res_gboolean (simple, success);
- 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);
g_simple_async_result_complete (simple);
attachment_open_context_free (open_context);
@@ -2324,9 +2320,8 @@ attachment_save_check_for_error (SaveContext *save_context,
return FALSE;
simple = save_context->simple;
- g_simple_async_result_set_from_error (simple, error);
+ g_simple_async_result_take_error (simple, error);
g_simple_async_result_complete (simple);
- g_error_free (error);
attachment_save_context_free (save_context);