From e8d33a030869ccb251f729fb6dc38c94678ce12f Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Tue, 18 Sep 2001 21:45:23 +0000 Subject: Attach an X-Evolution-Format header so if people re-edit a message in say 2001-09-18 Jeffrey Stedfast * e-msg-composer.c (build_message): Attach an X-Evolution-Format header so if people re-edit a message in say their Sent folder, we will preserve format preferences. (e_msg_composer_get_message_draft): Don't attach X-Evolution-Format headers here since it is now done in build_message(). (e_msg_composer_new_with_message): Make sure to remove *all* X-Evolution headers by using the mail-tools functions. svn path=/trunk/; revision=12958 --- composer/ChangeLog | 11 +++++++++++ composer/e-msg-composer.c | 18 +++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) (limited to 'composer') diff --git a/composer/ChangeLog b/composer/ChangeLog index 5703d17db0..2676296f12 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,14 @@ +2001-09-18 Jeffrey Stedfast + + * e-msg-composer.c (build_message): Attach an X-Evolution-Format + header so if people re-edit a message in say their Sent folder, we + will preserve format preferences. + (e_msg_composer_get_message_draft): Don't attach + X-Evolution-Format headers here since it is now done in + build_message(). + (e_msg_composer_new_with_message): Make sure to remove *all* + X-Evolution headers by using the mail-tools functions. + 2001-09-16 Jeffrey Stedfast * e-msg-composer-attachment-bar.c (update): Don't diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index e8ce7d6844..4135164ed2 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -612,6 +612,10 @@ build_message (EMsgComposer *composer) #endif /* HAVE_NSS */ + /* Attach whether this message was written in HTML */ + camel_medium_set_header (CAMEL_MEDIUM (new), "X-Evolution-Format", + composer->send_html ? "text/html" : "text/plain"); + return new; exception: @@ -2578,6 +2582,7 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg) CamelContentType *content_type; struct _header_raw *headers; EMsgComposer *new; + XEvolution *xev; guint len, i; g_return_val_if_fail (gtk_main_level () > 0, NULL); @@ -2640,7 +2645,6 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg) if (account_name) { while (*account_name && isspace ((unsigned) *account_name)) account_name++; - camel_medium_remove_header (CAMEL_MEDIUM (msg), "X-Evolution-Account"); } e_msg_composer_set_headers (new, account_name, Tov, Ccv, Bccv, subject); @@ -2659,15 +2663,11 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg) e_msg_composer_set_send_html (new, TRUE); else e_msg_composer_set_send_html (new, FALSE); - - camel_medium_remove_header (CAMEL_MEDIUM (msg), "X-Evolution-Format"); } /* Remove any other X-Evolution-* headers that may have been set */ - if (camel_medium_get_header (CAMEL_MEDIUM (msg), "X-Evolution-Transport")) - camel_medium_remove_header (CAMEL_MEDIUM (msg), "X-Evolution-Transport"); - if (camel_medium_get_header (CAMEL_MEDIUM (msg), "X-Evolution-Source")) - camel_medium_remove_header (CAMEL_MEDIUM (msg), "X-Evolution-Source"); + xev = mail_tool_remove_xevolution_headers (msg); + mail_tool_destroy_xevolution (xev); /* set extra headers */ headers = CAMEL_MIME_PART (msg)->headers; @@ -3029,10 +3029,6 @@ e_msg_composer_get_message_draft (EMsgComposer *composer) composer->smime_sign = old_smime_sign; composer->smime_encrypt = old_smime_encrypt; - /* Attach whether this message was written in HTML */ - camel_medium_set_header (CAMEL_MEDIUM (msg), "X-Evolution-Format", - composer->send_html ? "text/html" : "text/plain"); - /* Attach account info to the draft. */ account = e_msg_composer_get_preferred_account (composer); if (account && account->name) -- cgit v1.2.3