diff options
-rw-r--r-- | mail/ChangeLog | 7 | ||||
-rw-r--r-- | mail/mail-config-druid.c | 28 |
2 files changed, 29 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 981c4b260b..8d826c7ef4 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,10 @@ +2001-09-09 Jeffrey Stedfast <fejj@ximian.com> + + * mail-config-druid.c (evolution_mail_config_wizard_factory_fn): + We need to initialize all of the struct fields or else god knows + what will happen later when we try to use 'em. Also set a destroy + function for the MailConfigWizard so we don't leak it. + 2001-09-08 Jon Trowbridge <trow@ximian.com> * mail-callbacks.c (ask_confirm_for_unwanted_html_mail): Added. diff --git a/mail/mail-config-druid.c b/mail/mail-config-druid.c index 4fe0a88b21..043964443b 100644 --- a/mail/mail-config-druid.c +++ b/mail/mail-config-druid.c @@ -852,6 +852,18 @@ wizard_help_cb (EvolutionWizard *wizard, { } +static void +wizard_free (MailConfigWizard *wizard) +{ + if (wizard->gui) + mail_account_gui_destroy (wizard->gui); + + if (wizard->account) + account_destroy (wizard->account); + + g_free (wizard); +} + static BonoboObject * evolution_mail_config_wizard_factory_fn (BonoboGenericFactory *factory, void *closure) @@ -861,17 +873,20 @@ evolution_mail_config_wizard_factory_fn (BonoboGenericFactory *factory, MailConfigWizard *gui; account = make_account (); - + gui = g_new (MailConfigWizard, 1); + gui->gui = NULL; gui->account = account; - gui->gui = NULL; - + gui->identity_copied = FALSE; + gui->last_source = NULL; + wizard = evolution_wizard_new (get_fn, 5, gui); account_wizard = wizard; - - gtk_object_set_data (GTK_OBJECT (account_wizard), "account-data", gui); + + gtk_object_set_data_full (GTK_OBJECT (account_wizard), + "account-data", gui, wizard_free); gui->wizard = wizard; - + gtk_signal_connect (GTK_OBJECT (wizard), "next", GTK_SIGNAL_FUNC (wizard_next_cb), gui); gtk_signal_connect (GTK_OBJECT (wizard), "prepare", @@ -884,6 +899,7 @@ evolution_mail_config_wizard_factory_fn (BonoboGenericFactory *factory, GTK_SIGNAL_FUNC (wizard_cancel_cb), gui); gtk_signal_connect (GTK_OBJECT (wizard), "help", GTK_SIGNAL_FUNC (wizard_help_cb), gui); + return BONOBO_OBJECT (wizard); } |