[Commits] [SCM] claws branch, master, updated. 3.15.0-185-gfbf3e9c

ticho at claws-mail.org ticho at claws-mail.org
Sun Dec 3 01:24:28 CET 2017


The branch, master has been updated
       via  fbf3e9ceb63690b727c7909d2c6115b11b0e2054 (commit)
      from  61c5435f4202f3f2d7fabec41412f73f6974aaaa (commit)

Summary of changes:
 src/summaryview.c |   26 ++++++++++++++++++++------
 1 file changed, 20 insertions(+), 6 deletions(-)


- Log -----------------------------------------------------------------
commit fbf3e9ceb63690b727c7909d2c6115b11b0e2054
Author: Olaf Hering <olaf at aepfle.de>
Date:   Wed Nov 22 18:03:15 2017 +0100

    Set flags of all selected messages before updating view
    
    If a collapsed, unread thread is marked as 'ignore thread' the first
    message remains bold in the message list. That happens because
    summary_ignore_thread_func calls summary_set_row_marks, which finds
    unread children. As a result bold_style is selected.
    
    To fix this it is required to first update the message flags of all
    selected messages, before updating the view of all selected messages.
    
    Signed-off-by: Olaf Hering <olaf at aepfle.de>

diff --git a/src/summaryview.c b/src/summaryview.c
index 8335ed9..ebb344f 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -7674,9 +7674,8 @@ static gint summary_cmp_by_score(GtkCMCList *clist,
 		return summary_cmp_by_date(clist, ptr1, ptr2);
 }
 
-static void summary_ignore_thread_func(GtkCMCTree *ctree, GtkCMCTreeNode *row, gpointer data)
+static void summary_ignore_thread_func_mark_unread(GtkCMCTree *ctree, GtkCMCTreeNode *row, gpointer data)
 {
-	SummaryView *summaryview = (SummaryView *) data;
 	MsgInfo *msginfo;
 
 	msginfo = gtk_cmctree_node_get_row_data(ctree, row);
@@ -7685,9 +7684,19 @@ static void summary_ignore_thread_func(GtkCMCTree *ctree, GtkCMCTreeNode *row, g
 	summary_msginfo_unset_flags(msginfo, MSG_WATCH_THREAD, 0);
 	summary_msginfo_change_flags(msginfo, MSG_IGNORE_THREAD, 0, MSG_NEW | MSG_UNREAD, 0);
 
+	debug_print("Message %d is marked as ignore thread\n", msginfo->msgnum);
+}
+
+static void summary_ignore_thread_func_set_row(GtkCMCTree *ctree, GtkCMCTreeNode *row, gpointer data)
+{
+	SummaryView *summaryview = (SummaryView *) data;
+	MsgInfo *msginfo;
+
+	msginfo = gtk_cmctree_node_get_row_data(ctree, row);
+	cm_return_if_fail(msginfo);
+
 	summary_set_row_marks(summaryview, row);
-	debug_print("Message %d is marked as ignore thread\n",
-	    msginfo->msgnum);
+	debug_print("Message %d update in row view\n", msginfo->msgnum);
 }
 
 void summary_ignore_thread(SummaryView *summaryview)
@@ -7698,8 +7707,13 @@ void summary_ignore_thread(SummaryView *summaryview)
 
 	START_LONG_OPERATION(summaryview, FALSE);
 	for (cur = GTK_CMCLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next)
-		gtk_cmctree_pre_recursive(ctree, GTK_CMCTREE_NODE(cur->data), 
-					GTK_CMCTREE_FUNC(summary_ignore_thread_func), 
+		gtk_cmctree_pre_recursive(ctree, GTK_CMCTREE_NODE(cur->data),
+					GTK_CMCTREE_FUNC(summary_ignore_thread_func_mark_unread),
+					summaryview);
+
+	for (cur = GTK_CMCLIST(ctree)->selection; cur != NULL && cur->data != NULL; cur = cur->next)
+		gtk_cmctree_pre_recursive(ctree, GTK_CMCTREE_NODE(cur->data),
+					GTK_CMCTREE_FUNC(summary_ignore_thread_func_set_row),
 					summaryview);
 
 	END_LONG_OPERATION(summaryview);

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list