diff options
author | Dan Winship <danw@src.gnome.org> | 2000-05-04 06:16:23 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-05-04 06:16:23 +0800 |
commit | 460048da687dd596900edb0677a7232e22a862fa (patch) | |
tree | 513b901485d89b73c9282f7936bcc1aca47ac0f7 | |
parent | 932ea694649727e1f0e17b5bc79fae12eafbcecd (diff) | |
download | gsoc2013-evolution-460048da687dd596900edb0677a7232e22a862fa.tar.gz gsoc2013-evolution-460048da687dd596900edb0677a7232e22a862fa.tar.zst gsoc2013-evolution-460048da687dd596900edb0677a7232e22a862fa.zip |
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
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/mail-format.c | 16 |
2 files changed, 16 insertions, 7 deletions
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 <danw@helixcode.com> + + * 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 <lewing@helixcode.com> * 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); |