mirror of
https://github.com/cookiengineer/audacity
synced 2025-08-08 08:01:19 +02:00
FileNames does not depend on wx/app.h...
... The string constant used at startup in SetAppName() (which is called nowhere else) is made known to FileNames, so it need not use GetAppName().
This commit is contained in:
parent
9b0706dede
commit
44c4219d7c
@ -1118,16 +1118,7 @@ bool AudacityApp::OnInit()
|
||||
"widget_class \"*GtkCombo*\" style \"audacity\"");
|
||||
#endif
|
||||
|
||||
// Don't use AUDACITY_NAME here.
|
||||
// We want Audacity with a capital 'A'
|
||||
|
||||
// DA: App name
|
||||
#ifndef EXPERIMENTAL_DA
|
||||
wxString appName = wxT("Audacity");
|
||||
#else
|
||||
wxString appName = wxT("DarkAudacity");
|
||||
#endif
|
||||
|
||||
const auto &appName = FileNames::AppName;
|
||||
wxTheApp->SetAppName(appName);
|
||||
// Explicitly set since OSX will use it for the "Quit" menu item
|
||||
wxTheApp->SetAppDisplayName(appName);
|
||||
|
@ -27,7 +27,6 @@ used throughout Audacity into this one place.
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include <wx/app.h>
|
||||
#include <wx/defs.h>
|
||||
#include <wx/filename.h>
|
||||
#include <wx/intl.h>
|
||||
@ -468,7 +467,8 @@ wxFileNameWrapper FileNames::DefaultToDocumentsFolder(const wxString &preference
|
||||
|
||||
#ifdef __WIN32__
|
||||
wxFileName defaultPath( wxStandardPaths::Get().GetDocumentsDir(), "" );
|
||||
defaultPath.AppendDir( wxTheApp->GetAppName() );
|
||||
|
||||
defaultPath.AppendDir( AppName );
|
||||
result.SetPath( gPrefs->Read( preference, defaultPath.GetPath( wxPATH_GET_VOLUME ) ) );
|
||||
|
||||
// MJB: Bug 1899 & Bug 2007. Only create directory if the result is the default path
|
||||
@ -766,3 +766,12 @@ wxString FileNames::AbbreviatePath( const wxFileName &fileName )
|
||||
return target;
|
||||
}
|
||||
|
||||
// We want Audacity with a capital 'A'
|
||||
// DA: App name
|
||||
const wxString FileNames::AppName =
|
||||
#ifndef EXPERIMENTAL_DA
|
||||
L"Audacity"
|
||||
#else
|
||||
L"DarkAudacity"
|
||||
#endif
|
||||
;
|
||||
|
@ -225,6 +225,9 @@ namespace FileNames
|
||||
AUDACITY_DLL_API
|
||||
//! Give enough of the path to identify the device. (On Windows, drive letter plus ':')
|
||||
wxString AbbreviatePath(const wxFileName &fileName);
|
||||
|
||||
AUDACITY_DLL_API
|
||||
extern const wxString AppName;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user