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
|
set( SOURCES
|
||||||
MemoryX.cpp
|
MemoryX.cpp
|
||||||
MemoryX.h
|
MemoryX.h
|
||||||
|
ModuleConstants.cpp
|
||||||
ModuleConstants.h
|
ModuleConstants.h
|
||||||
)
|
)
|
||||||
audacity_library( lib-utility "${SOURCES}" ""
|
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__
|
#ifndef __AUDACITY_MODULE_CONSTANTS__
|
||||||
#define __AUDACITY_MODULE_CONSTANTS__
|
#define __AUDACITY_MODULE_CONSTANTS__
|
||||||
|
|
||||||
|
#include <string>
|
||||||
|
|
||||||
#define ModuleDispatchName "ModuleDispatch"
|
#define ModuleDispatchName "ModuleDispatch"
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
@ -53,4 +55,7 @@ extern "C" { \
|
|||||||
DEFINE_VERSION_CHECK \
|
DEFINE_VERSION_CHECK \
|
||||||
extern "C" DLL_API int ModuleDispatch(ModuleDispatchTypes type){ return 1; }
|
extern "C" DLL_API int ModuleDispatch(ModuleDispatchTypes type){ return 1; }
|
||||||
|
|
||||||
|
//! This program's name
|
||||||
|
UTILITY_API extern const std::wstring AppName;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1118,11 +1118,10 @@ bool AudacityApp::OnInit()
|
|||||||
"widget_class \"*GtkCombo*\" style \"audacity\"");
|
"widget_class \"*GtkCombo*\" style \"audacity\"");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
const auto &appName = FileNames::AppName;
|
wxTheApp->SetAppName(AppName);
|
||||||
wxTheApp->SetAppName(appName);
|
|
||||||
// Explicitly set since OSX will use it for the "Quit" menu item
|
// Explicitly set since OSX will use it for the "Quit" menu item
|
||||||
wxTheApp->SetAppDisplayName(appName);
|
wxTheApp->SetAppDisplayName(AppName);
|
||||||
wxTheApp->SetVendorName(appName);
|
wxTheApp->SetVendorName(AppName);
|
||||||
|
|
||||||
::wxInitAllImageHandlers();
|
::wxInitAllImageHandlers();
|
||||||
|
|
||||||
|
@ -34,6 +34,7 @@ used throughout Audacity into this one place.
|
|||||||
#include "BasicUI.h"
|
#include "BasicUI.h"
|
||||||
#include "Prefs.h"
|
#include "Prefs.h"
|
||||||
#include "Internat.h"
|
#include "Internat.h"
|
||||||
|
#include "ModuleConstants.h"
|
||||||
#include "PlatformCompatibility.h"
|
#include "PlatformCompatibility.h"
|
||||||
#include "wxFileNameWrapper.h"
|
#include "wxFileNameWrapper.h"
|
||||||
|
|
||||||
@ -765,13 +766,3 @@ wxString FileNames::AbbreviatePath( const wxFileName &fileName )
|
|||||||
#endif
|
#endif
|
||||||
return target;
|
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
|
AUDACITY_DLL_API
|
||||||
//! Give enough of the path to identify the device. (On Windows, drive letter plus ':')
|
//! Give enough of the path to identify the device. (On Windows, drive letter plus ':')
|
||||||
wxString AbbreviatePath(const wxFileName &fileName);
|
wxString AbbreviatePath(const wxFileName &fileName);
|
||||||
|
|
||||||
AUDACITY_DLL_API
|
|
||||||
extern const wxString AppName;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user