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:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user