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 683632 - main-toolbar: Add an add_widget method
main-toolbar: Add an add_widget method
Status: RESOLVED FIXED
Product: libgd
Classification: Platform
Component: general
unspecified
Other All
: Normal normal
: ---
Assigned To: libgd maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-09-08 17:18 UTC by Stefano Facchini
Modified: 2012-09-11 07:35 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
main-toolbar: Add an add_widget method (2.08 KB, patch)
2012-09-08 17:18 UTC, Stefano Facchini
committed Details | Review
main-toolbar: introduce a "pack-type" child property (9.21 KB, patch)
2012-09-10 12:24 UTC, Stefano Facchini
rejected Details | Review

Description Stefano Facchini 2012-09-08 17:18:10 UTC
It can be useful to add e.g. a button box to the toolbar
Comment 1 Stefano Facchini 2012-09-08 17:18:13 UTC
Created attachment 223817 [details] [review]
main-toolbar: Add an add_widget method
Comment 2 Cosimo Cecchi 2012-09-10 05:09:53 UTC
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.
Comment 3 Stefano Facchini 2012-09-10 12:24:11 UTC
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 :(
Comment 4 Cosimo Cecchi 2012-09-10 21:51:50 UTC
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 :)
Comment 5 Stefano Facchini 2012-09-11 07:35:37 UTC
Attachment 223817 [details] pushed as f5cc816 - main-toolbar: Add an add_widget method