From 33bc36d016736f3e0ef15928e0b636a36fa46716 Mon Sep 17 00:00:00 2001 From: Dan Winship Date: Tue, 27 Feb 2001 23:20:34 +0000 Subject: If !mail_config_is_configured(), give an error and return NULL. * evolution-composer.c (factory_fn): If !mail_config_is_configured(), give an error and return NULL. svn path=/trunk/; revision=8419 --- composer/evolution-composer.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'composer/evolution-composer.c') diff --git a/composer/evolution-composer.c b/composer/evolution-composer.c index 72afc6930e..2ea7949462 100644 --- a/composer/evolution-composer.c +++ b/composer/evolution-composer.c @@ -29,6 +29,7 @@ #include #include #include "evolution-composer.h" +#include "mail/mail-config.h" #define PARENT_TYPE BONOBO_OBJECT_TYPE static BonoboObjectClass *parent_class = NULL; @@ -346,6 +347,13 @@ E_MAKE_TYPE (evolution_composer, "EvolutionComposer", EvolutionComposer, class_i static BonoboObject * factory_fn (BonoboGenericFactory *factory, void *closure) { + if (!mail_config_is_configured ()) { + e_notice (NULL, GNOME_MESSAGE_BOX_ERROR, + _("Could not create composer window, because you " + "have not yet\nconfigured any identities in the " + "mail component.")); + return NULL; + } return BONOBO_OBJECT (evolution_composer_new ()); } -- cgit