diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2001-10-12 03:39:07 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2001-10-12 03:39:07 +0800 |
commit | bde8795c9423b33fcf1759b6b1231410ba11f3b1 (patch) | |
tree | 98b35d0cf16bd504ca79db7a585892d28d7179e1 | |
parent | 377edd07b7ba473cddb65f269d3bc26a7e501f70 (diff) | |
download | gsoc2013-evolution-bde8795c9423b33fcf1759b6b1231410ba11f3b1.tar gsoc2013-evolution-bde8795c9423b33fcf1759b6b1231410ba11f3b1.tar.gz gsoc2013-evolution-bde8795c9423b33fcf1759b6b1231410ba11f3b1.tar.bz2 gsoc2013-evolution-bde8795c9423b33fcf1759b6b1231410ba11f3b1.tar.lz gsoc2013-evolution-bde8795c9423b33fcf1759b6b1231410ba11f3b1.tar.xz gsoc2013-evolution-bde8795c9423b33fcf1759b6b1231410ba11f3b1.tar.zst gsoc2013-evolution-bde8795c9423b33fcf1759b6b1231410ba11f3b1.zip |
Deleted declaration of len.
2001-10-11 Jeffrey Stedfast <fejj@ximian.com>
* listener.c (impl_event): Deleted declaration of len.
* e-msg-composer.c (e_msg_composer_add_message_attachments): Take
a settext argument.
(e_msg_composer_new_with_message): Updated to pass the settext argument.
svn path=/trunk/; revision=13595
-rw-r--r-- | composer/ChangeLog | 8 | ||||
-rw-r--r-- | composer/e-msg-composer.c | 56 | ||||
-rw-r--r-- | composer/e-msg-composer.h | 3 | ||||
-rw-r--r-- | composer/listener.c | 1 |
4 files changed, 40 insertions, 28 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog index 76cc7ddf47..44dca3c49e 100644 --- a/composer/ChangeLog +++ b/composer/ChangeLog @@ -1,3 +1,11 @@ +2001-10-11 Jeffrey Stedfast <fejj@ximian.com> + + * listener.c (impl_event): Deleted declaration of len. + + * e-msg-composer.c (e_msg_composer_add_message_attachments): Take + a settext argument. + (e_msg_composer_new_with_message): Updated to pass the settext argument. + 2001-10-10 Jon Trowbridge <trow@ximian.com> * e-msg-composer-hdrs.c (e_msg_composer_hdrs_set_from_account): diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 72210b4c16..1b483396fa 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -2582,23 +2582,24 @@ is_special_header (const char *hdr_name) /** * e_msg_composer_add_message_attachments: * @composer: the composer to add the attachments to. - * @msg: the source message to copy the attachments from. + * @message: the source message to copy the attachments from. + * @settext: set the text of the composer * - * Walk through all the mime parts in @msg and add them to the composer + * Walk through all the mime parts in @message and add them to the composer * specified in @composer. */ void -e_msg_composer_add_message_attachments (EMsgComposer *composer, CamelMimeMessage *msg) +e_msg_composer_add_message_attachments (EMsgComposer *composer, CamelMimeMessage *message, gboolean settext) { CamelContentType *content_type; - - content_type = camel_mime_part_get_content_type (CAMEL_MIME_PART (msg)); + + content_type = camel_mime_part_get_content_type (CAMEL_MIME_PART (message)); if (header_content_type_is (content_type, "multipart", "alternative")) { /* multipart/alternative contains the text/plain and text/html versions of the message body */ CamelDataWrapper *wrapper; CamelMultipart *multipart; - wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (CAMEL_MIME_PART (msg))); + wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (CAMEL_MIME_PART (message))); multipart = CAMEL_MULTIPART (wrapper); handle_multipart_alternative (composer, multipart); @@ -2607,38 +2608,40 @@ e_msg_composer_add_message_attachments (EMsgComposer *composer, CamelMimeMessage CamelDataWrapper *wrapper; CamelMultipart *multipart; - wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (CAMEL_MIME_PART (msg))); + wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (CAMEL_MIME_PART (message))); multipart = CAMEL_MULTIPART (wrapper); handle_multipart (composer, multipart, 0); - } else { + } else if (settext) { /* We either have a text/plain or a text/html part */ CamelDataWrapper *contents; char *text; - contents = camel_medium_get_content_object (CAMEL_MEDIUM (msg)); + contents = camel_medium_get_content_object (CAMEL_MEDIUM (message)); text = mail_get_message_body (contents, FALSE, FALSE); - + if (text) e_msg_composer_set_pending_body (composer, text); } - /* We wait until now to set the body text because we need to ensure that - * the attachment bar has all the attachments, before we request them. - */ - e_msg_composer_apply_pending_body (composer); + if (settext) { + /* We wait until now to set the body text because we need to ensure that + * the attachment bar has all the attachments, before we request them. + */ + e_msg_composer_apply_pending_body (composer); + } } /** * e_msg_composer_new_with_message: - * @msg: The message to use as the source + * @message: The message to use as the source * * Create a new message composer widget. * * Return value: A pointer to the newly created widget **/ EMsgComposer * -e_msg_composer_new_with_message (CamelMimeMessage *msg) +e_msg_composer_new_with_message (CamelMimeMessage *message) { const CamelInternetAddress *to, *cc, *bcc; GList *To = NULL, *Cc = NULL, *Bcc = NULL; @@ -2655,11 +2658,11 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg) if (!new) return NULL; - subject = camel_mime_message_get_subject (msg); + subject = camel_mime_message_get_subject (message); - to = camel_mime_message_get_recipients (msg, CAMEL_RECIPIENT_TYPE_TO); - cc = camel_mime_message_get_recipients (msg, CAMEL_RECIPIENT_TYPE_CC); - bcc = camel_mime_message_get_recipients (msg, CAMEL_RECIPIENT_TYPE_BCC); + to = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_TO); + cc = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_CC); + bcc = camel_mime_message_get_recipients (message, CAMEL_RECIPIENT_TYPE_BCC); len = CAMEL_ADDRESS (to)->addresses->len; for (i = 0; i < len; i++) { @@ -2705,13 +2708,13 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg) g_list_free (Bcc); /* Restore the Account preference */ - account_name = camel_medium_get_header (CAMEL_MEDIUM (msg), "X-Evolution-Account"); + account_name = camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Account"); if (account_name) { while (*account_name && isspace ((unsigned) *account_name)) account_name++; } if (account_name == NULL) { - account_name = camel_medium_get_header (CAMEL_MEDIUM (msg), "From"); + account_name = camel_medium_get_header (CAMEL_MEDIUM (message), "From"); } e_msg_composer_set_headers (new, account_name, Tov, Ccv, Bccv, subject); @@ -2721,7 +2724,7 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg) e_destination_freev (Bccv); /* Restore the format editing preference */ - format = camel_medium_get_header (CAMEL_MEDIUM (msg), "X-Evolution-Format"); + format = camel_medium_get_header (CAMEL_MEDIUM (message), "X-Evolution-Format"); if (format) { while (*format && isspace ((unsigned) *format)) format++; @@ -2733,11 +2736,11 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg) } /* Remove any other X-Evolution-* headers that may have been set */ - xev = mail_tool_remove_xevolution_headers (msg); + xev = mail_tool_remove_xevolution_headers (message); mail_tool_destroy_xevolution (xev); /* set extra headers */ - headers = CAMEL_MIME_PART (msg)->headers; + headers = CAMEL_MIME_PART (message)->headers; while (headers) { if (!is_special_header (headers->name)) { g_ptr_array_add (new->extra_hdr_names, g_strdup (headers->name)); @@ -2747,7 +2750,8 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg) headers = headers->next; } - e_msg_composer_add_message_attachments (new, msg); + e_msg_composer_add_message_attachments (new, message, TRUE); + return new; } diff --git a/composer/e-msg-composer.h b/composer/e-msg-composer.h index 0f727d2065..01f7c2db9d 100644 --- a/composer/e-msg-composer.h +++ b/composer/e-msg-composer.h @@ -173,7 +173,8 @@ gchar * e_msg_composer_get_sig_file_content (const char *sigfi gboolean in_html); void e_msg_composer_add_message_attachments (EMsgComposer *composer, - CamelMimeMessage *msg); + CamelMimeMessage *message, + gboolean settext); #ifdef __cplusplus } diff --git a/composer/listener.c b/composer/listener.c index 341852806e..0b72407b88 100644 --- a/composer/listener.c +++ b/composer/listener.c @@ -162,7 +162,6 @@ impl_event (PortableServer_Servant _servant, } } else if (!strcmp (name, "url_requested")) { GNOME_GtkHTML_Editor_URLRequestEvent *e; - CORBA_long len = 0; CamelMimePart *part = NULL; e = (GNOME_GtkHTML_Editor_URLRequestEvent *)arg->_value; |