diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2004-04-08 02:36:01 +0800 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2004-04-08 02:36:01 +0800 |
commit | 2be4a8aa19abb284523b820a4c4845ad0b4d0bfd (patch) | |
tree | c6b7c596445eaae7d56fc320dcb7a4f4d7feb8f3 /mail/mail-config-factory.c | |
parent | e716c8bc983d664815e8b6d4ba74791d76f59e8a (diff) | |
download | gsoc2013-evolution-2be4a8aa19abb284523b820a4c4845ad0b4d0bfd.tar.gz gsoc2013-evolution-2be4a8aa19abb284523b820a4c4845ad0b4d0bfd.tar.zst gsoc2013-evolution-2be4a8aa19abb284523b820a4c4845ad0b4d0bfd.zip |
No longer need the Apply stuff.
2004-04-07 Jeffrey Stedfast <fejj@ximian.com>
* mail-config-factory.c (mail_config_control_factory_cb): No
longer need the Apply stuff.
svn path=/trunk/; revision=25356
Diffstat (limited to 'mail/mail-config-factory.c')
-rw-r--r-- | mail/mail-config-factory.c | 45 |
1 files changed, 0 insertions, 45 deletions
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); } |