Index: doc-rnd/gpmi/packages/actions.html =================================================================== --- doc-rnd/gpmi/packages/actions.html (revision 1527) +++ doc-rnd/gpmi/packages/actions.html (revision 1528) @@ -82,16 +82,33 @@ which is called after the gui finished setting up.

The first argument of create_menu() is the menu path. The path is a list -of visible menu names separated by slashes (e.g. "File/Save as..." means -"File" menu, "Save as..." submenu). By convention, scripts should -create new menu items under the "Plugins/" menu. +of visible menu names separated by slashes (e.g. "/main_menu/File/Save as..." means +"File" menu, "Save as..." submenu).

+Paths are interpreted as menu paths, which are a slightly simplified version +of lihata paths found in menu.lht. Basically there's a main directory directly +under root that determines the type of the menu: +

+

+

+The simplification compared to lihata paths is that only menu and submenu +names are on the path, so lihata nodes like "li:submenu" should be ignored. +In other words, the path represents how the menus can be reached from the user +interface, plus a "main menu type prefix" as discussed above. +

+By convention, scripts should +create new menu items under the "/main_menu/Plugins/" menu. +

The following example lua script registers a new menu item

 PkgLoad("pcb-rnd-gpmi/actions", 0);
 
 function ev_gui_init(argc, argv)
-	create_menu("Plugins/foo", "undo()", "o", "Ctrl<Key>o", "tooltip for foo");
+	create_menu("/main_menu/Plugins/foo", "undo()", "o", "Ctrl<Key>o", "tooltip for foo");
 end
 
 -- register and bind action