Bug #655167 - Messages moved from IMAP Inbox reappear
authorMichel Dänzer <daenzer@debian.org>
Wed, 2 Nov 2011 07:35:56 +0000 (08:35 +0100)
committerMilan Crha <mcrha@redhat.com>
Wed, 2 Nov 2011 07:35:56 +0000 (08:35 +0100)
camel/providers/imap/camel-imap-folder.c
camel/providers/imap/camel-imap-summary.h

index 77faa64..751e6cd 100644 (file)
@@ -68,11 +68,6 @@ enum {
        PROP_CHECK_FOLDER = 0x2500
 };
 
-enum {
-       /* used when moving messages and has real trash folder set with a google account */
-       CAMEL_MESSAGE_IMAP_MOVED = CAMEL_MESSAGE_FOLDER_FLAGGED << 1
-};
-
 extern gint camel_application_is_exiting;
 
 static gboolean imap_rescan (CamelFolder *folder, gint exists, GCancellable *cancellable, GError **error);
@@ -1417,7 +1412,7 @@ get_matching (CamelFolder *folder,
                        }
                }
 
-               if (deleted_uids && (info->info.flags & (CAMEL_MESSAGE_DELETED | CAMEL_MESSAGE_IMAP_MOVED)) == CAMEL_MESSAGE_DELETED) {
+               if (deleted_uids && (info->info.flags & (CAMEL_MESSAGE_DELETED | CAMEL_IMAP_MESSAGE_MOVED)) == CAMEL_MESSAGE_DELETED) {
                        g_ptr_array_add (deleted_uids, (gpointer) camel_pstring_strdup (camel_message_info_uid (info)));
                        info->info.flags &= ~CAMEL_MESSAGE_DELETED;
                } else if (junked_uids && (info->info.flags & CAMEL_MESSAGE_JUNK) != 0) {
@@ -1747,7 +1742,7 @@ imap_synchronize_sync (CamelFolder *folder,
                                        info->info.flags &= ~CAMEL_MESSAGE_DELETED;
                                }
 
-                               info->info.flags &= ~(CAMEL_MESSAGE_FOLDER_FLAGGED | CAMEL_MESSAGE_IMAP_MOVED);
+                               info->info.flags &= ~(CAMEL_MESSAGE_FOLDER_FLAGGED | CAMEL_IMAP_MESSAGE_MOVED);
                                ((CamelImapMessageInfo *) info)->server_flags = info->info.flags & CAMEL_IMAP_SERVER_FLAGS;
                                info->info.dirty = TRUE; /* Sync it back to the DB */
                                if (((CamelMessageInfo *) info)->summary)
@@ -2841,7 +2836,7 @@ do_copy (CamelFolder *source,
                                        CamelMessageInfoBase *info = (CamelMessageInfoBase *) camel_folder_summary_get (source->summary, uids->pdata[i]);
 
                                        if (info)
-                                               info->flags |= CAMEL_MESSAGE_IMAP_MOVED;
+                                               info->flags |= CAMEL_IMAP_MESSAGE_MOVED;
                                }
                        }
                        last = uid;
index 53fb245..5ca93fb 100644 (file)
@@ -53,7 +53,9 @@
 G_BEGIN_DECLS
 
 enum {
-       CAMEL_IMAP_MESSAGE_RECENT = 1 << 17
+       CAMEL_IMAP_MESSAGE_RECENT = 1 << 17,
+       /* used when moving messages and has real trash folder set with a google account */
+       CAMEL_IMAP_MESSAGE_MOVED = 1 << 18
 };
 
 typedef struct _CamelImapSummary CamelImapSummary;