diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-12-05 05:45:44 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-12-08 03:01:04 +0800 |
commit | 2f0d83cf74b94d5e6272c07179df6e6c7a929789 (patch) | |
tree | cf6b432d7992770ac8841f242cb487c2ac31a7fc /mail | |
parent | 13f4544dafe211a748b064b86a8af4085d042b2b (diff) | |
download | gsoc2013-evolution-2f0d83cf74b94d5e6272c07179df6e6c7a929789.tar.gz gsoc2013-evolution-2f0d83cf74b94d5e6272c07179df6e6c7a929789.tar.zst gsoc2013-evolution-2f0d83cf74b94d5e6272c07179df6e6c7a929789.zip |
EMailFormatterContext: Keep a reference to EMailPartList.
Replace the individual components of an EMailPartList with a reference
on the EMailPartList itself in EMailFormatContext. Easier to manage.
Diffstat (limited to 'mail')
-rw-r--r-- | mail/e-mail-request.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/mail/e-mail-request.c b/mail/e-mail-request.c index b0cbedee93..b07b5f0c49 100644 --- a/mail/e-mail-request.c +++ b/mail/e-mail-request.c @@ -102,10 +102,7 @@ handle_mail_request (GSimpleAsyncResult *res, if (val) context.mode = atoi (val); - context.message = part_list->message; - context.message_uid = part_list->message_uid; - context.folder = part_list->folder; - context.parts = part_list->list; + context.part_list = g_object_ref (part_list); context.uri = request->priv->full_uri; if (context.mode == E_MAIL_FORMATTER_MODE_PRINTING) @@ -146,6 +143,9 @@ handle_mail_request (GSimpleAsyncResult *res, context.flags, context.mode, cancellable); } + g_object_unref (context.part_list); + context.part_list = NULL; + /* Convert the GString to GInputStream and send it back to WebKit */ ba = camel_stream_mem_get_byte_array (CAMEL_STREAM_MEM (request->priv->output_stream)); if (!ba->data) { @@ -166,7 +166,7 @@ handle_mail_request (GSimpleAsyncResult *res, g_object_unref (formatter); stream = g_memory_input_stream_new_from_data ( - (gchar *) ba->data, ba->len, NULL); + (gchar *) ba->data, ba->len, NULL); g_simple_async_result_set_op_res_gpointer (res, stream, NULL); } |