2006-10-03 [ticho] 2.5.2cvs39
authorAndrej Kacian <ticho@claws-mail.org>
Tue, 3 Oct 2006 10:19:12 +0000 (10:19 +0000)
committerAndrej Kacian <ticho@claws-mail.org>
Tue, 3 Oct 2006 10:19:12 +0000 (10:19 +0000)
* src/filtering.c
* src/folder.c
* src/inc.c
* src/mbox.c
Colin's fix for "copy" filtering rules.

ChangeLog
PATCHSETS
configure.ac
src/filtering.c
src/folder.c
src/inc.c
src/mbox.c

index 2232f6739be9cd0fca717a136efa98491291dfe2..6d317909c034d4115c6458c95a680b36b3a941bc 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2006-10-03 [ticho]     2.5.2cvs39
+
+       * src/filtering.c
+       * src/folder.c
+       * src/inc.c
+       * src/mbox.c
+               Colin's fix for "copy" filtering rules.
+
 2006-10-02 [colin]     2.5.2cvs38
 
        * src/folderview.c
index 21c774d1cb04264e62ba1cd22d313cf14c842dc9..13cb7702a29d5835cbaee24a9d23ca8806a38c0b 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.207.2.125 -r 1.207.2.126 src/folderview.c;  ) > 2.5.2cvs36.patchset
 ( cvs diff -u -r 1.207.2.126 -r 1.207.2.127 src/folderview.c;  ) > 2.5.2cvs37.patchset
 ( cvs diff -u -r 1.207.2.127 -r 1.207.2.128 src/folderview.c;  ) > 2.5.2cvs38.patchset
+( cvs diff -u -r 1.60.2.21 -r 1.60.2.22 src/filtering.c;  cvs diff -u -r 1.213.2.119 -r 1.213.2.120 src/folder.c;  cvs diff -u -r 1.149.2.59 -r 1.149.2.60 src/inc.c;  cvs diff -u -r 1.28.2.28 -r 1.28.2.29 src/mbox.c;  ) > 2.5.2cvs39.patchset
index 1c4823cf6e0a09839eb5de41d231c25968283f90..31eaf074022c4883a43727625d5ea816fd16c135 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=2
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=38
+EXTRA_VERSION=39
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 602b179491200e62d2868524b0f4a3b99c9639ba..2b3282f18d2a7978941799a4ba8dc8a536688fb6 100644 (file)
@@ -181,7 +181,7 @@ void filtering_move_and_copy_msgs(GSList *msgs)
        GSList *messages = g_slist_copy(msgs);
        FolderItem *last_item = NULL;
        gboolean is_copy = FALSE, is_move = FALSE;
-       
+       debug_print("checking %d messages\n", g_slist_length(msgs));
        while (messages) {
                GSList *batch = NULL, *cur;
                gint found = 0;
@@ -208,6 +208,9 @@ void filtering_move_and_copy_msgs(GSList *msgs)
                if (found == 0) {
                        debug_print("no more messages to move/copy\n");
                        break;
+               } else {
+                       debug_print("%d messages to %s in %s\n", found,
+                               is_copy ? "copy":"move", last_item->name ? last_item->name:"(noname)");
                }
                for (cur = batch; cur; cur = cur->next) {
                        MsgInfo *info = (MsgInfo *)cur->data;
index 31fac1618b0770b22ba5103175ae6665450161bc..6165a85bc70baa10fbe6e51dfa83ac1af3f72595 100644 (file)
@@ -1960,8 +1960,8 @@ gint folder_item_scan_full(FolderItem *item, gboolean filtering)
                                        &to_filter, &unfiltered, 
                                        TRUE);
                        
+                       filtering_move_and_copy_msgs(newmsg_list);
                        if (to_filter != NULL) {
-                               filtering_move_and_copy_msgs(to_filter);
                                for (elem = to_filter; elem; elem = g_slist_next(elem)) {
                                        MsgInfo *msginfo = (MsgInfo *)elem->data;
                                        procmsg_msginfo_free(msginfo);
index c86a6c59864f2fc4bcd977ea9e04a02a659b4f5d..7ad4fa480261815ef7f1f471b2696a3ea22b9f67 100644 (file)
--- a/src/inc.c
+++ b/src/inc.c
@@ -657,9 +657,8 @@ static gint inc_start(IncProgressDialog *inc_dialog)
                                &filtered, &unfiltered, 
                                pop3_session->ac_prefs->filter_on_recv);
 
-               if (filtered != NULL)
-                       filtering_move_and_copy_msgs(filtered);
-               if (unfiltered != NULL)
+               filtering_move_and_copy_msgs(msglist);
+               if (unfiltered != NULL)         
                        folder_item_move_msgs(inbox, unfiltered);
 
                for(msglist_element = msglist; msglist_element != NULL; 
index 03883f08c6ddc57f2292a05b8ddbee78b45e76c1..dd7ea090b2d0cb376e1a16730bfd0ac200161fd6 100644 (file)
@@ -251,16 +251,16 @@ gint proc_mbox(FolderItem *dest, const gchar *mbox, gboolean apply_filter,
        if (apply_filter) {
                procmsg_msglist_filter(to_filter, account, 
                                &filtered, &unfiltered, TRUE);
-               unfiltered = g_slist_reverse(unfiltered);
-               folder_item_move_msgs(dest, unfiltered);
-               for (cur = unfiltered; cur; cur = g_slist_next(cur)) {
+
+               filtering_move_and_copy_msgs(to_filter);
+               for (cur = filtered; cur; cur = g_slist_next(cur)) {
                        MsgInfo *info = (MsgInfo *)cur->data;
                        procmsg_msginfo_free(info);
                }
 
-               filtered = g_slist_reverse(filtered);
-               filtering_move_and_copy_msgs(filtered);
-               for (cur = filtered; cur; cur = g_slist_next(cur)) {
+               unfiltered = g_slist_reverse(unfiltered);
+               folder_item_move_msgs(dest, unfiltered);
+               for (cur = unfiltered; cur; cur = g_slist_next(cur)) {
                        MsgInfo *info = (MsgInfo *)cur->data;
                        procmsg_msginfo_free(info);
                }