1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-01-02 14:17:07 +01:00

Move menu handling functions out of class AudacityProject

This commit is contained in:
Paul Licameli
2017-08-20 00:16:22 -04:00
parent 3ed43a9f12
commit 9481587fa8
30 changed files with 2949 additions and 1913 deletions

View File

@@ -730,18 +730,18 @@ bool MacroCommands::ApplyEffectCommand(
{
if( plug->GetPluginType() == PluginTypeAudacityCommand )
// and apply the effect...
res = project->DoAudacityCommand(ID,
res = GetMenuCommandHandler(*project).DoAudacityCommand(ID,
Context,
AudacityProject::OnEffectFlags::kConfigured |
AudacityProject::OnEffectFlags::kSkipState |
AudacityProject::OnEffectFlags::kDontRepeatLast);
MenuCommandHandler::OnEffectFlags::kConfigured |
MenuCommandHandler::OnEffectFlags::kSkipState |
MenuCommandHandler::OnEffectFlags::kDontRepeatLast);
else
// and apply the effect...
res = project->DoEffect(ID,
res = GetMenuCommandHandler(*project).DoEffect(ID,
Context,
AudacityProject::OnEffectFlags::kConfigured |
AudacityProject::OnEffectFlags::kSkipState |
AudacityProject::OnEffectFlags::kDontRepeatLast);
MenuCommandHandler::OnEffectFlags::kConfigured |
MenuCommandHandler::OnEffectFlags::kSkipState |
MenuCommandHandler::OnEffectFlags::kDontRepeatLast);
}
return res;
@@ -802,7 +802,7 @@ bool MacroCommands::ApplyCommandInBatchMode( const wxString &friendlyCommand,
{
AudacityProject *project = GetActiveProject();
// Recalc flags and enable items that may have become enabled.
project->UpdateMenus(false);
GetMenuCommandHandler(*project).UpdateMenus(*project, false);
// enter batch mode...
bool prevShowMode = project->GetShowId3Dialog();
project->mBatchMode++;