From 2a6a191e0501a677fbac59304b6bc375e221e3ec Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 26 Apr 2000 21:30:32 +0000 Subject: Remove. We weren't using the fields that made this different from * camel-mime-body-part.[ch]: Remove. We weren't using the fields that made this different from camel-mime-part, so it basically just forced us to do lots of gratuitous typecasting. * camel-multipart.[ch]: Use CamelMimePart. Remove the multipart parent stuff, since we weren't using that either. * etc: update for CamelMimeBodyPart -> CamelMimePart svn path=/trunk/; revision=2645 --- composer/ChangeLog | 4 ++++ composer/e-msg-composer-attachment-bar.c | 17 ++++++++--------- composer/e-msg-composer-attachment-bar.h | 1 - composer/e-msg-composer.c | 9 ++++----- 4 files changed, 16 insertions(+), 15 deletions(-) (limited to 'composer') diff --git a/composer/ChangeLog b/composer/ChangeLog index 2bf6f7e439..9969b45de8 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,7 @@ +2000-04-26 Dan Winship + + * Update for CamelMimeBodyPart -> CamelMimePart + 2000-04-26 Dan Winship * e-msg-composer-attachment-bar.c (attach_to_multipart): add a diff --git a/composer/e-msg-composer-attachment-bar.c b/composer/e-msg-composer-attachment-bar.c index b83b4e1a41..212577a7ad 100644 --- a/composer/e-msg-composer-attachment-bar.c +++ b/composer/e-msg-composer-attachment-bar.c @@ -26,8 +26,9 @@ #include "e-msg-composer-attachment.h" #include "e-msg-composer-attachment-bar.h" -#include "camel/camel-simple-data-wrapper.h" +#include "camel/camel-data-wrapper.h" #include "camel/camel-stream-fs.h" +#include "camel/camel-mime-part.h" #define ICON_WIDTH 64 @@ -604,11 +605,11 @@ static void attach_to_multipart (CamelMultipart *multipart, EMsgComposerAttachment *attachment) { - CamelMimeBodyPart *part; + CamelMimePart *part; struct stat st; int fd; - part = camel_mime_body_part_new (); + part = camel_mime_part_new (); fd = open (attachment->file_name, O_RDONLY); if (fd != -1 && fstat (fd, &st) != -1) { char *data; @@ -617,8 +618,7 @@ attach_to_multipart (CamelMultipart *multipart, read (fd, data, st.st_size); close (fd); - camel_mime_part_set_content (CAMEL_MIME_PART (part), data, - st.st_size, + camel_mime_part_set_content (part, data, st.st_size, attachment->mime_type); } else { g_warning ("couldn't open %s", attachment->file_name); @@ -626,11 +626,10 @@ attach_to_multipart (CamelMultipart *multipart, return; } - camel_mime_part_set_disposition (CAMEL_MIME_PART (part), "attachment"); - camel_mime_part_set_filename (CAMEL_MIME_PART (part), + camel_mime_part_set_disposition (part, "attachment"); + camel_mime_part_set_filename (part, g_basename (attachment->file_name)); - camel_mime_part_set_description (CAMEL_MIME_PART (part), - attachment->description); + camel_mime_part_set_description (part, attachment->description); camel_multipart_add_part (multipart, part); } diff --git a/composer/e-msg-composer-attachment-bar.h b/composer/e-msg-composer-attachment-bar.h index 55fe0e6b96..803b51a954 100644 --- a/composer/e-msg-composer-attachment-bar.h +++ b/composer/e-msg-composer-attachment-bar.h @@ -26,7 +26,6 @@ #include #include -#include #ifdef __cplusplus extern "C" { diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 3a2decae4a..81423f39d3 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -135,7 +135,7 @@ static CamelMimeMessage * build_message (EMsgComposer *composer) { CamelMimeMessage *new; - CamelMimeBodyPart *body_part; + CamelMimePart *part; CamelMultipart *multipart; char *text; int i; @@ -151,14 +151,13 @@ build_message (EMsgComposer *composer) } multipart = camel_multipart_new (); - body_part = camel_mime_body_part_new (); + part = camel_mime_part_new (); text = get_editor_text (BONOBO_WIDGET (composer->editor)); - camel_mime_part_set_content (CAMEL_MIME_PART (body_part), text, - strlen (text), "text/html"); + camel_mime_part_set_content (part, text, strlen (text), "text/html"); g_free (text); - camel_multipart_add_part (multipart, body_part); + camel_multipart_add_part (multipart, part); e_msg_composer_attachment_bar_to_multipart (E_MSG_COMPOSER_ATTACHMENT_BAR (composer->attachment_bar), -- cgit v1.2.3