aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
Diffstat (limited to 'mail')
-rw-r--r--mail/ChangeLog8
-rw-r--r--mail/importers/Makefile.am8
-rw-r--r--mail/importers/evolution-mbox-importer.c6
-rw-r--r--mail/importers/evolution-outlook-importer.c6
-rw-r--r--mail/importers/netscape-importer.c14
5 files changed, 36 insertions, 6 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index ae7bf1a4e4..28206eac84 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,11 @@
+2001-03-22 Iain Holmes <iain@ximian.com>
+
+ * importers/evolution-outlook-importer.c: Update for new IDL.
+
+ * importers/evolution-mbox-importer.c: Update for new IDL.
+
+ * importers/Makefile.am: Build the elm importer.
+
2001-03-22 Jeffrey Stedfast <fejj@ximian.com>
* mail-accounts.c (mail_double_click): New callback to handle a
diff --git a/mail/importers/Makefile.am b/mail/importers/Makefile.am
index ee26f19215..f93115f950 100644
--- a/mail/importers/Makefile.am
+++ b/mail/importers/Makefile.am
@@ -1,7 +1,7 @@
importersdir = $(pkglibdir)/evolution-mail-importers/$(VERSION)
importers_LTLIBRARIES = liboutlook.la libmbox.la libiinetscape.la \
- libiipine.la
+ libiipine.la libiielm.la
INCLUDES = -I.. \
-I$(srcdir)/.. \
@@ -25,11 +25,15 @@ libiinetscape_la_LDFLAGS = -version-info 0:0:0
libiipine_la_SOURCES = pine-importer.c
libiipine_la_LDFLAGS = -version-info 0:0:0
+libiielm_la_SOURCES = elm-importer.c
+libiielm_la_LDFLAGS = -version-info 0:0:0
+
oafdir = $(datadir)/oaf
oaf_in_files = GNOME_Evolution_Mail_Mbox_Importer.oaf.in \
GNOME_Evolution_Mail_Outlook_Importer.oaf.in \
GNOME_Evolution_Mail_Netscape_Intelligent_Importer.oaf.in \
- GNOME_Evolution_Mail_Pine_Intelligent_Importer.oaf.in
+ GNOME_Evolution_Mail_Pine_Intelligent_Importer.oaf.in \
+ GNOME_Evolution_Mail_Elm_Intelligent_Importer.oaf.in
oaf_DATA = $(oaf_in_files:.oaf.in=.oaf)
diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c
index b39691f0dc..aa701d9f25 100644
--- a/mail/importers/evolution-mbox-importer.c
+++ b/mail/importers/evolution-mbox-importer.c
@@ -171,6 +171,7 @@ importer_destroy_cb (GtkObject *object,
static gboolean
load_file_fn (EvolutionImporter *eimporter,
const char *filename,
+ const char *folderpath,
void *closure)
{
MboxImporter *mbi;
@@ -196,7 +197,10 @@ load_file_fn (EvolutionImporter *eimporter,
}
importer->mstream = NULL;
- importer->folder = mail_tool_get_local_inbox (NULL);
+ if (folderpath == NULL)
+ importer->folder = mail_tool_get_local_inbox (NULL);
+ else
+ importer->folder = mail_tool_uri_to_folder (folderpath, NULL);
if (importer->folder == NULL){
g_print ("Bad folder\n");
diff --git a/mail/importers/evolution-outlook-importer.c b/mail/importers/evolution-outlook-importer.c
index a92f5086ab..7f8a361697 100644
--- a/mail/importers/evolution-outlook-importer.c
+++ b/mail/importers/evolution-outlook-importer.c
@@ -218,6 +218,7 @@ importer_destroy_cb (GtkObject *object,
static gboolean
load_file_fn (EvolutionImporter *eimporter,
const char *filename,
+ const char *folderpath,
void *closure)
{
OutlookImporter *oli;
@@ -256,7 +257,10 @@ load_file_fn (EvolutionImporter *eimporter,
importer->mstream = NULL;
- importer->folder = mail_tool_get_local_inbox (NULL);
+ if (folderpath == NULL)
+ importer->folder = mail_tool_get_local_inbox (NULL);
+ else
+ importer->folder = mail_tool_uri_to_folder (folderpath);
if (importer->folder == NULL){
g_warning ("Bad folder");
diff --git a/mail/importers/netscape-importer.c b/mail/importers/netscape-importer.c
index 8752ce4de9..9a6ec5eac9 100644
--- a/mail/importers/netscape-importer.c
+++ b/mail/importers/netscape-importer.c
@@ -44,6 +44,8 @@
#include <importer/evolution-intelligent-importer.h>
#include <importer/GNOME_Evolution_Importer.h>
+#include <evolution-storage.h>
+
#include "mail-importer.h"
#include "mail-tools.h"
@@ -52,6 +54,7 @@ static char *nsmail_dir = NULL;
extern char *evolution_dir;
#define NETSCAPE_INTELLIGENT_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Netscape_Intelligent_Importer_Factory"
+#define MBOX_IMPORTER_IID "OAFIID:GNOME_Evolution_Mail_Mbox_ImporterFactory"
#define KEY "netscape-mail-imported"
/*#define SUPER_IMPORTER_DEBUG*/
@@ -229,7 +232,7 @@ netscape_import_file (NetscapeImporter *importer,
char *protocol;
CamelException *ex;
CamelFolder *folder;
-
+
/* Do import */
d(g_warning ("Importing %s as %s\n", filename, fullpath));
@@ -242,6 +245,8 @@ netscape_import_file (NetscapeImporter *importer,
return;
}
+ g_free (protocol);
+
if (folder == NULL) {
g_warning ("Folder for %s is NULL", fullpath);
camel_exception_free (ex);
@@ -267,6 +272,7 @@ netscape_dir_created (BonoboListener *listener,
CORBA_Environment *ev,
NetscapeImporter *importer)
{
+ EvolutionStorageResult storage_result;
NetscapeCreateDirectoryData *data;
GList *l;
GNOME_Evolution_Storage_FolderResult *result;
@@ -277,8 +283,11 @@ netscape_dir_created (BonoboListener *listener,
}
result = event_data->_value;
+ storage_result = result->result;
fullpath = result->path;
+ g_warning ("path: %s\tresult: %d", fullpath, storage_result);
+
l = importer->dir_list;
importer->dir_list = g_list_remove_link (importer->dir_list, l);
data = l->data;
@@ -286,7 +295,8 @@ netscape_dir_created (BonoboListener *listener,
/* Import the file */
/* We got the folder, so try to import the file into it. */
- netscape_import_file (data->importer, data->path, fullpath);
+ if (fullpath != NULL || *fullpath != '\0')
+ netscape_import_file (data->importer, data->path, fullpath);
g_free (data->parent);
g_free (data->path);