From 460048da687dd596900edb0677a7232e22a862fa Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Wed, 3 May 2000 22:16:23 +0000 Subject: Make the "Cc:" field optional again. (Before, we could check if * mail-format.c (write_recipients_to_stream, write_headers): Make the "Cc:" field optional again. (Before, we could check if camel_mime_message_get_recipients returned NULL, but now we need to actually look into the returned CamelInternetAddress object.) svn path=/trunk/; revision=2783 --- mail/ChangeLog | 7 +++++++ mail/mail-format.c | 16 +++++++++------- 2 files changed, 16 insertions(+), 7 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index beddf39fd1..3492ab5252 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2000-05-03 Dan Winship + + * mail-format.c (write_recipients_to_stream, write_headers): Make + the "Cc:" field optional again. (Before, we could check if + camel_mime_message_get_recipients returned NULL, but now we need + to actually look into the returned CamelInternetAddress object.) + 2000-05-03 Larry Ewing * folder-browser.c (folder_browser_gui_init): comment out the diff --git a/mail/mail-format.c b/mail/mail-format.c index 32b34b0c4d..f883eca54b 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -332,8 +332,8 @@ write_field_to_stream (const char *description, const char *value, static void write_recipients_to_stream (const gchar *recipient_type, const CamelInternetAddress *recipients, - gboolean bold, GtkHTML *html, - GtkHTMLStreamHandle *stream) + gboolean optional, gboolean bold, + GtkHTML *html, GtkHTMLStreamHandle *stream) { int i; char *recipients_string = NULL; @@ -351,8 +351,10 @@ write_recipients_to_stream (const gchar *recipient_type, g_free (old_string); } - write_field_to_stream (recipient_type, recipients_string, - bold, html, stream); + if (recipients_string || !optional) { + write_field_to_stream (recipient_type, recipients_string, + bold, html, stream); + } g_free (recipients_string); } @@ -388,11 +390,11 @@ write_headers (CamelMimeMessage *mime_message, GtkBox *box) write_recipients_to_stream ("To:", camel_mime_message_get_recipients (mime_message, CAMEL_RECIPIENT_TYPE_TO), - TRUE, html, stream); + FALSE, TRUE, html, stream); recipients = camel_mime_message_get_recipients (mime_message, CAMEL_RECIPIENT_TYPE_CC); - if (recipients) - write_recipients_to_stream ("Cc:", recipients, TRUE, html, stream); + write_recipients_to_stream ("Cc:", recipients, TRUE, TRUE, + html, stream); write_field_to_stream ("Subject:", camel_mime_message_get_subject (mime_message), TRUE, html, stream); -- cgit v1.2.3