evolution r37462 - trunk/composer



Author: mcrha
Date: Thu Mar 19 10:16:14 2009
New Revision: 37462
URL: http://svn.gnome.org/viewvc/evolution?rev=37462&view=rev

Log:
2009-03-19  Milan Crha  <mcrha redhat com>

	** 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.



Modified:
   trunk/composer/ChangeLog
   trunk/composer/e-msg-composer.c

Modified: trunk/composer/e-msg-composer.c
==============================================================================
--- trunk/composer/e-msg-composer.c	(original)
+++ trunk/composer/e-msg-composer.c	Thu Mar 19 10:16:14 2009
@@ -3032,24 +3032,6 @@
 	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 @@
 	/* 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));
 		}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]