more fixes to folder dnd (folderview locking, feedback to the user, don't copy
authorColin Leroy <colin@colino.net>
Sat, 9 Nov 2002 02:09:58 +0000 (02:09 +0000)
committerColin Leroy <colin@colino.net>
Sat, 9 Nov 2002 02:09:58 +0000 (02:09 +0000)
filtering compiled regexps)

ChangeLog.claws
configure.in
src/folder.c
src/folderview.c
src/matcher.c

index d943fcd46d9846ae7bf17ef7c94645b15bc84499..737d696bf3915980a27b285fdb5342dd58c2a48a 100644 (file)
@@ -1,3 +1,12 @@
+2002-11-08 [colin]     0.8.5claws100
+       
+       * src/matcher.c
+               Don't copy the compiled regexp (will be reevaluated)
+       * src/folderview.c
+               Lock folderview while moving
+       * src/folder.c
+               Provide info on what's happening to the user
+
 2002-11-08 [colin]     0.8.5claws99
 
        * src/folderview.c
index 1f41e84be575e7f11cc3c49d9a18baccf03de298..9fd89f6a02e4b7e2dcf6e924360efce6b45fff20 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=5
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws99
+EXTRA_VERSION=claws100
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
index 001c21869e46b1fe07dbe56d4879588c32d4187d..73d3d11b246376f10da6a3901f38fb6e7d2739fc 100644 (file)
@@ -50,6 +50,7 @@
 #include "scoring.h"
 #include "prefs_folder_item.h"
 #include "procheader.h"
+#include "statusbar.h"
 
 static GList *folder_list = NULL;
 
@@ -1444,7 +1445,7 @@ FolderItem *folder_item_move_recursive (FolderItem *src, FolderItem *dest)
        FolderItem *new_item;
        FolderItem *next_item;
        GNode *srcnode;
-       
+       int cnt = 0;
        mlist = folder_item_get_msg_list(src);
 
        /* move messages */
@@ -1455,14 +1456,21 @@ FolderItem *folder_item_move_recursive (FolderItem *src, FolderItem *dest)
                return NULL;
        }
        
+       statusbar_print_all(_("Moving %s to %s..."), src->name, new_item->path);
+
        if (new_item->folder == NULL)
                new_item->folder = dest->folder;
 
        /* move messages */
        for (cur = mlist ; cur != NULL ; cur = cur->next) {
                MsgInfo * msginfo;
+               cnt++;
                msginfo = (MsgInfo *) cur->data;
                folder_item_move_msg(new_item, msginfo);
+               if (cnt%500)
+                       statusbar_print_all(_("Moving %s to %s (%d%%)..."), src->name, 
+                                       new_item->path,
+                                       100*cnt/g_slist_length(mlist));
        }
        
        /*copy prefs*/
index 2184025f97f1f8a40b1bb4c0688a995585707dda..324c8caa0e860361e9d5c80c7cc887cb04d3e18d 100644 (file)
@@ -2694,6 +2694,8 @@ static void folderview_drag_received_cb(GtkWidget        *widget,
                STATUSBAR_PUSH(folderview->mainwin, buf);
                g_free(buf);
                main_window_cursor_wait(folderview->mainwin);
+               gtk_widget_set_sensitive(folderview->ctree, FALSE);
+               inc_lock();
                if ((new_item = folder_item_move_to(src_item, item)) != NULL) {
                        gtk_drag_finish(drag_context, TRUE, TRUE, time);
                
@@ -2718,7 +2720,9 @@ static void folderview_drag_received_cb(GtkWidget        *widget,
                        gtk_drag_finish(drag_context, FALSE, FALSE, time);
                        STATUSBAR_PUSH(folderview->mainwin, _("Done."));
                        main_window_cursor_normal(folderview->mainwin);
-               }                       
+               }       
+               inc_unlock();           
+               gtk_widget_set_sensitive(folderview->ctree, TRUE);
        }
 }
 
index 53e369a020710aeddba1e2942a2e46d31108855b..2b59595a21a3c81580ce056623cfc6b077eac97d 100644 (file)
@@ -259,10 +259,8 @@ MatcherProp *matcherprop_copy(MatcherProp *src)
        else
                prop->expr = NULL;
        prop->matchtype   = src->matchtype;
-       if (src->preg != NULL)
-               memcpy(prop->preg, src->preg, sizeof(regex_t));
-       else 
-               prop->preg = NULL;
+       
+       prop->preg = NULL; /* will be re-evaluated */
        prop->value       = src->value;
        prop->error       = src->error; 
        return prop;