aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-09-19 05:45:23 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-09-19 05:45:23 +0800
commite8d33a030869ccb251f729fb6dc38c94678ce12f (patch)
tree0e0c9efb5122a1a4d5fd949e3cbdd750e76b9ec1 /composer
parentb490c7e42a2ca3f75426ec5c4052a658b722d06c (diff)
downloadgsoc2013-evolution-e8d33a030869ccb251f729fb6dc38c94678ce12f.tar.gz
gsoc2013-evolution-e8d33a030869ccb251f729fb6dc38c94678ce12f.tar.zst
gsoc2013-evolution-e8d33a030869ccb251f729fb6dc38c94678ce12f.zip
Attach an X-Evolution-Format header so if people re-edit a message in say
2001-09-18 Jeffrey Stedfast <fejj@ximian.com> * 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
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog11
-rw-r--r--composer/e-msg-composer.c18
2 files changed, 18 insertions, 11 deletions
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 <fejj@ximian.com>
+
+ * 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 <fejj@ximian.com>
* 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)