Quote
James
_FavRenAdd_ModMenu{
# add another option to Favorites menu
setmenu(Favorites,macro,"Rename-Add",_FavRenAdd_RenameAdd,-1);
}
$OnInit=$OnInit."_FavRenAdd_ModMenu;";
I am seeing no change in the Favorites menu. Can someone point out my mistake and get me headed in the right direction?
The favorites menu you want to add an item to is called
F&avorites, not simply Favorites! The ampersand (&) in the menu name indicates that the letter following the ampersand is an access key for this item.
Tip: When you want to modify a default menu, first make sure how this menu is exactly called. The first place to look at is the default menus.cfg file which is placed in \K-Meleon\defaults\settings\ (Open Edit > Configuration > Macros and go up one directory level. Then navigate down to defaults\settings.)
Note: As Alain mentioned, the favorites plugin is writing into this menu. That for, you cannot do everything with the favorites menu that you can do with other menus:
1) Something like:
setmenu(
F&avorites,macro,"Rename-Add",_FavRenAdd_RenameAdd,
-1);
may not work as intended. Better specify a true position:
setmenu(
F&avorites,macro,"Rename-Add",_FavRenAdd_RenameAdd,
1);
2) The favorites menu does only exist when the favorites plugin is loaded. You should catch this case in order to avoid writing to a non-existant menu:
$kFavorites==true?setmenu(
F&avorites,macro,"Rename-Add",_FavRenAdd_RenameAdd,
1):0;
There are other global variables like $kFavorites for the other plugins. They're all defined in main.kmm.