diff options
author | Dan Winship <danw@src.gnome.org> | 2000-05-29 01:36:31 +0800 |
---|---|---|
committer | Dan Winship <danw@src.gnome.org> | 2000-05-29 01:36:31 +0800 |
commit | fbd1a80e319890c83423912913238a63f0478424 (patch) | |
tree | f9a78116c4206755a30dfc5c2f6899d6e0edd3fb /mail/mail-format.c | |
parent | dd4eb1738f82647b4ef4cf93e73c2cd4d5349456 (diff) | |
download | gsoc2013-evolution-fbd1a80e319890c83423912913238a63f0478424.tar.gz gsoc2013-evolution-fbd1a80e319890c83423912913238a63f0478424.tar.zst gsoc2013-evolution-fbd1a80e319890c83423912913238a63f0478424.zip |
Use `foo@bar' rather than `<foo@bar>' for recipient with no name.
* mail-format.c (write_recipients_to_stream): Use `foo@bar' rather
than `<foo@bar>' for recipient with no name.
svn path=/trunk/; revision=3247
Diffstat (limited to 'mail/mail-format.c')
-rw-r--r-- | mail/mail-format.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/mail/mail-format.c b/mail/mail-format.c index 1e90dbf6dc..429e94f2d0 100644 --- a/mail/mail-format.c +++ b/mail/mail-format.c @@ -360,12 +360,18 @@ write_recipients_to_stream (const gchar *recipient_type, i = 0; while (camel_internet_address_get (recipients, i++, &name, &addr)) { char *old_string = recipients_string; - recipients_string = - g_strdup_printf ("%s%s%s%s%s <%s>", - old_string ? old_string : "", - old_string ? ", " : "", - *name ? "\"" : "", name, - *name ? "\"" : "", addr); + + if (*name) { + recipients_string = g_strdup_printf ( + "%s%s\"%s\" <%s>", + old_string ? old_string : "", + old_string ? ", " : "", + name, addr); + } else { + recipients_string = g_strdup_printf ( + "%s%s%s", old_string ? old_string : "", + old_string ? ", " : "", addr); + } g_free (old_string); } |