Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Mon, 04 Mar 2013 20:56:35 UTC Commit: b38142adbe214ad598e669e797473904d389e1dd https://github.com/geany/geany-plugins/commit/b38142adbe214ad598e669e7974739...
Log Message: ----------- TreeBrowser: Fix gtk_tree_store_iter_clear_nodes()
The removing a node, no need to manually delete its children. Also, the code used to try removing the child nodes with children twice, leading to runtime assertions failures.
Modified Paths: -------------- treebrowser/src/treebrowser.c
Modified: treebrowser/src/treebrowser.c 7 files changed, 3 insertions(+), 4 deletions(-) =================================================================== @@ -791,11 +791,10 @@ enum { GtkTreeIter i;
- while (gtk_tree_model_iter_children(GTK_TREE_MODEL(treestore), &i, iter)) + if (gtk_tree_model_iter_children(GTK_TREE_MODEL(treestore), &i, iter)) { - if (gtk_tree_model_iter_has_child(GTK_TREE_MODEL(treestore), &i)) - gtk_tree_store_iter_clear_nodes(&i, TRUE); - gtk_tree_store_remove(GTK_TREE_STORE(treestore), &i); + while (gtk_tree_store_remove(GTK_TREE_STORE(treestore), &i)) + /* do nothing */; } if (delete_root) gtk_tree_store_remove(GTK_TREE_STORE(treestore), iter);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).