aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2012-06-23 02:18:16 +0800
committerMatthew Barnes <mbarnes@redhat.com>2012-06-23 03:04:37 +0800
commitcc55cf3e686ad873cb14129f48d06f83ecc97e68 (patch)
tree89a103b6aa41bf5749c25b0e3d47d34f33e40405 /mail
parentae49f89b72320b0ee9f0b7bf6fff7ae06ebb3b05 (diff)
downloadgsoc2013-evolution-cc55cf3e686ad873cb14129f48d06f83ecc97e68.tar.gz
gsoc2013-evolution-cc55cf3e686ad873cb14129f48d06f83ecc97e68.tar.zst
gsoc2013-evolution-cc55cf3e686ad873cb14129f48d06f83ecc97e68.zip
Keep display names synchronized during account creation.
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. */