From 2b0ac4817c1b417a2724219ef79f09f042be9f09 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Thu, 6 Sep 2001 20:54:24 +0000 Subject: (handle_multipart_alternative, handle_multipart, e_msg_composer_new_with_message): Update for mail_get_message_body change. svn path=/trunk/; revision=12658 --- composer/ChangeLog | 3 +++ composer/e-msg-composer.c | 39 +++++++++------------------------------ 2 files changed, 12 insertions(+), 30 deletions(-) (limited to 'composer') diff --git a/composer/ChangeLog b/composer/ChangeLog index 0cff78a9fd..1f53484000 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -2,6 +2,9 @@ * e-msg-composer.c (save): Have to specify a mode when using O_CREAT. + (handle_multipart_alternative, handle_multipart, + e_msg_composer_new_with_message): Update for mail_get_message_body + change. 2001-09-05 Ettore Perazzoli diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 6a2b49ab08..dbb06de932 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -2468,20 +2468,13 @@ handle_multipart_alternative (EMsgComposer *composer, CamelMultipart *multipart) if (header_content_type_is (content_type, "text", "html")) { CamelDataWrapper *contents; - char *text, *final_text; - gboolean is_html; + char *text; contents = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part)); - text = mail_get_message_body (contents, FALSE, &is_html); + text = mail_get_message_body (contents, FALSE, FALSE); if (text) { - if (is_html) - final_text = g_strdup (text); - else - final_text = e_text_to_html (text, E_TEXT_TO_HTML_CONVERT_NL | - E_TEXT_TO_HTML_CONVERT_SPACES); + e_msg_composer_set_body_text (composer, text); g_free (text); - - e_msg_composer_set_body_text (composer, final_text); } return; @@ -2524,20 +2517,13 @@ handle_multipart (EMsgComposer *composer, CamelMultipart *multipart, int depth) } else if (depth == 0 && i == 0) { /* Since the first part is not multipart/alternative, then this must be the body */ CamelDataWrapper *contents; - char *text, *final_text; - gboolean is_html; + char *text; contents = camel_medium_get_content_object (CAMEL_MEDIUM (mime_part)); - text = mail_get_message_body (contents, FALSE, &is_html); + text = mail_get_message_body (contents, FALSE, FALSE); if (text) { - if (is_html) - final_text = g_strdup (text); - else - final_text = e_text_to_html (text, E_TEXT_TO_HTML_CONVERT_NL | - E_TEXT_TO_HTML_CONVERT_SPACES); + e_msg_composer_set_body_text (composer, text); g_free (text); - - e_msg_composer_set_body_text (composer, final_text); } } else { /* this is a leaf of the tree, so attach it */ @@ -2714,20 +2700,13 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg) } else { /* We either have a text/plain or a text/html part */ CamelDataWrapper *contents; - char *text, *final_text; - gboolean is_html; + char *text; contents = camel_medium_get_content_object (CAMEL_MEDIUM (msg)); - text = mail_get_message_body (contents, FALSE, &is_html); + text = mail_get_message_body (contents, FALSE, FALSE); if (text) { - if (is_html) - final_text = g_strdup (text); - else - final_text = e_text_to_html (text, E_TEXT_TO_HTML_CONVERT_NL | - E_TEXT_TO_HTML_CONVERT_SPACES); + e_msg_composer_set_body_text (new, text); g_free (text); - - e_msg_composer_set_body_text (new, final_text); } } -- cgit v1.2.3