aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
authorMilan Crha <mcrha@redhat.com>2009-10-21 02:03:43 +0800
committerMilan Crha <mcrha@redhat.com>2009-10-21 02:03:43 +0800
commit2587f7c220528f1ccb4ac41df7e30a31a5903d29 (patch)
tree7a78bce4025c57713ae428db27d72ed85de45b9f /modules
parent7e40d7f799f4a2aa57b7771fd2a00e63d2a9227d (diff)
downloadgsoc2013-evolution-2587f7c220528f1ccb4ac41df7e30a31a5903d29.tar
gsoc2013-evolution-2587f7c220528f1ccb4ac41df7e30a31a5903d29.tar.gz
gsoc2013-evolution-2587f7c220528f1ccb4ac41df7e30a31a5903d29.tar.bz2
gsoc2013-evolution-2587f7c220528f1ccb4ac41df7e30a31a5903d29.tar.lz
gsoc2013-evolution-2587f7c220528f1ccb4ac41df7e30a31a5903d29.tar.xz
gsoc2013-evolution-2587f7c220528f1ccb4ac41df7e30a31a5903d29.tar.zst
gsoc2013-evolution-2587f7c220528f1ccb4ac41df7e30a31a5903d29.zip
Bug #593953 - LDAP SSL option order doesn't match with a backend's
Diffstat (limited to 'modules')
-rw-r--r--modules/addressbook/addressbook-config.c10
-rw-r--r--modules/addressbook/addressbook-config.h7
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);