From 1d7088845139f364724d8c657780959a6cffc129 Mon Sep 17 00:00:00 2001 From: Milan Crha Date: Thu, 19 Mar 2009 10:16:14 +0000 Subject: ** Fix for bug #574680 2009-03-19 Milan Crha ** Fix for bug #574680 * e-msg-composer.c: (is_special_header): Function removed. * e-msg-composer.c: (e_msg_composer_new_with_message): Remove all headers except "References" and "In-Reply-To" when composing from an existing message. svn path=/trunk/; revision=37462 --- composer/e-msg-composer.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'composer/e-msg-composer.c') diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index f06dc85b72..c5683359c1 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -3032,24 +3032,6 @@ e_msg_composer_new (void) return e_msg_composer_new_with_type (E_MSG_COMPOSER_MAIL); } -static gboolean -is_special_header (const gchar *hdr_name) -{ - /* Note: a header is a "special header" if it has any meaning: - 1. it's not a X-* header or - 2. it's an X-Evolution* header - */ - if (g_ascii_strncasecmp (hdr_name, "X-", 2)) - return TRUE; - - if (!g_ascii_strncasecmp (hdr_name, "X-Evolution", 11)) - return TRUE; - - /* we can keep all other X-* headers */ - - return FALSE; -} - static void e_msg_composer_set_pending_body (EMsgComposer *composer, gchar *text, @@ -3693,9 +3675,8 @@ e_msg_composer_new_with_message (CamelMimeMessage *message) /* set extra headers */ headers = CAMEL_MIME_PART (message)->headers; while (headers) { - if (!is_special_header (headers->name) || - !g_ascii_strcasecmp (headers->name, "References") || - !g_ascii_strcasecmp (headers->name, "In-Reply-To")) { + if (g_ascii_strcasecmp (headers->name, "References") == 0 || + g_ascii_strcasecmp (headers->name, "In-Reply-To") == 0) { g_ptr_array_add (p->extra_hdr_names, g_strdup (headers->name)); g_ptr_array_add (p->extra_hdr_values, g_strdup (headers->value)); } -- cgit