From 90a263ce5050d3e54df20212178320585385395f Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 1 Feb 2002 22:35:02 +0000 Subject: swap the order in which we add recipients to the list. If we add the auto-recipients first, then it is more visually appearling since most users will add their own recipients to the end of a list. svn path=/trunk/; revision=15551 --- composer/e-msg-composer.c | 67 ++++++++++++++++++++++++----------------------- 1 file changed, 34 insertions(+), 33 deletions(-) (limited to 'composer') diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index 64c4c5ed75..5f7d692578 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -1881,40 +1881,7 @@ update_auto_recipients (EMsgComposerHdrs *hdrs, int mode, const char *auto_addrs GList *list, *tail, *node; int i, n = 0; - switch (mode) { - case UPDATE_AUTO_CC: - destv = e_msg_composer_hdrs_get_cc (hdrs); - break; - case UPDATE_AUTO_BCC: - destv = e_msg_composer_hdrs_get_bcc (hdrs); - break; - default: - g_assert_not_reached (); - } - tail = list = NULL; - if (destv) { - for (i = 0; destv[i]; i++) { - if (!e_destination_is_auto_recipient (destv[i])) { - node = g_list_alloc (); - node->data = e_destination_copy (destv[i]); - node->next = NULL; - - if (tail) { - node->prev = tail; - tail->next = node; - } else { - node->prev = NULL; - list = node; - } - - tail = node; - n++; - } - } - - e_destination_freev (destv); - } if (auto_addrs) { iaddr = camel_internet_address_new (); @@ -1954,6 +1921,40 @@ update_auto_recipients (EMsgComposerHdrs *hdrs, int mode, const char *auto_addrs camel_object_unref (CAMEL_OBJECT (iaddr)); } + switch (mode) { + case UPDATE_AUTO_CC: + destv = e_msg_composer_hdrs_get_cc (hdrs); + break; + case UPDATE_AUTO_BCC: + destv = e_msg_composer_hdrs_get_bcc (hdrs); + break; + default: + g_assert_not_reached (); + } + + if (destv) { + for (i = 0; destv[i]; i++) { + if (!e_destination_is_auto_recipient (destv[i])) { + node = g_list_alloc (); + node->data = e_destination_copy (destv[i]); + node->next = NULL; + + if (tail) { + node->prev = tail; + tail->next = node; + } else { + node->prev = NULL; + list = node; + } + + tail = node; + n++; + } + } + + e_destination_freev (destv); + } + destv = e_destination_list_to_vector_sized (list, n); g_list_free (list); -- cgit