[evolution-patches] #53734 : Attachments cannot be forwarded as inline/Quoted



When add attachments to a composer,the text attachments were not treated
as attachments but as text content of the mail.So the text type
attachments were not added in.
Here is the patch for branch 1.4.5 and for trunk 1.5

the detail is:
	http://bugzilla.ximian.com/show_bug.cgi?id=53734

Index: e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.395.2.8
diff -u -r1.395.2.8 e-msg-composer.c
--- e-msg-composer.c	6 Oct 2003 17:07:16 -0000	1.395.2.8
+++ e-msg-composer.c	2 Feb 2004 06:16:02 -0000
@@ -3216,11 +3216,7 @@
 	} else if (related && header_content_type_is (content_type, "image", "*")) {
 		e_msg_composer_add_inline_image_from_mime_part (composer, mime_part);
 	} else {
-		if (header_content_type_is (content_type, "text", "*")) {
-			/* do nothing */
-		} else {
-			e_msg_composer_attach (composer, mime_part);
-		}
+		e_msg_composer_attach (composer, mime_part);
 	}
 }
 
@@ -3243,7 +3239,8 @@
 	} else {
 		nparts = camel_multipart_get_number (multipart);
 
-		for (i = 0; i < nparts; i++) {
+		for (i = 1; i < nparts; i++) {
+                        /* the first mime_part is the text content of the mail,so we skiped it */
 			mime_part = camel_multipart_get_part (multipart, i);
 			add_attachments_handle_mime_part (composer, mime_part, just_inlines, related, depth);
 		}
Index: e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.434
diff -u -r1.434 e-msg-composer.c
--- e-msg-composer.c	29 Jan 2004 06:27:52 -0000	1.434
+++ e-msg-composer.c	2 Feb 2004 07:15:53 -0000
@@ -3360,11 +3360,7 @@
 	} else if (related && camel_content_type_is (content_type, "image", "*")) {
 		e_msg_composer_add_inline_image_from_mime_part (composer, mime_part);
 	} else {
-		if (camel_content_type_is (content_type, "text", "*")) {
-			/* do nothing */
-		} else {
-			e_msg_composer_attach (composer, mime_part);
-		}
+		e_msg_composer_attach (composer, mime_part);
 	}
 }
 
@@ -3387,7 +3383,8 @@
 	} else {
 		nparts = camel_multipart_get_number (multipart);
 
-		for (i = 0; i < nparts; i++) {
+		for (i = 1; i < nparts; i++) {
+                        /* the first mime_part is the text content of the mail,so we skiped it */
 			mime_part = camel_multipart_get_part (multipart, i);
 			add_attachments_handle_mime_part (composer, mime_part, just_inlines, related, depth);
 		}


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