aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--composer/ChangeLog9
-rw-r--r--composer/e-msg-composer-attachment-bar.c6
-rw-r--r--composer/e-msg-composer.c9
3 files changed, 15 insertions, 9 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 9e90314668..7f5c75b617 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,12 @@
+2000-04-26 NotZed <NotZed@HelixCode.com>
+
+ * e-msg-composer.c (build_message): Use camel_mime_part_set_text()
+ to set the text rather than messing with data wrappers.
+
+ * e-msg-composer-attachment-bar.c (attach_to_multipart): Change
+ for new camel-stream interfaces.
+ (attach_to_multipart): Also set base64 encoding by default.
+
2000-04-25 Radek Doulik <rodo@helixcode.com>
* e-msg-composer.c (create_editor): use uih here
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c
index 59785587fd..c37c9558a0 100644
--- a/composer/e-msg-composer-attachment-bar.c
+++ b/composer/e-msg-composer-attachment-bar.c
@@ -622,13 +622,13 @@ attach_to_multipart (CamelMultipart *multipart,
content = CAMEL_DATA_WRAPPER (gtk_object_new (CAMEL_SIMPLE_DATA_WRAPPER_TYPE,
NULL));
camel_data_wrapper_set_mime_type (content, attachment->mime_type);
- stream = camel_stream_fs_new_with_name (attachment->file_name,
- CAMEL_STREAM_FS_READ);
+ stream = camel_stream_fs_new_with_name (attachment->file_name, O_RDONLY, 0);
camel_data_wrapper_construct_from_stream (content, stream);
camel_stream_close (stream);
camel_medium_set_content_object (CAMEL_MEDIUM (part), content);
- /* FIXME: What about Content-Transfer-Encoding? */
+ /* TODO: could possibly select an appropriate encoder based on the content */
+ camel_mime_part_set_encoding((CamelMimePart *)part, CAMEL_MIME_PART_ENCODING_BASE64);
camel_multipart_add_part (multipart, part);
}
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 0271666454..17b34fb943 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -155,13 +155,10 @@ build_message (EMsgComposer *composer)
body_part = camel_mime_body_part_new ();
text = get_editor_text (BONOBO_WIDGET (composer->editor));
- sdr = camel_simple_data_wrapper_new ();
- camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (sdr),
+ /* set text sets text/plain */
+ camel_mime_part_set_text((CamelMimePart *)body_part, text);
+ camel_data_wrapper_set_mime_type (CAMEL_DATA_WRAPPER (camel_medium_get_content_object((CamelMedium *)body_part)),
"text/html");
- camel_simple_data_wrapper_set_text (sdr, text);
- camel_medium_set_content_object (CAMEL_MEDIUM (body_part),
- CAMEL_DATA_WRAPPER (sdr));
- gtk_object_unref (GTK_OBJECT (sdr));
g_free (text);
camel_multipart_add_part (multipart, body_part);
'>+0 * Python cleanup:rene2014-01-141-1/+1 * Fix dependency information.crees2013-12-251-7/+2 * Add NO_STAGE all over the place in preparation for the staging support (cat: ...bapt2013-09-211-0/+1 * Finish converting the whole ports tree to USES=pkgconfigbapt2013-04-231-2/+1 * Mechanically convert unmaintained ports which use "gnomehack" to use "pathfix...eadler2013-03-281-6/+3 * Add USE_PKGCONFIGbapt2012-07-271-0/+1 * - update png to 1.5.10dinoex2012-06-011-1/+1 * - strict python version to 2.x onlyrm2012-05-141-1/+1 * Remove WWW entries from unmaintained ports that return 404 or where the domainehaupt2011-08-031-2/+0 * - Reassign to the heaptabthorpe2011-07-051-1/+1 * - Get Rid MD5 supportmiwi2011-03-20