diff options
author | Dan Winship <danw@src.gnome.org> | 2001-10-22 03:08:07 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2001-10-22 03:08:07 +0800 |
commit | b0ac33fbbe200997569e14574dd5aac746419bed (patch) | |
tree | c5573f27b274206769804d81262c0a90f1d85774 /composer/e-msg-composer-attachment-bar.c | |
parent | e563157722c2dd8fe2cc157326e745142e850bcc (diff) | |
download | gsoc2013-evolution-b0ac33fbbe200997569e14574dd5aac746419bed.tar.gz gsoc2013-evolution-b0ac33fbbe200997569e14574dd5aac746419bed.tar.zst gsoc2013-evolution-b0ac33fbbe200997569e14574dd5aac746419bed.zip |
Make inline images used for replies not show up as
attachments. Also, I think this should make replies to HTML
messages containing inline images referenced via Content-Location
work, but that's not tested.
* e-msg-composer.c (various): Keep two hash tables of inline image
data: one mapping from cid: URLs to CamelMimeParts for all
attachments, the other mapping from file: and Content-Location
urls to CamelMimeParts (for those inline images that came from a
file or have a Content-Location).
(add_inlined_images): Simplify. Most of this code is in
e_msg_composer_add_inline_image_from_file() now.
(e_msg_composer_add_message_attachments, handle_multipart): Change
"attach_all" arg to "just_inlines". If it is set, call
e_msg_composer_add_inline_image_from_mime_part on any attachment
with a Content-Id or Content-Location.
(e_msg_composer_add_inline_image_from_file): Create a mime part
from a file and add it to the inline images hash.
(e_msg_composer_add_inline_image_from_mime_part): Add a mime part
directly to the inline images hash.
* listener.c (resolve_image_url): If asked to resolve a file: URL
that isn't in the inline images hash, call
e_msg_composer_add_inline_image_from_file to get a cid for it.
(impl_event): Look up the URL in the inline_images and
inline_images_by_url hashes.
* e-msg-composer-attachment-bar.c
(e_msg_composer_attachment_bar_find_message): Gone. No longer
used.
svn path=/trunk/; revision=13852
Diffstat (limited to 'composer/e-msg-composer-attachment-bar.c')
-rw-r--r-- | composer/e-msg-composer-attachment-bar.c | 39 |
1 files changed, 0 insertions, 39 deletions
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c index 6619a59597..71562e9692 100644 --- a/composer/e-msg-composer-attachment-bar.c +++ b/composer/e-msg-composer-attachment-bar.c @@ -816,42 +816,3 @@ e_msg_composer_attachment_bar_attach_mime_part (EMsgComposerAttachmentBar *bar, add_from_mime_part (bar, part); } - -CamelMimePart * -e_msg_composer_attachment_bar_find_message (EMsgComposerAttachmentBar *bar, char *url) -{ - EMsgComposerAttachmentBarPrivate *priv; - GList *p; - char *content_id = NULL; - - g_return_val_if_fail (E_IS_MSG_COMPOSER_ATTACHMENT_BAR (bar), NULL); - g_return_val_if_fail (url != NULL, NULL); - - if (!strncmp ("cid:", url, 4)) - content_id = url + 4; - - priv = bar->priv; - - for (p = priv->attachments; p != NULL; p = p->next) { - CamelMimePart *part; - const char *part_id; - const char *part_location; - - part = E_MSG_COMPOSER_ATTACHMENT (p->data)->body; - - part_id = camel_mime_part_get_content_id (part); - g_warning ("content_id: %s, part_id: %s\n", content_id, part_id); - - if (content_id && part_id && !strcmp (part_id, content_id)) - return part; - - part_location = camel_mime_part_get_content_location (part); - g_warning ("url: %s, part_id: %s\n", url, part_id); - - if (part_location && !strcmp (part_location, url)) - return part; - - } - - return NULL; -} |