[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: Fri, 22 Jun 2012 19:25:45 +0000 (UTC)
commit cc55cf3e686ad873cb14129f48d06f83ecc97e68
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Jun 22 14:18:16 2012 -0400
Keep display names synchronized during account creation.
mail/e-mail-config-assistant.c | 14 ++++++++++++++
mail/e-mail-config-service-backend.c | 8 ++++++++
mail/e-mail-config-summary-page.c | 6 +-----
3 files changed, 23 insertions(+), 5 deletions(-)
---
diff --git a/mail/e-mail-config-assistant.c b/mail/e-mail-config-assistant.c
index 16d0e2e..70f60e6 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 c6c42ae..5762ca9 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 2da138e..110b007 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. */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]