1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-13 14:13:32 +02:00

Use global ChoiceSettings variables, not coincidental string literals

This commit is contained in:
Paul Licameli
2019-04-02 18:40:42 -04:00
parent 9b41741074
commit 87a9e7ccbb
14 changed files with 41 additions and 30 deletions

View File

@@ -236,7 +236,7 @@ auto PCMImportFileHandle::GetFileUncompressedBytes() -> ByteCount
static wxString AskCopyOrEdit()
{
wxString oldCopyPref = gPrefs->Read(wxT("/FileFormats/CopyOrEditUncompressedData"), wxT("copy"));
auto oldCopyPref = FileFormatsCopyOrEditSetting.Read();
bool firstTimeAsk = gPrefs->Read(wxT("/Warnings/CopyOrEditUncompressedDataFirstAsk"), true)?true:false;
bool oldAskPref = gPrefs->Read(wxT("/Warnings/CopyOrEditUncompressedDataAsk"), true)?true:false;
@@ -245,7 +245,7 @@ static wxString AskCopyOrEdit()
// This effectively does a one-time change to the preferences.
if (firstTimeAsk) {
if (oldCopyPref != wxT("copy")) {
gPrefs->Write(wxT("/FileFormats/CopyOrEditUncompressedData"), wxT("copy"));
FileFormatsCopyOrEditSetting.Write( wxT("copy") );
oldCopyPref = wxT("copy");
}
gPrefs->Write(wxT("/Warnings/CopyOrEditUncompressedDataFirstAsk"), (long) false);
@@ -338,7 +338,7 @@ static wxString AskCopyOrEdit()
// if the preference changed, save it.
if (newCopyPref != oldCopyPref) {
gPrefs->Write(wxT("/FileFormats/CopyOrEditUncompressedData"), newCopyPref);
FileFormatsCopyOrEditSetting.Write( newCopyPref );
gPrefs->Flush();
}
oldCopyPref = newCopyPref;