Migrating LibBonobo menus to GAction

During GNOME 2 days the context menu of the applet was based on the BonoboUiVerb class. These old menu verb definitions have been removed and should be replaced by the GAction interface family of objects.

Previous versions of this migration guide suggested to migrate to the family of GtkActionGroup classes. Since Gtk+ 3.10 these are deprecated and with the change of the Panel Applet Library API to version 5.0 the panel_applet_setup_menu family of functions now accept the GActionGroup interface and its related classes.

If the applet that is being ports had a context menu then it should contain code that looks similar to the following listing:
1
The new code instead looks like this:
1
This change also means that the callbacks must be changed to match the GAction API: Old callback looked like this:
1
The new version should have the following signature:
1

Additionally you should use GtkBuilder to define a GMenuModel in XML and use the panel_applet_setup_menu family of functions to setup the menu. See Using a context menu for more details. For more information about using the GMenu and GAction APIs please refer to the GIO Reference Manual.