aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/e-mail-config-service-backend.c8
-rw-r--r--mail/e-mail-config-service-page.c12
2 files changed, 12 insertions, 8 deletions
diff --git a/mail/e-mail-config-service-backend.c b/mail/e-mail-config-service-backend.c
index 5762ca94f3..c6c42ae7f5 100644
--- a/mail/e-mail-config-service-backend.c
+++ b/mail/e-mail-config-service-backend.c
@@ -58,14 +58,6 @@ 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-service-page.c b/mail/e-mail-config-service-page.c
index dc4eb805bf..6109623ddc 100644
--- a/mail/e-mail-config-service-page.c
+++ b/mail/e-mail-config-service-page.c
@@ -158,6 +158,18 @@ mail_config_service_page_new_candidate (EMailConfigServicePage *page,
e_mail_config_service_backend_set_collection (
backend, opt_collection);
+ /* Backend may have created its own collection source,
+ * so we need to get it from the backend before binding. */
+ opt_collection = e_mail_config_service_backend_get_collection (backend);
+
+ /* Keep display names synchronized. */
+ if (opt_collection != NULL)
+ g_object_bind_property (
+ scratch_source, "display-name",
+ opt_collection, "display-name",
+ G_BINDING_BIDIRECTIONAL |
+ G_BINDING_SYNC_CREATE);
+
/* Make sure we have a corresponding CamelSettings. */
settings = e_mail_config_service_backend_get_settings (backend);
g_return_val_if_fail (CAMEL_IS_SETTINGS (settings), NULL);