aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/exchange-operations
diff options
context:
space:
mode:
authorPraveen Kumar <kpraveen@novell.com>2005-08-01 14:46:30 +0800
committerPraveen Kumar <kpraveen@src.gnome.org>2005-08-01 14:46:30 +0800
commit35340abb72120c3b7ef27d9e9bde361471c78236 (patch)
treebbe3ffac75a65f745654e3deb2e0dbf77bab6935 /plugins/exchange-operations
parent51c126e3fb9a9e15b5ae0737e08bc32ab0a6a67c (diff)
downloadgsoc2013-evolution-35340abb72120c3b7ef27d9e9bde361471c78236.tar
gsoc2013-evolution-35340abb72120c3b7ef27d9e9bde361471c78236.tar.gz
gsoc2013-evolution-35340abb72120c3b7ef27d9e9bde361471c78236.tar.bz2
gsoc2013-evolution-35340abb72120c3b7ef27d9e9bde361471c78236.tar.lz
gsoc2013-evolution-35340abb72120c3b7ef27d9e9bde361471c78236.tar.xz
gsoc2013-evolution-35340abb72120c3b7ef27d9e9bde361471c78236.tar.zst
gsoc2013-evolution-35340abb72120c3b7ef27d9e9bde361471c78236.zip
Added new (add_defaults_for_account) : Added a call to the newly added
2005-08-01 Praveen Kumar <kpraveen@novell.com> * exchnage-config-listener.c (exchange_add_autocompletion_folders) : Added new (add_defaults_for_account) : Added a call to the newly added function to select GAL for autocompletion by default. Fixes bug 303998 svn path=/trunk/; revision=29945
Diffstat (limited to 'plugins/exchange-operations')
-rw-r--r--plugins/exchange-operations/ChangeLog6
-rw-r--r--plugins/exchange-operations/exchange-config-listener.c50
2 files changed, 53 insertions, 3 deletions
diff --git a/plugins/exchange-operations/ChangeLog b/plugins/exchange-operations/ChangeLog
index c5a09144dc..5548357cec 100644
--- a/plugins/exchange-operations/ChangeLog
+++ b/plugins/exchange-operations/ChangeLog
@@ -1,3 +1,9 @@
+2005-08-01 Praveen Kumar <kpraveen@novell.com>
+ * exchnage-config-listener.c
+ (exchange_add_autocompletion_folders) : Added new
+ (add_defaults_for_account) : Added a call to the newly added function
+ to select GAL for autocompletion by default. Fixes bug 303998
+
2005-07-27 Praveen Kumar <kpraveen@novell.com>
* exchange-folder.c (org_gnome_exchange_folder_subscription) : Handle
diff --git a/plugins/exchange-operations/exchange-config-listener.c b/plugins/exchange-operations/exchange-config-listener.c
index 2138e9d638..5b4cb2a86c 100644
--- a/plugins/exchange-operations/exchange-config-listener.c
+++ b/plugins/exchange-operations/exchange-config-listener.c
@@ -86,6 +86,9 @@ static void account_changed (EAccountList *account_listener,
static void account_removed (EAccountList *account_listener,
EAccount *account);
+static void exchange_add_autocompletion_folders (GConfClient *gc_client,
+ ExchangeAccount *account);
+
static void
class_init (GObjectClass *object_class)
{
@@ -202,9 +205,7 @@ add_defaults_for_account (ExchangeConfigListener *config_listener,
{
EAccount *eaccount;
-#if LDEAD
- add_autocompletion_folders (config_listener->priv->gconf, account);
-#endif
+ exchange_add_autocompletion_folders (config_listener->priv->gconf, account);
eaccount = config_listener->priv->configured_account;
set_special_mail_folder (account, "drafts",
@@ -879,3 +880,46 @@ exchange_config_listener_get_accounts (ExchangeConfigListener *config_listener)
return NULL;
}
+/**
+ * exchange_add_autocompletion_folders:
+ *
+ * @gc_client: GConfClient handle
+ * @account: ExchangeAccount handle
+ *
+ * This function adds the GAL of the Exchange account to the autocompletion list
+ * while configuring a new Exchange account
+ *
+ **/
+static void
+exchange_add_autocompletion_folders (GConfClient *gc_client, ExchangeAccount *account)
+{
+ ESourceList *sl=NULL;
+ ESourceGroup *group;
+ ESource *source;
+ GSList *groups, *sources;
+ gboolean found_group=FALSE;
+
+ sl = e_source_list_new_for_gconf (gc_client, CONF_KEY_CONTACTS);
+ groups = e_source_list_peek_groups (sl);
+
+ for ( ; groups != NULL && !found_group; groups = g_slist_next (groups)) {
+ group = E_SOURCE_GROUP (groups->data);
+ if (strcmp (e_source_group_peek_name (group), account->account_name) == 0
+ &&
+ strcmp (e_source_group_peek_base_uri (group), EXCHANGE_URI_PREFIX) == 0) {
+
+ sources = e_source_group_peek_sources (group);
+
+ for( ; sources != NULL; sources = g_slist_next (sources)) {
+ source = E_SOURCE (sources->data);
+ if (g_str_has_prefix (e_source_peek_absolute_uri (source),
+ "gal://")) {
+ /* Set autocompletion on GAL alone by default */
+ e_source_set_property (source, "completion", "true");
+ break;
+ }
+ }
+ found_group = TRUE;
+ }
+ }
+}