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
This commit is contained in:
Peter Williams
2002-08-23 18:08:35 +00:00
committed by Peter Williams
parent 536e8060e9
commit 3fa45e2cfc
2 changed files with 90 additions and 2 deletions

View File

@ -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

View File

@ -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;
}