From c9dcabffdbe3fdb2102855660e285b7dc89e095e Mon Sep 17 00:00:00 2001 From: Larry Ewing Date: Mon, 29 Apr 2002 07:05:51 +0000 Subject: handle requests for the font manager control. 2002-04-29 Larry Ewing * mail-config-factory.c (config_control_factory_cb): handle requests for the font manager control. * mail-config.glade: add fonts tabs and reorder composer options to match the new dialogs from anna. * GNOME_Evolution_Mail.oaf.in: add font manager control definition. * mail-composer-prefs.c (mail_composer_prefs_construct): hook to the gtkhtml propmanager. (mail_composer_prefs_apply): apply propmanager changes. (mail_composer_prefs_finalise): unref the propmanager. * mail-composer-prefs.h: add propmanager member. * mail-font-prefs.c: initialize gui properly. * mail-preferences.c (mail_preferences_construct): hook to gtkhtml's propmanager. (mail_preferences_apply): apply propmanager changes. (mail_preferences_finalise): unref the propmanager. * mail-preferences.h: add propmanager member. * Makefile.am (evolution_mail_SOURCES): add mail-font-prefs.[ch] to the build. svn path=/trunk/; revision=16627 --- mail/mail-config-factory.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mail/mail-config-factory.c') diff --git a/mail/mail-config-factory.c b/mail/mail-config-factory.c index 2e825b8b5a..f7ce73fd38 100644 --- a/mail/mail-config-factory.c +++ b/mail/mail-config-factory.c @@ -28,6 +28,7 @@ #include "mail-accounts.h" #include "mail-preferences.h" #include "mail-composer-prefs.h" +#include "mail-font-prefs.h" #include "mail-config-factory.h" @@ -51,6 +52,7 @@ config_control_destroy_callback (EvolutionConfigControl *config_control, void *u struct _config_data *data = user_data; gtk_widget_unref (data->prefs); + g_free (data); } @@ -62,7 +64,6 @@ config_control_apply_callback (EvolutionConfigControl *config_control, void *use data->apply (data->prefs); } - static BonoboObject * config_control_factory_cb (BonoboGenericFactory *factory, const char *component_id, void *user_data) { @@ -82,6 +83,9 @@ config_control_factory_cb (BonoboGenericFactory *factory, const char *component_ } else if (!strcmp (component_id, MAIL_COMPOSER_PREFS_CONTROL_ID)) { prefs = mail_composer_prefs_new (); data->apply = (ApplyFunc) mail_composer_prefs_apply; + } else if (!strcmp (component_id, MAIL_FONT_PREFS_CONTROL_ID)) { + prefs = mail_font_prefs_new (); + data->apply = (ApplyFunc) mail_font_prefs_apply; } else { g_assert_not_reached (); } @@ -99,6 +103,8 @@ config_control_factory_cb (BonoboGenericFactory *factory, const char *component_ MAIL_PREFERENCES (prefs)->control = control; } else if (!strcmp (component_id, MAIL_COMPOSER_PREFS_CONTROL_ID)) { MAIL_COMPOSER_PREFS (prefs)->control = control; + } else if (!strcmp (component_id, MAIL_FONT_PREFS_CONTROL_ID)) { + MAIL_FONT_PREFS (prefs)->control = control; } else { g_assert_not_reached (); } -- cgit