mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 15:49:36 +02:00
Remove duplicate commands from 'Select Commands' dialog.
- Removed special commands that now have menu equivalents. - Removed duplicated commands in the list, e.g. from multiple instances of Nyquist effects.
This commit is contained in:
parent
bf03fd874b
commit
ef63f716e3
@ -73,6 +73,8 @@ static const std::pair<const wxChar*, const wxChar*> SpecialCommands[] = {
|
||||
/* i18n-hint: FLAC names an audio file format */
|
||||
{ XO("Export as FLAC"), wxT("ExportFLAC") },
|
||||
|
||||
// MP3 OGG and WAV already handled by menu items.
|
||||
#if 0
|
||||
/* i18n-hint: MP3 names an audio file format */
|
||||
{ XO("Export as MP3"), wxT("ExportMP3") },
|
||||
|
||||
@ -81,6 +83,7 @@ static const std::pair<const wxChar*, const wxChar*> SpecialCommands[] = {
|
||||
|
||||
/* i18n-hint: WAV names an audio file format */
|
||||
{ XO("Export as WAV"), wxT("ExportWAV") },
|
||||
#endif
|
||||
};
|
||||
// end CLEANSPEECH remnant
|
||||
|
||||
@ -325,12 +328,19 @@ auto BatchCommands::GetAllCommands() -> CommandNameVector
|
||||
{ return std::get<0>(a) < std::get<0>(b); }
|
||||
);
|
||||
|
||||
|
||||
|
||||
return commands;
|
||||
// JKC: Gave up on trying to use std::unique on this.
|
||||
CommandNameVector uniqueCommands;
|
||||
unsigned size = commands.size();
|
||||
wxString oldName = "";
|
||||
for( unsigned i = 0; i < size; ++i )
|
||||
{
|
||||
if( std::get<0>( commands[i] ) != oldName )
|
||||
uniqueCommands.push_back( commands[i] );
|
||||
oldName = std::get<0>( commands[i] );
|
||||
}
|
||||
return uniqueCommands;
|
||||
}
|
||||
|
||||
|
||||
wxString BatchCommands::GetCurrentParamsFor(const wxString & command)
|
||||
{
|
||||
const PluginID & ID = EffectManager::Get().GetEffectByIdentifier(command);
|
||||
|
Loading…
x
Reference in New Issue
Block a user