aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorPeter Williams <peterw@ximian.com>2002-08-24 02:08:35 +0800
committerPeter Williams <peterw@src.gnome.org>2002-08-24 02:08:35 +0800
commit3fa45e2cfcf2a61c9c80a0f2e9ebf23dc3cc20cd (patch)
tree774110efb24d6d77c820a6090d5994217002268b /mail
parent536e8060e9ff1656462c4c2f518279465ac43454 (diff)
downloadgsoc2013-evolution-3fa45e2cfcf2a61c9c80a0f2e9ebf23dc3cc20cd.tar.gz
gsoc2013-evolution-3fa45e2cfcf2a61c9c80a0f2e9ebf23dc3cc20cd.tar.zst
gsoc2013-evolution-3fa45e2cfcf2a61c9c80a0f2e9ebf23dc3cc20cd.zip
Address most of bug #4940. Fails on the last page of the add account
2002-08-23 Peter Williams <peterw@ximian.com> Address most of bug #4940. Fails on the last page of the add account dialog as called from the prefs dialog due to EvolutionWizard being weird. * mail-config-druid.c (goto_next_page): New function, little wrapper around wizard_next_cb. Also potential place to work around EvolutionWizard weirdness in the future. (identity_activate_cb): New function, calls goto_next_page if identity page is complete. (source_activate_cb): Analogous. (transport_activate_cb): Analogous. (management_activate_cb): Analogous. (get_fn): Hook up the activate signals of the various GtkEntries to the correct callbacks above. (management_check): Return the result of the check so that management_activate_cb can use it. svn path=/trunk/; revision=17851
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog19
-rw-r--r--mail/mail-config-druid.c73
2 files changed, 90 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 9a68a963a3..bf9afb466b 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,22 @@
+2002-08-23 Peter Williams <peterw@ximian.com>
+
+ Address most of bug #4940. Fails on the last page of the add account
+ dialog as called from the prefs dialog due to EvolutionWizard being
+ weird.
+
+ * mail-config-druid.c (goto_next_page): New function, little
+ wrapper around wizard_next_cb. Also potential place to work around
+ EvolutionWizard weirdness in the future.
+ (identity_activate_cb): New function, calls goto_next_page if
+ identity page is complete.
+ (source_activate_cb): Analogous.
+ (transport_activate_cb): Analogous.
+ (management_activate_cb): Analogous.
+ (get_fn): Hook up the activate signals of the various GtkEntries
+ to the correct callbacks above.
+ (management_check): Return the result of the check so that
+ management_activate_cb can use it.
+
2002-08-22 Jeffrey Stedfast <fejj@ximian.com>
* mail-tools.c (mail_tool_restore_xevolution_headers): Reset the
diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c
index 39bf2f4f14..6266fa1e0b 100644
--- a/mail/mail-config-druid.c
+++ b/mail/mail-config-druid.c
@@ -391,7 +391,7 @@ transport_prepare (EvolutionWizard *wizard, gpointer data)
}
/* Management page */
-static void
+static gboolean
management_check (MailConfigWizard *wizard)
{
gboolean next_sensitive;
@@ -406,6 +406,7 @@ management_check (MailConfigWizard *wizard)
evolution_wizard_set_buttons_sensitive (wizard->wizard, TRUE,
next_sensitive, TRUE, NULL);
+ return next_sensitive;
}
static void
@@ -712,6 +713,50 @@ mail_config_druid_new (GNOME_Evolution_Shell shell)
return new;
}
+static void wizard_next_cb (EvolutionWizard *wizard, int page_num, MailConfigWizard *gui);
+
+static void
+goto_next_page (MailConfigWizard *gui)
+{
+ wizard_next_cb (gui->wizard, gui->page, gui);
+}
+
+static void
+identity_activate_cb (GtkEntry *ent, gpointer user_data)
+{
+ MailConfigWizard *gui = (MailConfigWizard *) user_data;
+
+ if (mail_account_gui_identity_complete (gui->gui, NULL))
+ goto_next_page (gui);
+}
+
+static void
+source_activate_cb (GtkEntry *ent, gpointer user_data)
+{
+ MailConfigWizard *gui = (MailConfigWizard *) user_data;
+
+ if (mail_account_gui_source_complete (gui->gui, NULL))
+ goto_next_page (gui);
+}
+
+static void
+transport_activate_cb (GtkEntry *ent, gpointer user_data)
+{
+ MailConfigWizard *gui = (MailConfigWizard *) user_data;
+
+ if (mail_account_gui_transport_complete (gui->gui, NULL))
+ goto_next_page (gui);
+}
+
+static void
+management_activate_cb (GtkEntry *ent, gpointer user_data)
+{
+ MailConfigWizard *gui = (MailConfigWizard *) user_data;
+
+ if (management_check (gui))
+ goto_next_page (gui);
+}
+
static BonoboControl *
get_fn (EvolutionWizard *wizard,
int page_num,
@@ -748,6 +793,30 @@ get_fn (EvolutionWizard *wizard,
"changed", transport_changed, gui);
gtk_signal_connect (GTK_OBJECT (gui->gui->transport.username),
"changed", transport_changed, gui);
+
+ gtk_signal_connect (GTK_OBJECT (gui->gui->account_name),
+ "activate", management_activate_cb, gui);
+
+ gtk_signal_connect (GTK_OBJECT (gui->gui->full_name),
+ "activate", identity_activate_cb, gui);
+ gtk_signal_connect (GTK_OBJECT (gui->gui->email_address),
+ "activate", identity_activate_cb, gui);
+ gtk_signal_connect (GTK_OBJECT (gui->gui->reply_to),
+ "activate", identity_activate_cb, gui);
+ gtk_signal_connect (GTK_OBJECT (gui->gui->organization),
+ "activate", identity_activate_cb, gui);
+
+ gtk_signal_connect (GTK_OBJECT (gui->gui->source.hostname),
+ "activate", source_activate_cb, gui);
+ gtk_signal_connect (GTK_OBJECT (gui->gui->source.username),
+ "activate", source_activate_cb, gui);
+ gtk_signal_connect (GTK_OBJECT (gui->gui->source.path),
+ "activate", source_activate_cb, gui);
+
+ gtk_signal_connect (GTK_OBJECT (gui->gui->transport.hostname),
+ "activate", transport_activate_cb, gui);
+ gtk_signal_connect (GTK_OBJECT (gui->gui->transport.username),
+ "activate", transport_activate_cb, gui);
first_time = TRUE;
}
@@ -792,7 +861,7 @@ get_fn (EvolutionWizard *wizard,
widget = glade_xml_get_widget (gui->gui->xml, "management_frame");
gtk_widget_reparent (widget, vbox);
break;
-
+
default:
return NULL;
}