From aa1e2ad3c4486499658c0a6cba3486ebca867898 Mon Sep 17 00:00:00 2001 From: Sivaiah Nallagatla Date: Tue, 11 May 2004 08:17:04 +0000 Subject: see if the selected group is groupwise one and setup the relative uri and 2004-05-11 Sivaiah Nallagatla * gui/component/addressbook-config.c (dialog_to_source) : see if the selected group is groupwise one and setup the relative uri and other properties into e-source svn path=/trunk/; revision=25852 --- addressbook/ChangeLog | 6 ++++++ addressbook/gui/component/addressbook-config.c | 22 +++++++++++++++++++++- 2 files changed, 27 insertions(+), 1 deletion(-) diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog index 74fb95b57a..48365db5e1 100644 --- a/addressbook/ChangeLog +++ b/addressbook/ChangeLog @@ -1,3 +1,9 @@ +2004-05-11 Sivaiah Nallagatla + + * gui/component/addressbook-config.c (dialog_to_source) : see if the selected + group is groupwise one and setup the relative uri and other properties into + e-source + 2004-05-10 Suresh Chandrasekharan Fixes bug #44196 addressbook table view uses ASCII sort diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c index d3ab88470c..d33da18620 100644 --- a/addressbook/gui/component/addressbook-config.c +++ b/addressbook/gui/component/addressbook-config.c @@ -263,7 +263,27 @@ dialog_to_source (AddressbookSourceDialog *dialog, ESource *source, gboolean tem e_source_set_relative_uri (source, str); g_free (str); #endif - } else { + }else if (g_str_has_prefix (e_source_group_peek_base_uri (dialog->source_group), "groupwise://") && + !e_source_peek_group (source)) { /* if this is an existing book we don't change anything else */ + + GSList *groupwise_source_list; + ESource *existing_source = NULL; + const char *property_value = NULL; + + groupwise_source_list = e_source_group_peek_sources(dialog->source_group); + if (groupwise_source_list) + existing_source = E_SOURCE (groupwise_source_list->data); + if (existing_source) { + property_value = e_source_get_property (existing_source, "auth"); + e_source_set_property (source, "auth", property_value); + property_value = e_source_get_property (existing_source, "user"); + e_source_set_property (source, "user", property_value); + } + str = g_strconcat (";", gtk_entry_get_text (GTK_ENTRY (dialog->display_name)), NULL); + e_source_set_relative_uri (source, str); + g_free (str); + + } else { const gchar *relative_uri; relative_uri = e_source_peek_relative_uri (source); -- cgit