Don't allow an auth-type to be set when saving the service.

2001-10-23  Jeffrey Stedfast  <fejj@ximian.com>

	* mail-account-gui.c (service_check_supported): Don't allow an
	auth-type to be set when saving the service.
	(mail_account_gui_new): Initialize the source and transport
	provider_type's here so we don't forget to do it when it matters.
	(mail_account_gui_setup): Don't bother setting the provider_type's
	here, they are already set in mail_account_gui_new() now.

svn path=/trunk/; revision=13968
This commit is contained in:
Jeffrey Stedfast
2001-10-23 23:39:07 +00:00
committed by Jeffrey Stedfast
parent d998431a1e
commit 65c33efb1b
3 changed files with 42 additions and 20 deletions

View File

@ -1,3 +1,12 @@
2001-10-23 Jeffrey Stedfast <fejj@ximian.com>
* mail-account-gui.c (service_check_supported): Don't allow an
auth-type to be set when saving the service.
(mail_account_gui_new): Initialize the source and transport
provider_type's here so we don't forget to do it when it matters.
(mail_account_gui_setup): Don't bother setting the provider_type's
here, they are already set in mail_account_gui_new() now.
2001-10-23 <NotZed@Ximian.com> 2001-10-23 <NotZed@Ximian.com>
* mail-display.c (mail_display_destroy): Remove the idle_id when * mail-display.c (mail_display_destroy): Remove the idle_id when

View File

@ -502,10 +502,20 @@ service_check_supported (GtkButton *button, gpointer user_data)
MailAccountGuiService *gsvc = user_data; MailAccountGuiService *gsvc = user_data;
MailConfigService *service; MailConfigService *service;
GList *authtypes = NULL; GList *authtypes = NULL;
GtkWidget *authitem;
service = g_new0 (MailConfigService, 1); service = g_new0 (MailConfigService, 1);
/* This is sort of a hack, when checking for supported AUTH
types we don't want to use whatever authtype is selected
because it may not be available. */
authitem = gsvc->authitem;
gsvc->authitem = NULL;
save_service (gsvc, NULL, service); save_service (gsvc, NULL, service);
gsvc->authitem = authitem;
if (mail_config_check_service (service->url, gsvc->provider_type, &authtypes)) { if (mail_config_check_service (service->url, gsvc->provider_type, &authtypes)) {
build_auth_menu (gsvc, gsvc->provider->authtypes, authtypes, TRUE); build_auth_menu (gsvc, gsvc->provider->authtypes, authtypes, TRUE);
if (!authtypes) { if (!authtypes) {
@ -1244,6 +1254,7 @@ mail_account_gui_new (MailConfigAccount *account)
} }
/* Source */ /* Source */
gui->source.provider_type = CAMEL_PROVIDER_STORE;
gui->source.type = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "source_type_omenu")); gui->source.type = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "source_type_omenu"));
gui->source.description = GTK_LABEL (glade_xml_get_widget (gui->xml, "source_description")); gui->source.description = GTK_LABEL (glade_xml_get_widget (gui->xml, "source_description"));
gui->source.hostname = GTK_ENTRY (glade_xml_get_widget (gui->xml, "source_host")); gui->source.hostname = GTK_ENTRY (glade_xml_get_widget (gui->xml, "source_host"));
@ -1266,6 +1277,7 @@ mail_account_gui_new (MailConfigAccount *account)
gui->source_auto_check_min = GTK_SPIN_BUTTON (glade_xml_get_widget (gui->xml, "extra_auto_check_min")); gui->source_auto_check_min = GTK_SPIN_BUTTON (glade_xml_get_widget (gui->xml, "extra_auto_check_min"));
/* Transport */ /* Transport */
gui->transport.provider_type = CAMEL_PROVIDER_TRANSPORT;
gui->transport.type = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "transport_type_omenu")); gui->transport.type = GTK_OPTION_MENU (glade_xml_get_widget (gui->xml, "transport_type_omenu"));
gui->transport.description = GTK_LABEL (glade_xml_get_widget (gui->xml, "transport_description")); gui->transport.description = GTK_LABEL (glade_xml_get_widget (gui->xml, "transport_description"));
gui->transport.hostname = GTK_ENTRY (glade_xml_get_widget (gui->xml, "transport_host")); gui->transport.hostname = GTK_ENTRY (glade_xml_get_widget (gui->xml, "transport_host"));

View File

@ -764,6 +764,7 @@ get_fn (EvolutionWizard *wizard,
mail_account_gui_setup (gui->gui, NULL); mail_account_gui_setup (gui->gui, NULL);
first_time = FALSE; first_time = FALSE;
} }
return control; return control;
} }