speed up a bit folder dnd
authorColin Leroy <colin@colino.net>
Fri, 21 Mar 2003 17:28:52 +0000 (17:28 +0000)
committerColin Leroy <colin@colino.net>
Fri, 21 Mar 2003 17:28:52 +0000 (17:28 +0000)
ChangeLog.claws
configure.ac
src/folder.c
src/folderview.c

index ace0122..ab16ef0 100644 (file)
@@ -1,3 +1,9 @@
+2003-03-21 [colin]     0.8.11claws35
+
+       * src/folder.c 
+       * src/folderview.c
+               speed up a bit folder dnd
+
 2003-03-20 [alfons]    0.8.11claws34
 
        * src/main.c
index 6b31cc4..8b59755 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws34
+EXTRA_VERSION=claws35
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index db9ec95..554c4e6 100644 (file)
@@ -1595,18 +1595,9 @@ FolderItem *folder_item_move_recursive (FolderItem *src, FolderItem *dest)
                new_item->folder = dest->folder;
 
        /* move messages */
-       for (cur = mlist ; cur != NULL ; cur = cur->next) {
-               MsgInfo * msginfo;
-               cnt++;
-               if (cnt%500)
-                       log_message(_("Moving %s to %s (%d%%)...\n"), src->name, 
-                                       new_item->path,
-                                       100*cnt/g_slist_length(mlist));
-               msginfo = (MsgInfo *) cur->data;
-               folder_item_move_msg(new_item, msginfo);
-
-               procmsg_msginfo_free(msginfo);
-       }
+       log_message(_("Moving %s to %s...\n"), 
+                       src->name, new_item->path);
+       folder_item_move_msgs_with_dest(new_item, mlist);
        
        /*copy prefs*/
        prefs_folder_item_copy_prefs(src, new_item);
index a103308..5ee4da3 100644 (file)
@@ -2577,10 +2577,13 @@ static void folderview_move_to(FolderView *folderview, FolderItem *from_folder,
        inc_lock();
        main_window_cursor_wait(folderview->mainwin);
        statusbar_verbosity_set(TRUE);
+       folder_item_update_freeze();
        if ((status = folder_item_move_to(from_folder, to_folder, &new_folder)) == F_MOVE_OK) {
                statusbar_verbosity_set(FALSE);
                main_window_cursor_normal(folderview->mainwin);
                STATUSBAR_POP(folderview->mainwin);
+               folder_item_update_thaw();
+               folder_item_update_recursive(new_folder, F_ITEM_UPDATE_MSGCNT);
                if (src_node)
                        gtk_ctree_remove_node(GTK_CTREE(folderview->ctree), src_node);
                else 
@@ -2595,6 +2598,7 @@ static void folderview_move_to(FolderView *folderview, FolderItem *from_folder,
                statusbar_verbosity_set(FALSE);         
                main_window_cursor_normal(folderview->mainwin);
                STATUSBAR_POP(folderview->mainwin);
+               folder_item_update_thaw();
                switch (status) {
                case F_MOVE_FAILED_DEST_IS_PARENT:
                        alertpanel_error(_("Source and destination are the same."));