aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog10
-rw-r--r--mail/mail-config-druid.c24
-rw-r--r--mail/mail-config-druid.h1
3 files changed, 34 insertions, 1 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index a58c9241cc..9791381d33 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,5 +1,15 @@
2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
+ * mail-config-druid.c (transport_back): New callback to handle
+ when the user hits the "back" button when on the transport
+ page. This is needed to handle the case where we don't want to
+ show the user the auth page (due to there being no auth choices).
+ (incoming_next): If we are going to skip over the auth page, set
+ the 'have_auth_page' variable to FALSE.
+ (construct): Initialize the have_auth_page to TRUE.
+
+2001-01-10 Jeffrey Stedfast <fejj@helixcode.com>
+
* mail-config-druid.c (incoming_type_changed): Grab the focus of
the first widget that is sensitive.
(transport_type_changed): Same.
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
index 86977b5081..6982965105 100644
--- a/mail/mail-config-druid.c
+++ b/mail/mail-config-druid.c
@@ -340,6 +340,8 @@ incoming_next (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
gchar *source_url;
CamelURL *url;
+ config->have_auth_page = TRUE;
+
source_url = mail_config_druid_get_source_url (config);
url = camel_url_new (source_url, NULL);
g_free (source_url);
@@ -358,6 +360,7 @@ incoming_next (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
}
/* Otherwise, skip to transport page. */
+ config->have_auth_page = FALSE;
transport_page = glade_xml_get_widget (config->gui, "druidTransportPage");
gnome_druid_set_page (config->druid, GNOME_DRUID_PAGE (transport_page));
@@ -595,6 +598,24 @@ transport_next (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
return FALSE;
}
+static gboolean
+transport_back (GnomeDruidPage *page, GnomeDruid *druid, gpointer data)
+{
+ MailConfigDruid *config = data;
+
+ if (config->have_auth_page) {
+ return FALSE;
+ } else {
+ /* jump to the source page, skipping over the auth page */
+ GtkWidget *widget;
+
+ widget = glade_xml_get_widget (config->gui, "druidSourcePage");
+ gnome_druid_set_page (config->druid, GNOME_DRUID_PAGE (widget));
+
+ return TRUE;
+ }
+}
+
static void
transport_changed (GtkWidget *widget, gpointer data)
{
@@ -801,7 +822,7 @@ static struct {
{ "druidTransportPage",
GTK_SIGNAL_FUNC (transport_next),
GTK_SIGNAL_FUNC (transport_prepare),
- GTK_SIGNAL_FUNC (NULL),
+ GTK_SIGNAL_FUNC (transport_back),
GTK_SIGNAL_FUNC (NULL) },
{ "druidManagementPage",
GTK_SIGNAL_FUNC (management_next),
@@ -894,6 +915,7 @@ construct (MailConfigDruid *druid)
gtk_signal_connect (GTK_OBJECT (druid->incoming_path), "changed", incoming_changed, druid);
druid->incoming_keep_mail = GTK_CHECK_BUTTON (glade_xml_get_widget (gui, "chkIncomingKeepMail"));
+ druid->have_auth_page = TRUE;
druid->auth_text = glade_xml_get_widget (gui, "htmlAuthentication");
druid->auth_type = GTK_OPTION_MENU (glade_xml_get_widget (gui, "omenuAuthType"));
druid->password = GTK_ENTRY (glade_xml_get_widget (gui, "txtAuthPasswd"));
diff --git a/mail/mail-config-druid.h b/mail/mail-config-druid.h
index e738839bc7..05b07391fd 100644
--- a/mail/mail-config-druid.h
+++ b/mail/mail-config-druid.h
@@ -72,6 +72,7 @@ struct _MailConfigDruid {
GtkCheckButton *incoming_keep_mail;
/* authentication */
+ gboolean have_auth_page;
GtkWidget *auth_text;
GtkOptionMenu *auth_type;
GtkEntry *password;