1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-08 12:42:03 +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

@@ -461,7 +461,7 @@ void ApplyMacroDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
auto success = GuardedCall< bool >( [&] {
project->Import(files[i]);
project->ZoomAfterImport(nullptr);
project->OnSelectAll(*project);
GetMenuCommandHandler(*project).OnSelectAll(*project);
if (!mMacroCommands.ApplyMacro(mCatalog))
return false;
@@ -476,6 +476,7 @@ void ApplyMacroDialog::OnApplyToFiles(wxCommandEvent & WXUNUSED(event))
project->ResetProjectToEmpty();
}
Show();
Raise();
}
@@ -747,7 +748,8 @@ void MacrosWindow::AddItem(const wxString &Action, const wxString &Params)
void MacrosWindow::UpdateMenus()
{
// OK even on mac, as dialog is modal.
GetActiveProject()->RebuildMenuBar();
auto p = GetActiveProject();
GetMenuCommandHandler(*p).RebuildMenuBar(*p);
}
void MacrosWindow::UpdateDisplay( bool bExpanded )