aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-10-24 07:39:07 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-10-24 07:39:07 +0800
commit65c33efb1b50b4ca08adf3dbc56c300a20b55608 (patch)
tree2afe5d0e9350164eeca282035f9d33a20a8271b5
parentd998431a1eb014dd5e791c5d5cfecafba40dd32c (diff)
downloadgsoc2013-evolution-65c33efb1b50b4ca08adf3dbc56c300a20b55608.tar.gz
gsoc2013-evolution-65c33efb1b50b4ca08adf3dbc56c300a20b55608.tar.zst
gsoc2013-evolution-65c33efb1b50b4ca08adf3dbc56c300a20b55608.zip
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
-rw-r--r--mail/ChangeLog9
-rw-r--r--mail/mail-account-gui.c12
-rw-r--r--mail/mail-config-druid.c41
3 files changed, 42 insertions, 20 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index dbc2fbfd9e..8f96dbab03 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -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>
* mail-display.c (mail_display_destroy): Remove the idle_id when
diff --git a/mail/mail-account-gui.c b/mail/mail-account-gui.c
index 39572f9ab1..07b76a93b9 100644
--- a/mail/mail-account-gui.c
+++ b/mail/mail-account-gui.c
@@ -502,10 +502,20 @@ service_check_supported (GtkButton *button, gpointer user_data)
MailAccountGuiService *gsvc = user_data;
MailConfigService *service;
GList *authtypes = NULL;
+ GtkWidget *authitem;
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);
+ gsvc->authitem = authitem;
+
if (mail_config_check_service (service->url, gsvc->provider_type, &authtypes)) {
build_auth_menu (gsvc, gsvc->provider->authtypes, authtypes, TRUE);
if (!authtypes) {
@@ -1244,6 +1254,7 @@ mail_account_gui_new (MailConfigAccount *account)
}
/* 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.description = GTK_LABEL (glade_xml_get_widget (gui->xml, "source_description"));
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"));
/* 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.description = GTK_LABEL (glade_xml_get_widget (gui->xml, "transport_description"));
gui->transport.hostname = GTK_ENTRY (glade_xml_get_widget (gui->xml, "transport_host"));
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
index dbe6553845..2afc90a386 100644
--- a/mail/mail-config-druid.c
+++ b/mail/mail-config-druid.c
@@ -283,7 +283,7 @@ source_changed (GtkWidget *widget, gpointer data)
if (gui->page != MAIL_CONFIG_WIZARD_PAGE_SOURCE)
return;
-
+
next_sensitive = mail_account_gui_source_complete (gui->gui, &incomplete);
evolution_wizard_set_buttons_sensitive (gui->wizard, TRUE, next_sensitive, TRUE, NULL);
@@ -342,7 +342,7 @@ static gboolean
transport_back (EvolutionWizard *wizard, gpointer data)
{
MailConfigWizard *gui = data;
-
+
if (gui->gui->source.provider && gui->gui->source.provider->extra_conf)
return FALSE;
else {
@@ -357,7 +357,7 @@ transport_changed (GtkWidget *widget, gpointer data)
MailConfigWizard *gui = data;
GtkWidget *incomplete;
gboolean next_sensitive;
-
+
if (gui->page != MAIL_CONFIG_WIZARD_PAGE_TRANSPORT)
return;
next_sensitive = mail_account_gui_transport_complete (gui->gui, &incomplete);
@@ -681,20 +681,20 @@ get_fn (EvolutionWizard *wizard,
BonoboControl *control;
GtkWidget *vbox, *widget;
static gboolean first_time = TRUE;
-
+
if (gui->gui == NULL) {
if (gui->account == NULL) {
gui->account = make_account ();
gtk_object_set_data (GTK_OBJECT (wizard), "account-data",
gui->account);
}
-
- gui->gui = mail_account_gui_new (gui->account);
-
- /* set up signals, etc */
- gtk_signal_connect (GTK_OBJECT (gui->gui->account_name),
- "changed", management_changed, gui);
- gtk_signal_connect (GTK_OBJECT (gui->gui->full_name),
+
+ gui->gui = mail_account_gui_new (gui->account);
+
+ /* set up signals, etc */
+ gtk_signal_connect (GTK_OBJECT (gui->gui->account_name),
+ "changed", management_changed, gui);
+ gtk_signal_connect (GTK_OBJECT (gui->gui->full_name),
"changed", identity_changed, gui);
gtk_signal_connect (GTK_OBJECT (gui->gui->email_address),
"changed", identity_changed, gui);
@@ -710,7 +710,7 @@ get_fn (EvolutionWizard *wizard,
"changed", transport_changed, gui);
first_time = TRUE;
}
-
+
/* Fill in the druid pages */
vbox = gtk_vbox_new (FALSE, 0);
switch (page_num) {
@@ -724,7 +724,7 @@ get_fn (EvolutionWizard *wizard,
gtk_widget_reparent (widget, vbox);
gtk_box_set_child_packing (GTK_BOX (vbox), widget, FALSE, FALSE, 0, GTK_PACK_START);
break;
-
+
case 1:
widget = create_label ("source_html");
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
@@ -732,14 +732,14 @@ get_fn (EvolutionWizard *wizard,
gtk_widget_reparent (widget, vbox);
gtk_widget_show (widget);
break;
-
+
case 2:
widget = create_label ("extra_html");
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
widget = glade_xml_get_widget (gui->gui->xml, "extra_vbox");
gtk_widget_reparent (widget, vbox);
break;
-
+
case 3:
widget = create_label ("transport_html");
gtk_box_pack_start (GTK_BOX (vbox), widget, FALSE, FALSE, 0);
@@ -747,23 +747,24 @@ get_fn (EvolutionWizard *wizard,
gtk_widget_reparent (widget, vbox);
gtk_widget_show (widget);
break;
-
+
case 4:
widget = glade_xml_get_widget (gui->gui->xml, "management_frame");
gtk_widget_reparent (widget, vbox);
break;
-
+
default:
return NULL;
}
-
+
gtk_widget_show (vbox);
control = bonobo_control_new (vbox);
-
+
if (first_time) {
mail_account_gui_setup (gui->gui, NULL);
first_time = FALSE;
}
+
return control;
}
@@ -900,7 +901,7 @@ evolution_mail_config_wizard_factory_fn (BonoboGenericFactory *factory,
wizard = evolution_wizard_new (get_fn, 5, gui);
account_wizard = wizard;
-
+
gtk_object_set_data_full (GTK_OBJECT (account_wizard),
"account-data", gui,
(GtkDestroyNotify) wizard_free);