Gimp.Procedure.prototype.add_menu_path
function add_menu_path(menu_path: String): void {
// Gjs wrapper for gimp_procedure_add_menu_path()
}
Adds a menu path to the procedure. Only procedures which have a menu label can add a menu path.
Menu paths are untranslated paths to known menus and submenus with the syntax `<Prefix>/Path/To/Submenu`, for example `<Image>/Layer/Transform`. GIMP will localize these. Nevertheless you should localize unknown parts of the path. For instance, say you want to create procedure to create customized layers and add a `Create` submenu which you want to localize from your plug-in with gettext. You could call:
```C path = g_build_path ("/", "<Image>/Layer", _("Create"), NULL); gimp_procedure_add_menu_path (procedure, path); g_free (path); ```
See also: Gimp.PlugIn.prototype.add_menu_branch.
GIMP menus also have a concept of named section. For instance, say you are creating a plug-in which you want to show next to the "Export", "Export As" plug-ins in the File menu. You would add it to the menu path "File/[Export]". If you actually wanted to create a submenu called "[Export]" (with square brackets), double the brackets: "File/[[Export]]"
See also: https://gitlab.gnome.org/GNOME/gimp/-/blob/master/menus/image-menu.ui.in.in
This function will place your procedure to the bottom of the selected path or section. Order is not assured relatively to other plug-ins.
Since 3.0
- menu_path
The procedure's additional menu path.