1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-07-06 15:37:44 +02:00

Remove some more old preferences code which does not do anything useful, preserving only things which may be useful in the future

This commit is contained in:
richardash1981 2014-10-25 21:08:13 +00:00
parent 384048e1bd
commit b133ba5ab7

@ -180,22 +180,9 @@ void InitPreferences()
gPrefs->DeleteEntry(wxT("/NewPrefsInitialized"), true); // take group as well if empty gPrefs->DeleteEntry(wxT("/NewPrefsInitialized"), true); // take group as well if empty
} }
gPrefs->Write(wxT("/Version"), wxString(AUDACITY_VERSION_STRING)); // record the Prefs version for future checking (this has not been used for a very
// long time).
// BG: Make sure the users prefs are up to date gPrefs->Write(wxT("/PrefsVersion"), wxString(wxT(AUDACITY_PREFS_VERSION_STRING)));
// BG: Otherwise reset some of them to their defaults
wxString prefsversion;
prefsversion = gPrefs->Read(wxT("/PrefsVersion"), wxT(""));
if(prefsversion.CmpNoCase(wxString(wxT(AUDACITY_PREFS_VERSION_STRING))))
{
// BG: Reset the prefs by removing them
if(gPrefs->Exists(wxT("/Keyboard")))
gPrefs->DeleteGroup(wxT("/Keyboard"));
if(gPrefs->Exists(wxT("/Locale")))
gPrefs->DeleteGroup(wxT("/Locale"));
gPrefs->Write(wxT("/PrefsVersion"), wxString(wxT(AUDACITY_PREFS_VERSION_STRING)));
}
// Check if some prefs updates need to happen based on audacity version. // Check if some prefs updates need to happen based on audacity version.
// Unfortunately we can't use the PrefsVersion prefs key because that resets things. // Unfortunately we can't use the PrefsVersion prefs key because that resets things.
@ -227,6 +214,7 @@ void InitPreferences()
} }
} }
// write out the version numbers to the prefs file for future checking
gPrefs->Write(wxT("/Version/Major"), AUDACITY_VERSION); gPrefs->Write(wxT("/Version/Major"), AUDACITY_VERSION);
gPrefs->Write(wxT("/Version/Minor"), AUDACITY_RELEASE); gPrefs->Write(wxT("/Version/Minor"), AUDACITY_RELEASE);
gPrefs->Write(wxT("/Version/Micro"), AUDACITY_REVISION); gPrefs->Write(wxT("/Version/Micro"), AUDACITY_REVISION);