mirror of
https://github.com/cookiengineer/audacity
synced 2025-10-19 09:01:15 +02:00
Do not require AudacityApp.h when using global file history
This commit is contained in:
@@ -81,7 +81,7 @@ void DoExport
|
||||
}
|
||||
else
|
||||
{
|
||||
wxGetApp().AddFileToHistory(filename);
|
||||
FileHistory::Global().AddFileToHistory(filename);
|
||||
// We're in batch mode, the file does not exist already.
|
||||
// We really can proceed without prompting.
|
||||
int nChannels = MacroCommands::IsMono() ? 1 : 2;
|
||||
@@ -131,7 +131,7 @@ AudacityProject *DoImportMIDI(
|
||||
pProject->ZoomAfterImport(pTrack);
|
||||
pNewProject = nullptr;
|
||||
|
||||
wxGetApp().AddFileToHistory(fileName);
|
||||
FileHistory::Global().AddFileToHistory(fileName);
|
||||
|
||||
return pProject;
|
||||
}
|
||||
@@ -597,8 +597,9 @@ MenuTable::BaseItemPtr FileMenu( AudacityProject& )
|
||||
,
|
||||
Special( [](AudacityProject &, wxMenu &theMenu){
|
||||
// Recent Files and Recent Projects menus
|
||||
wxGetApp().GetRecentFiles()->UseMenu( &theMenu );
|
||||
wxGetApp().GetRecentFiles()->AddFilesToMenu( &theMenu );
|
||||
auto &history = FileHistory::Global();
|
||||
history.UseMenu( &theMenu );
|
||||
history.AddFilesToMenu( &theMenu );
|
||||
|
||||
wxWeakRef<wxMenu> recentFilesMenu{ &theMenu };
|
||||
wxTheApp->CallAfter( [=] {
|
||||
|
Reference in New Issue
Block a user