diff options
author | Jon Trowbridge <trow@ximian.com> | 2001-08-23 10:58:14 +0800 |
---|---|---|
committer | Jon Trowbridge <trow@src.gnome.org> | 2001-08-23 10:58:14 +0800 |
commit | 6fba7d7077b165410cb9362597f074556093561c (patch) | |
tree | 18f6abed525857e76f75d6bebfb239e9e5860f27 /addressbook/backend | |
parent | e27c0f7d1a89c33e7c81de58984c7fb043f102f6 (diff) | |
download | gsoc2013-evolution-6fba7d7077b165410cb9362597f074556093561c.tar gsoc2013-evolution-6fba7d7077b165410cb9362597f074556093561c.tar.gz gsoc2013-evolution-6fba7d7077b165410cb9362597f074556093561c.tar.bz2 gsoc2013-evolution-6fba7d7077b165410cb9362597f074556093561c.tar.lz gsoc2013-evolution-6fba7d7077b165410cb9362597f074556093561c.tar.xz gsoc2013-evolution-6fba7d7077b165410cb9362597f074556093561c.tar.zst gsoc2013-evolution-6fba7d7077b165410cb9362597f074556093561c.zip |
In the GUI, the toggle is labelled "hide addresses", not "show addresses"
2001-08-22 Jon Trowbridge <trow@ximian.com>
* gui/contact-list-editor/e-contact-list-editor.c (extract_info):
In the GUI, the toggle is labelled "hide addresses", not "show
addresses" -- so we have to reverse the boolean value we read in.
(fill_in_info): Same bug as before: since the GUI reads "hide", we
have to initialize the toggle to '!show_addresses', not
'show_addresses'.
* backend/ebook/e-destination.c
(e_destination_list_show_addresses): Added.
(e_destination_xml_encode): Encode the value of
e_destination_list_show_addresses into the XML.
(e_destination_xml_decode): Read and store the "show_addresses"
flag.
2001-08-22 Jon Trowbridge <trow@ximian.com>
* e-msg-composer-hdrs.c (set_recipients_from_destv): Added. Try
to properly handle contact lists in which the addresses of the
list members should be hidden.
(e_msg_composer_hdrs_to_message): Changed to extract the
destination data from the entries and pass it along to
set_recipients_from_destv.
2001-08-22 Jon Trowbridge <trow@ximian.com>
* mail-callbacks.c (ask_confirm_for_only_bcc): Provide alternative
text for this dialog for the case when a message has only Bcc
recipients because of a hidden contact list's addresses being
moved from To/Cc to Bcc.
(composer_get_message): Try to detect when our message has only
Bcc recipients because of moving addresses around due to a hidden
contact list, and show the dialog with the revised wording in this
case.
svn path=/trunk/; revision=12414
Diffstat (limited to 'addressbook/backend')
-rw-r--r-- | addressbook/backend/ebook/e-destination.c | 24 | ||||
-rw-r--r-- | addressbook/backend/ebook/e-destination.h | 3 |
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 *); |