From 5893a146f20f364042410aa7d8cd45f8194ae745 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Sat, 16 May 2009 17:19:51 -0400 Subject: Bug 582744 – CC field autofill doesn't work for replies MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- composer/e-composer-name-header.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) (limited to 'composer/e-composer-name-header.c') diff --git a/composer/e-composer-name-header.c b/composer/e-composer-name-header.c index 1b5acc19d5..a6618fdb4a 100644 --- a/composer/e-composer-name-header.c +++ b/composer/e-composer-name-header.c @@ -297,6 +297,27 @@ e_composer_name_header_get_destinations (EComposerNameHeader *header) return destinations; /* free with e_destination_freev() */ } +void +e_composer_name_header_add_destinations (EComposerNameHeader *header, + EDestination **destinations) +{ + EDestinationStore *store; + ENameSelectorEntry *entry; + gint ii; + + g_return_if_fail (E_IS_COMPOSER_NAME_HEADER (header)); + + entry = E_COMPOSER_NAME_HEADER_GET_ENTRY (header); + store = e_name_selector_entry_peek_destination_store (entry); + + if (destinations == NULL) + return; + + for (ii = 0; destinations[ii] != NULL; ii++) + e_destination_store_append_destination ( + store, destinations[ii]); +} + void e_composer_name_header_set_destinations (EComposerNameHeader *header, EDestination **destinations) @@ -304,7 +325,6 @@ e_composer_name_header_set_destinations (EComposerNameHeader *header, EDestinationStore *store; ENameSelectorEntry *entry; GList *list, *iter; - gint ii; g_return_if_fail (E_IS_COMPOSER_NAME_HEADER (header)); @@ -317,10 +337,5 @@ e_composer_name_header_set_destinations (EComposerNameHeader *header, e_destination_store_remove_destination (store, iter->data); g_list_free (list); - if (destinations == NULL) - return; - - for (ii = 0; destinations[ii] != NULL; ii++) - e_destination_store_append_destination ( - store, destinations[ii]); + e_composer_name_header_add_destinations (header, destinations); } -- cgit