From 197cf154adc392c688f0e8e5d012904663c52959 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Mon, 14 Jun 2004 03:45:34 +0000 Subject: if we removed all of the addresses because they were 'us', add the first 2004-06-14 Not Zed * em-composer-utils.c (get_reply_all): if we removed all of the addresses because they were 'us', add the first to address back. otherwise reply-to-all behaves strange. svn path=/trunk/; revision=26330 --- mail/ChangeLog | 6 ++++++ mail/em-composer-utils.c | 8 +++++++- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index de32f33fab..8c8f254118 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,9 @@ +2004-06-14 Not Zed + + * em-composer-utils.c (get_reply_all): if we removed all of the + addresses because they were 'us', add the first to + address back. otherwise reply-to-all behaves strange. + 2004-06-11 Jeffrey Stedfast * em-folder-tree.c (em_folder_tree_set_selected): Free any old diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index abc758915f..42e70400a7 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -868,7 +868,6 @@ static void forward_non_attached (GPtrArray *messages, int style, const char *fromuri) { CamelMimeMessage *message; - CamelDataWrapper *wrapper; EMsgComposer *composer; char *subject, *text; int i; @@ -1458,6 +1457,13 @@ get_reply_all (CamelMimeMessage *message, CamelInternetAddress **to, CamelIntern camel_internet_address_add (*to, name, addr); camel_address_remove ((CamelAddress *) *cc, 0); } + + /* if To: is still empty, may we removed duplicates (i.e. ourself), so add the original To if it was set */ + if (camel_address_length((CamelAddress *)*to) == 0 + && (camel_internet_address_get(to_addrs, 0, &name, &addr) + || camel_internet_address_get(cc_addrs, 0, &name, &addr))) { + camel_internet_address_add(*to, name, addr); + } g_hash_table_destroy (rcpt_hash); } -- cgit v1.2.3