1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-03 17:19:43 +02:00

Case insensitive command names.

This commit is contained in:
James Crook 2018-02-16 22:47:36 +00:00 committed by Paul Licameli
parent e9e9ee2998
commit 859fe69a15
3 changed files with 4 additions and 4 deletions

View File

@ -651,7 +651,7 @@ bool BatchCommands::ApplyCommand(const wxString & command, const wxString & para
// Test for a special command. // Test for a special command.
// CLEANSPEECH remnant // CLEANSPEECH remnant
for( i = 0; i < sizeof(SpecialCommands)/sizeof(*SpecialCommands); ++i ) { for( i = 0; i < sizeof(SpecialCommands)/sizeof(*SpecialCommands); ++i ) {
if( command == SpecialCommands[i].second ) if( command.IsSameAs( SpecialCommands[i].second, false) )
return ApplySpecialCommand( i, command, params ); return ApplySpecialCommand( i, command, params );
} }
// end CLEANSPEECH remnant // end CLEANSPEECH remnant

View File

@ -1546,7 +1546,7 @@ bool CommandManager::HandleTextualCommand(const wxString & Str, const CommandCon
if (!entry->multi) if (!entry->multi)
{ {
// Testing against labelPrefix too allows us to call Nyquist functions by name. // Testing against labelPrefix too allows us to call Nyquist functions by name.
if( Str.IsSameAs( entry->name ) || Str.IsSameAs( entry->labelPrefix )) if( Str.IsSameAs( entry->name, false ) || Str.IsSameAs( entry->labelPrefix, false ))
{ {
return HandleCommandEntry( entry.get(), flags, mask); return HandleCommandEntry( entry.get(), flags, mask);
} }
@ -1566,7 +1566,7 @@ bool CommandManager::HandleTextualCommand(const wxString & Str, const CommandCon
const PluginDescriptor *plug = pm.GetFirstPlugin(PluginTypeEffect); const PluginDescriptor *plug = pm.GetFirstPlugin(PluginTypeEffect);
while (plug) while (plug)
{ {
if (em.GetCommandIdentifier(plug->GetID()).IsSameAs(Str)) if (em.GetCommandIdentifier(plug->GetID()).IsSameAs(Str, false))
{ {
return proj->DoEffect(plug->GetID(), context, AudacityProject::OnEffectFlags::kConfigured); return proj->DoEffect(plug->GetID(), context, AudacityProject::OnEffectFlags::kConfigured);
} }

View File

@ -951,7 +951,7 @@ const PluginID & EffectManager::GetEffectByIdentifier(const wxString & strTarget
const PluginDescriptor *plug = pm.GetFirstPlugin(PluginTypeEffect | PluginTypeAudacityCommand); const PluginDescriptor *plug = pm.GetFirstPlugin(PluginTypeEffect | PluginTypeAudacityCommand);
while (plug) while (plug)
{ {
if (GetCommandIdentifier(plug->GetID()).IsSameAs(strTarget)) if (GetCommandIdentifier(plug->GetID()).IsSameAs(strTarget, false))
{ {
return plug->GetID(); return plug->GetID();
} }