GNOME Bugzilla – Bug 700257
Port to GtkMenuTrackerItem
Last modified: 2013-05-13 22:35:13 UTC
We did half of this a while ago when we ported to GtkMenuTracker. But Ryan had another trick up his sleeve. Here's the final API we should be porting to. This is a giant set of cleanups that punt a lot of the complex code into C and into Ryan's hand to maintain, while adding support for a lot of GModelMenu features, some new, some we just didn't work on before. This patch set makes me really happy.
Created attachment 244091 [details] [review] Update copy/paste code from upstream This includes a rename from the G* namespace to the Gtk* one, which will help us with introspecting this code. Note that this removes some of the custom code we added to GActionMuxer to relay event times to the remote action group. We'll add this back soon.
Created attachment 244092 [details] [review] gtkactionmuxer: Reintroduce the passing of event timestamps This is a hack we have in our local fork as compared to upstream; work on a generic "hook" system in here is ongoing, but until then, this is the easiest way to do it.
Created attachment 244093 [details] [review] Add a separate ShellMenu GIR file for introspecting the copy/paste code We'll need some of these pieces to be introspectable when we port to GtkMenuTrackerItem. Due to technical limitations in introspection, we can't put Gtk-prefixed items in the shell namespace, so add them to a new introspection library instead.
Created attachment 244094 [details] [review] popupMenu: Split the remote menu code into its own module This is getting sufficiently complicated to deserve its own place.
Created attachment 244095 [details] [review] remoteMenu: Port to GtkMenuTrackerItem This pulls in new upstream API that Ryan will maintain, removing code on our side. Currently, our implementation of submenus will be gone, but this will be fixed in a few commits.
Created attachment 244096 [details] [review] remoteMenu: Add support for extended accessibility roles
Created attachment 244097 [details] [review] remoteMenu: Allow separator items to have labels This fixes a regression with remote menus where sections have labels, like gnome-documents.
Created attachment 244098 [details] [review] remoteMenu: Split the tracking code out of RemoteMenu The tracking logic will be used to more easily implement submenus.
Created attachment 244099 [details] [review] remoteMenu: Add support for submenu items Wrap new GtkMenuTracker API that adds an easy way to bind to tracker items, and use it to add back support for submenus. This also adds support for a submenu feature that we didn't have support for before, action namespaces.
Created attachment 244100 [details] [review] remoteMenu: Add support for the submenu show requests This lets clients defer submenus showing until their submenu model is ready.
Created attachment 244101 [details] [review] remoteMenu: Minor code cleanups
Created attachment 244118 [details] [review] remoteMenu: Port to GtkMenuTrackerItem This pulls in new upstream API that Ryan will maintain, removing code on our side. Currently, our implementation of submenus will be gone, but this will be fixed in a few commits.
Created attachment 244119 [details] [review] remoteMenu: Allow separator items to have labels This fixes a regression with remote menus where sections have labels, like gnome-documents.
Created attachment 244120 [details] [review] remoteMenu: Add support for submenu items Wrap new GtkMenuTracker API that adds an easy way to bind to tracker items, and use it to add back support for submenus. This also adds support for a submenu feature that we didn't have support for before, action namespaces.
I reviewed the whole stack off splinter, and all my comments were addressed in IRC. Also, it works fine in my testing. For me, this is good for master.
Attachment 244091 [details] pushed as 10e857c - Update copy/paste code from upstream Attachment 244092 [details] pushed as a6a2cea - gtkactionmuxer: Reintroduce the passing of event timestamps Attachment 244093 [details] pushed as bfd1cc9 - Add a separate ShellMenu GIR file for introspecting the copy/paste code Attachment 244094 [details] pushed as 5803f69 - popupMenu: Split the remote menu code into its own module Attachment 244096 [details] pushed as 3075f3c - remoteMenu: Add support for extended accessibility roles Attachment 244098 [details] pushed as 026f61f - remoteMenu: Split the tracking code out of RemoteMenu Attachment 244100 [details] pushed as c698dee - remoteMenu: Add support for the submenu show requests Attachment 244101 [details] pushed as ff3c20d - remoteMenu: Minor code cleanups Attachment 244118 [details] pushed as 419f2dc - remoteMenu: Port to GtkMenuTrackerItem Attachment 244119 [details] pushed as af063dc - remoteMenu: Allow separator items to have labels Attachment 244120 [details] pushed as 8891a41 - remoteMenu: Add support for submenu items