We have a Mac main menu item which has been working for years but after recent JUCE updates it is now never enabled, even though we are setting it to be active in the
ApplicationCommandTarget::getCommandInfo (CommandID commandID, ApplicationCommandInfo& result) callback:
case preferences: result.setInfo ("Preferences", "Load the preferences panel", "Category Name", 0); result.setTicked (false); result.setActive (true); result.addDefaultKeypress (',', ModifierKeys::commandModifier); break;
This is how we add the item (elsewhere in our codebase):
PopupMenu extraAppleMenuItems; extraAppleMenuItems.addCommandItem (&commandManager, preferences); MenuBarModel::setMacMainMenu (this, &extraAppleMenuItems);
To be clear - the menu item shows up, but it is greyed out. All other menu items (in non-Apple
Edit, etc menus) work as normal.
Could it be something to do with this recent change?
In particular, my tests indicate that the
validateMenuItem() function in
juce_mac_MainMenu.mm is never called for this Mac main menu item, but is called for all other menu items.