speed up a bit folder dnd

This commit is contained in:
Colin Leroy 2003-03-21 17:28:52 +00:00
parent ceba6a46ab
commit 57723d335f
4 changed files with 14 additions and 13 deletions

View 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

View 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

View 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);

View 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."));