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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user