diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/addressbook/addressbook-config.c | 10 | ||||
-rw-r--r-- | modules/addressbook/addressbook-config.h | 7 |
2 files changed, 9 insertions, 8 deletions
diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c index 1a9f4a4e95..caf2a8ab7c 100644 --- a/modules/addressbook/addressbook-config.c +++ b/modules/addressbook/addressbook-config.c @@ -194,14 +194,14 @@ static AddressbookLDAPSSLType ldap_parse_ssl (const gchar *ssl) { if (!ssl) - return ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE; /* XXX good default? */ + return ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE; if (!strcmp (ssl, "always")) return ADDRESSBOOK_LDAP_SSL_ALWAYS; - else if (!strcmp (ssl, "never")) - return ADDRESSBOOK_LDAP_SSL_NEVER; - else + else if (!strcmp (ssl, "whenever_possible")) return ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE; + else + return ADDRESSBOOK_LDAP_SSL_NEVER; } static const gchar * @@ -793,7 +793,7 @@ eabc_general_host(EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget * sdialog->ssl_combobox = glade_xml_get_widget (gui, "ssl-combobox"); gtk_widget_set_has_tooltip (sdialog->ssl_combobox, TRUE); tmp = e_source_get_property (sdialog->source, "ssl"); - sdialog->ssl = tmp ? ldap_parse_ssl (tmp) : ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE; + sdialog->ssl = ldap_parse_ssl (tmp); gtk_combo_box_set_active (GTK_COMBO_BOX (sdialog->ssl_combobox), sdialog->ssl); gtk_widget_set_tooltip_text (sdialog->ssl_combobox, ldap_get_ssl_tooltip (sdialog->ssl)); gtk_widget_set_sensitive (sdialog->ssl_combobox, strcmp (port, LDAPS_PORT_STRING) != 0); diff --git a/modules/addressbook/addressbook-config.h b/modules/addressbook/addressbook-config.h index 26c1788e51..aaf791d487 100644 --- a/modules/addressbook/addressbook-config.h +++ b/modules/addressbook/addressbook-config.h @@ -40,10 +40,11 @@ typedef enum { ADDRESSBOOK_LDAP_SCOPE_LAST } AddressbookLDAPScopeType; +/* the order matches order of items in "ssl-combobox" */ typedef enum { - ADDRESSBOOK_LDAP_SSL_ALWAYS, - ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE, - ADDRESSBOOK_LDAP_SSL_NEVER + ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE, /* SSL */ + ADDRESSBOOK_LDAP_SSL_ALWAYS, /* TLS */ + ADDRESSBOOK_LDAP_SSL_NEVER /* No encryption */ } AddressbookLDAPSSLType; GtkWidget* addressbook_config_edit_source (GtkWidget *parent, ESource *source); |