[Commits] [SCM] claws branch, master, updated. 3.16.0-75-g6329dc3
ticho at claws-mail.org
ticho at claws-mail.org
Mon Feb 26 22:09:59 CET 2018
The branch, master has been updated
via 6329dc382d539135add187c5b1e8cf6efe1a9d22 (commit)
via 9bac1080abb054f6d743cb5672a6d5d3fed5e6e0 (commit)
from 20dc0b893bdf2b9131d59a211c4315a5a7f0ebf7 (commit)
Summary of changes:
src/mainwindow.c | 2 +-
src/summaryview.c | 25 +++++++++++++++++++++++++
src/summaryview.h | 1 +
3 files changed, 27 insertions(+), 1 deletion(-)
- Log -----------------------------------------------------------------
commit 6329dc382d539135add187c5b1e8cf6efe1a9d22
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Mon Feb 26 22:06:27 2018 +0100
Fix summary_select_all when there is nothing selected.
Due to how GtkCMCList works, we first need to focus and
select a row.
Fixes bug #3973, ''select all' in summaryview does not
automatically focus the summaryview'
diff --git a/src/summaryview.c b/src/summaryview.c
index 60938ef..586d7b1 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -4819,11 +4819,26 @@ void summary_add_address(SummaryView *summaryview)
void summary_select_all(SummaryView *summaryview)
{
+ GtkCMCTreeNode *node;
+
if (!summaryview->folder_item) return;
+ if (GTK_CMCLIST(summaryview->ctree)->focus_row < 0) {
+ /* If no row is selected, select (but do not open) the first
+ * row, to get summaryview into correct state for selecting all. */
+ debug_print("summary_select_all: no row selected, selecting first one\n");
+ if (GTK_CMCLIST(summaryview->ctree)->row_list != NULL) {
+ node = gtk_cmctree_node_nth(GTK_CMCTREE(summaryview->ctree), 0);
+ summary_select_node(summaryview, node, FALSE);
+ }
+ }
+
+ /* Now select all rows while locking the summaryview for
+ * faster performance. */
summary_lock(summaryview);
gtk_cmclist_select_all(GTK_CMCLIST(summaryview->ctree));
summary_unlock(summaryview);
+
summary_status_show(summaryview);
}
commit 9bac1080abb054f6d743cb5672a6d5d3fed5e6e0
Author: Andrej Kacian <ticho at claws-mail.org>
Date: Mon Feb 26 22:06:02 2018 +0100
Revert "fix bug 3973, ''select all' in summaryview does not automatically focus the summaryview'"
This reverts commit a3e48bd6e7e62dedfef8ddedbeeb90400b5234b3.
That commit introduced slowness when selecting all rows.
diff --git a/src/mainwindow.c b/src/mainwindow.c
index 1300839..74dbc4b 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -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)
diff --git a/src/summaryview.c b/src/summaryview.c
index 257e850..60938ef 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -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);
diff --git a/src/summaryview.h b/src/summaryview.h
index 9d1d943..77ac05b 100644
--- a/src/summaryview.h
+++ b/src/summaryview.h
@@ -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,
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list