aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-component-factory.c
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-02-11 16:26:58 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-02-11 16:26:58 +0800
commit06b08adb257351bf8080d960fb98b4265cc43081 (patch)
tree9f429f497d47c5b933d2c4c98a1058566233a7dc /mail/mail-component-factory.c
parent136b8ea938580f3c1d4fb9f92093c4631ec6038b (diff)
downloadgsoc2013-evolution-06b08adb257351bf8080d960fb98b4265cc43081.tar
gsoc2013-evolution-06b08adb257351bf8080d960fb98b4265cc43081.tar.gz
gsoc2013-evolution-06b08adb257351bf8080d960fb98b4265cc43081.tar.bz2
gsoc2013-evolution-06b08adb257351bf8080d960fb98b4265cc43081.tar.lz
gsoc2013-evolution-06b08adb257351bf8080d960fb98b4265cc43081.tar.xz
gsoc2013-evolution-06b08adb257351bf8080d960fb98b4265cc43081.tar.zst
gsoc2013-evolution-06b08adb257351bf8080d960fb98b4265cc43081.zip
Basically rewrote this, the import tasks run in another thread. It tells
2004-02-11 Not Zed <NotZed@Ximian.com> * importers/pine-importer.c: Basically rewrote this, the import tasks run in another thread. It tells you more about what's going on, and its cancellable. (pine_store_settings): changed the meaning of the settings slightly, if set it means we've processed them already. * mail-component-factory.c (factory): hook in importer factory callback. 2004-02-10 Not Zed <NotZed@Ximian.com> * importers/*-importer.c: removed module init, just provide a new method. Updates for api changes. * Makefile.am: link mail importers in directly. * mail-importer.c: changed to do stuff in-memory with linked stuff, moved to importers/. * importers/GNOME_Evolution_Mail_Importers.server.in.in: merge all importer .server info's here, point them all to the mailer factory. Removed the others. * importers/Makefile.am: remove Mailer.idl stuff. Move all importers to a single library. svn path=/trunk/; revision=24701
Diffstat (limited to 'mail/mail-component-factory.c')
-rw-r--r--mail/mail-component-factory.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/mail/mail-component-factory.c b/mail/mail-component-factory.c
index 04782b9a16..ef7e8e85b8 100644
--- a/mail/mail-component-factory.c
+++ b/mail/mail-component-factory.c
@@ -37,11 +37,14 @@
#include "mail-config.h"
#include "mail-mt.h"
+#include "importers/mail-importer.h"
+
#include <bonobo-activation/bonobo-activation.h>
#include <bonobo/bonobo-shlib-factory.h>
#include <string.h>
+/* TODO: clean up these definitions */
#define FACTORY_ID "OAFIID:GNOME_Evolution_Mail_Factory:" BASE_VERSION
#define COMPONENT_ID "OAFIID:GNOME_Evolution_Mail_Component:" BASE_VERSION
@@ -51,14 +54,10 @@
#define MAIL_CONFIG_ID "OAFIID:GNOME_Evolution_MailConfig:" BASE_VERSION
#define WIZARD_ID "OAFIID:GNOME_Evolution_Mail_Wizard:" BASE_VERSION
-
static BonoboObject *
-factory (BonoboGenericFactory *factory,
- const char *component_id,
- void *closure)
+factory(BonoboGenericFactory *factory, const char *component_id, void *closure)
{
- /* EPFIXME this is messy. The IDs are defined all over the place
- without a logic... */
+ BonoboObject *o;
if (strcmp (component_id, COMPONENT_ID) == 0) {
MailComponent *component = mail_component_peek ();
@@ -80,8 +79,11 @@ factory (BonoboGenericFactory *factory,
return (BonoboObject *) evolution_composer_new (em_utils_composer_send_cb, em_utils_composer_save_draft_cb);
}
- g_warning (FACTORY_ID ": Don't know what to do with %s", component_id);
- return NULL;
+ o = mail_importer_factory_cb(factory, component_id, NULL);
+ if (o == NULL)
+ g_warning (FACTORY_ID ": Don't know what to do with %s", component_id);
+
+ return o;
}
static Bonobo_Unknown