diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2012-06-23 08:08:39 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2012-06-23 08:12:11 +0800 |
commit | e9b5561fd07e799b9c292eb2792f9a8b334204cf (patch) | |
tree | b93a5fe60d67f4ca145b612245620cd853e683f5 /modules | |
parent | 97792841a09d2617fb297940d887fd7233b1eb2d (diff) | |
download | gsoc2013-evolution-e9b5561fd07e799b9c292eb2792f9a8b334204cf.tar gsoc2013-evolution-e9b5561fd07e799b9c292eb2792f9a8b334204cf.tar.gz gsoc2013-evolution-e9b5561fd07e799b9c292eb2792f9a8b334204cf.tar.bz2 gsoc2013-evolution-e9b5561fd07e799b9c292eb2792f9a8b334204cf.tar.lz gsoc2013-evolution-e9b5561fd07e799b9c292eb2792f9a8b334204cf.tar.xz gsoc2013-evolution-e9b5561fd07e799b9c292eb2792f9a8b334204cf.tar.zst gsoc2013-evolution-e9b5561fd07e799b9c292eb2792f9a8b334204cf.zip |
EMailConfigSummaryPage: Remove "account-name" property.
It's redundant. Just set the display name on one of the ESources.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/mail-config/e-mail-config-google-summary.c | 14 | ||||
-rw-r--r-- | modules/mail-config/e-mail-config-yahoo-summary.c | 14 |
2 files changed, 18 insertions, 10 deletions
diff --git a/modules/mail-config/e-mail-config-google-summary.c b/modules/mail-config/e-mail-config-google-summary.c index e4e383d3f8..ca0580e8a6 100644 --- a/modules/mail-config/e-mail-config-google-summary.c +++ b/modules/mail-config/e-mail-config-google-summary.c @@ -119,6 +119,7 @@ mail_config_google_summary_commit_changes_cb (EMailConfigSummaryPage *page, GList *head, *link; const gchar *address; const gchar *parent_uid; + const gchar *display_name; const gchar *extension_name; gboolean calendar_active; gboolean contacts_active; @@ -137,13 +138,17 @@ mail_config_google_summary_commit_changes_cb (EMailConfigSummaryPage *page, if (!calendar_active && !contacts_active) return; - /* The collection identity is the user's email address. */ source = e_mail_config_summary_page_get_identity_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); 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); @@ -279,10 +284,9 @@ mail_config_google_summary_constructed (GObject *object) extension_name = E_SOURCE_EXTENSION_COLLECTION; collection_extension = e_source_get_extension (source, extension_name); - g_object_bind_property ( - page, "account-name", - source, "display-name", - G_BINDING_SYNC_CREATE); + /* Can't bind the collection's display name here because + * the Summary Page has no sources yet. Set the display + * name while committing instead. */ g_object_bind_property ( extension->priv->calendar_toggle, "active", diff --git a/modules/mail-config/e-mail-config-yahoo-summary.c b/modules/mail-config/e-mail-config-yahoo-summary.c index 204424ca1a..2153f9cadf 100644 --- a/modules/mail-config/e-mail-config-yahoo-summary.c +++ b/modules/mail-config/e-mail-config-yahoo-summary.c @@ -118,6 +118,7 @@ mail_config_yahoo_summary_commit_changes_cb (EMailConfigSummaryPage *page, GList *head, *link; const gchar *address; const gchar *parent_uid; + const gchar *display_name; const gchar *extension_name; gboolean calendar_active; @@ -132,13 +133,17 @@ mail_config_yahoo_summary_commit_changes_cb (EMailConfigSummaryPage *page, if (!calendar_active) return; - /* The collection identity is the user's email address. */ source = e_mail_config_summary_page_get_identity_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); 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); @@ -260,10 +265,9 @@ mail_config_yahoo_summary_constructed (GObject *object) extension_name = E_SOURCE_EXTENSION_COLLECTION; collection_extension = e_source_get_extension (source, extension_name); - g_object_bind_property ( - page, "account-name", - source, "display-name", - G_BINDING_SYNC_CREATE); + /* Can't bind the collection's display name here because + * the Summary Page has no sources yet. Set the display + * name while committing instead. */ g_object_bind_property ( extension->priv->calendar_toggle, "active", |