mirror of
https://github.com/cookiengineer/audacity
synced 2025-04-29 15:19:44 +02:00
FileNames: Support XDG paths handling under wxGTK 3.0
Signed-off-by: Mart Raudsepp <leio@gentoo.org>
This commit is contained in:
parent
930a3a7386
commit
663dfa4671
@ -1049,7 +1049,9 @@ bool AudacityApp::OnInit() {
|
||||
wxFileSystem::AddHandler(safenew wxZipFSHandler);
|
||||
|
||||
// encouraged by wxwidgets
|
||||
#if wxCHECK_VERSION(3, 1, 1)
|
||||
wxStandardPaths::Get().SetFileLayout(wxStandardPaths::FileLayout::FileLayout_XDG);
|
||||
#endif
|
||||
|
||||
//
|
||||
// Paths: set search path and temp dir path
|
||||
|
@ -47,6 +47,10 @@ used throughout Audacity into this one place.
|
||||
#include <windows.h>
|
||||
#endif
|
||||
|
||||
#if defined(__WXGTK__) && !wxCHECK_VERSION(3, 1, 1)
|
||||
#include <glib.h>
|
||||
#endif
|
||||
|
||||
static wxString gConfigDir;
|
||||
static wxString gDataDir;
|
||||
|
||||
@ -246,6 +250,8 @@ FilePath FileNames::ConfigDir()
|
||||
// Use OS-provided user data dir folder
|
||||
#if defined(__WXMSW__)
|
||||
wxString configDir(wxStandardPaths::Get().GetUserConfigDir() + wxT("\\Tenacity"));
|
||||
#elif defined(__WXGTK__) && !wxCHECK_VERSION(3, 1, 1)
|
||||
wxString configDir = wxString::Format(wxT("%s/tenacity"), g_get_user_config_dir());
|
||||
#else
|
||||
wxString configDir(wxStandardPaths::Get().GetUserConfigDir() + wxT("/tenacity"));
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user