From 4baef8309f7b216401269448ff5389296dd335c0 Mon Sep 17 00:00:00 2001 From: Jeffrey Stedfast Date: Fri, 3 Aug 2001 21:37:00 +0000 Subject: Try to restore the choice the user had chosen before hitting the "Check 2001-08-03 Jeffrey Stedfast * mail-account-gui.c (build_auth_menu): Try to restore the choice the user had chosen before hitting the "Check Supported Types" button. * mail-format.c (write_headers): Removed a no-longer-needed g_warning. svn path=/trunk/; revision=11625 --- mail/mail-account-gui.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mail/mail-account-gui.c') diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c index 19d7789742..05d2674699 100644 --- a/mail/mail-account-gui.c +++ b/mail/mail-account-gui.c @@ -222,9 +222,16 @@ build_auth_menu (MailAccountGuiService *service, GList *all_authtypes, GList *supported_authtypes, gboolean check_supported) { GtkWidget *menu, *item, *first = NULL; - CamelServiceAuthType *authtype, *sauthtype; + CamelServiceAuthType *preferred, *authtype, *sauthtype; GList *l, *s; + if (service->authitem) + preferred = gtk_object_get_data (GTK_OBJECT (service->authitem), "authtype"); + else + preferred = NULL; + + service->authitem = NULL; + menu = gtk_menu_new (); for (l = all_authtypes; l; l = l->next) { @@ -238,6 +245,8 @@ build_auth_menu (MailAccountGuiService *service, GList *all_authtypes, } if (check_supported && !s) gtk_widget_set_sensitive (item, FALSE); + else if (preferred == authtype) + first = item; else if (!first) first = item; -- cgit v1.2.3