From 81a5255f6dc6b64bd9befa6c83bafa4a285f72f5 Mon Sep 17 00:00:00 2001 From: Hans Petter Jansson Date: Sat, 22 Feb 2003 00:44:47 +0000 Subject: Don't try to get a FontPrefs control. 2003-02-21 Hans Petter Jansson * component-factory.c (factory): Don't try to get a FontPrefs control. * mail-config-factory.c (mail_config_control_factory_cb): Just return NULL if a FontPrefs control was requested. * mail-config.c (mail_config_get_default_account): If no accounts are defined, don't try to set the default account. svn path=/trunk/; revision=19996 --- mail/ChangeLog | 10 ++++++++++ mail/component-factory.c | 2 +- mail/mail-config-factory.c | 3 ++- mail/mail-config.c | 4 +++- 4 files changed, 16 insertions(+), 3 deletions(-) (limited to 'mail') diff --git a/mail/ChangeLog b/mail/ChangeLog index 778f0e26c1..edd6807050 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,13 @@ +2003-02-21 Hans Petter Jansson + + * component-factory.c (factory): Don't try to get a FontPrefs control. + + * mail-config-factory.c (mail_config_control_factory_cb): Just return + NULL if a FontPrefs control was requested. + + * mail-config.c (mail_config_get_default_account): If no accounts + are defined, don't try to set the default account. + 2003-02-21 Dan Winship * Makefile.am (libevolution_mail_la_LIBADD): Remove libebook's diff --git a/mail/component-factory.c b/mail/component-factory.c index 9783283c81..54a8adabe4 100644 --- a/mail/component-factory.c +++ b/mail/component-factory.c @@ -1631,7 +1631,7 @@ factory (BonoboGenericFactory *factory, else if (strcmp (component_id, MAIL_ACCOUNTS_CONTROL_ID) == 0 || strcmp (component_id, MAIL_PREFERENCES_CONTROL_ID) == 0 || strcmp (component_id, MAIL_COMPOSER_PREFS_CONTROL_ID) == 0 - || strcmp (component_id, MAIL_FONT_PREFS_CONTROL_ID) == 0) + /* || strcmp (component_id, MAIL_FONT_PREFS_CONTROL_ID) == 0 */) return mail_config_control_factory_cb (factory, component_id, evolution_shell_client_corba_objref (global_shell_client)); g_warning (FACTORY_ID ": Don't know what to do with %s", component_id); diff --git a/mail/mail-config-factory.c b/mail/mail-config-factory.c index bda05e83ad..2748a1473f 100644 --- a/mail/mail-config-factory.c +++ b/mail/mail-config-factory.c @@ -90,10 +90,11 @@ mail_config_control_factory_cb (BonoboGenericFactory *factory, const char *compo prefs = mail_font_prefs_new (); data->apply = (ApplyFunc) mail_font_prefs_apply; #endif + return NULL; } else { g_assert_not_reached (); } - + data->prefs = prefs; g_object_ref (prefs); diff --git a/mail/mail-config.c b/mail/mail-config.c index 02a72ea672..acb044449c 100644 --- a/mail/mail-config.c +++ b/mail/mail-config.c @@ -627,7 +627,9 @@ mail_config_get_default_account (void) the default */ e_iterator_reset (iter); account = (EAccount *) e_iterator_get (iter); - gconf_client_set_string (config->gconf, "/apps/evolution/mail/default_account", account->uid, NULL); + if (account) + gconf_client_set_string (config->gconf, "/apps/evolution/mail/default_account", + account->uid, NULL); g_object_unref (iter); return account; -- cgit v1.2.3