aboutsummaryrefslogtreecommitdiffstats
path: root/composer
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-17 05:19:51 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-21 10:52:36 +0800
commit5893a146f20f364042410aa7d8cd45f8194ae745 (patch)
tree2c5a1b8e36f2a6c7ec024f944baf8aed3f707fa8 /composer
parentee4f68726e2ca4cffd5e63ec5bdad62aff4147d3 (diff)
downloadgsoc2013-evolution-5893a146f20f364042410aa7d8cd45f8194ae745.tar
gsoc2013-evolution-5893a146f20f364042410aa7d8cd45f8194ae745.tar.gz
gsoc2013-evolution-5893a146f20f364042410aa7d8cd45f8194ae745.tar.bz2
gsoc2013-evolution-5893a146f20f364042410aa7d8cd45f8194ae745.tar.lz
gsoc2013-evolution-5893a146f20f364042410aa7d8cd45f8194ae745.tar.xz
gsoc2013-evolution-5893a146f20f364042410aa7d8cd45f8194ae745.tar.zst
gsoc2013-evolution-5893a146f20f364042410aa7d8cd45f8194ae745.zip
Bug 582744 – CC field autofill doesn't work for replies
Diffstat (limited to 'composer')
-rw-r--r--composer/e-composer-header-table.c44
-rw-r--r--composer/e-composer-header-table.h9
-rw-r--r--composer/e-composer-name-header.c29
-rw-r--r--composer/e-composer-name-header.h3
4 files changed, 78 insertions, 7 deletions
diff --git a/composer/e-composer-header-table.c b/composer/e-composer-header-table.c
index 44a4919e0d..d539565ad2 100644
--- a/composer/e-composer-header-table.c
+++ b/composer/e-composer-header-table.c
@@ -1003,6 +1003,22 @@ e_composer_header_table_get_destinations_bcc (EComposerHeaderTable *table)
}
void
+e_composer_header_table_add_destinations_bcc (EComposerHeaderTable *table,
+ EDestination **destinations)
+{
+ EComposerNameHeader *header;
+
+ g_return_if_fail (E_IS_COMPOSER_HEADER_TABLE (table));
+
+ header = E_COMPOSER_HEADER_TABLE_GET_BCC_HEADER (table);
+ e_composer_name_header_add_destinations (header, destinations);
+
+ if (destinations != NULL && *destinations != NULL)
+ e_composer_header_table_set_header_visible (
+ table, E_COMPOSER_HEADER_BCC, TRUE);
+}
+
+void
e_composer_header_table_set_destinations_bcc (EComposerHeaderTable *table,
EDestination **destinations)
{
@@ -1030,6 +1046,22 @@ e_composer_header_table_get_destinations_cc (EComposerHeaderTable *table)
}
void
+e_composer_header_table_add_destinations_cc (EComposerHeaderTable *table,
+ EDestination **destinations)
+{
+ EComposerNameHeader *header;
+
+ g_return_if_fail (E_IS_COMPOSER_HEADER_TABLE (table));
+
+ header = E_COMPOSER_HEADER_TABLE_GET_CC_HEADER (table);
+ e_composer_name_header_add_destinations (header, destinations);
+
+ if (destinations != NULL && *destinations != NULL)
+ e_composer_header_table_set_header_visible (
+ table, E_COMPOSER_HEADER_CC, TRUE);
+}
+
+void
e_composer_header_table_set_destinations_cc (EComposerHeaderTable *table,
EDestination **destinations)
{
@@ -1057,6 +1089,18 @@ e_composer_header_table_get_destinations_to (EComposerHeaderTable *table)
}
void
+e_composer_header_table_add_destinations_to (EComposerHeaderTable *table,
+ EDestination **destinations)
+{
+ EComposerNameHeader *header;
+
+ g_return_if_fail (E_IS_COMPOSER_HEADER_TABLE (table));
+
+ header = E_COMPOSER_HEADER_TABLE_GET_TO_HEADER (table);
+ e_composer_name_header_add_destinations (header, destinations);
+}
+
+void
e_composer_header_table_set_destinations_to (EComposerHeaderTable *table,
EDestination **destinations)
{
diff --git a/composer/e-composer-header-table.h b/composer/e-composer-header-table.h
index b3150c409a..91d64fe22a 100644
--- a/composer/e-composer-header-table.h
+++ b/composer/e-composer-header-table.h
@@ -112,16 +112,25 @@ EDestination ** e_composer_header_table_get_destinations
(EComposerHeaderTable *table);
EDestination ** e_composer_header_table_get_destinations_bcc
(EComposerHeaderTable *table);
+void e_composer_header_table_add_destinations_bcc
+ (EComposerHeaderTable *table,
+ EDestination **destination);
void e_composer_header_table_set_destinations_bcc
(EComposerHeaderTable *table,
EDestination **destinations);
EDestination ** e_composer_header_table_get_destinations_cc
(EComposerHeaderTable *table);
+void e_composer_header_table_add_destinations_cc
+ (EComposerHeaderTable *table,
+ EDestination **destination);
void e_composer_header_table_set_destinations_cc
(EComposerHeaderTable *table,
EDestination **destinations);
EDestination ** e_composer_header_table_get_destinations_to
(EComposerHeaderTable *table);
+void e_composer_header_table_add_destinations_to
+ (EComposerHeaderTable *table,
+ EDestination **destinations);
void e_composer_header_table_set_destinations_to
(EComposerHeaderTable *table,
EDestination **destinations);
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
@@ -298,13 +298,33 @@ e_composer_name_header_get_destinations (EComposerNameHeader *header)
}
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)
{
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);
}
diff --git a/composer/e-composer-name-header.h b/composer/e-composer-name-header.h
index 04f7100241..f95c33fce3 100644
--- a/composer/e-composer-name-header.h
+++ b/composer/e-composer-name-header.h
@@ -66,6 +66,9 @@ ENameSelector * e_composer_name_header_get_name_selector
(EComposerNameHeader *header);
EDestination ** e_composer_name_header_get_destinations
(EComposerNameHeader *header);
+void e_composer_name_header_add_destinations
+ (EComposerNameHeader *header,
+ EDestination **destination);
void e_composer_name_header_set_destinations
(EComposerNameHeader *header,
EDestination **destinations);