diff options
author | Larry Ewing <lewing@ximian.com> | 2001-10-06 00:57:01 +0800 |
---|---|---|
committer | Larry Ewing <lewing@src.gnome.org> | 2001-10-06 00:57:01 +0800 |
commit | a1750a292eb31a113a22c0278fb6517d56f78f75 (patch) | |
tree | f57113886943ed069664c79914e8ae1533cc1788 /composer/e-msg-composer-attachment-bar.c | |
parent | 301815b5e307a83e49218e2e2aa5ce9971717bc0 (diff) | |
download | gsoc2013-evolution-a1750a292eb31a113a22c0278fb6517d56f78f75.tar.gz gsoc2013-evolution-a1750a292eb31a113a22c0278fb6517d56f78f75.tar.zst gsoc2013-evolution-a1750a292eb31a113a22c0278fb6517d56f78f75.zip |
remove unused variable.
2001-10-05 Larry Ewing <lewing@ximian.com>
* e-msg-composer-attachment.c (e_msg_composer_attachment_new):
remove unused variable.
* e-msg-composer-attachment-bar.c
(e_msg_composer_attachment_bar_find_message): generalize this to
lookup content locations as well.
* e-msg-composer-attachment-bar.h: change prototype to match the
new function.
* listener.c (impl_event): handle the url_requested event, look up
parts in the attachment part and feed them down the stream if it
is found.
* e-msg-composer.c (handle_multipart_alternative): delay setting
the body text.
(handle_multipart): delay setting body text
(e_msg_composer_new_with_message): set the body text from the
object data. Doing this ensures that we will have the attachments
processed before we try to look them up.
svn path=/trunk/; revision=13445
Diffstat (limited to 'composer/e-msg-composer-attachment-bar.c')
-rw-r--r-- | composer/e-msg-composer-attachment-bar.c | 58 |
1 files changed, 18 insertions, 40 deletions
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c index ed79beb77d..5cb8ed0244 100644 --- a/composer/e-msg-composer-attachment-bar.c +++ b/composer/e-msg-composer-attachment-bar.c @@ -820,62 +820,40 @@ e_msg_composer_attachment_bar_attach_mime_part (EMsgComposerAttachmentBar *bar, } CamelMimePart * -e_msg_composer_attachment_bar_find_content_id (EMsgComposerAttachmentBar *bar, char *content_id) +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 (content_id != NULL, 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) { - EMsgComposerAttachment *attachment; + CamelMimePart *part; const char *part_id; - - attachment = p->data; - part_id = camel_mime_part_get_content_id (attachment->body); - - g_warning ("content_id: %s, part_id: %s\n", content_id, part_id); - if (part_id && !strcmp (part_id, content_id)) - return attachment->body; - } + const char *part_location; - return NULL; -} + part = E_MSG_COMPOSER_ATTACHMENT (p->data)->body; -#if 0 -EMsgComposerAttachment * -e_msg_composer_attachment_bar_find_content_id (EMsgComposerAttachmentBar *bar, char *content_id) -{ - EMsgComposerAttachmentBarPrivate *priv; - GList *p; + part_id = camel_mime_part_get_content_id (part); + g_warning ("content_id: %s, part_id: %s\n", content_id, part_id); - g_return_val_if_fail (E_IS_MSG_COMPOSER_ATTACHMENT_BAR (bar), NULL); - g_return_val_if_fail (content_id != NULL, NULL); + if (content_id && part_id && !strcmp (part_id, content_id)) + return part; - priv = bar->priv; - - if (priv->attachments) - g_warning ("NO ATTACHMENTS"); - - for (p = priv->attachments; p != NULL; p = p->next) { - EMsgComposerAttachment *attachment; - const char *part_id; - - attachment = p->data; - part_id = camel_mime_part_get_content_id (attachment->body); + part_location = camel_mime_part_get_content_location (part); + g_warning ("url: %s, part_id: %s\n", url, part_id); - g_warning ("content_id: %s, part_id: %s\n", content_id, part_id); - if (part_id && !strcmp (part_id, content_id)) - return attachment; + if (part_id && !strcmp (part_location, url)) + return part; + } return NULL; } -#endif - - - - |