diff options
author | Tomas Popela <tpopela@redhat.com> | 2014-07-11 15:17:10 +0800 |
---|---|---|
committer | Tomas Popela <tpopela@redhat.com> | 2014-07-15 17:09:59 +0800 |
commit | 5f7d8405951d3188faf7fe1d9274a8271394fbb7 (patch) | |
tree | 56b27d7a1fd32b2ac28c29c73cd6be07219bc390 | |
parent | e7d745268e3c81d7360ebfbdd22e9a670f13d4cc (diff) | |
download | gsoc2013-evolution-5f7d8405951d3188faf7fe1d9274a8271394fbb7.tar gsoc2013-evolution-5f7d8405951d3188faf7fe1d9274a8271394fbb7.tar.gz gsoc2013-evolution-5f7d8405951d3188faf7fe1d9274a8271394fbb7.tar.bz2 gsoc2013-evolution-5f7d8405951d3188faf7fe1d9274a8271394fbb7.tar.lz gsoc2013-evolution-5f7d8405951d3188faf7fe1d9274a8271394fbb7.tar.xz gsoc2013-evolution-5f7d8405951d3188faf7fe1d9274a8271394fbb7.tar.zst gsoc2013-evolution-5f7d8405951d3188faf7fe1d9274a8271394fbb7.zip |
EMsgComposer - Correctly save the composer mode into the message headers
-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; |