diff options
author | Dan Winship <danw@src.gnome.org> | 2001-09-07 04:54:24 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-09-07 04:54:24 +0800 |
commit | 2b0ac4817c1b417a2724219ef79f09f042be9f09 (patch) | |
tree | a2f40b8e0ab1828b545302eaaeff5e612ef8c2ba /composer | |
parent | e243f47a722dcbabbc1e82fa2cfeb8d4edcc0f60 (diff) | |
download | gsoc2013-evolution-2b0ac4817c1b417a2724219ef79f09f042be9f09.tar.gz gsoc2013-evolution-2b0ac4817c1b417a2724219ef79f09f042be9f09.tar.zst gsoc2013-evolution-2b0ac4817c1b417a2724219ef79f09f042be9f09.zip |
(handle_multipart_alternative, handle_multipart,
e_msg_composer_new_with_message): Update for mail_get_message_body
change.
svn path=/trunk/; revision=12658
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 3 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 39 |
2 files changed, 12 insertions, 30 deletions
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 <ettore@ximian.com> 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); } } |