[evolution-patches] composer: forward inline with inlined images fix
- From: Radek Doulík <rodo ximian com>
- To: Patches <evolution-patches ximian com>
- Cc: Jeffrey Stedfast <fejj ximian com>, Not Zed <notzed ximian com>
- Subject: [evolution-patches] composer: forward inline with inlined images fix
- Date: 21 Apr 2003 16:15:06 +0200
Attached patch makes images from multipart/related to be added as inline
images to composer when forwarding inlined message(s).
OK to commit?
? autosave1
? forward_inline_with_inlined_images_fix.patch
Index: e-msg-composer.c
===================================================================
RCS file: /cvs/gnome/evolution/composer/e-msg-composer.c,v
retrieving revision 1.387
diff -u -p -r1.387 e-msg-composer.c
--- e-msg-composer.c 19 Apr 2003 22:10:35 -0000 1.387
+++ e-msg-composer.c 21 Apr 2003 13:39:14 -0000
@@ -3131,7 +3131,7 @@ e_msg_composer_flush_pending_body (EMsgC
static void
add_attachments_handle_mime_part (EMsgComposer *composer, CamelMimePart *mime_part,
- gboolean just_inlines, int depth)
+ gboolean just_inlines, gboolean related, int depth)
{
CamelContentType *content_type;
CamelDataWrapper *wrapper;
@@ -3148,6 +3148,8 @@ add_attachments_handle_mime_part (EMsgCo
if (camel_mime_part_get_content_id (mime_part) ||
camel_mime_part_get_content_location (mime_part))
e_msg_composer_add_inline_image_from_mime_part (composer, mime_part);
+ } 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", "*")) {
const char *disposition;
@@ -3167,19 +3169,22 @@ add_attachments_from_multipart (EMsgComp
{
/* find appropriate message attachments to add to the composer */
CamelMimePart *mime_part;
+ gboolean related;
int i, nparts;
+ related = header_content_type_is (CAMEL_DATA_WRAPPER (multipart)->mime_type, "multipart", "related");
+
if (CAMEL_IS_MULTIPART_SIGNED (multipart)) {
mime_part = camel_multipart_get_part (multipart, CAMEL_MULTIPART_SIGNED_CONTENT);
- add_attachments_handle_mime_part (composer, mime_part, just_inlines, depth);
+ add_attachments_handle_mime_part (composer, mime_part, just_inlines, related, depth);
} else if (CAMEL_IS_MULTIPART_ENCRYPTED (multipart)) {
/* what should we do in this case? */
} else {
nparts = camel_multipart_get_number (multipart);
-
+
for (i = 0; i < nparts; i++) {
mime_part = camel_multipart_get_part (multipart, i);
- add_attachments_handle_mime_part (composer, mime_part, just_inlines, depth);
+ 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]