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
This commit is contained in:
Jeffrey Stedfast
2001-03-25 08:55:13 +00:00
committed by Jeffrey Stedfast
parent 14c2e4a813
commit c63489710d
2 changed files with 31 additions and 2 deletions

View File

@ -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

View File

@ -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;