aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Winship <danw@src.gnome.org>2001-02-28 07:20:34 +0800
committerDan Winship <danw@src.gnome.org>2001-02-28 07:20:34 +0800
commit33bc36d016736f3e0ef15928e0b636a36fa46716 (patch)
tree563c1bf403943b1ebeebfc860dc7145b2ed110f1
parentad0dcb2798173898f6b28d7054c94a4a65b272d8 (diff)
downloadgsoc2013-evolution-33bc36d016736f3e0ef15928e0b636a36fa46716.tar
gsoc2013-evolution-33bc36d016736f3e0ef15928e0b636a36fa46716.tar.gz
gsoc2013-evolution-33bc36d016736f3e0ef15928e0b636a36fa46716.tar.bz2
gsoc2013-evolution-33bc36d016736f3e0ef15928e0b636a36fa46716.tar.lz
gsoc2013-evolution-33bc36d016736f3e0ef15928e0b636a36fa46716.tar.xz
gsoc2013-evolution-33bc36d016736f3e0ef15928e0b636a36fa46716.tar.zst
gsoc2013-evolution-33bc36d016736f3e0ef15928e0b636a36fa46716.zip
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
-rw-r--r--composer/ChangeLog5
-rw-r--r--composer/evolution-composer.c8
2 files changed, 13 insertions, 0 deletions
diff --git a/composer/ChangeLog b/composer/ChangeLog
index 22a9dd4b71..d3aad74928 100644
--- a/composer/ChangeLog
+++ b/composer/ChangeLog
@@ -1,3 +1,8 @@
+2001-02-27 Dan Winship <danw@ximian.com>
+
+ * evolution-composer.c (factory_fn): If
+ !mail_config_is_configured(), give an error and return NULL.
+
2001-02-22 Ettore Perazzoli <ettore@ximian.com>
* Makefile.am (INCLUDES): Add `-I$(top_srcdir)/shell'.
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 <gal/widgets/e-gui-utils.h>
#include <bonobo/bonobo-item-handler.h>
#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 ());
}