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 2232f67..6d31790 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 21c774d..13cb770 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 1c4823c..31eaf07 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 602b179..2b3282f 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 31fac16..6165a85 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 c86a6c5..7ad4fa4 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 03883f0..dd7ea09 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);
                }