aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-03-25 16:55:13 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-03-25 16:55:13 +0800
commitc63489710d49a5daa4ce7499be8a59ea1d23ec29 (patch)
treea9e1aa3b0b2303a5c2751db1ee19a15a9c270ee1
parent14c2e4a8132ced1091baaf9ce98111562735c718 (diff)
downloadgsoc2013-evolution-c63489710d49a5daa4ce7499be8a59ea1d23ec29.tar.gz
gsoc2013-evolution-c63489710d49a5daa4ce7499be8a59ea1d23ec29.tar.zst
gsoc2013-evolution-c63489710d49a5daa4ce7499be8a59ea1d23ec29.zip
Allow the authtype to be NULL. (transport_auth_init): If the provider
2001-03-25 Jeffrey Stedfast <fejj@ximian.com> * mail-account-editor.c (transport_auth_type_changed): Allow the authtype to be NULL. (transport_auth_init): If the provider allows authtypes but doesn't *need* one, create a "None" menu item that the user can choose. This should fix the bug people have been seeing recently since dan removed the no_authtype authmech from the smtp provider. svn path=/trunk/; revision=8926
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/mail-account-editor.c24
2 files changed, 31 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 670641500f..06db4b33bf 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,12 @@
+2001-03-25 Jeffrey Stedfast <fejj@ximian.com>
+
+ * mail-account-editor.c (transport_auth_type_changed): Allow the
+ authtype to be NULL.
+ (transport_auth_init): If the provider allows authtypes but
+ doesn't *need* one, create a "None" menu item that the user can
+ choose. This should fix the bug people have been seeing recently
+ since dan removed the no_authtype authmech from the smtp provider.
+
2001-03-24 Jeffrey Stedfast <fejj@ximian.com>
* openpgp-utils.c (openpgp_verify): Default to iso-8859-1 as the
diff --git a/mail/mail-account-editor.c b/mail/mail-account-editor.c
index 2c4b2e8e93..751ae57646 100644
--- a/mail/mail-account-editor.c
+++ b/mail/mail-account-editor.c
@@ -407,9 +407,10 @@ transport_auth_type_changed (GtkWidget *widget, gpointer user_data)
authtype = gtk_object_get_data (GTK_OBJECT (widget), "authtype");
- gtk_object_set_data (GTK_OBJECT (editor), "transport_authmech", authtype->authproto);
+ gtk_object_set_data (GTK_OBJECT (editor), "transport_authmech",
+ authtype ? authtype->authproto : NULL);
- if (authtype->need_password)
+ if (authtype && authtype->need_password)
sensitive = TRUE;
else
sensitive = FALSE;
@@ -443,6 +444,25 @@ transport_auth_init (MailAccountEditor *editor, CamelURL *url)
menu = gtk_menu_new ();
+ if (CAMEL_PROVIDER_ALLOWS (editor->transport, CAMEL_URL_ALLOW_AUTH) &&
+ !CAMEL_PROVIDER_NEEDS (editor->transport, CAMEL_URL_NEED_AUTH)) {
+ /* It allows auth, but doesn't require it so give the user a
+ way to say he doesn't need it */
+ item = gtk_menu_item_new_with_label (_("None"));
+ gtk_object_set_data (GTK_OBJECT (item), "authtype", NULL);
+ gtk_signal_connect (GTK_OBJECT (item), "activate",
+ GTK_SIGNAL_FUNC (transport_auth_type_changed),
+ editor);
+
+ gtk_menu_append (GTK_MENU (menu), item);
+
+ gtk_widget_show (item);
+
+ authmech = item;
+ history = i;
+ i++;
+ }
+
if (authtypes) {
GList *l;