From 06b08adb257351bf8080d960fb98b4265cc43081 Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 11 Feb 2004 08:26:58 +0000 Subject: Basically rewrote this, the import tasks run in another thread. It tells 2004-02-11 Not Zed * 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 * 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 --- mail/mail-component-factory.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'mail/mail-component-factory.c') 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 #include #include +/* 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 -- cgit v1.2.3