2007-05-03 [colin] 2.9.1cvs42
authorColin Leroy <colin@colino.net>
Thu, 3 May 2007 17:37:24 +0000 (17:37 +0000)
committerColin Leroy <colin@colino.net>
Thu, 3 May 2007 17:37:24 +0000 (17:37 +0000)
* src/summaryview.c
* src/mainwindow.c
Fix bug 1213, 'Delete more than
one thread at once'

ChangeLog
PATCHSETS
configure.ac
src/mainwindow.c
src/summaryview.c

index f47d74791df95fba11caa5b894d3394a5e3cf8c4..b1ead22b7e572fbab6e90c71de53ae8269621d20 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2007-05-03 [colin]     2.9.1cvs42
+
+       * src/summaryview.c
+       * src/mainwindow.c
+               Fix bug 1213, 'Delete more than 
+               one thread at once'
+
 2007-05-03 [wwp]       2.9.1cvs41
 
        * src/prefs_common.c
index 0b4608c8cb04a9713042d848f033544f57f966e1..69b5123c4e27ea8bb796f937f6781c3832a037d2 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.149.2.72 -r 1.149.2.73 src/inc.c;  ) > 2.9.1cvs39.patchset
 ( cvs diff -u -r 1.18.2.51 -r 1.18.2.52 src/plugins/spamassassin/spamassassin.c;  cvs diff -u -r 1.4.2.14 -r 1.4.2.15 src/plugins/spamassassin/spamassassin.h;  cvs diff -u -r 1.23.2.37 -r 1.23.2.38 src/plugins/spamassassin/spamassassin_gtk.c;  cvs diff -u -r 1.1.2.29 -r 1.1.2.30 src/plugins/bogofilter/bogofilter.c;  cvs diff -u -r 1.1.2.11 -r 1.1.2.12 src/plugins/bogofilter/bogofilter.h;  cvs diff -u -r 1.1.2.23 -r 1.1.2.24 src/plugins/bogofilter/bogofilter_gtk.c;  ) > 2.9.1cvs40.patchset
 ( cvs diff -u -r 1.204.2.132 -r 1.204.2.133 src/prefs_common.c;  cvs diff -u -r 1.59.2.55 -r 1.59.2.56 src/prefs_filtering.c;  cvs diff -u -r 1.12.2.40 -r 1.12.2.41 src/prefs_template.c;  cvs diff -u -r 1.2.4.18 -r 1.2.4.19 src/common/template.c;  cvs diff -u -r 1.1.4.4 -r 1.1.4.5 src/common/template.h;  cvs diff -u -r 1.5.2.57 -r 1.5.2.58 src/gtk/gtkutils.c;  cvs diff -u -r 1.4.2.34 -r 1.4.2.35 src/gtk/gtkutils.h;  ) > 2.9.1cvs41.patchset
+( cvs diff -u -r 1.395.2.299 -r 1.395.2.300 src/summaryview.c;  cvs diff -u -r 1.274.2.188 -r 1.274.2.189 src/mainwindow.c;  ) > 2.9.1cvs42.patchset
index fb3188e8006a70529418ec1dc213ed45f45be14d..b45d8afb2aae6183b2f363aeea8954924e4f74e2 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=1
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=41
+EXTRA_VERSION=42
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 489416bee1aa05fc2fafbdfed480a2fc2d40a0c7..bba078b9ae6b8f207bef21eea2cdc770c9ae2663 100644 (file)
@@ -2275,8 +2275,8 @@ void main_window_set_menu_sensitive(MainWindow *mainwin)
                {"/File/Synchronise folders", M_WANT_SYNC},
                {"/File/Exit"      , M_UNLOCKED},
 
-               {"/Edit/Select thread"             , M_SINGLE_TARGET_EXIST},
-               {"/Edit/Delete thread"             , M_SINGLE_TARGET_EXIST},
+               {"/Edit/Select thread"             , M_TARGET_EXIST},
+               {"/Edit/Delete thread"             , M_TARGET_EXIST},
                {"/Edit/Find in current message...", M_SINGLE_TARGET_EXIST},
 
                {"/View/Set displayed columns/in Folder list..."
index f5bd6e8517fc129e8840fbff81ea5fb5fe7559cb..c97691e8e32d185e8b28d49a6bc8a16a6b817a20 100644 (file)
@@ -4159,22 +4159,27 @@ void summary_unselect_all(SummaryView *summaryview)
 void summary_select_thread(SummaryView *summaryview, gboolean delete_thread)
 {
        GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
-       GtkCTreeNode *node = summaryview->selected;
+       GtkCTreeNode *node = NULL;
        gboolean froze = FALSE;
+       GList *cur = NULL;
+       GList *copy = NULL;
+       if (!GTK_CLIST(summaryview->ctree)->selection) 
+               return;
 
-       if (!node) return;
-
-       while (GTK_CTREE_ROW(node)->parent != NULL)
-               node = GTK_CTREE_ROW(node)->parent;
 
        START_LONG_OPERATION(summaryview, FALSE);
-       if (node != summaryview->selected)
-               summary_select_node
-                       (summaryview, node,
-                        messageview_is_visible(summaryview->messageview),
-                        FALSE);
+       copy = g_list_copy(GTK_CLIST(summaryview->ctree)->selection);
+       for (cur = copy; cur != NULL && cur->data != NULL;
+            cur = cur->next) {
+               node = GTK_CTREE_NODE(cur->data);
+               if (!node)
+                       continue;
+               while (GTK_CTREE_ROW(node)->parent != NULL)
+                       node = GTK_CTREE_ROW(node)->parent;
 
-       gtk_ctree_select_recursive(ctree, node);
+               gtk_ctree_select_recursive(ctree, node);
+       }
+       g_list_free(copy);
        END_LONG_OPERATION(summaryview);
 
        if (delete_thread) {