aboutsummaryrefslogtreecommitdiffstats
path: root/mail/importers
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-11-12 13:54:07 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-11-12 13:54:07 +0800
commitd25f16e9ea91dc50cc8477576c6a7def086d34c7 (patch)
treeafd1003f6acc2573c505d25b74d3e1f3c8b1691c /mail/importers
parent8e212824134c1740d05fb36799f78716c5059801 (diff)
downloadgsoc2013-evolution-d25f16e9ea91dc50cc8477576c6a7def086d34c7.tar.gz
gsoc2013-evolution-d25f16e9ea91dc50cc8477576c6a7def086d34c7.tar.zst
gsoc2013-evolution-d25f16e9ea91dc50cc8477576c6a7def086d34c7.zip
** Merge in notzed-messageinfo-branch.
2004-11-12 Not Zed <NotZed@Ximian.com> ** Merge in notzed-messageinfo-branch. svn path=/trunk/; revision=27899
Diffstat (limited to 'mail/importers')
-rw-r--r--mail/importers/evolution-outlook-importer.c2
-rw-r--r--mail/importers/mail-importer.c16
2 files changed, 10 insertions, 8 deletions
diff --git a/mail/importers/evolution-outlook-importer.c b/mail/importers/evolution-outlook-importer.c
index 4b78cd3b81..ca04678260 100644
--- a/mail/importers/evolution-outlook-importer.c
+++ b/mail/importers/evolution-outlook-importer.c
@@ -388,7 +388,7 @@ import_outlook_import(struct _mail_msg *mm)
goto fail2;
}
- info = camel_message_info_new();
+ info = camel_message_info_new(NULL);
/* any headers to read? */
camel_folder_append_message(folder, msg, info, NULL, &mm->ex);
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index b9e022ac29..7cc6482c84 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -93,8 +93,8 @@ mail_importer_add_line (MailImporter *importer,
return;
camel_stream_reset (CAMEL_STREAM (importer->mstream));
- info = g_new0 (CamelMessageInfo, 1);
- info->flags = CAMEL_MESSAGE_SEEN;
+ info = camel_message_info_new(NULL);
+ camel_message_info_set_flags(info, CAMEL_MESSAGE_SEEN, ~0);
msg = camel_mime_message_new ();
camel_data_wrapper_construct_from_stream (CAMEL_DATA_WRAPPER (msg),
@@ -108,7 +108,7 @@ mail_importer_add_line (MailImporter *importer,
camel_object_unref (msg);
camel_exception_free (ex);
- g_free (info);
+ camel_message_info_free(info);
}
struct _BonoboObject *mail_importer_factory_cb(struct _BonoboGenericFactory *factory, const char *iid, void *data)
@@ -230,6 +230,7 @@ import_mbox_import(struct _mail_msg *mm)
CamelMimeMessage *msg;
const char *tmp;
int pc;
+ guint32 flags = 0;
if (st.st_size > 0)
pc = (int)(100.0 * ((double)camel_mime_parser_tell(mp) / (double)st.st_size));
@@ -242,18 +243,19 @@ import_mbox_import(struct _mail_msg *mm)
break;
}
- info = camel_message_info_new();
+ info = camel_message_info_new(NULL);
tmp = camel_medium_get_header((CamelMedium *)msg, "X-Mozilla-Status");
if (tmp)
- info->flags |= decode_mozilla_status(tmp);
+ flags |= decode_mozilla_status(tmp);
tmp = camel_medium_get_header((CamelMedium *)msg, "Status");
if (tmp)
- info->flags |= decode_status(tmp);
+ flags |= decode_status(tmp);
tmp = camel_medium_get_header((CamelMedium *)msg, "X-Status");
if (tmp)
- info->flags |= decode_status(tmp);
+ flags |= decode_status(tmp);
+ camel_message_info_set_flags(info, flags, ~0);
camel_folder_append_message(folder, msg, info, NULL, &mm->ex);
camel_message_info_free(info);
camel_object_unref(msg);