1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-07 20:22: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

@@ -60,10 +60,8 @@
#include <wx/filename.h>
#include <wx/stdpaths.h>
#include "FileNames.h"
#include "Internat.h"
#include "MemoryX.h"
#include "Languages.h"
std::unique_ptr<AudacityPrefs> ugPrefs {};
@@ -206,12 +204,10 @@ bool AudacityPrefs::GetEditClipsCanMove()
return editClipsCanMove;
}
void InitPreferences()
void InitPreferences( const wxFileName &configFileName )
{
wxString appName = wxTheApp->GetAppName();
wxFileName configFileName(FileNames::DataDir(), wxT("audacity.cfg"));
ugPrefs = std::make_unique<AudacityPrefs>
(appName, wxEmptyString,
configFileName.GetFullPath(),
@@ -226,9 +222,8 @@ bool CheckWritablePreferences()
return gPrefs->Write("/TEST", true) && gPrefs->Flush();
}
wxString UnwritablePreferencesErrorMessage()
wxString UnwritablePreferencesErrorMessage( const wxFileName &configFileName )
{
wxFileName configFileName(FileNames::DataDir(), wxT("audacity.cfg"));
return wxString::Format(
_("Audacity cannot start because the settings file at %s is not writable."),
configFileName.GetFullPath()