GNOME Bugzilla – Bug 683632
main-toolbar: Add an add_widget method
Last modified: 2012-09-11 07:35:40 UTC
It can be useful to add e.g. a button box to the toolbar
Created attachment 223817 [details] [review] main-toolbar: Add an add_widget method
Review of attachment 223817 [details] [review]: The patch looks fine, but I think I would rather have a "pack-type" GtkContainer child property (like GtkBox does), override the add method from GtkContainerClass in class_init and then have clients use gtk_container_add/gtk_container_add_with_properties.
Created attachment 223904 [details] [review] main-toolbar: introduce a "pack-type" child property This should roughly be what you asked for, but now of course GtkGrid complains that it doesn't have a "pack-type" child property :(
I spoke with Matthias this morning about it, and it seems that what I was suggesting is actually not possible for how widget hierarchies work right now in GTK. Containers can't use child properties to refer to a child which is not a direct descendant, not even if you use e.g. gtk_widget_push_composite_child() to mark it as "internal". Sorry for the useless code I made you write, it looks like we want your first patch after all :)
Attachment 223817 [details] pushed as f5cc816 - main-toolbar: Add an add_widget method