[evolution-mapi] Use 'username' instead of 'user' property in ESource



commit 24dcfda143738cd8a49c376da0c7863c29a19806
Author: Milan Crha <mcrha redhat com>
Date:   Thu May 26 07:51:54 2011 +0200

    Use 'username' instead of 'user' property in ESource
    
    This is due to EClient changes, where it expects 'username' during
    the authentication processing, instead of 'user'.

 .../exchange-mapi-account-listener.c               |    9 ++++++---
 .../exchange-mapi-account-setup.c                  |    3 ++-
 2 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/src/account-setup-eplugin/exchange-mapi-account-listener.c b/src/account-setup-eplugin/exchange-mapi-account-listener.c
index 088c70f..31e2db5 100644
--- a/src/account-setup-eplugin/exchange-mapi-account-listener.c
+++ b/src/account-setup-eplugin/exchange-mapi-account-listener.c
@@ -649,7 +649,8 @@ add_addressbook_sources (EAccount *account, GSList *folders, mapi_id_t trash_fid
 		is_new_group = TRUE;
 		old_sources = NULL;
 	}
-	e_source_group_set_property (group, "user", url->user);
+	e_source_group_set_property (group, "user", NULL);
+	e_source_group_set_property (group, "username", url->user);
 	e_source_group_set_property (group, "host", url->host);
 	e_source_group_set_property (group, "profile", camel_url_get_param (url, "profile"));
 	e_source_group_set_property (group, "domain", camel_url_get_param (url, "domain"));
@@ -677,7 +678,8 @@ add_addressbook_sources (EAccount *account, GSList *folders, mapi_id_t trash_fid
 		}
 		e_source_set_property (source, "auth", "plain/password");
 		e_source_set_property (source, "auth-domain", EXCHANGE_MAPI_PASSWORD_COMPONENT);
-		e_source_set_property(source, "user", url->user);
+		e_source_set_property(source, "user", NULL);
+		e_source_set_property(source, "username", url->user);
 		e_source_set_property(source, "host", url->host);
 		e_source_set_property(source, "profile", camel_url_get_param (url, "profile"));
 		e_source_set_property(source, "domain", camel_url_get_param (url, "domain"));
@@ -740,7 +742,8 @@ add_addressbook_sources (EAccount *account, GSList *folders, mapi_id_t trash_fid
 		e_source_set_property (source, "auth-domain", "MAPIGAL");
 
 		//FIXME: Offline handling
-		e_source_set_property(source, "user", url->user);
+		e_source_set_property(source, "user", NULL);
+		e_source_set_property(source, "username", 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"));
diff --git a/src/account-setup-eplugin/exchange-mapi-account-setup.c b/src/account-setup-eplugin/exchange-mapi-account-setup.c
index 6a7a0cf..088908f 100644
--- a/src/account-setup-eplugin/exchange-mapi-account-setup.c
+++ b/src/account-setup-eplugin/exchange-mapi-account-setup.c
@@ -795,7 +795,8 @@ exchange_mapi_book_commit (EPlugin *epl, EConfigTarget *target)
 	grp = e_source_peek_group (source);
 	e_source_set_property (source, "auth", "plain/password");
 	e_source_set_property (source, "auth-domain", EXCHANGE_MAPI_PASSWORD_COMPONENT);
-	e_source_set_property(source, "user", e_source_group_get_property (grp, "user"));
+	e_source_set_property(source, "user", NULL);
+	e_source_set_property(source, "username", e_source_group_get_property (grp, "username") ? e_source_group_get_property (grp, "username") : e_source_group_get_property (grp, "user"));
 	e_source_set_property(source, "host", e_source_group_get_property (grp, "host"));
 	e_source_set_property(source, "profile", e_source_group_get_property (grp, "profile"));
 	e_source_set_property(source, "domain", e_source_group_get_property (grp, "domain"));



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]