GNOME Bugzilla – Bug 657793
Support NULL sibling in gtk_grid_attach_next_to
Last modified: 2011-09-03 00:07:46 UTC
It would be nice if I could pass NULL for sibling in gtk_grid_attach_next_to, meaning attach at the beginning or end of the current contents. This isn't perfectly defined. As if you specify e.g. BOTTOM you don't know which column is meant. However, if we just assume the first column you would be fine. Having this means you can e.g. do: GtkWidget *last = NULL; for (i = 0; i < LEN; i++) { child = ... gtk_grid_attach_next_to (grid, child, last, GTK_POS_BOTTOM, CHILD_WIDTH, CHILD_HEIGHT); ... last = child; } You can do a similar loop just with gtk_container_add, but then you can't specify the span of the child.
The following fix has been pushed: ef4690d GtkGrid: make attaching more flexible
Created attachment 195547 [details] [review] GtkGrid: make attaching more flexible Allow to attach children at either end of row/column 0. Proposed by Alex Larsson.