aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-06-23 06:53:49 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-06-23 07:07:23 +0800
commit97792841a09d2617fb297940d887fd7233b1eb2d (patch)
tree8452130259c8bd570b81af6ee6289068f8d8a108
parentd9833b43ab0c4757fa136ef925a1f6245efc926f (diff)
downloadgsoc2013-evolution-97792841a09d2617fb297940d887fd7233b1eb2d.tar.gz
gsoc2013-evolution-97792841a09d2617fb297940d887fd7233b1eb2d.tar.zst
gsoc2013-evolution-97792841a09d2617fb297940d887fd7233b1eb2d.zip
Keep display names synchronized during account creation.
Reworked part of commit cc55cf3e686ad873cb14129f48d06f83ecc97e68, which caused a bunch of runtime warnings.
-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);