mirror of
https://github.com/cookiengineer/audacity
synced 2025-07-03 22:19:07 +02:00
Case insensitive command names.
This commit is contained in:
parent
123348630a
commit
7dc36eeabf
@ -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
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
@ -151,9 +151,7 @@ extern void * nyq_make_opaque_string( int size, unsigned char *src );
|
|||||||
void * ExecForLisp( char * pIn ){
|
void * ExecForLisp( char * pIn ){
|
||||||
wxString Str1( pIn );
|
wxString Str1( pIn );
|
||||||
wxString Str2;
|
wxString Str2;
|
||||||
Str2 = "Foo Bar Halleluya";
|
|
||||||
ExecCommand2( &Str1, &Str2 );
|
ExecCommand2( &Str1, &Str2 );
|
||||||
//Str2 = Str1;
|
|
||||||
|
|
||||||
// wxString provides a const char *
|
// wxString provides a const char *
|
||||||
const char * pStr = static_cast<const char*>(Str2);
|
const char * pStr = static_cast<const char*>(Str2);
|
||||||
|
@ -943,7 +943,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();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user