aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/backend/ebook
diff options
context:
space:
mode:
Diffstat (limited to 'addressbook/backend/ebook')
-rw-r--r--addressbook/backend/ebook/e-destination.c24
-rw-r--r--addressbook/backend/ebook/e-destination.h3
2 files changed, 25 insertions, 2 deletions
diff --git a/addressbook/backend/ebook/e-destination.c b/addressbook/backend/ebook/e-destination.c
index 25e1caa6ec..076eccf835 100644
--- a/addressbook/backend/ebook/e-destination.c
+++ b/addressbook/backend/ebook/e-destination.c
@@ -67,6 +67,7 @@ struct _EDestinationPrivate {
gboolean wants_html_mail;
GList *list_dests;
+ gboolean show_addresses;
gboolean has_been_cardified;
gboolean allow_cardify;
@@ -750,6 +751,17 @@ e_destination_is_evolution_list (const EDestination *dest)
}
gboolean
+e_destination_list_show_addresses (const EDestination *dest)
+{
+ g_return_val_if_fail (E_IS_DESTINATION (dest), FALSE);
+
+ if (dest->priv->card != NULL)
+ return e_card_evolution_list_show_addresses (dest->priv->card);
+
+ return dest->priv->show_addresses;
+}
+
+gboolean
e_destination_get_html_mail_pref (const EDestination *dest)
{
g_return_val_if_fail (dest && E_IS_DESTINATION (dest), FALSE);
@@ -1031,6 +1043,8 @@ e_destination_xml_encode (const EDestination *dest)
}
xmlNewProp (dest_node, "is_list", "yes");
+ xmlNewProp (dest_node, "show_addresses",
+ e_destination_list_show_addresses (dest) ? "yes" : "no");
}
str = e_destination_get_book_uri (dest);
@@ -1057,7 +1071,7 @@ e_destination_xml_decode (EDestination *dest, xmlNodePtr node)
gchar *name = NULL, *email = NULL, *book_uri = NULL, *card_uid = NULL;
gint email_num = -1;
gboolean html_mail = FALSE;
- gboolean is_list = FALSE;
+ gboolean is_list = FALSE, show_addr = FALSE;
gchar *tmp;
GList *list_dests = NULL;
@@ -1079,6 +1093,12 @@ e_destination_xml_decode (EDestination *dest, xmlNodePtr node)
xmlFree (tmp);
}
+ tmp = xmlGetProp (node, "show_addresses");
+ if (tmp) {
+ show_addr = !strcmp (tmp, "yes");
+ xmlFree (tmp);
+ }
+
node = node->xmlChildrenNode;
while (node) {
if (!strcmp (node->name, "name")) {
@@ -1154,6 +1174,8 @@ e_destination_xml_decode (EDestination *dest, xmlNodePtr node)
if (list_dests)
dest->priv->list_dests = list_dests;
+ dest->priv->show_addresses = show_addr;
+
e_destination_thaw (dest);
return TRUE;
diff --git a/addressbook/backend/ebook/e-destination.h b/addressbook/backend/ebook/e-destination.h
index dc43d9703c..c0ab60d33f 100644
--- a/addressbook/backend/ebook/e-destination.h
+++ b/addressbook/backend/ebook/e-destination.h
@@ -95,7 +95,8 @@ const gchar *e_destination_get_address (const EDestination *); /* "Jan
void e_destination_set_raw (EDestination *, const gchar *free_form_string);
const gchar *e_destination_get_textrep (const EDestination *); /* "Jane Smith" or "jane@assbarn.com" */
-gboolean e_destination_is_evolution_list (const EDestination *);
+gboolean e_destination_is_evolution_list (const EDestination *);
+gboolean e_destination_list_show_addresses (const EDestination *);
/* If true, they want HTML mail. */
gboolean e_destination_get_html_mail_pref (const EDestination *);