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

Bug1119: Windows menu on Mac should list all project names...

... Reimplemented without making dependency cycles.

Project and ProjectFileManager publish events for change of active project or
change of a project title.

WindowMenus.cpp can listen for those events, so that it can update the menu
appropriately.  So it's all done nonintrusively in the rest of the code.
This commit is contained in:
Paul Licameli
2020-04-21 12:26:37 -04:00
parent 3348e2fecd
commit c3d0d0370b
5 changed files with 112 additions and 2 deletions

View File

@@ -19,6 +19,7 @@
#include <wx/frame.h>
wxDEFINE_EVENT(EVT_TRACK_PANEL_TIMER, wxCommandEvent);
wxDEFINE_EVENT(EVT_PROJECT_ACTIVATION, wxCommandEvent);
size_t AllProjects::size() const
{
@@ -111,6 +112,7 @@ void SetActiveProject(AudacityProject * project)
if ( gActiveProject != project ) {
gActiveProject = project;
KeyboardCapture::Capture( nullptr );
wxTheApp->QueueEvent( safenew wxCommandEvent{ EVT_PROJECT_ACTIVATION } );
}
wxTheApp->SetTopWindow( FindProjectFrame( project ) );
}