[Github-comments] [geany/geany] Rpg sidebar tree (see #259) (#1813)
Thomas Martitz
notifications at xxxxx
Thu Aug 1 13:40:43 UTC 2019
kugel- commented on this pull request.
> +/*
+ * Recursively copy all nodes from old parent to new parent
+ * */
+static void tree_copy_recursive(GtkTreeIter *parent_old, GtkTreeIter *parent_new)
+{
+ gint i;
+ GtkTreeIter child;
+ GtkTreeIter parent;
+ GtkTreePath *path;
+ GtkTreeModel *model = GTK_TREE_MODEL(store_openfiles);
+
+ path = gtk_tree_model_get_path(model, parent_old);
+ gtk_tree_path_free(path);
+ tree_copy_item(&parent, parent_old, parent_new);
+ i = gtk_tree_model_iter_n_children(model, parent_old) - 1;
+ while (i >= 0 && gtk_tree_model_iter_nth_child(model, &child, parent_old, i))
The original author probably copied the loop from `on_openfiles_document_action_apply()`. I changed it your suggestion which is a more natual fit.
--
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/1813#discussion_r309701724
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20190801/1e6f89f1/attachment.html>
More information about the Github-comments
mailing list