aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-config-assistant.c14
-rw-r--r--mail/e-mail-config-service-backend.c8
-rw-r--r--mail/e-mail-config-summary-page.c6
3 files changed, 23 insertions, 5 deletions
diff --git a/mail/e-mail-config-assistant.c b/mail/e-mail-config-assistant.c
index 16d0e2e42a..70f60e66ea 100644
--- a/mail/e-mail-config-assistant.c
+++ b/mail/e-mail-config-assistant.c
@@ -602,6 +602,13 @@ mail_config_assistant_constructed (GObject *object)
e_source_backend_set_backend_name (
backend_extension, backend_name);
+ /* Keep display names synchronized. */
+ g_object_bind_property (
+ identity_source, "display-name",
+ scratch_source, "display-name",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+
/* We always pass NULL for the collection argument.
* The backend generates its own scratch collection
* source if implements the new_collection() method. */
@@ -672,6 +679,13 @@ mail_config_assistant_constructed (GObject *object)
e_source_backend_set_backend_name (
backend_extension, backend_name);
+ /* Keep display names synchronized. */
+ g_object_bind_property (
+ identity_source, "display-name",
+ scratch_source, "display-name",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+
/* We always pass NULL for the collection argument.
* The backend generates its own scratch collection
* source if implements the new_collection() method. */
diff --git a/mail/e-mail-config-service-backend.c b/mail/e-mail-config-service-backend.c
index c6c42ae7f5..5762ca94f3 100644
--- a/mail/e-mail-config-service-backend.c
+++ b/mail/e-mail-config-service-backend.c
@@ -58,6 +58,14 @@ mail_config_service_backend_init_collection (EMailConfigServiceBackend *backend)
g_return_if_fail (class->new_collection != NULL);
backend->priv->collection = class->new_collection (backend);
+
+ /* Keep display names synchronized. */
+ if (backend->priv->collection != NULL)
+ g_object_bind_property (
+ backend->priv->source, "display-name",
+ backend->priv->collection, "display-name",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
}
static void
diff --git a/mail/e-mail-config-summary-page.c b/mail/e-mail-config-summary-page.c
index 2da138ee4f..110b007bd9 100644
--- a/mail/e-mail-config-summary-page.c
+++ b/mail/e-mail-config-summary-page.c
@@ -699,13 +699,9 @@ mail_config_summary_page_commit_changes (EMailConfigPage *page,
identity_source = e_mail_config_summary_page_get_identity_source (
E_MAIL_CONFIG_SUMMARY_PAGE (page));
+ /* This should propagate to the other sources through bindings. */
text = gtk_entry_get_text (priv->account_name_entry);
- e_source_set_display_name (account_source, text);
e_source_set_display_name (identity_source, text);
- if (transport_source != NULL)
- e_source_set_display_name (transport_source, text);
- if (collection_source != NULL)
- e_source_set_display_name (collection_source, text);
/* Setup parent/child relationships and cross-references. */