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 729915 - Popopver does not follow relative widget to find action groups
Popopver does not follow relative widget to find action groups
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: Widget: GtkPopover
3.12.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2014-05-10 12:38 UTC by Jamie Nicol
Modified: 2014-05-12 20:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Example showing problem (2.03 KB, text/x-python)
2014-05-10 12:40 UTC, Jamie Nicol
  Details
GtkPopover: inherit actions from the relative_to widget (1.41 KB, patch)
2014-05-12 20:27 UTC, Owen Taylor
committed Details | Review

Description Jamie Nicol 2014-05-10 12:38:35 UTC
My GtkPopover menu can find actions from the "app" and "win" action groups fine, as well as actions from a custom action group I have inserted into the popover with gtk_widget_insert_action_group().

Custom action groups inserted into the widget the popover is attached to do not work however, my menu item remains greyed-out.

Custom action groups inserted into the GtkApplicationWindow work fine.

from irc:
desrt: looks like in the case of popovers, the relative widget is not being properly followed to find action groups
i think this might have something to do with the way popovers get reparented up to the toplevel window
indeed best to talk to mclasen about this
something to test might be to install your extra actiongroup on the GtkApplicationWindow
i bet that works...

OS: arch linux
GTK version: 3.12.1-2
Comment 1 Jamie Nicol 2014-05-10 12:40:23 UTC
Created attachment 276278 [details]
Example showing problem
Comment 2 Owen Taylor 2014-05-12 20:27:35 UTC
Created attachment 276404 [details] [review]
GtkPopover: inherit actions from the relative_to widget

Make the relative_to widget the parent for a GtkPopover's
GtkActionGroup. This, for example, makes the menu model of a
GtkMenuButton find action groups attached to the button.
Comment 3 Matthias Clasen 2014-05-12 20:29:12 UTC
Review of attachment 276404 [details] [review]:

looks good to me, thanks !
Comment 4 Owen Taylor 2014-05-12 20:42:42 UTC
Will cherry-pick to the 3.12 branch as well.

Attachment 276404 [details] pushed as 8f9e50d - GtkPopover: inherit actions from the relative_to widget