aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-07-13 13:35:29 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-07-13 13:35:29 +0800
commitbc79d7668d144d75a5f99190f6480f2ef60bc9fb (patch)
tree8548743a1126b4dcc9594d2fbc2aa33e225a79ed /mail/mail-ops.c
parentf3b827786b6140f21ed8f306d31a454ccc424f7d (diff)
downloadgsoc2013-evolution-bc79d7668d144d75a5f99190f6480f2ef60bc9fb.tar
gsoc2013-evolution-bc79d7668d144d75a5f99190f6480f2ef60bc9fb.tar.gz
gsoc2013-evolution-bc79d7668d144d75a5f99190f6480f2ef60bc9fb.tar.bz2
gsoc2013-evolution-bc79d7668d144d75a5f99190f6480f2ef60bc9fb.tar.lz
gsoc2013-evolution-bc79d7668d144d75a5f99190f6480f2ef60bc9fb.tar.xz
gsoc2013-evolution-bc79d7668d144d75a5f99190f6480f2ef60bc9fb.tar.zst
gsoc2013-evolution-bc79d7668d144d75a5f99190f6480f2ef60bc9fb.zip
Back to the old way to avoid g_warnings, yay
2000-07-13 Jeffrey Stedfast <fejj@helixcode.com> * mail-ops.c (real_fetch_mail): Back to the old way to avoid g_warnings, yay svn path=/trunk/; revision=4138
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c20
1 files changed, 18 insertions, 2 deletions
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);