aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
Diffstat (limited to 'composer')
-rw-r--r--composer/ChangeLog5
-rw-r--r--composer/e-msg-composer-attachment-bar.c42
2 files changed, 27 insertions, 20 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 2d8f902b48..4704e382d7 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,8 @@
+2001-02-10 Jeffrey Stedfast <fejj@ximian.com>
+
+ * e-msg-composer-attachment-bar.c (attach_to_multipart):
+ multipart/* is another mime type we DO NOT want to encode ;-)
+
2001-02-06 Christopher James Lahey <clahey@ximian.com>
* e-msg-composer-hdrs.c (address_button_clicked_cb, add_header):
diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c
index d797f4aa4e..9c125e08b8 100644
--- a/composer/e-msg-composer-attachment-bar.c
+++ b/composer/e-msg-composer-attachment-bar.c
@@ -718,26 +718,28 @@ attach_to_multipart (CamelMultipart *multipart,
content_type = camel_mime_part_get_content_type (attachment->body);
- if (header_content_type_is (content_type, "text", "*")) {
- CamelStream *stream;
- GByteArray *array;
- guchar *text;
-
- array = g_byte_array_new ();
- stream = camel_stream_mem_new_with_byte_array (array);
- camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (attachment->body), stream);
- g_byte_array_append (array, "", 1);
- text = array->data;
-
- if (is_8bit (text))
- camel_mime_part_set_encoding (attachment->body, best_encoding (text));
- else
- camel_mime_part_set_encoding (attachment->body, CAMEL_MIME_PART_ENCODING_7BIT);
-
- camel_object_unref (CAMEL_OBJECT (stream));
- } else if (!header_content_type_is (content_type, "message", "*")) {
- camel_mime_part_set_encoding (attachment->body,
- CAMEL_MIME_PART_ENCODING_BASE64);
+ if (!header_content_type_is (content_type, "multipart", "*")) {
+ if (header_content_type_is (content_type, "text", "*")) {
+ CamelStream *stream;
+ GByteArray *array;
+ guchar *text;
+
+ array = g_byte_array_new ();
+ stream = camel_stream_mem_new_with_byte_array (array);
+ camel_data_wrapper_write_to_stream (CAMEL_DATA_WRAPPER (attachment->body), stream);
+ g_byte_array_append (array, "", 1);
+ text = array->data;
+
+ if (is_8bit (text))
+ camel_mime_part_set_encoding (attachment->body, best_encoding (text));
+ else
+ camel_mime_part_set_encoding (attachment->body, CAMEL_MIME_PART_ENCODING_7BIT);
+
+ camel_object_unref (CAMEL_OBJECT (stream));
+ } else if (!header_content_type_is (content_type, "message", "*")) {
+ camel_mime_part_set_encoding (attachment->body,
+ CAMEL_MIME_PART_ENCODING_BASE64);
+ }
}
camel_multipart_add_part (multipart, attachment->body);