diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-11 22:43:53 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:12 +0800 |
commit | d2efe18e83f5ac28d19afa506010910f752f670c (patch) | |
tree | 0dd6abce58691f43cb0e586979bc096271b40d9b /mail/mail-ops.c | |
parent | 750864c8902f95edb1023ed4169b208d3f04cabf (diff) | |
download | gsoc2013-evolution-d2efe18e83f5ac28d19afa506010910f752f670c.tar gsoc2013-evolution-d2efe18e83f5ac28d19afa506010910f752f670c.tar.gz gsoc2013-evolution-d2efe18e83f5ac28d19afa506010910f752f670c.tar.bz2 gsoc2013-evolution-d2efe18e83f5ac28d19afa506010910f752f670c.tar.lz gsoc2013-evolution-d2efe18e83f5ac28d19afa506010910f752f670c.tar.xz gsoc2013-evolution-d2efe18e83f5ac28d19afa506010910f752f670c.tar.zst gsoc2013-evolution-d2efe18e83f5ac28d19afa506010910f752f670c.zip |
Remove mail_build_attachment().
Use e_mail_folder_build_attachment() instead.
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r-- | mail/mail-ops.c | 61 |
1 files changed, 0 insertions, 61 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c index d6507ec4c3..8c13507545 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -1127,67 +1127,6 @@ mail_get_folderinfo (CamelStore *store, return id; } -/* ** ATTACH MESSAGES ****************************************************** */ - -struct _build_data { - void (*done)(CamelFolder *folder, GPtrArray *uids, CamelMimePart *part, gchar *subject, gpointer data); - gpointer data; -}; - -static void -do_build_attachment (CamelFolder *folder, GPtrArray *uids, GPtrArray *messages, gpointer data) -{ - struct _build_data *d = data; - CamelMultipart *multipart; - CamelMimePart *part; - gchar *subject; - gint i; - - if (messages->len == 0) { - d->done (folder, messages, NULL, NULL, d->data); - g_free (d); - return; - } - - if (messages->len == 1) { - part = mail_tool_make_message_attachment (messages->pdata[0]); - } else { - multipart = camel_multipart_new (); - camel_data_wrapper_set_mime_type(CAMEL_DATA_WRAPPER (multipart), "multipart/digest"); - camel_multipart_set_boundary (multipart, NULL); - - for (i=0;i<messages->len;i++) { - part = mail_tool_make_message_attachment (messages->pdata[i]); - camel_multipart_add_part (multipart, part); - g_object_unref (part); - } - part = camel_mime_part_new (); - camel_medium_set_content (CAMEL_MEDIUM (part), CAMEL_DATA_WRAPPER (multipart)); - g_object_unref (multipart); - - camel_mime_part_set_description(part, _("Forwarded messages")); - } - - subject = mail_tool_generate_forward_subject (messages->pdata[0]); - d->done (folder, messages, part, subject, d->data); - g_free (subject); - g_object_unref (part); - - g_free (d); -} - -void -mail_build_attachment (CamelFolder *folder, GPtrArray *uids, - void (*done)(CamelFolder *folder, GPtrArray *messages, CamelMimePart *part, gchar *subject, gpointer data), gpointer data) -{ - struct _build_data *d; - - d = g_malloc (sizeof (*d)); - d->done = done; - d->data = data; - mail_get_messages (folder, uids, do_build_attachment, d); -} - /* ** LOAD FOLDER ********************************************************* */ /* there should be some way to merge this and create folder, since both can |