mirror of
https://github.com/cookiengineer/audacity
synced 2025-09-17 16:50:26 +02:00
Move AppName to lib-utility...
... It makes more sense there, at an even lower level than lib-files. Avoid type wxString.
This commit is contained in:
parent
44c4219d7c
commit
347cb7c294
@ -18,6 +18,7 @@ used utilities that don't correspond to things in the standard.
|
||||
set( SOURCES
|
||||
MemoryX.cpp
|
||||
MemoryX.h
|
||||
ModuleConstants.cpp
|
||||
ModuleConstants.h
|
||||
)
|
||||
audacity_library( lib-utility "${SOURCES}" ""
|
||||
|
21
libraries/lib-utility/ModuleConstants.cpp
Normal file
21
libraries/lib-utility/ModuleConstants.cpp
Normal file
@ -0,0 +1,21 @@
|
||||
/**********************************************************************
|
||||
|
||||
Audacity: A Digital Audio Editor
|
||||
|
||||
ModuleConstants.cpp
|
||||
|
||||
Paul Licameli
|
||||
|
||||
**********************************************************************/
|
||||
|
||||
#include "ModuleConstants.h"
|
||||
|
||||
// We want Audacity with a capital 'A'
|
||||
// DA: App name
|
||||
const std::wstring AppName =
|
||||
#ifndef EXPERIMENTAL_DA
|
||||
L"Audacity"
|
||||
#else
|
||||
L"DarkAudacity"
|
||||
#endif
|
||||
;
|
@ -11,6 +11,8 @@
|
||||
#ifndef __AUDACITY_MODULE_CONSTANTS__
|
||||
#define __AUDACITY_MODULE_CONSTANTS__
|
||||
|
||||
#include <string>
|
||||
|
||||
#define ModuleDispatchName "ModuleDispatch"
|
||||
|
||||
#ifdef _MSC_VER
|
||||
@ -53,4 +55,7 @@ extern "C" { \
|
||||
DEFINE_VERSION_CHECK \
|
||||
extern "C" DLL_API int ModuleDispatch(ModuleDispatchTypes type){ return 1; }
|
||||
|
||||
//! This program's name
|
||||
UTILITY_API extern const std::wstring AppName;
|
||||
|
||||
#endif
|
||||
|
@ -1118,11 +1118,10 @@ bool AudacityApp::OnInit()
|
||||
"widget_class \"*GtkCombo*\" style \"audacity\"");
|
||||
#endif
|
||||
|
||||
const auto &appName = FileNames::AppName;
|
||||
wxTheApp->SetAppName(appName);
|
||||
wxTheApp->SetAppName(AppName);
|
||||
// Explicitly set since OSX will use it for the "Quit" menu item
|
||||
wxTheApp->SetAppDisplayName(appName);
|
||||
wxTheApp->SetVendorName(appName);
|
||||
wxTheApp->SetAppDisplayName(AppName);
|
||||
wxTheApp->SetVendorName(AppName);
|
||||
|
||||
::wxInitAllImageHandlers();
|
||||
|
||||
|
@ -34,6 +34,7 @@ used throughout Audacity into this one place.
|
||||
#include "BasicUI.h"
|
||||
#include "Prefs.h"
|
||||
#include "Internat.h"
|
||||
#include "ModuleConstants.h"
|
||||
#include "PlatformCompatibility.h"
|
||||
#include "wxFileNameWrapper.h"
|
||||
|
||||
@ -765,13 +766,3 @@ wxString FileNames::AbbreviatePath( const wxFileName &fileName )
|
||||
#endif
|
||||
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,9 +225,6 @@ 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