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 760312 - gtkapplication: export windows directly as action groups
gtkapplication: export windows directly as action groups
Status: RESOLVED NOTABUG
Product: gtk+
Classification: Platform
Component: .General
unspecified
Other All
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-01-08 10:15 UTC by Lars Karlitski
Modified: 2016-01-15 08:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gtkapplication: export windows directly as action groups (3.10 KB, patch)
2016-01-08 10:15 UTC, Lars Karlitski
needs-work Details | Review

Description Lars Karlitski 2016-01-08 10:15:33 UTC
GtkApplicationWindow is a GActionGroup. Export the window directly
instead of the GSimpleActionGroup contained in them.

This allows overriding methods from the GActionGroup interface in
GtkApplicationWindow subclasses.
Comment 1 Lars Karlitski 2016-01-08 10:15:37 UTC
Created attachment 318472 [details] [review]
gtkapplication: export windows directly as action groups
Comment 2 Allison Karlitskaya (desrt) 2016-01-08 10:26:12 UTC
Review of attachment 318472 [details] [review]:

I don't think that this will work.

The GSimpleActionGroup inside of the window is actually a subclass which also implements GRemoteActionGroupInterface.  This is necessary to ensure that external actions forward the timestamp correctly.  GtkApplicationWindow will not correctly pass this information on to the internal group.

Can you also provide a bit of context about the exact usecase that motivates this?  I'm suspicious...
Comment 3 Lars Karlitski 2016-01-15 08:49:28 UTC
(In reply to Allison Ryan Lortie (desrt) from comment #2)
> Review of attachment 318472 [details] [review] [review]:
> Can you also provide a bit of context about the exact usecase that motivates
> this?  I'm suspicious...

You're right. Thanks for catching this. I was trying to export an internal action group under a prefix by overriding the GActionGroup vfuncs from GtkApplicationWindow.

As we discussed on IRC, a working fix for this will be more elaborate and probably involves making GtkApplicationWindow implement GRemoteActionGroup. That work is out of scope for this bug though.