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 778537 - ActionBar need placeholder
ActionBar need placeholder
Status: RESOLVED OBSOLETE
Product: glade
Classification: Applications
Component: user interface
3.20.x
Other Linux
: Normal normal
: ---
Assigned To: Glade 3 Maintainers
Glade 3 Maintainers
: 769966 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2017-02-12 17:28 UTC by Pavlo Solntsev
Modified: 2018-03-26 15:58 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Seems to fix the issue (1.36 KB, patch)
2017-05-13 12:03 UTC, Arnaud Rebillout
none Details | Review
Placeholder fix (922 bytes, patch)
2018-03-04 01:47 UTC, Pavlo Solntsev
none Details | Review

Description Pavlo Solntsev 2017-02-12 17:28:37 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.
Comment 1 Tristan Van Berkom 2017-02-16 06:25:08 UTC
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.
Comment 2 Pavlo Solntsev 2017-02-16 13:33:16 UTC
Thank you, Tristan.

I am glad the problem was identified. Let me know if I can help in some way. 

Best.
-Pavlo.
Comment 3 Arnaud Rebillout 2017-05-13 12:03:38 UTC
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 !
Comment 4 Arnaud Rebillout 2017-05-15 05:27:50 UTC
There are still issues with the packing position of the child, it's set to zero all the time. It needs more investigation.
Comment 5 Adolfo Jayme 2017-05-23 07:11:14 UTC
*** Bug 769966 has been marked as a duplicate of this bug. ***
Comment 6 Arnaud Rebillout 2017-06-01 06:42:05 UTC
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.
Comment 7 Arnaud Rebillout 2017-08-25 01:35:50 UTC
Branch name changed, is now 3.20/gtkactionbar. Based on the tag 3.20, so it's now easy to move the changes around.
Comment 8 Pavlo Solntsev 2018-03-04 01:47:03 UTC
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.
Comment 9 Pavlo Solntsev 2018-03-06 05:21:04 UTC
Please disregard previous patch. It doesn't solve this issue. Glade compiles and run as normal but issue still there. Branch 3-20.
Comment 10 GNOME Infrastructure Team 2018-03-26 15:58:06 UTC
-- 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.