[Commits] [SCM] claws branch, master, updated. 3.10.1-111-g3abe2e6

claws at claws-mail.org claws at claws-mail.org
Sun Jun 29 13:59:38 CEST 2014


The branch master of project "claws" (Claws Mail) has been updated
       via  3abe2e6d328a1b890475391fd0f5c31869eb3ea5 (commit)
      from  723acc9063cd53cbf22810724135da2be370c703 (commit)

Summary of changes:
 src/folderview.c |   41 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 41 insertions(+)


- Log -----------------------------------------------------------------
commit 3abe2e6d328a1b890475391fd0f5c31869eb3ea5
Author: Paul <paul at claws-mail.org>
Date:   Sun Jun 29 12:59:25 2014 +0100

    highlight queue if there are msgs in its sub-folders and the tree is collapsed
    
    as is done for the parent queue folder

diff --git a/src/folderview.c b/src/folderview.c
index 2ce7f9c..d9d3a75 100644
--- a/src/folderview.c
+++ b/src/folderview.c
@@ -1189,6 +1189,43 @@ void folderview_check_new_all(void)
 	inc_unlock();
 }
 
+static gboolean folderview_have_children_sub(FolderView *folderview,
+					     FolderItem *item,
+					     gboolean in_sub)
+{
+	GNode *node = NULL;
+	
+	if (!item || !item->folder || !item->folder->node)
+		return FALSE;
+		
+	node = item->folder->node;
+	
+	node = g_node_find(node, G_PRE_ORDER, G_TRAVERSE_ALL, item);
+	node = node->children;
+
+	if (in_sub && item->total_msgs > 0) {
+		return TRUE;
+	}
+
+	while (node != NULL) {
+		if (node && node->data) {
+			FolderItem *next_item = (FolderItem*) node->data;
+			node = node->next;
+			if (folderview_have_children_sub(folderview, 
+							 next_item, TRUE))
+				return TRUE;
+		}
+	}
+
+	return FALSE;
+}
+
+static gboolean folderview_have_children(FolderView *folderview,
+					 FolderItem *item)
+{
+	return folderview_have_children_sub(folderview, item, FALSE);
+}
+
 static gboolean folderview_have_new_children_sub(FolderView *folderview,
 						 FolderItem *item,
 						 gboolean in_sub)
@@ -1540,6 +1577,10 @@ static void folderview_update_node(FolderView *folderview, GtkCMCTreeNode *node)
 				break;
 			}
 		}
+		if (!GTK_CMCTREE_ROW(node)->expanded &&
+		    use_bold == FALSE &&
+		    folderview_have_children(folderview, item))
+			use_bold = use_color = TRUE;
 		procmsg_msg_list_free(list);
 	} else {
 		/* if unread messages exist, print with bold font */

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list