GNOME Bugzilla – Bug 778537
ActionBar need placeholder
Last modified: 2018-03-26 15:58:06 UTC
Create GtkActionBar container. Add any child widget. Say GtkButton. Get massage "ActionBar needs placeholder to insert a child widget." If I leave ActionBar without child widget, receive pointer via GtkBuilder and add child widget manually everything is fine. Why does Glad want placeholder? Would it be possible to add a reference to API in situation like this. Thanks.
Hi, Sorry for the late reply to this. First, the gray widgets in the Glade UI, where you can drop and add widgets, are what we call "placeholders" (the placeholders also sometimes get serialized into the XML output, but these are purely there only to help Glade remember how a project is setup while editing, things like "how many slots does this box currently have"). I tried your reproduction steps and yes I can reproduce this, which is sad because this originally worked when we landed the action bar support but has regressed without any code changes on Glade's side. I strongly suspect that GTK+ has made a subtle API incompatible change, it may be that the placeholders we add do not return the actionbar anymore when gtk_widget_get_parent() is called on them (in Glade we have always strongly relied on a consistent widget hierarchy, which is to say that the parent of a widget is always expected to be the container which you added that widget to). Probably Glade's actionbar adapters have to be updated to support the new actionbar behavior, unfortunately.
Thank you, Tristan. I am glad the problem was identified. Let me know if I can help in some way. Best. -Pavlo.
Created attachment 351777 [details] [review] Seems to fix the issue Please review this patch, it provides an explanation of the bug and seems to fix the issue. I'm no glade expert though, so it needs review. Cheers !
There are still issues with the packing position of the child, it's set to zero all the time. It needs more investigation.
*** Bug 769966 has been marked as a duplicate of this bug. ***
I added some additional fixes, it's available on GitLab. clone: https://arnaud-preevio@gitlab.com/arnaud-preevio/glade.git branch: art/glade-3-20/gtkactionbar Cheers.
Branch name changed, is now 3.20/gtkactionbar. Based on the tag 3.20, so it's now easy to move the changes around.
Created attachment 369234 [details] [review] Placeholder fix Still have placeholder issue: Glade-3.20.2. The attached patch should fix it but I haven't tested it yet.
Please disregard previous patch. It doesn't solve this issue. Glade compiles and run as normal but issue still there. Branch 3-20.
-- GitLab Migration Automatic Message -- This bug has been migrated to GNOME's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/glade/issues/257.