aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2000-04-27 05:52:13 +0800
committerDan Winship <danw@src.gnome.org>2000-04-27 05:52:13 +0800
commit9f81c2c796e9e93d643eed11d9e6f7d31a9eb4d8 (patch)
tree4516224d8c527419cbe658e1411a575f733a977f /composer
parent82071abd45b2dbc7874c3556fbc03a503cf29bd3 (diff)
downloadgsoc2013-evolution-9f81c2c796e9e93d643eed11d9e6f7d31a9eb4d8.tar.gz
gsoc2013-evolution-9f81c2c796e9e93d643eed11d9e6f7d31a9eb4d8.tar.zst
gsoc2013-evolution-9f81c2c796e9e93d643eed11d9e6f7d31a9eb4d8.zip
Only generate a multipart message if there are attachments. Otherwise
* e-msg-composer.c (build_message): Only generate a multipart message if there are attachments. Otherwise generate a single part. svn path=/trunk/; revision=2648
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog4
-rw-r--r--composer/e-msg-composer.c20
2 files changed, 15 insertions, 9 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 9969b45de8..8e0cd2ee0d 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,5 +1,9 @@
2000-04-26 Dan Winship <danw@helixcode.com>
+ * e-msg-composer.c (build_message): Only generate a multipart
+ message if there are attachments. Otherwise generate a single
+ part.
+
* Update for CamelMimeBodyPart -> CamelMimePart
2000-04-26 Dan Winship <danw@helixcode.com>
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 81423f39d3..d404146351 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -136,7 +136,6 @@ build_message (EMsgComposer *composer)
{
CamelMimeMessage *new;
CamelMimePart *part;
- CamelMultipart *multipart;
char *text;
int i;
@@ -150,21 +149,24 @@ build_message (EMsgComposer *composer)
composer->extra_hdr_values->pdata[i]);
}
- multipart = camel_multipart_new ();
part = camel_mime_part_new ();
-
text = get_editor_text (BONOBO_WIDGET (composer->editor));
camel_mime_part_set_content (part, text, strlen (text), "text/html");
g_free (text);
- camel_multipart_add_part (multipart, part);
+ if (e_msg_composer_attachment_bar_get_num_attachments (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar))) {
+ CamelMultipart *multipart = camel_multipart_new ();
- e_msg_composer_attachment_bar_to_multipart
- (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar),
- multipart);
+ camel_multipart_add_part (multipart, part);
+
+ e_msg_composer_attachment_bar_to_multipart (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar), multipart);
- camel_medium_set_content_object (CAMEL_MEDIUM (new),
- CAMEL_DATA_WRAPPER (multipart));
+ camel_medium_set_content_object (CAMEL_MEDIUM (new),
+ CAMEL_DATA_WRAPPER (multipart));
+ } else {
+ camel_medium_set_content_object (CAMEL_MEDIUM (new),
+ CAMEL_DATA_WRAPPER (part));
+ }
/* FIXME refcounting is most certainly wrong. We want all the stuff to
be destroyed when we unref() the message. */
an>/+0 * Update mbuffer to 2014-12-27mm2015-01-202-3/+3 * - Update to version 2014.03.10mva2014-10-083-12/+22 * Convert a bunch of EXTRACT_SUFX=... into USES=tar:...adamw2014-07-301-2/+1 * Modernize LIB_DEPENDSbapt2014-07-151-1/+1 * - Convert gmake, bzip2 to USESmiwi2014-05-261-1/+1 * Fix pkg-plist for mbuffermm2014-01-191-3/+2 * Add STAGE support to misc/mbuffermm2014-01-191-1/+0 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1 * Update to 2013.02.20mm2013-06-222-5/+4 * - adoption of optionsNGjgh2013-06-031-8/+7 * - mbuffer prefers mash, so let it be (also fixed hidden dependency to mhashrafan2012-05-271-0/+14 * - Update to 2011.07.24rafan2012-01-153-30/+3 * Fix a typo.olgeni2011-09-091-2/+2 * - Correct the patch to use sigaction(2) for 7.x and 6.xrafan2011-03-291-5/+20 * - Update to 2011.03.17rafan2011-03-263-3/+15 * - Update to 2011.01.19rafan2011-01-242-3/+3 * - Update to 2010.12.30rafan2011-01-032-4/+6 * - Update to 2010.05.26rafan2010-09-242-4/+4 * - Update to 2009.01.06rafan2009-01-073-132/+4 * - Fix build on 6.x by using valloc(3) instead of posix_memalign(3)rafan2008-12-271-11/+18 * - Update to 20081207 which fixes many bugs from previous version in portsrafan2008-12-263-45/+88 * Remove always-false/true conditions based on OSVERSION 500000edwin2007-10-041-4/+0 * - Respect PTHREAD_LIBSrafan2007-01-111-1/+4 * - mbuffer needs pthread which is not available on 4.xrafan2007-01-111-0/+4