aboutsummaryrefslogtreecommitdiffstats
path: root/mail/em-composer-utils.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-04-13 03:55:53 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-04-13 03:55:53 +0800
commit51e5ae5524c778309800530e1e25fdf74f2226da (patch)
treecb4b49e313d0ac80d9b47c3f2ffe6e097fe08442 /mail/em-composer-utils.c
parent742b2d946553f3317a7cecc21f735441c37e4478 (diff)
downloadgsoc2013-evolution-51e5ae5524c778309800530e1e25fdf74f2226da.tar.gz
gsoc2013-evolution-51e5ae5524c778309800530e1e25fdf74f2226da.tar.zst
gsoc2013-evolution-51e5ae5524c778309800530e1e25fdf74f2226da.zip
Adapt to Camel API changes.
Diffstat (limited to 'mail/em-composer-utils.c')
-rw-r--r--mail/em-composer-utils.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index ffa053712f..3bd5021f12 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -920,7 +920,8 @@ traverse_parts (GSList *clues, CamelMimeMessage *message, CamelDataWrapper *cont
} else if (CAMEL_IS_MIME_PART (content)) {
CamelMimePart *part = CAMEL_MIME_PART (content);
CamelContentType *type;
- CamelStream *mem;
+ CamelStream *stream;
+ GByteArray *byte_array;
gchar *str;
content = camel_medium_get_content (CAMEL_MEDIUM (part));
@@ -936,17 +937,18 @@ traverse_parts (GSList *clues, CamelMimeMessage *message, CamelDataWrapper *cont
if (!camel_content_type_is (type, "text", "*"))
return;
- mem = camel_stream_mem_new ();
- camel_data_wrapper_decode_to_stream (content, mem);
+ byte_array = g_byte_array_new ();
+ stream = camel_stream_mem_new_with_byte_array (byte_array);
+ camel_data_wrapper_decode_to_stream (content, stream);
- str = g_strndup ((const gchar *)((CamelStreamMem *) mem)->buffer->data, ((CamelStreamMem *) mem)->buffer->len);
- camel_object_unref (mem);
+ str = g_strndup ((gchar *) byte_array->data, byte_array->len);
+ camel_object_unref (stream);
if (replace_variables (clues, message, &str)) {
- mem = camel_stream_mem_new_with_buffer (str, strlen (str));
- camel_stream_reset (mem);
- camel_data_wrapper_construct_from_stream (content, mem);
- camel_object_unref (mem);
+ stream = camel_stream_mem_new_with_buffer (str, strlen (str));
+ camel_stream_reset (stream);
+ camel_data_wrapper_construct_from_stream (content, stream);
+ camel_object_unref (stream);
}
g_free (str);