[anjal] BUGFIX: Moblin Bugzilla #8522 - Mails missing in conversation view.



commit 5261aa890c568bf0352b4b850fb1838f218cfd5c
Author: Srinivasa Ragavan <sragavan gnome org>
Date:   Mon Jan 4 18:20:28 2010 +0530

    BUGFIX: Moblin Bugzilla #8522 - Mails missing in conversation view.

 src/em-tree-store.c |   21 +++++++++++----------
 1 files changed, 11 insertions(+), 10 deletions(-)
---
diff --git a/src/em-tree-store.c b/src/em-tree-store.c
index e2f5b64..7181293 100644
--- a/src/em-tree-store.c
+++ b/src/em-tree-store.c
@@ -1400,16 +1400,15 @@ emts_child_tree (EMTreeStore *emts, EMTreeNode *node, GPtrArray *array)
 {
 	 EMTreeNode *n;
 
-	 if (node->info)
-		  g_ptr_array_add (array, node);
-			   
-	 n = (EMTreeNode *)node->children.head;
-	 while (n && n != (EMTreeNode *)&node->children.tail) {
-		  if (node_has_children(n))
-			   emts_child_tree (emts, (EMTreeNode *)n->children.head, array);
-		  if (n->info)
+	 if (node_has_children(node)) {
+		n = (EMTreeNode *)node->children.head;
+
+	 	while (n && n != (EMTreeNode *)&node->children.tail) {
+			emts_child_tree (emts, n, array);
+		  	if (n->info)
 			   g_ptr_array_add (array, n);
-		  n = n->next;
+		 	n = n->next;
+		 }
 	 }
 
 	 return ;
@@ -1422,6 +1421,7 @@ em_tree_store_get_child_sorted_tree (EMTreeStore  *emts, GtkTreeIter *iter)
 	 GPtrArray *nodes = g_ptr_array_new ();
 	 int i;
 	 
+	 g_ptr_array_add (nodes, node);
 	 emts_child_tree (emts, node, nodes);
 	 g_ptr_array_sort_with_data (nodes, (GCompareDataFunc)sort_dsent, emts);
 	 for (i=0; i<nodes->len; i++) {
@@ -1437,7 +1437,8 @@ em_tree_store_get_child_infos (EMTreeStore  *emts, GtkTreeIter *iter)
 	 EMTreeNode *node = (EMTreeNode *) iter->user_data;
 	 GPtrArray *nodes = g_ptr_array_new ();
 	 int i;
-	 
+
+	 g_ptr_array_add (nodes, node);
 	 emts_child_tree (emts, node, nodes);
 	 for (i=0; i<nodes->len; i++) {
 		  nodes->pdata[i] =  ((EMTreeNode *)nodes->pdata[i])->info;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]