2007-11-20 [colin] 3.1.0cvs11
authorColin Leroy <colin@colino.net>
Tue, 20 Nov 2007 20:13:59 +0000 (20:13 +0000)
committerColin Leroy <colin@colino.net>
Tue, 20 Nov 2007 20:13:59 +0000 (20:13 +0000)
* src/folderview.c
* src/main.c
* src/mainwindow.c
Fix bug 1396, 'Crash on disabling a filter
while it is processing'

ChangeLog
PATCHSETS
configure.ac
src/folderview.c
src/main.c
src/mainwindow.c

index 1d51133a81513fb17eb706388cca361b285cbef2..0163689155d861afde0d787e03ce4f87a1294547 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2007-11-20 [colin]     3.1.0cvs11
+
+       * src/folderview.c
+       * src/main.c
+       * src/mainwindow.c
+               Fix bug 1396, 'Crash on disabling a filter 
+               while it is processing'
+
 2007-11-20 [paul]      3.1.0cvs10
 
        * src/folder.c
index 77fe59e8f772c1109b48e896cfbbc87351dff27d..66b667151e4cee8bf03c9337bafcc95f76dbb13e 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.2.49 -r 1.1.2.50 src/prefs_summaries.c;  cvs diff -u -r 1.395.2.336 -r 1.395.2.337 src/summaryview.c;  ) > 3.1.0cvs8.patchset
 ( cvs diff -u -r 1.382.2.424 -r 1.382.2.425 src/compose.c;  ) > 3.1.0cvs9.patchset
 ( cvs diff -u -r 1.213.2.166 -r 1.213.2.167 src/folder.c;  ) > 3.1.0cvs10.patchset
+( cvs diff -u -r 1.207.2.187 -r 1.207.2.188 src/folderview.c;  cvs diff -u -r 1.115.2.176 -r 1.115.2.177 src/main.c;  cvs diff -u -r 1.274.2.220 -r 1.274.2.221 src/mainwindow.c;  ) > 3.1.0cvs11.patchset
index 87bea9cb227ec8c89e22ea4a0a94a638e82c145f..cbe6ffe0350f6d34ae4beabb671ff5b0821e593a 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=1
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=10
+EXTRA_VERSION=11
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index eee8a5f9881a76ba5cf7ec13b6966a2faca97e8f..f0733d8de8d3b7b387bfd3caa44d31a0ae642952 100644 (file)
@@ -1936,13 +1936,17 @@ static void folderview_set_sens_and_popup_menu(FolderView *folderview, gint row,
 
        if ( FOLDER_TYPE(item->folder) == F_NEWS || FOLDER_TYPE(item->folder) == F_IMAP )
                SET_SENS("/Download messages", !item->no_select);
+
        SET_SENS("/Mark all read", item->unread_msgs >= 1);
        SET_SENS("/Search folder...", item->total_msgs >= 1 && 
                 folderview->selected == folderview->opened);
-       SET_SENS("/Run processing rules", item->prefs->processing &&
-                item->total_msgs >= 1);
        SET_SENS("/Properties...", !item->no_select);
-       SET_SENS("/Processing...", item->node->parent != NULL && !item->no_select);
+
+       SET_SENS("/Run processing rules", item->prefs->processing &&
+                item->total_msgs >= 1 && !item->processing_pending);
+       SET_SENS("/Processing...", item->node->parent != NULL && 
+               !item->no_select && !item->processing_pending);
+
        if (item == folder->trash || item == special_trash
            || folder_has_parent_of_type(item, F_TRASH)) {
                GSList *msglist = folder_item_get_msg_list(item);
@@ -2485,7 +2489,9 @@ static void folderview_run_processing_cb(FolderView *folderview, guint action,
        g_return_if_fail(item != NULL);
        g_return_if_fail(item->folder != NULL);
 
+       item->processing_pending = TRUE;
        folder_item_apply_processing(item);
+       item->processing_pending = FALSE;
 }
 
 static void folderview_property_cb(FolderView *folderview, guint action,
index 763344bc5e45c2334c3d355cf71ab440c38b9f3d..7e69f2f2295dbda1445857a4de3e5054fb61c55b 100644 (file)
@@ -1683,7 +1683,9 @@ static void initial_processing(FolderItem *item, gpointer data)
 
        
        if (item->prefs->enable_processing) {
+               item->processing_pending = TRUE;
                folder_item_apply_processing(item);
+               item->processing_pending = FALSE;
        }
 
        STATUSBAR_POP(mainwin);
index e992023cfe0fc0ae512cb4ad7ec322eb926e2b7a..eb2338063914b525fefbad2a9b878f239077495a 100644 (file)
@@ -4041,7 +4041,9 @@ static void process_cb(MainWindow *mainwin, guint action, GtkWidget *widget)
        FolderItem *item = mainwin->summaryview->folder_item;   
        g_return_if_fail(item != NULL);
 
+       item->processing_pending = TRUE;
        folder_item_apply_processing(item);     
+       item->processing_pending = FALSE;
 }
 
 static void execute_summary_cb(MainWindow *mainwin, guint action,