diff options
author | Dan Winship <danw@src.gnome.org> | 2000-05-11 04:12:40 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-05-11 04:12:40 +0800 |
commit | 497516ec005a8c27065e003093be6d18470fc58d (patch) | |
tree | cf9887fae066c5c69e6ec56cdf3783de06155ff8 /composer | |
parent | c3d51050bba8ab55f6acb58510c81284063ab55e (diff) | |
download | gsoc2013-evolution-497516ec005a8c27065e003093be6d18470fc58d.tar.gz gsoc2013-evolution-497516ec005a8c27065e003093be6d18470fc58d.tar.zst gsoc2013-evolution-497516ec005a8c27065e003093be6d18470fc58d.zip |
deal with Content-Transfer-Encoding a little bit at least.
* e-msg-composer-attachment-bar.c (attach_to_multipart): deal with
Content-Transfer-Encoding a little bit at least.
svn path=/trunk/; revision=2977
Diffstat (limited to 'composer')
-rw-r--r-- | composer/ChangeLog | 5 | ||||
-rw-r--r-- | composer/e-msg-composer-attachment-bar.c | 13 |
2 files changed, 16 insertions, 2 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 8dfea666fb..a6fde518af 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,8 @@ +2000-05-10 Dan Winship <danw@helixcode.com> + + * e-msg-composer-attachment-bar.c (attach_to_multipart): deal with + Content-Transfer-Encoding a little bit at least. + 2000-05-07 Mathieu Lacage <mathieu@gnu.org> * e-msg-composer.c (create_editor): remove FIXME and hardcoded diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c index 57eb2d42b6..5041164d9b 100644 --- a/composer/e-msg-composer-attachment-bar.c +++ b/composer/e-msg-composer-attachment-bar.c @@ -608,12 +608,11 @@ attach_to_multipart (CamelMultipart *multipart, CamelMimePart *part; struct stat st; int fd; + char *data; part = camel_mime_part_new (); fd = open (attachment->file_name, O_RDONLY); if (fd != -1 && fstat (fd, &st) != -1) { - char *data; - data = g_malloc (st.st_size); read (fd, data, st.st_size); close (fd); @@ -631,6 +630,16 @@ attach_to_multipart (CamelMultipart *multipart, g_basename (attachment->file_name)); camel_mime_part_set_description (part, attachment->description); + /* Kludge a bit on CTE. For now, we set QP for text/ and message/ + * and B64 for all else. FIXME. + */ + + if (!strncasecmp (attachment->mime_type, "text/", 5) || + !strncasecmp (attachment->mime_type, "message/", 8)) + camel_mime_part_set_encoding (part, CAMEL_MIME_PART_ENCODING_QUOTEDPRINTABLE); + else + camel_mime_part_set_encoding (part, CAMEL_MIME_PART_ENCODING_BASE64); + camel_multipart_add_part (multipart, part); gtk_object_unref (GTK_OBJECT (part)); } |