[evolution] Bug 687137 - Google account user name overwritten with email address



commit f8e346731c87cddef5c6610432f960105157b011
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Nov 9 07:08:14 2012 -0500

    Bug 687137 - Google account user name overwritten with email address
    
    Evolution's Google account module was setting the ECollectionSource's
    "identity" property to the account's email address before submitting the
    account to E-D-S.  Meanwhile, the Google module in E-D-S was syncing the
    account user name to the ECollectionSource's "identity" property.
    
    This mismatch resulted in an explicitly specified GMail user name being
    overwritten when the account information is submitted.  Evolution should
    instead set the "identity" property to the account's user name.

 modules/mail-config/e-mail-config-google-summary.c |   16 ++++++++--------
 1 files changed, 8 insertions(+), 8 deletions(-)
---
diff --git a/modules/mail-config/e-mail-config-google-summary.c b/modules/mail-config/e-mail-config-google-summary.c
index ca0580e..d1d51a4 100644
--- a/modules/mail-config/e-mail-config-google-summary.c
+++ b/modules/mail-config/e-mail-config-google-summary.c
@@ -114,10 +114,10 @@ mail_config_google_summary_commit_changes_cb (EMailConfigSummaryPage *page,
 {
 	ESource *source;
 	ESourceCollection *collection_extension;
-	ESourceMailIdentity *identity_extension;
+	ESourceAuthentication *auth_extension;
 	GtkToggleButton *toggle_button;
 	GList *head, *link;
-	const gchar *address;
+	const gchar *user;
 	const gchar *parent_uid;
 	const gchar *display_name;
 	const gchar *extension_name;
@@ -138,20 +138,20 @@ mail_config_google_summary_commit_changes_cb (EMailConfigSummaryPage *page,
 	if (!calendar_active && !contacts_active)
 		return;
 
-	source = e_mail_config_summary_page_get_identity_source (page);
+	source = e_mail_config_summary_page_get_account_source (page);
 	display_name = e_source_get_display_name (source);
 
-	/* The collection identity is the user's email address. */
-	extension_name = E_SOURCE_EXTENSION_MAIL_IDENTITY;
-	identity_extension = e_source_get_extension (source, extension_name);
-	address = e_source_mail_identity_get_address (identity_extension);
+	/* The collection identity is the mail account user name. */
+	extension_name = E_SOURCE_EXTENSION_AUTHENTICATION;
+	auth_extension = e_source_get_extension (source, extension_name);
+	user = e_source_authentication_get_user (auth_extension);
 
 	source = extension->priv->collection_source;
 	e_source_set_display_name (source, display_name);
 
 	extension_name = E_SOURCE_EXTENSION_COLLECTION;
 	collection_extension = e_source_get_extension (source, extension_name);
-	e_source_collection_set_identity (collection_extension, address);
+	e_source_collection_set_identity (collection_extension, user);
 
 	/* All queued sources become children of the collection source. */
 	parent_uid = e_source_get_uid (source);



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