aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mail/ChangeLog5
-rw-r--r--mail/mail-ops.c20
2 files changed, 23 insertions, 2 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index 08450858c1..94c29b3e39 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,8 @@
+2000-07-13 Jeffrey Stedfast <fejj@helixcode.com>
+
+ * mail-ops.c (real_fetch_mail): Back to the old way to avoid
+ g_warnings, yay
+
2000-07-12 Chris Toshok <toshok@helixcode.com>
* mail-config.c (providers_config_new): fix some cut & paste bung.
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 735f3777a9..f74c33c152 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -243,13 +243,29 @@ real_fetch_mail (gpointer user_data)
uids = camel_folder_get_uids (sourcefolder, ex);
printf("got %d messages in source\n", uids->len);
for (i = 0; i < uids->len; i++) {
- camel_folder_move_message_to (sourcefolder, uids->pdata[i], folder, ex);
+ CamelMimeMessage *msg;
+
+ msg = camel_folder_get_message (sourcefolder, uids->pdata[i], ex);
+
if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) {
- async_mail_exception_dialog ("Unable to get new mail", ex, fb);
+ async_mail_exception_dialog ("Unable to get read message", ex, fb);
gtk_object_unref (GTK_OBJECT (sourcefolder));
+ gtk_object_unref (GTK_OBJECT (msg));
goto cleanup;
}
+
+ camel_folder_append_message (folder, msg, ex);
+ if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) {
+ async_mail_exception_dialog ("Unable to write message", ex, fb);
+ gtk_object_unref (GTK_OBJECT (msg));
+ gtk_object_unref (GTK_OBJECT (sourcefolder));
+
+ goto cleanup;
+ }
+
+ camel_folder_delete_message (sourcefolder, uids->pdata[i], ex);
+ gtk_object_unref (GTK_OBJECT (msg));
}
camel_folder_free_uids (sourcefolder, uids);
camel_folder_sync (sourcefolder, TRUE, ex);