mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 08:09:32 +02:00
Get rid of AutoSaveEnabled pref altogether. AutoSave doesn't copy any audio data, so there's no reason to turn it off.
This commit is contained in:
parent
d0f67d3e6b
commit
3f133811fb
@ -3536,14 +3536,12 @@ void AudacityProject::PushState(wxString desc,
|
||||
if (GetTracksFitVerticallyZoomed())
|
||||
this->DoZoomFitV();
|
||||
|
||||
if (IsAutoSaveEnabled())
|
||||
AutoSave();
|
||||
}
|
||||
|
||||
void AudacityProject::ModifyState()
|
||||
{
|
||||
mUndoManager.ModifyState(mTracks, mViewInfo.sel0, mViewInfo.sel1);
|
||||
if (IsAutoSaveEnabled())
|
||||
AutoSave();
|
||||
}
|
||||
|
||||
@ -3601,7 +3599,6 @@ void AudacityProject::PopState(TrackList * l)
|
||||
this->UpdateMixerBoard();
|
||||
#endif
|
||||
|
||||
if (IsAutoSaveEnabled())
|
||||
AutoSave();
|
||||
}
|
||||
|
||||
@ -4262,13 +4259,6 @@ void AudacityProject::ReleaseKeyboard(wxWindow *w)
|
||||
}
|
||||
}
|
||||
|
||||
// static
|
||||
bool AudacityProject::IsAutoSaveEnabled()
|
||||
{
|
||||
bool autoSaveEnabled = true;
|
||||
gPrefs->Read(wxT("/Directories/AutoSaveEnabled"), &autoSaveEnabled);
|
||||
return autoSaveEnabled;
|
||||
}
|
||||
|
||||
void AudacityProject::AutoSave()
|
||||
{
|
||||
@ -4380,7 +4370,7 @@ void AudacityProject::OnAudioIOStartRecording()
|
||||
// since no block files are written during recording that could be
|
||||
// recovered.
|
||||
//
|
||||
if (IsAutoSaveEnabled() && !GetCacheBlockFiles())
|
||||
if (!GetCacheBlockFiles())
|
||||
AutoSave();
|
||||
}
|
||||
|
||||
@ -4391,14 +4381,13 @@ void AudacityProject::OnAudioIOStopRecording()
|
||||
mDirManager->WriteCacheToDisk();
|
||||
|
||||
// Now we auto-save again to get the project to a "normal" state again.
|
||||
if (IsAutoSaveEnabled())
|
||||
AutoSave();
|
||||
}
|
||||
|
||||
void AudacityProject::OnAudioIONewBlockFiles(const wxString& blockFileLog)
|
||||
{
|
||||
// New blockfiles have been created, so add them to the auto-save file
|
||||
if (IsAutoSaveEnabled() && !GetCacheBlockFiles() &&
|
||||
if (!GetCacheBlockFiles() &&
|
||||
!mAutoSaveFileName.IsEmpty())
|
||||
{
|
||||
wxFFile f(mAutoSaveFileName, wxT("at"));
|
||||
|
@ -409,7 +409,6 @@ class AUDACITY_DLL_API AudacityProject: public wxFrame,
|
||||
void GetRegionsByLabel( Regions ®ions );
|
||||
|
||||
void AutoSave();
|
||||
static bool IsAutoSaveEnabled();
|
||||
void DeleteCurrentAutoSaveFile();
|
||||
|
||||
static bool GetCacheBlockFiles();
|
||||
|
@ -68,14 +68,6 @@ void ProjectsPrefs::PopulateOrExchange(ShuttleGui & S)
|
||||
S.EndRadioButtonGroup();
|
||||
}
|
||||
S.EndStatic();
|
||||
|
||||
S.StartStatic(_("Auto save"));
|
||||
{
|
||||
S.TieCheckBox(_("Auto &save a copy of the project in a separate folder"),
|
||||
wxT("/Directories/AutoSaveEnabled"),
|
||||
true);
|
||||
}
|
||||
S.EndStatic();
|
||||
}
|
||||
|
||||
bool ProjectsPrefs::Apply()
|
||||
|
Loading…
x
Reference in New Issue
Block a user