On Mon, Sep 30, 2013 at 1:53 PM, Tristan Van Berkom <tristanvb openismus com> wrote:
o gtk_flow_box_insert() or gtk_container_add() add an intermediate
child, breaking the logical widget hierarchy.
For most of the history of GTK+, one can rely on the logical
hierarchy being preserved, i.e. adding a widget to a parent will
always pass the 'gtk_widget_get_parent (child) == parent' check.
Honestly I would be more comfortable with a policy where only a
specific child type can be added to the flowbox. The GtkToolBar
and GtkMenuShell apis are clearer by limiting what types of
children can be added, without breaking the logical widget
hierarchy.
In any case, I think this is worth at least a mention in
the gtk_container_add() documentation.This is following recent precedents - we are now automatically inserting viewports between a scrolled window and its child, and GtkListBox is automatically wrapping its children in GtkListBoxRow intermediaries.
I agree that we should add some hints about this to the the gtk_container_add docs.