aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer-attachment-bar.c
diff options
context:
space:
mode:
Diffstat (limited to 'composer/e-msg-composer-attachment-bar.c')
-rw-r--r--composer/e-msg-composer-attachment-bar.c33
1 files changed, 32 insertions, 1 deletions
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c
index f5e90bf820..ed79beb77d 100644
--- a/composer/e-msg-composer-attachment-bar.c
+++ b/composer/e-msg-composer-attachment-bar.c
@@ -819,6 +819,33 @@ e_msg_composer_attachment_bar_attach_mime_part (EMsgComposerAttachmentBar *bar,
add_from_mime_part (bar, part);
}
+CamelMimePart *
+e_msg_composer_attachment_bar_find_content_id (EMsgComposerAttachmentBar *bar, char *content_id)
+{
+ EMsgComposerAttachmentBarPrivate *priv;
+ GList *p;
+
+ g_return_val_if_fail (E_IS_MSG_COMPOSER_ATTACHMENT_BAR (bar), NULL);
+ g_return_val_if_fail (content_id != NULL, NULL);
+
+ priv = bar->priv;
+
+ 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);
+
+ g_warning ("content_id: %s, part_id: %s\n", content_id, part_id);
+ if (part_id && !strcmp (part_id, content_id))
+ return attachment->body;
+ }
+
+ return NULL;
+}
+
+#if 0
EMsgComposerAttachment *
e_msg_composer_attachment_bar_find_content_id (EMsgComposerAttachmentBar *bar, char *content_id)
{
@@ -830,7 +857,7 @@ e_msg_composer_attachment_bar_find_content_id (EMsgComposerAttachmentBar *bar, c
priv = bar->priv;
- if (priv->attachments == NULL)
+ if (priv->attachments)
g_warning ("NO ATTACHMENTS");
for (p = priv->attachments; p != NULL; p = p->next) {
@@ -847,4 +874,8 @@ e_msg_composer_attachment_bar_find_content_id (EMsgComposerAttachmentBar *bar, c
return NULL;
}
+#endif
+
+
+