diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-02-10 17:14:38 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-02-10 17:14:38 +0800 |
commit | c1488e33dad8e49826a30e056282926f15f13537 (patch) | |
tree | f981c939dc7ef8673c4e200ae9f99bddb63fddd5 | |
parent | fd6e3e1eaa982649388fa2ac8d5464be47e10993 (diff) | |
download | gsoc2013-evolution-c1488e33dad8e49826a30e056282926f15f13537.tar.gz gsoc2013-evolution-c1488e33dad8e49826a30e056282926f15f13537.tar.zst gsoc2013-evolution-c1488e33dad8e49826a30e056282926f15f13537.zip |
multipart/* is another mime type we DO NOT want to encode ;-)
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 ;-)
svn path=/trunk/; revision=8156
-rw-r--r-- | composer/ChangeLog | 5 | ||||
-rw-r--r-- | composer/e-msg-composer-attachment-bar.c | 42 |
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); |