1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

Clarifying name change in CommandManager & simplify PluginMenus...

... The purpose of the boolean field in command entries was to exclude certain
menu commands from being steps in macros, because they require user interaction.

Effects are never meant to be excluded, even though they normally have dialogs,
but in the context of macro execution, the parameters are supplied by other
means.
This commit is contained in:
Paul Licameli
2019-12-12 13:37:33 -05:00
parent db96d1ab10
commit 5cbafc6086
5 changed files with 33 additions and 53 deletions

View File

@@ -320,17 +320,17 @@ MacroCommandsCatalog::MacroCommandsCatalog( const AudacityProject *project )
auto &manager = CommandManager::Get( *project );
wxArrayString mLabels;
CommandIDs mNames;
std::vector<bool> vHasDialog;
std::vector<bool> vExcludeFromMacros;
mLabels.clear();
mNames.clear();
manager.GetAllCommandLabels(mLabels, vHasDialog, true);
manager.GetAllCommandLabels(mLabels, vExcludeFromMacros, true);
manager.GetAllCommandNames(mNames, true);
const bool english = wxGetLocale()->GetCanonicalName().StartsWith(wxT("en"));
for(size_t i=0; i<mNames.size(); i++) {
wxString label = mLabels[i];
if( !vHasDialog[i] ){
if( !vExcludeFromMacros[i] ){
wxString label = mLabels[i];
label.Replace( "&", "" );
bool suffix;
if (!english)