diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 3 | ||||
-rw-r--r-- | mail/em-composer-prefs.h | 2 | ||||
-rw-r--r-- | mail/em-mailer-prefs.h | 2 | ||||
-rw-r--r-- | mail/mail-config-factory.c | 45 |
4 files changed, 3 insertions, 49 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index dfcf1a83e6..f30227ea52 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,8 @@ 2004-04-07 Jeffrey Stedfast <fejj@ximian.com> + * mail-config-factory.c (mail_config_control_factory_cb): No + longer need the Apply stuff. + * em-mailer-prefs.c (em_mailer_prefs_construct): Don't call a function that doesn't exist anymore. diff --git a/mail/em-composer-prefs.h b/mail/em-composer-prefs.h index 3006bf8d77..327675bb7c 100644 --- a/mail/em-composer-prefs.h +++ b/mail/em-composer-prefs.h @@ -58,8 +58,6 @@ struct _ESignature; struct _EMComposerPrefs { GtkVBox parent_object; - EvolutionConfigControl *control; - GConfClient *gconf; GladeXML *gui; diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h index 0029690fe1..cbbb0d2350 100644 --- a/mail/em-mailer-prefs.h +++ b/mail/em-mailer-prefs.h @@ -62,8 +62,6 @@ struct _EMMailerPrefs { GNOME_Evolution_Shell shell; - EvolutionConfigControl *control; - GladeXML *gui; GConfClient *gconf; diff --git a/mail/mail-config-factory.c b/mail/mail-config-factory.c index 9a6170796a..9c2525df14 100644 --- a/mail/mail-config-factory.c +++ b/mail/mail-config-factory.c @@ -35,71 +35,26 @@ #define CONFIG_CONTROL_FACTORY_ID "OAFIID:GNOME_Evolution_Mail_ConfigControlFactory:" BASE_VERSION - -typedef void (*ApplyFunc) (GtkWidget *prefs); - -struct _config_data { - GtkWidget *prefs; - ApplyFunc apply; -}; - -static void -config_control_destroy_cb (struct _config_data *data, GObject *deadbeef) -{ - g_object_unref (data->prefs); - g_free (data); -} - -static void -config_control_apply_cb (EvolutionConfigControl *config_control, void *user_data) -{ - struct _config_data *data = user_data; - - data->apply (data->prefs); -} - BonoboObject * mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *component_id, void *user_data) { GNOME_Evolution_Shell shell = (GNOME_Evolution_Shell) user_data; EvolutionConfigControl *control; - struct _config_data *data; GtkWidget *prefs = NULL; - data = g_new (struct _config_data, 1); - if (!strcmp (component_id, EM_ACCOUNT_PREFS_CONTROL_ID)) { prefs = em_account_prefs_new (shell); - data->apply = (ApplyFunc) em_account_prefs_apply; } else if (!strcmp (component_id, EM_MAILER_PREFS_CONTROL_ID)) { prefs = em_mailer_prefs_new (); - data->apply = (ApplyFunc) em_mailer_prefs_apply; } else if (!strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID)) { prefs = em_composer_prefs_new (); - data->apply = (ApplyFunc) em_composer_prefs_apply; } else { g_assert_not_reached (); } - - data->prefs = prefs; - g_object_ref (prefs); gtk_widget_show_all (prefs); control = evolution_config_control_new (prefs); - if (!strcmp (component_id, EM_ACCOUNT_PREFS_CONTROL_ID)) { - /* nothing to do here... */ - } else if (!strcmp (component_id, EM_MAILER_PREFS_CONTROL_ID)) { - EM_MAILER_PREFS (prefs)->control = control; - } else if (!strcmp (component_id, EM_COMPOSER_PREFS_CONTROL_ID)) { - EM_COMPOSER_PREFS (prefs)->control = control; - } else { - g_assert_not_reached (); - } - - g_signal_connect (control, "apply", G_CALLBACK (config_control_apply_cb), data); - g_object_weak_ref ((GObject *) control, (GWeakNotify) config_control_destroy_cb, data); - return BONOBO_OBJECT (control); } |