aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer-attachment.c
diff options
context:
space:
mode:
authorRadek Doulik <rodo@helixcode.com>2000-11-04 18:11:50 +0800
committerRadek Doulik <rodo@src.gnome.org>2000-11-04 18:11:50 +0800
commit7f7c32f6d202a2b1f9cc413bf361be91bcd47010 (patch)
treef3d634d30796ce96db4978eafd96db7e31e80c9b /composer/e-msg-composer-attachment.c
parent1ca157384dd51c016c0631f2fa3ab8526ae5f12a (diff)
downloadgsoc2013-evolution-7f7c32f6d202a2b1f9cc413bf361be91bcd47010.tar
gsoc2013-evolution-7f7c32f6d202a2b1f9cc413bf361be91bcd47010.tar.gz
gsoc2013-evolution-7f7c32f6d202a2b1f9cc413bf361be91bcd47010.tar.bz2
gsoc2013-evolution-7f7c32f6d202a2b1f9cc413bf361be91bcd47010.tar.lz
gsoc2013-evolution-7f7c32f6d202a2b1f9cc413bf361be91bcd47010.tar.xz
gsoc2013-evolution-7f7c32f6d202a2b1f9cc413bf361be91bcd47010.tar.zst
gsoc2013-evolution-7f7c32f6d202a2b1f9cc413bf361be91bcd47010.zip
use inline images hash table
2000-11-04 Radek Doulik <rodo@helixcode.com> * listener.c (resolve_image_url): use inline images hash table * e-msg-composer.c (init): create inlined images hash table (destroy): destroy it (clear_inline_images): helper function, used from g_hash_table_foreach_remove to destroy one inline image record * e-msg-composer.h: added hash table with inlined images url -> cid info 2000-11-03 Radek Doulik <rodo@helixcode.com> * listener.c (impl_event): updated for API changed implemented image_url event (resolve_image_url): new helper function, attaches image to mail and returns new (resolved) url pointing to mime component * e-msg-composer-attachment.c (e_msg_composer_attachment_new): added conponent_id parameter * e-msg-composer-attachment-bar.c (e_msg_composer_attachment_bar_attach): added parameter content_id (add_from_file): likewise svn path=/trunk/; revision=6390
Diffstat (limited to 'composer/e-msg-composer-attachment.c')
-rw-r--r--composer/e-msg-composer-attachment.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/composer/e-msg-composer-attachment.c b/composer/e-msg-composer-attachment.c
index b42631cda6..2ec141064b 100644
--- a/composer/e-msg-composer-attachment.c
+++ b/composer/e-msg-composer-attachment.c
@@ -165,7 +165,7 @@ e_msg_composer_attachment_get_type (void)
* Return value:
**/
EMsgComposerAttachment *
-e_msg_composer_attachment_new (const gchar *file_name)
+e_msg_composer_attachment_new (const gchar *file_name, const gchar *content_id)
{
EMsgComposerAttachment *new;
CamelMimePart *part;
@@ -199,7 +199,15 @@ e_msg_composer_attachment_new (const gchar *file_name)
part = camel_mime_part_new ();
camel_medium_set_content_object (CAMEL_MEDIUM (part), wrapper);
camel_object_unref (CAMEL_OBJECT (wrapper));
-
+
+ if (content_id) {
+ gchar *id;
+
+ id = g_strconcat ("<", content_id, ">", NULL);
+ camel_mime_part_set_content_id (part, id);
+ g_free (id);
+ }
+
camel_mime_part_set_disposition (part, "attachment");
if (strchr (file_name, '/'))
camel_mime_part_set_filename (part, strrchr (file_name, '/') + 1);