diff options
Diffstat (limited to 'mail')
-rw-r--r-- | mail/ChangeLog | 5 | ||||
-rw-r--r-- | mail/mail-ops.c | 19 |
2 files changed, 7 insertions, 17 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog index 5a6afafd49..b13b963e44 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,5 +1,10 @@ 2000-07-11 Jeffrey Stedfast <fejj@helixcode.com> + * mail-ops.c (real_fetch_mail): Changed to use + camel_folder_move_message_to () rather than get_message () and then + append_message (). This also makes it so we don't have to worry about + fetching message flags to pass to the new append_message () method. + * folder-browser.c (folder_browser_load_folder): Disable Search capability menu/entry if folder doesn't support it. diff --git a/mail/mail-ops.c b/mail/mail-ops.c index e961d794f2..735f3777a9 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -243,28 +243,13 @@ 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++) { - CamelMimeMessage *msg; - - msg = camel_folder_get_message (sourcefolder, uids->pdata[i], ex); + camel_folder_move_message_to (sourcefolder, uids->pdata[i], folder, ex); if (camel_exception_get_id (ex) != CAMEL_EXCEPTION_NONE) { - async_mail_exception_dialog ("Unable to read message", ex, fb); - gtk_object_unref (GTK_OBJECT (msg)); + async_mail_exception_dialog ("Unable to get new mail", ex, fb); gtk_object_unref (GTK_OBJECT (sourcefolder)); 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); |