After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 626258 - N-ary Trees - 'nodes' can be inserted before and after - 'data', only before
N-ary Trees - 'nodes' can be inserted before and after - 'data', only before
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: general
1.2.x
Other Linux
: Normal enhancement
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2010-08-06 17:40 UTC by John Navratil
Modified: 2012-01-25 04:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
inserts a new #GNode after the given sibling (2.26 KB, patch)
2012-01-21 16:52 UTC, Ravi Sankar Guntur
accepted-commit_now Details | Review
Macro to insert a new GNode "after" the given sibling. (2.25 KB, patch)
2012-01-25 04:41 UTC, Matthias Clasen
committed Details | Review

Description John Navratil 2010-08-06 17:40:50 UTC
In the API for N-ary trees, methods are provided to insert a GNode at a position, or before or after another GNode.  (g_node_insert, g_node_insert_before, g_node_insert_after).

If one wishes to insert data without creating the GNode directly, the available methods are g_node_data_insert and g_node_insert_data_before; no "...after".

Consistency would suggest it should be provided.  Should it?
Comment 1 Matthias Clasen 2010-08-13 04:30:35 UTC
I guess, yeah. Consistency would suggest so...
Comment 2 Ravi Sankar Guntur 2012-01-21 16:52:53 UTC
Created attachment 205765 [details] [review]
inserts a new #GNode after the given sibling

please review the patch.
Comment 3 Matthias Clasen 2012-01-21 22:10:17 UTC
Review of attachment 205765 [details] [review]:

The patch looks fine, thanks
Comment 4 Matthias Clasen 2012-01-25 04:41:33 UTC
The following fix has been pushed:
e9725d1 Macro to insert a new GNode "after" the given sibling.
Comment 5 Matthias Clasen 2012-01-25 04:41:37 UTC
Created attachment 206053 [details] [review]
Macro to insert a new GNode "after" the given sibling.

https://bugzilla.gnome.org/show_bug.cgi?id=626258

Signed-off-by: Ravi Sankar Guntur <ravi.g@samsung.com>