aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2001-09-10 07:32:31 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2001-09-10 07:32:31 +0800
commitf5fec6d07180668bd0f10ff405dbe0e87b224bea (patch)
tree1793439063e3eee0d70ca6f6e70a2afe159b4bcf
parente494a6049db8d2eb0b73f2add372a9dc254b14d2 (diff)
downloadgsoc2013-evolution-f5fec6d07180668bd0f10ff405dbe0e87b224bea.tar
gsoc2013-evolution-f5fec6d07180668bd0f10ff405dbe0e87b224bea.tar.gz
gsoc2013-evolution-f5fec6d07180668bd0f10ff405dbe0e87b224bea.tar.bz2
gsoc2013-evolution-f5fec6d07180668bd0f10ff405dbe0e87b224bea.tar.lz
gsoc2013-evolution-f5fec6d07180668bd0f10ff405dbe0e87b224bea.tar.xz
gsoc2013-evolution-f5fec6d07180668bd0f10ff405dbe0e87b224bea.tar.zst
gsoc2013-evolution-f5fec6d07180668bd0f10ff405dbe0e87b224bea.zip
We need to initialize all of the struct fields or else god knows what will
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. svn path=/trunk/; revision=12719
-rw-r--r--mail/ChangeLog7
-rw-r--r--mail/mail-config-druid.c28
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);
}