mirror of
https://github.com/cookiengineer/audacity
synced 2025-11-21 16:37:12 +01:00
New attached structure ProjectManager handles project lifetime...
... that is, a factory function, open, close, import, undo/redo/rollback. Also the callbacks from AudioIO, which need to invoke undo history push when recording stops. It is meant as a high-level class using several of the other things attached to the project, while AudacityProject will be a low level class acting mostly as just the container of the attached structures.
This commit is contained in:
@@ -417,9 +417,10 @@ void TimerRecordDialog::OnOK(wxCommandEvent& WXUNUSED(event))
|
||||
// as its possible that they plan to free up some
|
||||
// space before the recording begins
|
||||
AudacityProject* pProject = GetActiveProject();
|
||||
auto &projectManager = ProjectManager::Get( *pProject );
|
||||
|
||||
// How many minutes do we have left on the disc?
|
||||
int iMinsLeft = pProject->GetEstimatedRecordingMinsLeftOnDisk();
|
||||
int iMinsLeft = projectManager.GetEstimatedRecordingMinsLeftOnDisk();
|
||||
|
||||
// How many minutes will this recording require?
|
||||
int iMinsRecording = m_TimeSpan_Duration.GetMinutes();
|
||||
@@ -429,9 +430,9 @@ void TimerRecordDialog::OnOK(wxCommandEvent& WXUNUSED(event))
|
||||
|
||||
// Format the strings
|
||||
wxString sRemainingTime;
|
||||
sRemainingTime = pProject->GetHoursMinsString(iMinsLeft);
|
||||
sRemainingTime = projectManager.GetHoursMinsString(iMinsLeft);
|
||||
wxString sPlannedTime;
|
||||
sPlannedTime = pProject->GetHoursMinsString(iMinsRecording);
|
||||
sPlannedTime = projectManager.GetHoursMinsString(iMinsRecording);
|
||||
|
||||
// Create the message string
|
||||
wxString sMessage;
|
||||
|
||||
Reference in New Issue
Block a user