aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2012-09-14 17:20:08 +0800
committerMilan Crha <mcrha@redhat.com>2012-09-14 17:20:08 +0800
commit8e88f65fbe94ca97df338ebc8054879d7bef9aa0 (patch)
tree7872c4a5ed6a7a1ed2c3b6b40679a5534d4a65c9 /modules
parent2db009a1cf75d22e345a25dccff2706193e7950d (diff)
downloadgsoc2013-evolution-8e88f65fbe94ca97df338ebc8054879d7bef9aa0.tar
gsoc2013-evolution-8e88f65fbe94ca97df338ebc8054879d7bef9aa0.tar.gz
gsoc2013-evolution-8e88f65fbe94ca97df338ebc8054879d7bef9aa0.tar.bz2
gsoc2013-evolution-8e88f65fbe94ca97df338ebc8054879d7bef9aa0.tar.lz
gsoc2013-evolution-8e88f65fbe94ca97df338ebc8054879d7bef9aa0.tar.xz
gsoc2013-evolution-8e88f65fbe94ca97df338ebc8054879d7bef9aa0.tar.zst
gsoc2013-evolution-8e88f65fbe94ca97df338ebc8054879d7bef9aa0.zip
Bug #683949 - Cannot create new LDAP Addressbook
Diffstat (limited to 'modules')
-rw-r--r--modules/book-config-ldap/evolution-book-config-ldap.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/book-config-ldap/evolution-book-config-ldap.c b/modules/book-config-ldap/evolution-book-config-ldap.c
index 5dd0c9ec77..01f6e5d671 100644
--- a/modules/book-config-ldap/evolution-book-config-ldap.c
+++ b/modules/book-config-ldap/evolution-book-config-ldap.c
@@ -526,6 +526,7 @@ book_config_ldap_insert_widgets (ESourceConfigBackend *backend,
const gchar *extension_name;
const gchar *tab_label;
const gchar *uid;
+ gboolean is_new_source;
context = g_slice_new (Context);
uid = e_source_get_uid (scratch_source);
@@ -845,6 +846,7 @@ book_config_ldap_insert_widgets (ESourceConfigBackend *backend,
/* Bind widgets to extension properties. */
extension_name = E_SOURCE_EXTENSION_AUTHENTICATION;
+ is_new_source = !e_source_has_extension (scratch_source, extension_name);
extension = e_source_get_extension (scratch_source, extension_name);
g_object_bind_property (
@@ -914,6 +916,17 @@ book_config_ldap_insert_widgets (ESourceConfigBackend *backend,
context->security_combo, "active",
G_BINDING_BIDIRECTIONAL |
G_BINDING_SYNC_CREATE);
+
+ /* initialize values from UI into extension, if the source
+ is a fresh new source; bindings will take care of proper
+ values setting into extension properties
+ */
+ if (is_new_source) {
+ g_object_notify (G_OBJECT (context->host_entry), "text");
+ g_object_notify (G_OBJECT (context->port_combo), "active");
+ g_object_notify (G_OBJECT (context->auth_entry), "text");
+ g_object_notify (G_OBJECT (context->auth_combo), "active");
+ }
}
static gboolean