Revert "fix bug 3973, ''select all' in summaryview does not automatically focus the...
authorAndrej Kacian <ticho@claws-mail.org>
Mon, 26 Feb 2018 21:06:02 +0000 (22:06 +0100)
committerAndrej Kacian <ticho@claws-mail.org>
Mon, 26 Feb 2018 21:09:13 +0000 (22:09 +0100)
This reverts commit a3e48bd6e7e62dedfef8ddedbeeb90400b5234b3.
That commit introduced slowness when selecting all rows.

src/mainwindow.c
src/summaryview.c
src/summaryview.h

index 1300839..74dbc4b 100644 (file)
@@ -4983,7 +4983,7 @@ static void allsel_cb(GtkAction *action, gpointer data)
                 (gtk_widget_has_focus(msgview->mimeview->textview->text)))
                messageview_select_all(mainwin->messageview);
        else
-               gtk_cmclist_select_all(GTK_CMCLIST(mainwin->summaryview->ctree));
+               summary_select_all(mainwin->summaryview);
 }
 
 static void select_thread_cb(GtkAction *action, gpointer data)
index 257e850..60938ef 100644 (file)
@@ -4817,6 +4817,16 @@ void summary_add_address(SummaryView *summaryview)
        avatars_avatarrender_free(avatarr);
 }
 
+void summary_select_all(SummaryView *summaryview)
+{
+       if (!summaryview->folder_item) return;
+
+       summary_lock(summaryview);
+       gtk_cmclist_select_all(GTK_CMCLIST(summaryview->ctree));
+       summary_unlock(summaryview);
+       summary_status_show(summaryview);
+}
+
 void summary_unselect_all(SummaryView *summaryview)
 {
        summary_lock(summaryview);
index 9d1d943..77ac05b 100644 (file)
@@ -287,6 +287,7 @@ void summary_watch_thread     (SummaryView          *summaryview);
 void summary_unwatch_thread      (SummaryView          *summaryview);
 
 void summary_add_address         (SummaryView          *summaryview);
+void summary_select_all                  (SummaryView          *summaryview);
 void summary_unselect_all        (SummaryView          *summaryview);
 void summary_select_thread       (SummaryView          *summaryview,
                                   gboolean              delete_thread,