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

noreply at xfce.org noreply at xfce.org
Sun Dec 14 22:58:52 CET 2014


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

peter pushed a commit to branch peter/tree-model
in repository apps/xfce4-taskmanager.

commit 7ad6d4556c2005ee16847b7f14a666370c131c08
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 |   10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/src/process-tree-model.c b/src/process-tree-model.c
index fc10e1e..13f4b62 100644
--- a/src/process-tree-model.c
+++ b/src/process-tree-model.c
@@ -627,6 +627,11 @@ xtm_process_tree_model_row_inserted (XtmProcessTreeModel *treemodel, GtkTreePath
 	link->list = g_sequence_insert_before (
 		g_sequence_get_iter_at_pos (treemodel->list, *gtk_tree_path_get_indices (path)),
 		link);
+	/* 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 (link->list), g_sequence_get_end_iter (treemodel->list),
+			do_path, gtk_tree_path_next);
+
 	/* Use the root entry as fall-back if no parent could be found */
 	found.parent = treemodel->tree;
 	found.treemodel = treemodel;
@@ -639,11 +644,6 @@ xtm_process_tree_model_row_inserted (XtmProcessTreeModel *treemodel, GtkTreePath
 	/* Find the previous sibling at the same level to preserve sorting order */
 	link->tree = g_node_insert_data_after (found.parent, find_sibling (found.parent, link->list), link);
 
-	/* 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 (link->list), g_sequence_get_end_iter (treemodel->list),
-			do_path, gtk_tree_path_next);
-
 	/* Signal the new item */
 	s_iter.user_data = link->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