diff options
author | Dan Vrátil <dvratil@redhat.com> | 2012-04-19 15:20:07 +0800 |
---|---|---|
committer | Dan Vrátil <dvratil@redhat.com> | 2012-04-19 15:22:36 +0800 |
commit | 3fbbdd80ac987f2b9ac0b91b7fd16098bb3240c1 (patch) | |
tree | 2920ca78528630724ecb9fe69d1d841584b2509d /composer | |
parent | 263874d409fce7adaefee8df82e4c86237f28203 (diff) | |
download | gsoc2013-evolution-3fbbdd80ac987f2b9ac0b91b7fd16098bb3240c1.tar.gz gsoc2013-evolution-3fbbdd80ac987f2b9ac0b91b7fd16098bb3240c1.tar.zst gsoc2013-evolution-3fbbdd80ac987f2b9ac0b91b7fd16098bb3240c1.zip |
Bug #674248 - Lost new lines from text/plain
Diffstat (limited to 'composer')
-rw-r--r-- | composer/e-msg-composer.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 5c91037fa6..f033e9dd52 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -188,6 +188,9 @@ emcu_part_to_html (CamelSession *session, CamelStreamMem *mem; GByteArray *buf; gchar *text; + EMFormatParserInfo p_info = { 0 }; + EMFormatWriterInfo w_info = { 0 }; + GString *part_id; buf = g_byte_array_new (); mem = (CamelStreamMem *) camel_stream_mem_new (); @@ -208,8 +211,11 @@ emcu_part_to_html (CamelSession *session, (EMFormat *) emfq, em_format_get_charset (source)); } - em_format_format_text (EM_FORMAT (emfq), - CAMEL_STREAM (mem), CAMEL_DATA_WRAPPER (part), cancellable); + part_id = g_string_sized_new (0); + em_format_parse_part (EM_FORMAT (emfq), part, part_id, &p_info, cancellable); + em_format_write (EM_FORMAT (emfq), CAMEL_STREAM (mem), &w_info, cancellable); + g_string_free (part_id, TRUE); + g_object_unref (emfq); camel_stream_write((CamelStream *) mem, "", 1, cancellable, NULL); |