diff options
-rw-r--r-- | composer/ChangeLog | 10 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 13 |
2 files changed, 19 insertions, 4 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 2def85898c..fbcc50a7fb 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,13 @@ +2003-04-22 Radek Doulik <rodo@ximian.com> + + * e-msg-composer.c (add_attachments_handle_mime_part): added + related argument, TRUE means that container of mime_part is + multipart/related + (add_attachments_handle_mime_part): add images as inline when + related is TRUE + (add_attachments_from_multipart): pass related to + add_attachments_handle_mime_part + 2003-04-21 Jeffrey Stedfast <fejj@ximian.com> * e-msg-composer-attachment.glade: Change the order of the diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 4e228bdbc2..8b1c70de90 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -3131,7 +3131,7 @@ e_msg_composer_flush_pending_body (EMsgComposer *composer, gboolean apply) 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 (EMsgComposer *composer, CamelMimePart *mime_pa 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 (EMsgComposer *composer, CamelMultipart *multipar { /* 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); } } } |