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:
  Show dependency tree
 
Reported: 2016-01-08 10:15 UTC by Lars Karlitski
Modified: 2016-01-15 08:49 UTC (History)
0 users

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 | Diff | 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 Lortie (desrt) (extended vacation) 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.

Note You need to log in before you can comment on or make changes to this bug.