aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-config-druid.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2001-01-11 06:46:16 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-01-11 06:46:16 +0800
commit28cb7707dea9617f0c01b323ad31476f01006300 (patch)
tree7950bd80b427403dd99138fce7601f4ace2ae9ed /mail/mail-config-druid.c
parentc8db3edba3c1879e7f627a26ec0c50a0102d9c4d (diff)
downloadgsoc2013-evolution-28cb7707dea9617f0c01b323ad31476f01006300.tar
gsoc2013-evolution-28cb7707dea9617f0c01b323ad31476f01006300.tar.gz
gsoc2013-evolution-28cb7707dea9617f0c01b323ad31476f01006300.tar.bz2
gsoc2013-evolution-28cb7707dea9617f0c01b323ad31476f01006300.tar.lz
gsoc2013-evolution-28cb7707dea9617f0c01b323ad31476f01006300.tar.xz
gsoc2013-evolution-28cb7707dea9617f0c01b323ad31476f01006300.tar.zst
gsoc2013-evolution-28cb7707dea9617f0c01b323ad31476f01006300.zip
New callback to handle when the user hits the "back" button when on the
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. svn path=/trunk/; revision=7375
Diffstat (limited to 'mail/mail-config-druid.c')
-rw-r--r--mail/mail-config-druid.c24
1 files changed, 23 insertions, 1 deletions
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"));