[Xfce4-commits] [apps/xfce4-taskmanager] 01/01: Increment the link->path as directly after insert

noreply at xfce.org noreply at xfce.org
Mon Dec 15 21:11:09 CET 2014


This is an automated email from the git hooks/post-receive script.

landry pushed a commit to branch master
in repository apps/xfce4-taskmanager.

commit 20b1b04a221f57b4a1e009f80a93db4f7638aeb9
Author: Peter de Ridder <peter at xfce.org>
Date:   Sun Dec 14 22:57:33 2014 +0100

    Increment the link->path as directly after insert
---
 src/process-tree-model.c |   11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/process-tree-model.c b/src/process-tree-model.c
index 21bfb67..a4069eb 100644
--- a/src/process-tree-model.c
+++ b/src/process-tree-model.c
@@ -627,7 +627,11 @@ xtm_process_tree_model_row_inserted (XtmProcessTreeModel *treemodel, GtkTreePath
 	lnk->list = g_sequence_insert_before (
 		g_sequence_get_iter_at_pos (treemodel->list, *gtk_tree_path_get_indices (path)),
 		lnk);
-	/* Use the root entry as fall-back if no parent could be found */
+	/* Need to update all path caches after the insert and increment them with one */
+	if (not_persist)
+		g_sequence_foreach_range (g_sequence_iter_next (lnk->list), g_sequence_get_end_iter (treemodel->list),
+			do_path, gtk_tree_path_next);
+
 	found.parent = treemodel->tree;
 	found.treemodel = treemodel;
 	gtk_tree_model_get_value (model, iter, treemodel->p_column, &found.p_value);
@@ -639,11 +643,6 @@ xtm_process_tree_model_row_inserted (XtmProcessTreeModel *treemodel, GtkTreePath
 	/* Find the previous sibling at the same level to preserve sorting order */
 	lnk->tree = g_node_insert_data_after (found.parent, find_sibling (found.parent, lnk->list), lnk);
 
-	/* Need to update all path caches after the insert and increment them with one */
-	if (not_persist)
-		g_sequence_foreach_range (g_sequence_iter_next (lnk->list), g_sequence_get_end_iter (treemodel->list),
-			do_path, gtk_tree_path_next);
-
 	/* Signal the new item */
 	s_iter.user_data = lnk->tree;
 	s_path = xtm_process_tree_model_get_path (GTK_TREE_MODEL (treemodel), &s_iter);

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list