diff options
-rw-r--r-- | composer/e-msg-composer.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index a8451307b3..3e8df99914 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1021,21 +1021,20 @@ composer_build_message_thread (GSimpleAsyncResult *simple, static void composer_add_evolution_composer_mode_header (CamelMedium *medium, - ComposerFlags flags) + EMsgComposer *composer) { - GString *string; - - string = g_string_sized_new (128); + gboolean html_mode; + EHTMLEditor *editor; + EHTMLEditorView *view; - if (flags & COMPOSER_FLAG_HTML_MODE) - g_string_append (string, "text/html"); - else - g_string_append (string, "text/plain"); + editor = e_msg_composer_get_editor (composer); + view = e_html_editor_get_view (editor); + html_mode = e_html_editor_view_get_html_mode (view); camel_medium_add_header ( - medium, "X-Evolution-Composer-Mode", string->str); - - g_string_free (string, TRUE); + medium, + "X-Evolution-Composer-Mode", + html_mode ? "text/html" : "text/plain"); } static void @@ -1223,7 +1222,7 @@ composer_build_message (EMsgComposer *composer, /* X-Evolution-Composer-Mode */ composer_add_evolution_composer_mode_header ( - CAMEL_MEDIUM (context->message), flags); + CAMEL_MEDIUM (context->message), composer); if (flags & COMPOSER_FLAG_SAVE_DRAFT) { gchar *text; |