[evolution] Keep display names synchronized during account creation.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Keep display names synchronized during account creation.
- Date: Sat, 23 Jun 2012 00:25:44 +0000 (UTC)
commit 97792841a09d2617fb297940d887fd7233b1eb2d
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Jun 22 18:53:49 2012 -0400
Keep display names synchronized during account creation.
Reworked part of commit cc55cf3e686ad873cb14129f48d06f83ecc97e68,
which caused a bunch of runtime warnings.
mail/e-mail-config-service-backend.c | 8 --------
mail/e-mail-config-service-page.c | 12 ++++++++++++
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 5762ca9..c6c42ae 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 dc4eb80..6109623 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]