aboutsummaryrefslogtreecommitdiffstats
path: root/addressbook/gui
diff options
context:
space:
mode:
authorSivaiah Nallagatla <snallagatla@novell.com>2004-05-11 16:17:04 +0800
committerSivaiah Nallagatla <siva@src.gnome.org>2004-05-11 16:17:04 +0800
commitaa1e2ad3c4486499658c0a6cba3486ebca867898 (patch)
treee2119c508a9aa058f7c23c8d3d921e600f1c9910 /addressbook/gui
parent47ff96778e8d84e6906f3ae5e2f5a61147461ea6 (diff)
downloadgsoc2013-evolution-aa1e2ad3c4486499658c0a6cba3486ebca867898.tar.gz
gsoc2013-evolution-aa1e2ad3c4486499658c0a6cba3486ebca867898.tar.zst
gsoc2013-evolution-aa1e2ad3c4486499658c0a6cba3486ebca867898.zip
see if the selected group is groupwise one and setup the relative uri and
2004-05-11 Sivaiah Nallagatla <snallagatla@novell.com> * 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
Diffstat (limited to 'addressbook/gui')
-rw-r--r--addressbook/gui/component/addressbook-config.c22
1 files changed, 21 insertions, 1 deletions
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);