mirror of
https://github.com/cookiengineer/audacity
synced 2026-02-23 22:51:23 +01:00
Organise the occult commands in the Preferences Key View.
This commit is contained in:
@@ -419,7 +419,8 @@ CommandManager::CommandManager():
|
||||
mCurrentID(17000),
|
||||
mCurrentMenuName(COMMAND),
|
||||
mDefaultFlags(AlwaysEnabledFlag),
|
||||
mDefaultMask(AlwaysEnabledFlag)
|
||||
mDefaultMask(AlwaysEnabledFlag),
|
||||
bMakingOccultCommands( false )
|
||||
{
|
||||
mbSeparatorAllowed = false;
|
||||
}
|
||||
@@ -903,6 +904,7 @@ CommandListEntry *CommandManager::NewIdentifier(const wxString & name,
|
||||
entry->skipKeydown = (accel.Find(wxT("\tskipKeydown")) != wxNOT_FOUND);
|
||||
entry->wantKeyup = (accel.Find(wxT("\twantKeyup")) != wxNOT_FOUND) || entry->skipKeydown;
|
||||
entry->isGlobal = false;
|
||||
entry->isOccult = bMakingOccultCommands;
|
||||
|
||||
// For key bindings for commands with a list, such as effects,
|
||||
// the name in prefs is the category name plus the effect name.
|
||||
@@ -1030,6 +1032,8 @@ void CommandManager::EnableUsingFlags(CommandFlag flags, CommandMask mask)
|
||||
for(const auto &entry : mCommandList) {
|
||||
if (entry->multi && entry->index != 0)
|
||||
continue;
|
||||
if( entry->isOccult )
|
||||
continue;
|
||||
|
||||
auto combinedMask = (mask & entry->mask);
|
||||
if (combinedMask) {
|
||||
@@ -1466,6 +1470,11 @@ void CommandManager::SetDefaultFlags(CommandFlag flags, CommandMask mask)
|
||||
mDefaultMask = mask;
|
||||
}
|
||||
|
||||
void CommandManager::SetOccultCommands( bool bOccult)
|
||||
{
|
||||
bMakingOccultCommands = bOccult;
|
||||
}
|
||||
|
||||
void CommandManager::SetCommandFlags(const wxString &name,
|
||||
CommandFlag flags, CommandMask mask)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user