2006-03-08 [colin] 2.0.0cvs121
authorColin Leroy <colin@colino.net>
Wed, 8 Mar 2006 17:38:16 +0000 (17:38 +0000)
committerColin Leroy <colin@colino.net>
Wed, 8 Mar 2006 17:38:16 +0000 (17:38 +0000)
* src/procmsg.c
Batch move and copies from summaryview with delayed execution
too

ChangeLog
PATCHSETS
configure.ac
src/procmsg.c

index 1d754f08074ad6a324761bac961edd41897ce80e..9f1380ca1aba8b370f8ad50ef809ca852e63bea1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2006-03-08 [colin]     2.0.0cvs121
+
+       * src/procmsg.c
+               Batch move and copies from summaryview with delayed execution
+               too
+
 2006-03-07 [paul]      2.0.0cvs120
 
        * src/common/utils.c
index 6356d4782976526514dffb362239046782900af5..e066733925295f6da79de97ba2d72b539c53c400 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.101.2.22 -r 1.101.2.23 src/news.c;  cvs diff -u -r 1.2.2.16 -r 1.2.2.17 src/news_gtk.c;  ) > 2.0.0cvs118.patchset
 ( cvs diff -u -r 1.213.2.84 -r 1.213.2.85 src/folder.c;  cvs diff -u -r 1.87.2.25 -r 1.87.2.26 src/folder.h;  cvs diff -u -r 1.207.2.89 -r 1.207.2.90 src/folderview.c;  ) > 2.0.0cvs119.patchset
 ( cvs diff -u -r 1.36.2.57 -r 1.36.2.58 src/common/utils.c;  ) > 2.0.0cvs120.patchset
+( cvs diff -u -r 1.150.2.56 -r 1.150.2.57 src/procmsg.c;  ) > 2.0.0cvs121.patchset
index 9255a6ca9c8dd1f997ed5399f11136f3b8df6587..0d32d305e1844f2bfc95624f3419aea9c55ee894 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=120
+EXTRA_VERSION=121
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 0640ffb1e80d52e7b92923882440c10bfa54f083..7b1a5f90669d6d08a57cd20abd5ce2f329f2b730 100644 (file)
@@ -340,31 +340,38 @@ gint procmsg_move_messages(GSList *mlist)
        MsgInfo *msginfo;
        FolderItem *dest = NULL;
        gint retval = 0;
-
+       gboolean finished = TRUE;
        if (!mlist) return 0;
 
        folder_item_update_freeze();
 
+next_folder:
        for (cur = mlist; cur != NULL; cur = cur->next) {
                msginfo = (MsgInfo *)cur->data;
+               if (!msginfo->to_folder) {
+                       continue;
+               } else {
+                       finished = FALSE;
+               }
                if (!dest) {
                        dest = msginfo->to_folder;
                        movelist = g_slist_append(movelist, msginfo);
                } else if (dest == msginfo->to_folder) {
                        movelist = g_slist_append(movelist, msginfo);
                } else {
-                       folder_item_move_msgs(dest, movelist);
-                       g_slist_free(movelist);
-                       movelist = NULL;
-                       dest = msginfo->to_folder;
-                       movelist = g_slist_append(movelist, msginfo);
+                       continue;
                }
                procmsg_msginfo_set_to_folder(msginfo, NULL);
        }
-
        if (movelist) {
-               retval = folder_item_move_msgs(dest, movelist);
+               retval |= folder_item_move_msgs(dest, movelist);
                g_slist_free(movelist);
+               movelist = NULL;
+       }
+       if (finished == FALSE) {
+               finished = TRUE;
+               dest = NULL;
+               goto next_folder;
        }
 
        folder_item_update_thaw();
@@ -376,31 +383,38 @@ void procmsg_copy_messages(GSList *mlist)
        GSList *cur, *copylist = NULL;
        MsgInfo *msginfo;
        FolderItem *dest = NULL;
-
+       gboolean finished = TRUE;
        if (!mlist) return;
 
        folder_item_update_freeze();
 
+next_folder:
        for (cur = mlist; cur != NULL; cur = cur->next) {
                msginfo = (MsgInfo *)cur->data;
+               if (!msginfo->to_folder) {
+                       continue;
+               } else {
+                       finished = FALSE;
+               }
                if (!dest) {
                        dest = msginfo->to_folder;
                        copylist = g_slist_append(copylist, msginfo);
                } else if (dest == msginfo->to_folder) {
                        copylist = g_slist_append(copylist, msginfo);
                } else {
-                       folder_item_copy_msgs(dest, copylist);
-                       g_slist_free(copylist);
-                       copylist = NULL;
-                       dest = msginfo->to_folder;
-                       copylist = g_slist_append(copylist, msginfo);
+                       continue;
                }
                procmsg_msginfo_set_to_folder(msginfo, NULL);
        }
-
        if (copylist) {
                folder_item_copy_msgs(dest, copylist);
                g_slist_free(copylist);
+               copylist = NULL;
+       }
+       if (finished == FALSE) {
+               finished = TRUE;
+               dest = NULL;
+               goto next_folder;
        }
 
        folder_item_update_thaw();