[evolution-mapi/native-gal] Add the addressbook source for GAL.
- From: Bharath Acharya <abharath src gnome org>
- To: svn-commits-list gnome org
- Subject: [evolution-mapi/native-gal] Add the addressbook source for GAL.
- Date: Mon, 20 Jul 2009 05:14:26 +0000 (UTC)
commit c1dcab97360c4bc90573e20475f380f5585c971c
Author: Bharath Acharya <abharath novell com>
Date: Mon Jul 20 10:42:37 2009 +0530
Add the addressbook source for GAL.
Also enable GAL configuration in the account setup UI.
.../exchange-mapi-account-listener.c | 35 ++++++++++++++++++++
src/camel/camel-mapi-provider.c | 28 +++++++++-------
2 files changed, 51 insertions(+), 12 deletions(-)
---
diff --git a/src/account-setup-eplugin/exchange-mapi-account-listener.c b/src/account-setup-eplugin/exchange-mapi-account-listener.c
index 206826c..4766884 100644
--- a/src/account-setup-eplugin/exchange-mapi-account-listener.c
+++ b/src/account-setup-eplugin/exchange-mapi-account-listener.c
@@ -456,6 +456,41 @@ add_addressbook_sources (EAccount *account, GSList *folders)
g_object_unref (source);
}
+ //Add GAL
+ {
+ char *uri, *tmp;
+ mapi_id_t fid, pfid;
+ const char *sfid;
+
+ uri = g_strdup_printf("mapigal://%s %s/;Global Address List", url->user, url->host);
+ source = e_source_new_with_absolute_uri ("Global Address List", uri);
+ // source = e_source_new ("Global Address List", g_strconcat (";","Global Address List" , NULL));
+ e_source_set_property (source, "auth", "plain/password");
+ e_source_set_property (source, "auth-domain", "MAPIGAL");
+ fid = exchange_mapi_get_default_folder_id (olFolderContacts);
+
+ //FIXME: Offline handling
+ sfid = e_source_get_property (source, "parent-fid");
+ exchange_mapi_util_mapi_id_from_string (sfid, &pfid);
+
+ fid = exchange_mapi_create_folder (olFolderContacts, pfid, e_source_peek_name (source));
+ tmp = exchange_mapi_util_mapi_id_to_string (fid);
+ e_source_set_property(source, "folder-id", tmp);
+ g_free (tmp);
+
+ e_source_set_property(source, "user", url->user);
+ e_source_set_property(source, "host", camel_url_get_param (url, "ad_server"));
+ e_source_set_property(source, "view-limit", camel_url_get_param (url, "ad_limit"));
+ e_source_set_property(source, "profile", camel_url_get_param (url, "profile"));
+ e_source_set_property(source, "domain", camel_url_get_param (url, "domain"));
+ // e_source_set_property (source, "offline_sync",
+ // camel_url_get_param (url, "offline_sync") ? "1" : "0");
+ e_source_set_property(source, "offline_sync", "1");
+ e_source_set_property (source, "completion", "true");
+ e_source_group_add_source (group, source, -1);
+ g_object_unref (source);
+ }
+
e_source_list_add_group (list, group, -1);
e_source_list_sync (list, NULL);
g_object_unref (group);
diff --git a/src/camel/camel-mapi-provider.c b/src/camel/camel-mapi-provider.c
index ea36030..25340c6 100644
--- a/src/camel/camel-mapi-provider.c
+++ b/src/camel/camel-mapi-provider.c
@@ -53,20 +53,24 @@ static CamelProviderConfEntry mapi_conf_entries[] = {
N_("C_heck for new messages in all folders"), "1" },
{ CAMEL_PROVIDER_CONF_SECTION_END },
- /*FIXME : GAL is not available currently*/
-
- /* { CAMEL_PROVIDER_CONF_SECTION_START, "activedirectory", NULL, */
- /* /\* i18n: GAL is an Outlookism, AD is a Windowsism *\/ */
- /* N_("Global Address List / Active Directory") }, */
- /* { CAMEL_PROVIDER_CONF_ENTRY, "ad_server", NULL, */
- /* /\* i18n: "Global Catalog" is a Windowsism, but it's a */
- /* technical term and may not have translations? *\/ */
- /* N_("_Global Catalog server name:") }, */
- /* { CAMEL_PROVIDER_CONF_CHECKSPIN, "ad_limit", NULL, */
- /* N_("_Limit number of GAL responses: %s"), "y:1:500:10000" }, */
- /* { CAMEL_PROVIDER_CONF_SECTION_END }, */
+/* /\* override the labels/defaults of the standard settings *\/ */
+/* { CAMEL_PROVIDER_CONF_LABEL, "username", NULL, */
+/* /\* i18n: the '_' should appear before the same letter it */
+/* does in the evolution:mail-config.glade "User_name" */
+/* translation (or not at all) *\/ */
+/* N_("Windows User_name:") }, */
/* extra Exchange configuration settings */
+ { CAMEL_PROVIDER_CONF_SECTION_START, "activedirectory", NULL,
+ /* i18n: GAL is an Outlookism, AD is a Windowsism */
+ N_("Global Address List / Active Directory") },
+ { CAMEL_PROVIDER_CONF_ENTRY, "ad_server", NULL,
+ /* i18n: "Global Catalog" is a Windowsism, but it's a
+ technical term and may not have translations? */
+ N_("_Global Catalog server name:") },
+ { CAMEL_PROVIDER_CONF_CHECKSPIN, "ad_limit", NULL,
+ N_("_Limit number of GAL responses: %s"), "y:1:500:10000" },
+ { CAMEL_PROVIDER_CONF_SECTION_END },
{ CAMEL_PROVIDER_CONF_SECTION_START, "generals", NULL,
N_("Options") },
{ CAMEL_PROVIDER_CONF_CHECKBOX, "sync_offline", NULL,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]