aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-11-02 07:39:09 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-11-02 07:39:09 +0800
commit7158b3b00ac2e6293bbbcb36985280cf1a617590 (patch)
tree8c969c35adaed18790a0ea1191afe4840bae17ed
parentde58cbf8be4d351193d43525cec73950dcda6edf (diff)
downloadgsoc2013-evolution-7158b3b00ac2e6293bbbcb36985280cf1a617590.tar.gz
gsoc2013-evolution-7158b3b00ac2e6293bbbcb36985280cf1a617590.tar.zst
gsoc2013-evolution-7158b3b00ac2e6293bbbcb36985280cf1a617590.zip
Don't create the To, Cc, and Bcc lists based only on the address, use both
2000-11-01 Jeffrey Stedfast <fejj@helixcode.com> * e-msg-composer.c (e_msg_composer_new_with_message): Don't create the To, Cc, and Bcc lists based only on the address, use both the name and address and camel_address_encode() them. svn path=/trunk/; revision=6326
-rw-r--r--composer/ChangeLog6
-rw-r--r--composer/e-msg-composer.c36
2 files changed, 33 insertions, 9 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index b8991e1a98..da653450c2 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,5 +1,11 @@
2000-11-01 Jeffrey Stedfast <fejj@helixcode.com>
+ * e-msg-composer.c (e_msg_composer_new_with_message): Don't create
+ the To, Cc, and Bcc lists based only on the address, use both the
+ name and address and camel_address_encode() them.
+
+2000-11-01 Jeffrey Stedfast <fejj@helixcode.com>
+
* e-msg-composer-attachment-bar.c (attach_to_multipart): Fix the
CTE kludge, calculate the best mime transfer encoding for the mime
part and use that. Include e-msg-composer-select-file.h
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index 28b9eb7fac..59cdf40a38 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -1447,26 +1447,44 @@ e_msg_composer_new_with_message (CamelMimeMessage *msg)
len = CAMEL_ADDRESS (to)->addresses->len;
for (i = 0; i < len; i++) {
- const char *addr;
+ const char *name, *addr;
- if (camel_internet_address_get (to, i, NULL, &addr))
- To = g_list_append (To, g_strdup (addr));
+ if (camel_internet_address_get (to, i, &name, &addr)) {
+ CamelInternetAddress *cia;
+
+ cia = camel_internet_address_new ();
+ camel_internet_address_add (cia, name, addr);
+ To = g_list_append (To, camel_address_encode (CAMEL_ADDRESS (cia)));
+ camel_object_unref (CAMEL_OBJECT (cia));
+ }
}
len = CAMEL_ADDRESS (cc)->addresses->len;
for (i = 0; i < len; i++) {
- const char *addr;
+ const char *name, *addr;
- if (camel_internet_address_get (cc, i, NULL, &addr))
- Cc = g_list_append (Cc, g_strdup (addr));
+ if (camel_internet_address_get (to, i, &name, &addr)) {
+ CamelInternetAddress *cia;
+
+ cia = camel_internet_address_new ();
+ camel_internet_address_add (cia, name, addr);
+ Cc = g_list_append (Cc, camel_address_encode (CAMEL_ADDRESS (cia)));
+ camel_object_unref (CAMEL_OBJECT (cia));
+ }
}
len = CAMEL_ADDRESS (bcc)->addresses->len;
for (i = 0; i < len; i++) {
- const char *addr;
+ const char *name, *addr;
- if (camel_internet_address_get (bcc, i, NULL, &addr))
- Bcc = g_list_append (Bcc, g_strdup (addr));
+ if (camel_internet_address_get (to, i, &name, &addr)) {
+ CamelInternetAddress *cia;
+
+ cia = camel_internet_address_new ();
+ camel_internet_address_add (cia, name, addr);
+ Bcc = g_list_append (Bcc, camel_address_encode (CAMEL_ADDRESS (cia)));
+ camel_object_unref (CAMEL_OBJECT (cia));
+ }
}
e_msg_composer_set_headers (new, To, Cc, Bcc, subject);