diff options
author | Peter Williams <peterw@ximian.com> | 2002-07-26 06:51:58 +0800 |
---|---|---|
committer | Peter Williams <peterw@src.gnome.org> | 2002-07-26 06:51:58 +0800 |
commit | 4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf (patch) | |
tree | 1fc0d8858b7d952eb7324a48536ccbfe941dd5f1 /camel/providers/imap/camel-imap-folder.c | |
parent | 16fe42c893218a56e9b7fb1cd9418f8569a0f51f (diff) | |
download | gsoc2013-evolution-4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf.tar gsoc2013-evolution-4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf.tar.gz gsoc2013-evolution-4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf.tar.bz2 gsoc2013-evolution-4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf.tar.lz gsoc2013-evolution-4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf.tar.xz gsoc2013-evolution-4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf.tar.zst gsoc2013-evolution-4f17d5a3cb380e772c4c4885ff8c52b25e66aeaf.zip |
Prototype.
2002-07-25 Peter Williams <peterw@ximian.com>
* providers/imap/camel-imap-summary.h
(camel_imap_summary_add_offline_uncached): Prototype.
* providers/imap/camel-imap-summary.c
(camel_imap_summary_add_offline_uncached): New function to add an
uncached message to the summary while offline.
* providers/imap/camel-imap-store.c (imap_connect_online): Only
refresh the folders if the disco diary is empty (ie, we're not
resyncing.)
* providers/imap/camel-imap-folder.c (imap_transfer_offline): Emit
an event for the source if deleting its originals. Also, if we
can't load the message, still process it, using the new imap
summary function.
svn path=/trunk/; revision=17596
Diffstat (limited to 'camel/providers/imap/camel-imap-folder.c')
-rw-r--r-- | camel/providers/imap/camel-imap-folder.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/camel/providers/imap/camel-imap-folder.c b/camel/providers/imap/camel-imap-folder.c index cd82fb29aa..408b1fcc24 100644 --- a/camel/providers/imap/camel-imap-folder.c +++ b/camel/providers/imap/camel-imap-folder.c @@ -1260,21 +1260,25 @@ imap_transfer_offline (CamelFolder *source, GPtrArray *uids, } changes = camel_folder_change_info_new (); + for (i = 0; i < uids->len; i++) { uid = uids->pdata[i]; - message = camel_folder_get_message (source, uid, NULL); - if (!message) - continue; + destuid = g_strdup_printf ("copy-%s:%s", source->full_name, uid); + mi = camel_folder_summary_uid (source->summary, uid); g_return_if_fail (mi != NULL); - destuid = g_strdup_printf ("copy-%s:%s", source->full_name, uid); - camel_imap_summary_add_offline (dest->summary, destuid, message, mi); + message = camel_folder_get_message (source, uid, NULL); + + if (message) { + camel_imap_summary_add_offline (dest->summary, destuid, message, mi); + camel_object_unref (CAMEL_OBJECT (message)); + } else + camel_imap_summary_add_offline_uncached (dest->summary, destuid, mi); camel_imap_message_cache_copy (sc, uid, dc, destuid, ex); camel_folder_summary_info_free (source->summary, mi); - camel_object_unref (CAMEL_OBJECT (message)); camel_folder_change_info_add_uid (changes, destuid); if (transferred_uids) |