diff options
author | Chris Toshok <toshok@ximian.com> | 2002-04-19 06:43:54 +0800 |
---|---|---|
committer | Chris Toshok <toshok@src.gnome.org> | 2002-04-19 06:43:54 +0800 |
commit | 500a46c6b7aca3556b2f77e5448fe7cff83ecae1 (patch) | |
tree | 48168342b44a1c22ac6048a8491da1064a505b10 /addressbook/gui/component/ldap-config.c | |
parent | 7397bc24b8b776af4c46d13d2ac77d0e063bc853 (diff) | |
download | gsoc2013-evolution-500a46c6b7aca3556b2f77e5448fe7cff83ecae1.tar gsoc2013-evolution-500a46c6b7aca3556b2f77e5448fe7cff83ecae1.tar.gz gsoc2013-evolution-500a46c6b7aca3556b2f77e5448fe7cff83ecae1.tar.bz2 gsoc2013-evolution-500a46c6b7aca3556b2f77e5448fe7cff83ecae1.tar.lz gsoc2013-evolution-500a46c6b7aca3556b2f77e5448fe7cff83ecae1.tar.xz gsoc2013-evolution-500a46c6b7aca3556b2f77e5448fe7cff83ecae1.tar.zst gsoc2013-evolution-500a46c6b7aca3556b2f77e5448fe7cff83ecae1.zip |
fill in source->ssl. (addressbook_source_dialog_set_source): set up
2002-04-18 Chris Toshok <toshok@ximian.com>
* gui/component/ldap-config.c (addressbook_dialog_get_source):
fill in source->ssl.
(addressbook_source_dialog_set_source): set up auth/scope/ssl
option menus properly.
* gui/component/addressbook-storage.c
(addressbook_storage_init_source_uri): always include the
limit/ssl in the uri so we don't need to rely on defaults
everywhere.
(ldap_source_foreach): store the ssl option.
* gui/component/addressbook-storage.h: reorder SSLType to match
the UI.
* backend/pas/pas-backend-ldap.c: (struct _PASBackendLDAPPrivate)
add field for ldap_timeout.
(pas_backend_ldap_connect): reorder things a bit - we need to
start tls before the root dse query, if we can.
(pas_backend_ldap_load_uri): track the way ssl parameters are
given in the uri, and parse out the timeout.
* gui/component/ldap-config.c (port_changed_func): use the
symbolic SSL name instead of an integer constant.
svn path=/trunk/; revision=16529
Diffstat (limited to 'addressbook/gui/component/ldap-config.c')
-rw-r--r-- | addressbook/gui/component/ldap-config.c | 23 |
1 files changed, 12 insertions, 11 deletions
diff --git a/addressbook/gui/component/ldap-config.c b/addressbook/gui/component/ldap-config.c index 59e924c5af..c4aa08e15e 100644 --- a/addressbook/gui/component/ldap-config.c +++ b/addressbook/gui/component/ldap-config.c @@ -123,7 +123,7 @@ typedef struct { GtkSignalFunc connecting_modify_func; GtkWidget *port_combo; GtkWidget *ssl_optionmenu; - int ssl; /* XXX this should be AddressbookLDAPSSLType */ + AddressbookLDAPSSLType ssl; /* searching page fields */ GtkSignalFunc searching_modify_func; @@ -239,6 +239,7 @@ addressbook_dialog_get_source (AddressbookSourceDialog *dialog) source->limit = atoi(e_utf8_gtk_entry_get_text (GTK_ENTRY (dialog->limit_spinbutton))); source->scope = dialog->scope; source->auth = dialog->auth; + source->ssl = dialog->ssl; addressbook_storage_init_source_uri (source); @@ -260,20 +261,20 @@ addressbook_source_dialog_set_source (AddressbookSourceDialog *dialog, Addressbo e_utf8_gtk_entry_set_text (GTK_ENTRY (dialog->limit_spinbutton), string); g_free (string); -#if 0 dialog->auth = source ? source->auth : ADDRESSBOOK_LDAP_AUTH_NONE; + gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->auth_optionmenu), dialog->auth); if (dialog->auth != ADDRESSBOOK_LDAP_AUTH_NONE) { - gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->auth_optionmenu), dialog->auth - 1); - gtk_notebook_set_page (GTK_NOTEBOOK(dialog->auth_notebook), dialog->auth - 1); + gtk_notebook_set_page (GTK_NOTEBOOK(dialog->auth_label_notebook), dialog->auth - 1); + gtk_notebook_set_page (GTK_NOTEBOOK(dialog->auth_entry_notebook), dialog->auth - 1); } + gtk_widget_set_sensitive (dialog->auth_label_notebook, dialog->auth != ADDRESSBOOK_LDAP_AUTH_NONE); + gtk_widget_set_sensitive (dialog->auth_entry_notebook, dialog->auth != ADDRESSBOOK_LDAP_AUTH_NONE); - dialog->ldap_scope = source ? source->scope : ADDRESSBOOK_LDAP_SCOPE_ONELEVEL; - gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->scope_optionmenu), dialog->ldap_scope); + dialog->scope = source ? source->scope : ADDRESSBOOK_LDAP_SCOPE_ONELEVEL; + gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->scope_optionmenu), dialog->scope); - gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON(dialog->auth_checkbutton), source && source->auth != ADDRESSBOOK_LDAP_AUTH_NONE); - gtk_widget_set_sensitive (dialog->auth_optionmenu, source && source->auth != ADDRESSBOOK_LDAP_AUTH_NONE); - gtk_widget_set_sensitive (dialog->auth_notebook, source && source->auth != ADDRESSBOOK_LDAP_AUTH_NONE); -#endif + dialog->ssl = source ? source->auth : ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE; + gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->ssl_optionmenu), dialog->ssl); } static void @@ -467,7 +468,7 @@ port_changed_func (GtkWidget *item, AddressbookSourceDialog *dialog) dialog->connecting_modify_func (item, dialog); if (!strcmp (string, LDAPS_PORT_STRING)) { - dialog->ssl = 0; /* XXX SSL_ALWAYS */ + dialog->ssl = ADDRESSBOOK_LDAP_SSL_ALWAYS; gtk_option_menu_set_history (GTK_OPTION_MENU(dialog->ssl_optionmenu), dialog->ssl); |