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

Accessors to get the project window...

... as a preparation for splitting up class AudacityProject.

Use ProjectWindow as an alias for AudacityProject, and fetch it from the
project with a static member function, where certain of its services are used;
pretending they are not the same class.

Use global accessor functions to get wxFrame from the project where only
wxFrame's member functions are needed, so there will be less dependency on
ProjectWindow when it becomes a distinct class.
This commit is contained in:
Paul Licameli
2019-05-28 13:12:56 -04:00
parent 02afcbca8c
commit 82663892dc
49 changed files with 451 additions and 296 deletions

View File

@@ -597,6 +597,7 @@ void DependencyDialog::SaveFutureActionChoice()
bool ShowDependencyDialogIfNeeded(AudacityProject *project,
bool isSaving)
{
auto pWindow = ProjectWindow::Find( project );
AliasedFileArray aliasedFiles;
FindDependencies(project, aliasedFiles);
@@ -611,7 +612,7 @@ you may lose data.");
AudacityMessageBox(msg,
_("Dependency Check"),
wxOK | wxICON_INFORMATION,
project);
pWindow);
}
return true; // Nothing to do.
}
@@ -633,7 +634,7 @@ you may lose data.");
return true;
}
DependencyDialog dlog(project, -1, project, aliasedFiles, isSaving);
DependencyDialog dlog(pWindow, -1, project, aliasedFiles, isSaving);
int returnCode = dlog.ShowModal();
if (returnCode == wxID_CANCEL)
return false;