1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-21 08:27:13 +01:00

Break cycle of Prefs, Languages, FileNames

This commit is contained in:
Paul Licameli
2019-07-09 12:14:42 -04:00
parent 7d75f1bfc4
commit a08bd5782b
3 changed files with 10 additions and 11 deletions

View File

@@ -1358,13 +1358,15 @@ bool AudacityApp::OnInit()
#endif
// Initialize preferences and language
InitPreferences();
wxFileName configFileName(FileNames::DataDir(), wxT("audacity.cfg"));
InitPreferences( configFileName );
PopulatePreferences();
// This test must follow PopulatePreferences, because if an error message
// must be shown, we need internationalization to have been initialized
// first, which was done in PopulatePreferences
if ( !CheckWritablePreferences() ) {
::AudacityMessageBox( UnwritablePreferencesErrorMessage() );
::AudacityMessageBox(
UnwritablePreferencesErrorMessage( configFileName ) );
return false;
}