Keep display names synchronized during account creation.

This commit is contained in:
Matthew Barnes
2012-06-22 14:18:16 -04:00
parent ae49f89b72
commit cc55cf3e68
3 changed files with 23 additions and 5 deletions
+14
View File
@@ -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. */
+8
View File
@@ -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
+1 -5
View File
@@ -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. */