wxT rework for common directory
This commit is contained in:
parent
4657614e4f
commit
e18fc36646
|
@ -194,7 +194,7 @@ static const wxChar AllowManualCanvasScale[] = wxT( "AllowManualCanvasScale" );
|
|||
*/
|
||||
wxString dumpParamCfg( const PARAM_CFG& aParam )
|
||||
{
|
||||
wxString s = aParam.m_Ident + ": ";
|
||||
wxString s = aParam.m_Ident + wxT( ": " );
|
||||
|
||||
/*
|
||||
* This implementation is rather simplistic, but it is
|
||||
|
@ -217,9 +217,9 @@ wxString dumpParamCfg( const PARAM_CFG& aParam )
|
|||
s << *static_cast<const PARAM_CFG_FILENAME&>( aParam ).m_Pt_param;
|
||||
break;
|
||||
case paramcfg_id::PARAM_BOOL:
|
||||
s << ( *static_cast<const PARAM_CFG_BOOL&>( aParam ).m_Pt_param ? "true" : "false" );
|
||||
s << ( *static_cast<const PARAM_CFG_BOOL&>( aParam ).m_Pt_param ? wxT( "true" ) : wxT( "false" ) );
|
||||
break;
|
||||
default: s << "Unsupported PARAM_CFG variant: " << aParam.m_Type;
|
||||
default: s << wxT( "Unsupported PARAM_CFG variant: " ) << aParam.m_Type;
|
||||
}
|
||||
|
||||
return s;
|
||||
|
@ -249,14 +249,14 @@ static void dumpCfg( const std::vector<PARAM_CFG*>& aArray )
|
|||
*/
|
||||
static wxFileName getAdvancedCfgFilename()
|
||||
{
|
||||
const static wxString cfg_filename{ "kicad_advanced" };
|
||||
const static wxString cfg_filename{ wxT( "kicad_advanced" ) };
|
||||
return wxFileName( SETTINGS_MANAGER::GetUserSettingsPath(), cfg_filename );
|
||||
}
|
||||
|
||||
|
||||
ADVANCED_CFG::ADVANCED_CFG()
|
||||
{
|
||||
wxLogTrace( AdvancedConfigMask, "Init advanced config" );
|
||||
wxLogTrace( AdvancedConfigMask, wxT( "Init advanced config" ) );
|
||||
|
||||
// Init defaults - this is done in case the config doesn't exist,
|
||||
// then the values will remain as set here.
|
||||
|
@ -313,7 +313,7 @@ void ADVANCED_CFG::loadFromConfigFile()
|
|||
|
||||
if( !k_advanced.FileExists() )
|
||||
{
|
||||
wxLogTrace( AdvancedConfigMask, "File does not exist %s", k_advanced.GetFullPath() );
|
||||
wxLogTrace( AdvancedConfigMask, wxT( "File does not exist %s" ), k_advanced.GetFullPath() );
|
||||
|
||||
// load the defaults
|
||||
wxConfig emptyConfig;
|
||||
|
@ -322,9 +322,9 @@ void ADVANCED_CFG::loadFromConfigFile()
|
|||
return;
|
||||
}
|
||||
|
||||
wxLogTrace( AdvancedConfigMask, "Loading advanced config from: %s", k_advanced.GetFullPath() );
|
||||
wxLogTrace( AdvancedConfigMask, wxT( "Loading advanced config from: %s" ), k_advanced.GetFullPath() );
|
||||
|
||||
wxFileConfig file_cfg( "", "", k_advanced.GetFullPath() );
|
||||
wxFileConfig file_cfg( wxT( "" ), wxT( "" ), k_advanced.GetFullPath() );
|
||||
loadSettings( file_cfg );
|
||||
}
|
||||
|
||||
|
@ -414,14 +414,14 @@ void ADVANCED_CFG::loadSettings( wxConfigBase& aCfg )
|
|||
|
||||
// Special case for trace mask setting...we just grab them and set them immediately
|
||||
// Because we even use wxLogTrace inside of advanced config
|
||||
wxString traceMasks = "";
|
||||
configParams.push_back( new PARAM_CFG_WXSTRING( true, AC_KEYS::TraceMasks, &traceMasks, "" ) );
|
||||
wxString traceMasks = wxT( "" );
|
||||
configParams.push_back( new PARAM_CFG_WXSTRING( true, AC_KEYS::TraceMasks, &traceMasks, wxT( "" ) ) );
|
||||
|
||||
// Load the config from file
|
||||
wxConfigLoadSetups( &aCfg, configParams );
|
||||
|
||||
// Now actually set the trace masks
|
||||
wxStringTokenizer traceMaskTokenizer( traceMasks, "," );
|
||||
wxStringTokenizer traceMaskTokenizer( traceMasks, wxT( "," ) );
|
||||
|
||||
while( traceMaskTokenizer.HasMoreTokens() )
|
||||
{
|
||||
|
|
|
@ -42,10 +42,10 @@ ARRAY_AXIS::ARRAY_AXIS() : m_type( NUMBERING_TYPE::NUMBERING_NUMERIC ), m_offset
|
|||
|
||||
const wxString& ARRAY_AXIS::GetAlphabet() const
|
||||
{
|
||||
static const wxString alphaNumeric = "0123456789";
|
||||
static const wxString alphaHex = "0123456789ABCDEF";
|
||||
static const wxString alphaFull = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
||||
static const wxString alphaNoIOSQXZ = "ABCDEFGHJKLMNPRTUVWY";
|
||||
static const wxString alphaNumeric = wxT( "0123456789" );
|
||||
static const wxString alphaHex = wxT( "0123456789ABCDEF" );
|
||||
static const wxString alphaFull = wxT( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" );
|
||||
static const wxString alphaNoIOSQXZ = wxT( "ABCDEFGHJKLMNPRTUVWY" );
|
||||
|
||||
switch( m_type )
|
||||
{
|
||||
|
|
|
@ -87,7 +87,7 @@ bool ASSET_ARCHIVE::Load()
|
|||
long ASSET_ARCHIVE::GetFileContents( const wxString& aFilePath, const unsigned char* aDest,
|
||||
size_t aMaxLen )
|
||||
{
|
||||
wxFAIL_MSG( "Unimplemented" );
|
||||
wxFAIL_MSG( wxT( "Unimplemented" ) );
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
|
@ -73,7 +73,7 @@ const wxString& BASE_SCREEN::GetPageNumber() const
|
|||
static wxString pageNumber;
|
||||
|
||||
if( m_pageNumber.IsEmpty() )
|
||||
pageNumber.Printf( "%d", m_virtualPageNumber );
|
||||
pageNumber.Printf( wxT( "%d" ), m_virtualPageNumber );
|
||||
else
|
||||
pageNumber = m_pageNumber;
|
||||
|
||||
|
@ -86,9 +86,9 @@ const wxString& BASE_SCREEN::GetPageNumber() const
|
|||
void BASE_SCREEN::Show( int nestLevel, std::ostream& os ) const
|
||||
{
|
||||
// for now, make it look like XML, expand on this later.
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << ">\n";
|
||||
NestedSpace( nestLevel, os ) << '<' << GetClass().Lower().mb_str() << wxT( ">\n" );
|
||||
|
||||
NestedSpace( nestLevel, os ) << "</" << GetClass().Lower().mb_str() << ">\n";
|
||||
NestedSpace( nestLevel, os ) << wxT( "</" ) << GetClass().Lower().mb_str() << wxT( ">\n" );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -181,7 +181,7 @@ wxString MessageTextFromValue( EDA_UNITS aUnits, double aValue, bool aAddUnitLab
|
|||
|
||||
if( aAddUnitLabel )
|
||||
{
|
||||
text += " ";
|
||||
text += wxT( " " );
|
||||
text += GetAbbreviatedUnitsLabel( aUnits, aType );
|
||||
}
|
||||
|
||||
|
@ -352,7 +352,7 @@ double DoubleValueFromString( EDA_UNITS aUnits, const wxString& aTextValue, EDA_
|
|||
{
|
||||
aUnits = EDA_UNITS::INCHES;
|
||||
}
|
||||
else if( unit == "oz" ) // 1 oz = 1.37 mils
|
||||
else if( unit == wxT( "oz" ) ) // 1 oz = 1.37 mils
|
||||
{
|
||||
aUnits = EDA_UNITS::MILS;
|
||||
dtmp *= 1.37;
|
||||
|
|
|
@ -101,7 +101,7 @@ BITMAP_STORE::BITMAP_STORE()
|
|||
{
|
||||
wxFileName path( PATHS::GetStockDataPath() + wxT( "/resources" ), IMAGE_ARCHIVE );
|
||||
|
||||
wxLogTrace( traceBitmaps, "Loading bitmaps from " + path.GetFullPath() );
|
||||
wxLogTrace( traceBitmaps, wxT( "Loading bitmaps from " ) + path.GetFullPath() );
|
||||
|
||||
m_archive = std::make_unique<ASSET_ARCHIVE>( path.GetFullPath() );
|
||||
|
||||
|
@ -148,8 +148,8 @@ wxImage BITMAP_STORE::getImage( BITMAPS aBitmapId, int aHeight )
|
|||
|
||||
if( count < 0 )
|
||||
{
|
||||
wxLogTrace( traceBitmaps, "Bitmap for %d, %d, %s has an info tag with file %s,"
|
||||
"but that file could not be found in the archive!",
|
||||
wxLogTrace( traceBitmaps, wxT( "Bitmap for %d, %d, %s has an info tag with file %s," )
|
||||
wxT( "but that file could not be found in the archive!" ),
|
||||
aBitmapId, aHeight, m_theme );
|
||||
data = s_imageNotFound;
|
||||
count = sizeof( s_imageNotFound );
|
||||
|
@ -205,7 +205,7 @@ wxString BITMAP_STORE::computeBitmapName( BITMAPS aBitmapId, int aHeight )
|
|||
{
|
||||
if( !m_bitmapInfoCache.count( aBitmapId ) )
|
||||
{
|
||||
wxLogTrace( traceBitmaps, "No bitmap info available for %d", aBitmapId );
|
||||
wxLogTrace( traceBitmaps, wxT( "No bitmap info available for %d" ), aBitmapId );
|
||||
return wxEmptyString;
|
||||
}
|
||||
|
||||
|
@ -225,7 +225,7 @@ wxString BITMAP_STORE::computeBitmapName( BITMAPS aBitmapId, int aHeight )
|
|||
|
||||
if( fn.IsEmpty() )
|
||||
{
|
||||
wxLogTrace( traceBitmaps, "No bitmap found matching ID %d, height %d, theme %s",
|
||||
wxLogTrace( traceBitmaps, wxT( "No bitmap found matching ID %d, height %d, theme %s" ),
|
||||
aBitmapId, aHeight, m_theme );
|
||||
return m_bitmapInfoCache.at( aBitmapId ).begin()->filename;
|
||||
}
|
||||
|
|
|
@ -95,42 +95,42 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
|||
wxString aMsg;
|
||||
// DO NOT translate information in the msg_version string
|
||||
|
||||
wxString eol = aHtml ? "<br>" : "\n";
|
||||
wxString eol = aHtml ? wxT( "<br>" ) : wxT( "\n" );
|
||||
|
||||
// Tabs instead of spaces for the plaintext version for shorter string length
|
||||
wxString indent4 = aHtml ? " " : "\t";
|
||||
wxString indent4 = aHtml ? wxT( " " ) : wxT( "\t" );
|
||||
|
||||
#define ON "ON" << eol
|
||||
#define OFF "OFF" << eol
|
||||
#define ON wxT( "ON" ) << eol
|
||||
#define OFF wxT( "OFF" ) << eol
|
||||
|
||||
wxString version;
|
||||
version << ( KIPLATFORM::APP::IsOperatingSystemUnsupported() ? "(UNSUPPORTED)"
|
||||
version << ( KIPLATFORM::APP::IsOperatingSystemUnsupported() ? wxT( "(UNSUPPORTED)" )
|
||||
: GetBuildVersion() )
|
||||
#ifdef DEBUG
|
||||
<< ", debug"
|
||||
<< wxT( ", debug" )
|
||||
#else
|
||||
<< ", release"
|
||||
<< wxT( ", release" )
|
||||
#endif
|
||||
<< " build";
|
||||
<< wxT( " build" );
|
||||
|
||||
wxPlatformInfo platform;
|
||||
aMsg << "Application: " << aTitle;
|
||||
aMsg << wxT( "Application: " ) << aTitle;
|
||||
|
||||
#if defined( KICAD_BUILD_ARCH_X64 )
|
||||
aMsg << " (64-bit)";
|
||||
aMsg << wxT( " (64-bit)" );
|
||||
#elif defined( KICAD_BUILD_ARCH_X86 )
|
||||
aMsg << " (32-bit)";
|
||||
aMsg << wxT( " (32-bit)" );
|
||||
#elif defined( KICAD_BUILD_ARCH_ARM )
|
||||
aMsg << " (ARM 32-bit)";
|
||||
aMsg << wxT( " (ARM 32-bit)" );
|
||||
#elif defined( KICAD_BUILD_ARCH_ARM64 )
|
||||
aMsg << " (ARM 64-bit)";
|
||||
aMsg << wxT( " (ARM 64-bit)" );
|
||||
#endif
|
||||
|
||||
aMsg << eol << eol;
|
||||
|
||||
|
||||
aMsg << "Version: " << version << eol << eol;
|
||||
aMsg << "Libraries:" << eol;
|
||||
aMsg << wxT( "Version: " ) << version << eol << eol;
|
||||
aMsg << wxT( "Libraries:" ) << eol;
|
||||
|
||||
aMsg << indent4 << wxGetLibraryVersionInfo().GetVersionString() << eol;
|
||||
|
||||
|
@ -139,26 +139,26 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
|||
|
||||
aMsg << eol;
|
||||
|
||||
aMsg << "Platform: " << wxGetOsDescription() << ", "
|
||||
<< GetPlatformGetBitnessName() << ", "
|
||||
<< platform.GetEndiannessName() << ", "
|
||||
aMsg << wxT( "Platform: " ) << wxGetOsDescription() << wxT( ", " )
|
||||
<< GetPlatformGetBitnessName() << wxT( ", " )
|
||||
<< platform.GetEndiannessName() << wxT( ", " )
|
||||
<< platform.GetPortIdName();
|
||||
|
||||
#ifdef __WXGTK__
|
||||
aMsg << ", " << wxGetenv( "XDG_SESSION_DESKTOP" )
|
||||
<< ", " << wxGetenv( "XDG_SESSION_TYPE" );
|
||||
aMsg << wxT( ", " ) << wxGetenv( wxT( "XDG_SESSION_DESKTOP" ) )
|
||||
<< wxT( ", " ) << wxGetenv( wxT( "XDG_SESSION_TYPE" ) );
|
||||
#endif
|
||||
|
||||
aMsg << eol << eol;
|
||||
|
||||
if( !aBrief )
|
||||
{
|
||||
aMsg << "Build Info:" << eol;
|
||||
aMsg << indent4 << "Date: " << GetBuildDate() << eol;
|
||||
aMsg << wxT( "Build Info:" ) << eol;
|
||||
aMsg << indent4 << wxT( "Date: " ) << GetBuildDate() << eol;
|
||||
}
|
||||
|
||||
aMsg << indent4 << "wxWidgets: " << wxVERSION_NUM_DOT_STRING << " (";
|
||||
aMsg << __WX_BO_UNICODE __WX_BO_STL __WX_BO_WXWIN_COMPAT_2_8 ")";
|
||||
aMsg << indent4 << wxT( "wxWidgets: " ) << wxVERSION_NUM_DOT_STRING << wxT( " (" );
|
||||
aMsg << __WX_BO_UNICODE __WX_BO_STL __WX_BO_WXWIN_COMPAT_2_8 wxT( ")" );
|
||||
|
||||
// Get the GTK+ version where possible.
|
||||
#ifdef __WXGTK__
|
||||
|
@ -166,68 +166,68 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
|||
|
||||
major = wxPlatformInfo().Get().GetToolkitMajorVersion();
|
||||
minor = wxPlatformInfo().Get().GetToolkitMinorVersion();
|
||||
aMsg << " GTK+ " << major << "." << minor;
|
||||
aMsg << wxT( " GTK+ " ) << major << wxT( "." ) << minor;
|
||||
#endif
|
||||
|
||||
aMsg << eol;
|
||||
|
||||
aMsg << indent4 << "Boost: " << ( BOOST_VERSION / 100000 ) << wxT( "." )
|
||||
aMsg << indent4 << wxT( "Boost: " ) << ( BOOST_VERSION / 100000 ) << wxT( "." )
|
||||
<< ( BOOST_VERSION / 100 % 1000 ) << wxT( "." )
|
||||
<< ( BOOST_VERSION % 100 ) << eol;
|
||||
|
||||
#ifdef KICAD_USE_OCC
|
||||
aMsg << indent4 << "OCC: " << OCC_VERSION_COMPLETE << eol;
|
||||
aMsg << indent4 << wxT( "OCC: " ) << OCC_VERSION_COMPLETE << eol;
|
||||
#endif
|
||||
|
||||
aMsg << indent4 << "Curl: " << GetCurlLibVersion() << eol;
|
||||
aMsg << indent4 << wxT( "Curl: " ) << GetCurlLibVersion() << eol;
|
||||
|
||||
#if defined( KICAD_SPICE )
|
||||
#if defined( NGSPICE_BUILD_VERSION )
|
||||
aMsg << indent4 << "ngspice: " << NGSPICE_BUILD_VERSION << eol;
|
||||
aMsg << indent4 << wxT( "ngspice: " ) << NGSPICE_BUILD_VERSION << eol;
|
||||
#elif defined( NGSPICE_HAVE_CONFIG_H )
|
||||
#undef HAVE_STRNCASECMP /* is redefined in ngspice/config.h */
|
||||
#include <ngspice/config.h>
|
||||
aMsg << indent4 << "ngspice: " << PACKAGE_VERSION << eol;
|
||||
aMsg << indent4 << wxT( "ngspice: " ) << PACKAGE_VERSION << eol;
|
||||
#elif defined( NGSPICE_PACKAGE_VERSION )
|
||||
aMsg << indent4 << "ngspice: " << NGSPICE_PACKAGE_VERSION << eol;
|
||||
aMsg << indent4 << wxT( "ngspice: " ) << NGSPICE_PACKAGE_VERSION << eol;
|
||||
#else
|
||||
aMsg << indent4 << "ngspice: " << "unknown" << eol;
|
||||
aMsg << indent4 << wxT( "ngspice: " ) << wxT( "unknown" ) << eol;
|
||||
#endif
|
||||
#endif
|
||||
|
||||
aMsg << indent4 << "Compiler: ";
|
||||
aMsg << indent4 << wxT( "Compiler: " );
|
||||
#if defined(__clang__)
|
||||
aMsg << "Clang " << __clang_major__ << "." << __clang_minor__ << "." << __clang_patchlevel__;
|
||||
aMsg << wxT( "Clang " ) << __clang_major__ << wxT( "." ) << __clang_minor__ << wxT( "." ) << __clang_patchlevel__;
|
||||
#elif defined(__GNUG__)
|
||||
aMsg << "GCC " << __GNUC__ << "." << __GNUC_MINOR__ << "." << __GNUC_PATCHLEVEL__;
|
||||
aMsg << wxT( "GCC " ) << __GNUC__ << wxT( "." ) << __GNUC_MINOR__ << wxT( "." ) << __GNUC_PATCHLEVEL__;
|
||||
#elif defined(_MSC_VER)
|
||||
aMsg << "Visual C++ " << _MSC_VER;
|
||||
aMsg << wxT( "Visual C++ " ) << _MSC_VER;
|
||||
#elif defined(__INTEL_COMPILER)
|
||||
aMsg << "Intel C++ " << __INTEL_COMPILER;
|
||||
aMsg << wxT( "Intel C++ " ) << __INTEL_COMPILER;
|
||||
#else
|
||||
aMsg << "Other Compiler ";
|
||||
aMsg << wxT( "Other Compiler " );
|
||||
#endif
|
||||
|
||||
#if defined(__GXX_ABI_VERSION)
|
||||
aMsg << " with C++ ABI " << __GXX_ABI_VERSION << eol;
|
||||
aMsg << wxT( " with C++ ABI " ) << __GXX_ABI_VERSION << eol;
|
||||
#else
|
||||
aMsg << " without C++ ABI" << eol;
|
||||
aMsg << wxT( " without C++ ABI" ) << eol;
|
||||
#endif
|
||||
|
||||
aMsg << eol;
|
||||
|
||||
// Add build settings config (build options):
|
||||
aMsg << "Build settings:" << eol;
|
||||
aMsg << wxT( "Build settings:" ) << eol;
|
||||
|
||||
#ifdef KICAD_USE_OCC
|
||||
aMsg << indent4 << "KICAD_USE_OCC=" << ON;
|
||||
aMsg << indent4 << wxT( "KICAD_USE_OCC=" ) << ON;
|
||||
#endif
|
||||
|
||||
#ifdef KICAD_USE_EGL
|
||||
aMsg << indent4 << "KICAD_USE_EGL=" << ON;
|
||||
aMsg << indent4 << wxT( "KICAD_USE_EGL=" ) << ON;
|
||||
#endif
|
||||
|
||||
aMsg << indent4 << "KICAD_SPICE=";
|
||||
aMsg << indent4 << wxT( "KICAD_SPICE=" );
|
||||
#ifdef KICAD_SPICE
|
||||
aMsg << ON;
|
||||
#else
|
||||
|
@ -235,12 +235,12 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
|||
#endif
|
||||
|
||||
#ifndef NDEBUG
|
||||
aMsg << indent4 << "KICAD_STDLIB_DEBUG=";
|
||||
aMsg << indent4 << wxT( "KICAD_STDLIB_DEBUG=" );
|
||||
#ifdef KICAD_STDLIB_DEBUG
|
||||
aMsg << ON;
|
||||
#else
|
||||
aMsg << OFF;
|
||||
aMsg << indent4 << "KICAD_STDLIB_LIGHT_DEBUG=";
|
||||
aMsg << indent4 << wxT( "KICAD_STDLIB_LIGHT_DEBUG=" );
|
||||
#ifdef KICAD_STDLIB_LIGHT_DEBUG
|
||||
aMsg << ON;
|
||||
#else
|
||||
|
@ -248,14 +248,14 @@ wxString GetVersionInfoData( const wxString& aTitle, bool aHtml, bool aBrief )
|
|||
#endif
|
||||
#endif
|
||||
|
||||
aMsg << indent4 << "KICAD_SANITIZE_ADDRESS=";
|
||||
aMsg << indent4 << wxT( "KICAD_SANITIZE_ADDRESS=" );
|
||||
#ifdef KICAD_SANITIZE_ADDRESS
|
||||
aMsg << ON;
|
||||
#else
|
||||
aMsg << OFF;
|
||||
#endif
|
||||
|
||||
aMsg << indent4 << "KICAD_SANITIZE_THREADS=";
|
||||
aMsg << indent4 << wxT( "KICAD_SANITIZE_THREADS=" );
|
||||
#ifdef KICAD_SANITIZE_THREADS
|
||||
aMsg << ON;
|
||||
#else
|
||||
|
|
|
@ -102,7 +102,7 @@ wxString ExpandTextVars( const wxString& aSource,
|
|||
else
|
||||
{
|
||||
// Token not resolved: leave the reference unchanged
|
||||
newbuf.append( "${" + token + "}" );
|
||||
newbuf.append( wxT( "${" ) + token + wxT( "}" ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -68,14 +68,14 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
|||
|
||||
/* KiCad build version */
|
||||
wxString version;
|
||||
version << ( KIPLATFORM::APP::IsOperatingSystemUnsupported() ? "(UNSUPPORTED)"
|
||||
version << ( KIPLATFORM::APP::IsOperatingSystemUnsupported() ? wxT( "(UNSUPPORTED)" )
|
||||
: GetBuildVersion() )
|
||||
#ifdef DEBUG
|
||||
<< ", debug"
|
||||
<< wxT( ", debug" )
|
||||
#else
|
||||
<< ", release"
|
||||
<< wxT( ", release" )
|
||||
#endif
|
||||
<< " build";
|
||||
<< wxT( " build" );
|
||||
|
||||
aInfo.SetBuildVersion( version );
|
||||
aInfo.SetBuildDate( GetBuildDate() );
|
||||
|
@ -93,15 +93,15 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
|||
|
||||
// Just in case someone builds KiCad with the platform native of Boost instead of
|
||||
// the version included with the KiCad source.
|
||||
libVersion << "and Boost " << ( BOOST_VERSION / 100000 ) << "."
|
||||
<< ( BOOST_VERSION / 100 % 1000 ) << "." << ( BOOST_VERSION % 100 )
|
||||
<< "\n";
|
||||
libVersion << wxT( "and Boost " ) << ( BOOST_VERSION / 100000 ) << wxT( "." )
|
||||
<< ( BOOST_VERSION / 100 % 1000 ) << wxT( "." ) << ( BOOST_VERSION % 100 )
|
||||
<< wxT( "\n" );
|
||||
|
||||
// Operating System Information
|
||||
|
||||
wxPlatformInfo platformInfo;
|
||||
|
||||
libVersion << "Platform: " << wxGetOsDescription() << ", "
|
||||
libVersion << wxT( "Platform: " ) << wxGetOsDescription() << wxT( ", " )
|
||||
// TODO (ISM): Readd conditional once our wx fork and flatpaks are running released 3.1.5
|
||||
#if 0 && wxCHECK_VERSION( 3, 1, 5 )
|
||||
<< platformInfo.GetBitnessName();
|
||||
|
@ -117,64 +117,64 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
|||
wxString description;
|
||||
|
||||
/* short description */
|
||||
description << "<p>";
|
||||
description << "<b><u>"
|
||||
description << wxT( "<p>" );
|
||||
description << wxT( "<b><u>" )
|
||||
<< _( "Description" )
|
||||
<< "</u></b>"; // bold & underlined font for caption
|
||||
<< wxT( "</u></b>" ); // bold & underlined font for caption
|
||||
|
||||
description << "<p>"
|
||||
description << wxT( "<p>" )
|
||||
<< _( "The KiCad EDA Suite is a set of open source applications for the "
|
||||
"creation of electronic schematics and printed circuit boards." )
|
||||
<< "</p>";
|
||||
<< wxT( "</p>" );
|
||||
|
||||
description << "</p>";
|
||||
description << wxT( "</p>" );
|
||||
|
||||
/* websites */
|
||||
description << "<p><b><u>"
|
||||
description << wxT( "<p><b><u>" )
|
||||
<< _( "KiCad on the web" )
|
||||
<< "</u></b>"; // bold & underlined font for caption
|
||||
<< wxT( "</u></b>" ); // bold & underlined font for caption
|
||||
|
||||
// bullet-ed list with some http links
|
||||
description << "<ul>";
|
||||
description << "<li>"
|
||||
description << wxT( "<ul>" );
|
||||
description << wxT( "<li>" )
|
||||
<< _( "The official KiCad website - " )
|
||||
<< HtmlHyperlink( "http://www.kicad.org" )
|
||||
<< "</li>";
|
||||
description << "<li>"
|
||||
<< HtmlHyperlink( wxT( "http://www.kicad.org" ) )
|
||||
<< wxT( "</li>" );
|
||||
description << wxT( "<li>" )
|
||||
<< _( "Developer website - " )
|
||||
<< HtmlHyperlink( "https://go.kicad.org/dev" )
|
||||
<< "</li>";
|
||||
<< HtmlHyperlink( wxT( "https://go.kicad.org/dev" ) )
|
||||
<< wxT( "</li>" );
|
||||
|
||||
description << "<li>"
|
||||
description << wxT( "<li>" )
|
||||
<< _("Official KiCad library repositories - " )
|
||||
<< HtmlHyperlink( "https://go.kicad.org/libraries" )
|
||||
<< "</li>";
|
||||
<< HtmlHyperlink( wxT( "https://go.kicad.org/libraries" ) )
|
||||
<< wxT( "</li>" );
|
||||
|
||||
description << "</ul></p>";
|
||||
description << wxT( "</ul></p>" );
|
||||
|
||||
description << "<p><b><u>"
|
||||
description << wxT( "<p><b><u>" )
|
||||
<< _( "Bug tracker" )
|
||||
<< "</u></b>"; // bold & underlined font caption
|
||||
<< wxT( "</u></b>" ); // bold & underlined font caption
|
||||
|
||||
// bullet-ed list with some http links
|
||||
description << "<ul>";
|
||||
description << "<li>"
|
||||
description << wxT( "<ul>" );
|
||||
description << wxT( "<li>" )
|
||||
<< _( "Report or examine bugs - " )
|
||||
<< HtmlHyperlink( "https://go.kicad.org/bugs" )
|
||||
<< "</li>";
|
||||
description << "</ul></p>";
|
||||
<< HtmlHyperlink( wxT( "https://go.kicad.org/bugs" ) )
|
||||
<< wxT( "</li>" );
|
||||
description << wxT( "</ul></p>" );
|
||||
|
||||
description << "<p><b><u>"
|
||||
description << wxT( "<p><b><u>" )
|
||||
<< _( "KiCad users group and community" )
|
||||
<< "</u></b>"; // bold & underlined font caption
|
||||
<< wxT( "</u></b>" ); // bold & underlined font caption
|
||||
|
||||
description << "<ul>";
|
||||
description << "<li>"
|
||||
description << wxT( "<ul>" );
|
||||
description << wxT( "<li>" )
|
||||
<< _( "KiCad forum - " )
|
||||
<< HtmlHyperlink( "https://go.kicad.org/forum" )
|
||||
<< "</li>";
|
||||
<< HtmlHyperlink( wxT( "https://go.kicad.org/forum" ) )
|
||||
<< wxT( "</li>" );
|
||||
|
||||
description << "</ul></p>";
|
||||
description << wxT( "</ul></p>" );
|
||||
|
||||
aInfo.SetDescription( description );
|
||||
|
||||
|
@ -182,12 +182,12 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
|||
// License information also HTML formatted:
|
||||
wxString license;
|
||||
license
|
||||
<< "<div align='center'>"
|
||||
<< wxT( "<div align='center'>" )
|
||||
<< HtmlNewline( 4 )
|
||||
<< _( "The complete KiCad EDA Suite is released under the" ) << HtmlNewline( 2 )
|
||||
<< HtmlHyperlink( "http://www.gnu.org/licenses",
|
||||
<< HtmlHyperlink( wxT( "http://www.gnu.org/licenses" ),
|
||||
_( "GNU General Public License (GPL) version 3 or any later version" ) )
|
||||
<< "</div>";
|
||||
<< wxT( "</div>" );
|
||||
|
||||
aInfo.SetLicense( license );
|
||||
|
||||
|
@ -208,20 +208,20 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
|||
#define LEAD_DEV _( "Lead Development Team" )
|
||||
#define FORMER_DEV _( "Lead Development Alumni" )
|
||||
#define CONTRIB_DEV _( "Additional Contributions By")
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Jean-Pierre Charras", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Wayne Stambaugh", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jean-Pierre Charras" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Wayne Stambaugh" ), LEAD_DEV, nullptr ) );
|
||||
|
||||
// Alphabetical after the first two
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Jon Evans", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jon Evans" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Roberto Fernandez Bautista" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Seth Hillbrand", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Ian McInerney", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Seth Hillbrand" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Ian McInerney" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Orson (Maciej Sumiński)" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Mark Roszko", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Thomas Pointhuber", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Mikolaj Wielgus", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Tomasz Wlostowski", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( "Jeff Young", LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mark Roszko" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Thomas Pointhuber" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Mikolaj Wielgus" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Tomasz Wlostowski" ), LEAD_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Jeff Young" ), LEAD_DEV, nullptr ) );
|
||||
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "John Beard" ), FORMER_DEV, nullptr ) );
|
||||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Dick Hollenbeck" ), FORMER_DEV, nullptr ) );
|
||||
|
@ -533,13 +533,13 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
|||
aInfo.AddDeveloper( new CONTRIBUTOR( wxT( "Nick Østergaard" ), CONTRIB_DEV, nullptr ) );
|
||||
|
||||
// The document writers
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( "Jean-Pierre Charras" ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( "Marco Ciampa" ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( "Jon Evans" ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( "Dick Hollenbeck" ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( "Igor Plyatov" ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( "Wayne Stambaugh" ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( "Fabrizio Tappero" ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Jean-Pierre Charras" ) ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Marco Ciampa" ) ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Jon Evans" ) ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Dick Hollenbeck" ) ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Igor Plyatov" ) ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Wayne Stambaugh" ) ) );
|
||||
aInfo.AddDocWriter( new CONTRIBUTOR( wxT( "Fabrizio Tappero" ) ) );
|
||||
|
||||
/* The translators
|
||||
* As category the language to which the translation was done is used
|
||||
|
@ -547,339 +547,339 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
|||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Martin Kratoška" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Czech (CS)" ) );
|
||||
wxT( "Czech (CS)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Radek Kuznik" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Czech (CS)" ) );
|
||||
wxT( "Czech (CS)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Roman Ondráček" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Czech (CS)" ) );
|
||||
wxT( "Czech (CS)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jan Straka" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Czech (CS)" ) );
|
||||
wxT( "Czech (CS)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jan Vykydal" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Czech (CS)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Jonathan Haas",
|
||||
wxT( "Czech (CS)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jonathan Haas" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"German (DE)" ) );
|
||||
wxT( "German (DE)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mark Hämmerling" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"German (DE)" ) );
|
||||
wxT( "German (DE)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mathias Neumann" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"German (DE)" ) );
|
||||
wxT( "German (DE)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Dominik Wernberger" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"German (DE)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Manolis Stefanis",
|
||||
wxT( "German (DE)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Manolis Stefanis" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Greek (el_GR)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Athanasios Vlastos",
|
||||
wxT( "Greek (el_GR)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Athanasios Vlastos" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Greek (el_GR)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Milonas Kostas",
|
||||
wxT( "Greek (el_GR)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Milonas Kostas" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Greek (el_GR)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Michail Misirlis",
|
||||
wxT( "Greek (el_GR)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Michail Misirlis" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Greek (el_GR)" ) );
|
||||
wxT( "Greek (el_GR)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Adolfo Jayme Barrientos" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Spanish (ES)" ) );
|
||||
wxT( "Spanish (ES)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Roberto Fernandez Bautista" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Spanish (ES)" ) );
|
||||
wxT( "Spanish (ES)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Augusto Fraga Giachero" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Spanish (ES)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Pedro Martin del Valle",
|
||||
wxT( "Spanish (ES)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Pedro Martin del Valle" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Spanish (ES)" ) );
|
||||
wxT( "Spanish (ES)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Iñigo Figuero" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Spanish (ES)" ) );
|
||||
wxT( "Spanish (ES)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Iñigo Zuluaga" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Spanish (ES)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Vesa Solonen",
|
||||
wxT( "Spanish (ES)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Vesa Solonen" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Finnish (FI)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Alex Gellen",
|
||||
wxT( "Finnish (FI)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Alex Gellen" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Finnish (FI)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "J. Lavoie",
|
||||
wxT( "Finnish (FI)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "J. Lavoie" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Finnish (FI)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Purkka Koodari",
|
||||
wxT( "Finnish (FI)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Purkka Koodari" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Finnish (FI)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Ola Rinta-Koski",
|
||||
wxT( "Finnish (FI)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Ola Rinta-Koski" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Finnish (FI)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Riku Viitanen",
|
||||
wxT( "Finnish (FI)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Riku Viitanen" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Finnish (FI)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Simo Mattila",
|
||||
wxT( "Finnish (FI)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Simo Mattila" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Finnish (FI)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Jean-Pierre Charras",
|
||||
wxT( "Finnish (FI)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Jean-Pierre Charras" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"French (FR)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Marco Ciampa",
|
||||
wxT( "French (FR)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Marco Ciampa" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Italian (IT)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Hiroshi Tokita",
|
||||
wxT( "Italian (IT)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Hiroshi Tokita" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Kenta Yonekura",
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Kenta Yonekura" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Ji Yoon Choi",
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Hidemichi Gotou",
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Kaoru Zenyouji",
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Kinichiro Inoguchi",
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Norio Suzuki",
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "starfort-jp",
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Japanese (JA)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "킴슨김랑기" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Ji Yoon Choi" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Hidemichi Gotou" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Kaoru Zenyouji" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Kinichiro Inoguchi" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Norio Suzuki" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "starfort-jp" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Japanese (JA)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "킴슨김랑기" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Ji Yoon Choi" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "jeongsuAn" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "이상수" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "jehunseo" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Uibeom Jung" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "박준언" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "방준영" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "박기정" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "hokim" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "강명구" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "서범기" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Korean (KO)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Arend-Jan van Hilten",
|
||||
wxT( "Korean (KO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Arend-Jan van Hilten" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Dutch (NL)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "CJ van der Hoeven",
|
||||
wxT( "Dutch (NL)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "CJ van der Hoeven" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Dutch (NL)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Pim Jansen",
|
||||
wxT( "Dutch (NL)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Pim Jansen" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Dutch (NL)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Allan Nordhøy",
|
||||
wxT( "Dutch (NL)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Allan Nordhøy" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Norwegian (NO)" ) );
|
||||
wxT( "Norwegian (NO)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mateusz Skowroński" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Polish (PL)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Kerusey Karyu",
|
||||
wxT( "Polish (PL)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Kerusey Karyu" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Polish (PL)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Mark Roszko",
|
||||
wxT( "Polish (PL)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Mark Roszko" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Polish (PL)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "ZbeeGin",
|
||||
wxT( "Polish (PL)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "ZbeeGin" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Polish (PL)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Augusto Fraga Giachero",
|
||||
wxT( "Polish (PL)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Augusto Fraga Giachero" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Brazilian Portuguese (PT_BR)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Wellington Terumi Uemura",
|
||||
wxT( "Brazilian Portuguese (PT_BR)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Wellington Terumi Uemura" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Brazilian Portuguese (PT_BR)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Augusto Fraga Giachero",
|
||||
wxT( "Brazilian Portuguese (PT_BR)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Augusto Fraga Giachero" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Portuguese (PT)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Renie Marquet",
|
||||
wxT( "Portuguese (PT)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Renie Marquet" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Portuguese (PT)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Rafael Silva",
|
||||
wxT( "Portuguese (PT)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Rafael Silva" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Portuguese (PT)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Igor Plyatov",
|
||||
wxT( "Portuguese (PT)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Igor Plyatov" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Russian (RU)" ) );
|
||||
wxT( "Russian (RU)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Дмитрий Дёмин" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Russian (RU)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Andrey Fedorushkov",
|
||||
wxT( "Russian (RU)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Andrey Fedorushkov" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Russian (RU)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Eldar Khayrullin",
|
||||
wxT( "Russian (RU)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Eldar Khayrullin" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Russian (RU)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Konstantin Baranovskiy",
|
||||
wxT( "Russian (RU)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Konstantin Baranovskiy" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Russian (RU)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Axel Henriksson",
|
||||
wxT( "Russian (RU)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Axel Henriksson" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Swedish (SV)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Richard Jonsson",
|
||||
wxT( "Swedish (SV)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Richard Jonsson" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Swedish (SV)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Allan Nordhøy",
|
||||
wxT( "Swedish (SV)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Allan Nordhøy" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Swedish (SV)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Boonchai Kingrungped",
|
||||
wxT( "Swedish (SV)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Boonchai Kingrungped" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Thai (TH)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Liu Guang",
|
||||
wxT( "Thai (TH)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Liu Guang" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Simplified Chinese (zh_CN)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Taotieren",
|
||||
wxT( "Simplified Chinese (zh_CN)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Taotieren" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Simplified Chinese (zh_CN)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Dingzhong Chen",
|
||||
wxT( "Simplified Chinese (zh_CN)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Dingzhong Chen" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Simplified Chinese (zh_CN)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "David Chen",
|
||||
wxT( "Simplified Chinese (zh_CN)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "David Chen" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Simplified Chinese (zh_CN)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Rigo Ligo",
|
||||
wxT( "Simplified Chinese (zh_CN)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Rigo Ligo" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Simplified Chinese (zh_CN)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Tian Yunhao",
|
||||
wxT( "Simplified Chinese (zh_CN)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Tian Yunhao" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Simplified Chinese (zh_CN)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "David Chen",
|
||||
wxT( "Simplified Chinese (zh_CN)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "David Chen" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Traditional Chinese (zh_TW)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "kai chiao chuang",
|
||||
wxT( "Traditional Chinese (zh_TW)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "kai chiao chuang" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Traditional Chinese (zh_TW)" ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Taotieren",
|
||||
wxT( "Traditional Chinese (zh_TW)" ) ) );
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Taotieren" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Traditional Chinese (zh_TW)" ) );
|
||||
wxT( "Traditional Chinese (zh_TW)" ) ) );
|
||||
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Remy Halvick",
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Remy Halvick" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Other" ) );
|
||||
wxT( "Other" ) ) );
|
||||
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "David J S Briscoe",
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "David J S Briscoe" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Other" ) );
|
||||
wxT( "Other" ) ) );
|
||||
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Dominique Laigle",
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Dominique Laigle" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Other" ) );
|
||||
wxT( "Other" ) ) );
|
||||
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( "Paul Burke",
|
||||
aInfo.AddTranslator( new CONTRIBUTOR( wxT( "Paul Burke" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
"Other" ) );
|
||||
wxT( "Other" ) ) );
|
||||
|
||||
|
||||
// Program credits for 3d models
|
||||
|
@ -899,33 +899,33 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
|||
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "Evan Shultz"), LIBRARIANS, aInfo.CreateKiBitmap( BITMAPS::library ) ) );
|
||||
|
||||
#define MODELS_3D_CONTRIBUTION _( "3D models by" )
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( "Scripts by Maui",
|
||||
"https://github.com/easyw",
|
||||
"https://gitlab.com/kicad/libraries/kicad-packages3D-generator",
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "Scripts by Maui" ),
|
||||
wxT( "https://github.com/easyw" ),
|
||||
wxT( "https://gitlab.com/kicad/libraries/kicad-packages3D-generator" ),
|
||||
MODELS_3D_CONTRIBUTION,
|
||||
aInfo.CreateKiBitmap( BITMAPS::three_d ) ) );
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( "GitLab contributors",
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "GitLab contributors" ),
|
||||
wxEmptyString,
|
||||
"https://gitlab.com/kicad/libraries/kicad-packages3D/-/graphs/master",
|
||||
wxT( "https://gitlab.com/kicad/libraries/kicad-packages3D/-/graphs/master" ),
|
||||
MODELS_3D_CONTRIBUTION,
|
||||
aInfo.CreateKiBitmap( BITMAPS::three_d ) ) );
|
||||
|
||||
#define SYMBOL_LIB_CONTRIBUTION _( "Symbols by" )
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( "GitLab contributors",
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "GitLab contributors" ),
|
||||
wxEmptyString,
|
||||
"https://gitlab.com/kicad/libraries/kicad-symbols/-/graphs/master",
|
||||
wxT( "https://gitlab.com/kicad/libraries/kicad-symbols/-/graphs/master" ),
|
||||
SYMBOL_LIB_CONTRIBUTION,
|
||||
aInfo.CreateKiBitmap( BITMAPS::add_component ) ) );
|
||||
|
||||
#define FOOTPRINT_LIB_CONTRIBUTION _( "Footprints by" )
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( "Scripts by Thomas Pointhuber",
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "Scripts by Thomas Pointhuber" ),
|
||||
wxEmptyString,
|
||||
"https://gitlab.com/kicad/libraries/kicad-footprint-generator",
|
||||
wxT( "https://gitlab.com/kicad/libraries/kicad-footprint-generator" ),
|
||||
FOOTPRINT_LIB_CONTRIBUTION,
|
||||
aInfo.CreateKiBitmap( BITMAPS::module ) ) );
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( "GitLab contributors",
|
||||
aInfo.AddLibrarian( new CONTRIBUTOR( wxT( "GitLab contributors" ),
|
||||
wxEmptyString,
|
||||
"https://gitlab.com/kicad/libraries/kicad-footprints/-/graphs/master",
|
||||
wxT( "https://gitlab.com/kicad/libraries/kicad-footprints/-/graphs/master" ),
|
||||
FOOTPRINT_LIB_CONTRIBUTION,
|
||||
aInfo.CreateKiBitmap( BITMAPS::module ) ) );
|
||||
|
||||
|
@ -939,16 +939,16 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
|
|||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
ICON_CONTRIBUTION ) );
|
||||
aInfo.AddArtist( new CONTRIBUTOR( "Fabrizio Tappero",
|
||||
aInfo.AddArtist( new CONTRIBUTOR( wxT( "Fabrizio Tappero" ),
|
||||
wxEmptyString,
|
||||
wxEmptyString,
|
||||
ICON_CONTRIBUTION ) );
|
||||
|
||||
// Program credits for package developers.
|
||||
aInfo.AddPackager( new CONTRIBUTOR( "Steven Falco" ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( "Jean-Samuel Reynaud" ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( "Bernhard Stegmaier" ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( "Adam Wolf" ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Steven Falco" ) ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Jean-Samuel Reynaud" ) ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Bernhard Stegmaier" ) ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Adam Wolf" ) ) );
|
||||
aInfo.AddPackager( new CONTRIBUTOR( wxT( "Nick Østergaard" ) ) );
|
||||
}
|
||||
|
||||
|
@ -981,9 +981,9 @@ static wxString HtmlHyperlink( const wxString& aUrl, const wxString& aDescriptio
|
|||
wxString hyperlink = wxEmptyString;
|
||||
|
||||
if( aDescription.IsEmpty() )
|
||||
hyperlink << "<a href='" << aUrl << "'>" << aUrl << "</a>";
|
||||
hyperlink << wxT( "<a href='" ) << aUrl << wxT( "'>" ) << aUrl << wxT( "</a>" );
|
||||
else
|
||||
hyperlink << "<a href='" << aUrl << "'>" << aDescription << "</a>";
|
||||
hyperlink << wxT( "<a href='" ) << aUrl << wxT( "'>" ) << aDescription << wxT( "</a>" );
|
||||
|
||||
return hyperlink;
|
||||
}
|
||||
|
@ -1001,7 +1001,7 @@ static wxString HtmlNewline( const unsigned int aCount )
|
|||
wxString newlineTags = wxEmptyString;
|
||||
|
||||
for( size_t i = 0; i<aCount; ++i )
|
||||
newlineTags << "<br>";
|
||||
newlineTags << wxT( "<br>" );
|
||||
|
||||
return newlineTags;
|
||||
}
|
||||
|
|
|
@ -84,7 +84,7 @@ DIALOG_ABOUT::DIALOG_ABOUT( EDA_BASE_FRAME *aParent, ABOUT_APP_INFO& aAppInfo )
|
|||
m_titleName = aParent->GetAboutTitle();
|
||||
m_staticTextAppTitle->SetLabel( m_titleName );
|
||||
m_staticTextCopyright->SetLabel( m_info.GetCopyright() );
|
||||
m_staticTextBuildVersion->SetLabel( "Version: " + m_info.GetBuildVersion() );
|
||||
m_staticTextBuildVersion->SetLabel( wxT( "Version: " ) + m_info.GetBuildVersion() );
|
||||
m_staticTextLibVersion->SetLabel( m_info.GetLibVersion() );
|
||||
|
||||
SetTitle( wxString::Format( _( "About %s" ), m_titleName ) );
|
||||
|
@ -222,7 +222,7 @@ void DIALOG_ABOUT::createNotebookPageByCategory( wxNotebook* aParent, const wxSt
|
|||
// Of course the padding is different depending on the platform so we adjust the
|
||||
// padding accordingly.
|
||||
#if defined( __WXGTK__ )
|
||||
padding += " ";
|
||||
padding += wxT( " " );
|
||||
#endif
|
||||
wxPanel* outerPanel = new wxPanel( aParent );
|
||||
wxBoxSizer* outerSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
@ -419,7 +419,7 @@ void DIALOG_ABOUT::createNotebookHtmlPage( wxNotebook* aParent, const wxString&
|
|||
wxStaticText* DIALOG_ABOUT::wxStaticTextRef( wxScrolledWindow* aParent, const wxString& aReference )
|
||||
{
|
||||
wxStaticText* text = new wxStaticText( aParent, wxID_ANY,
|
||||
wxT( "(" ) + aReference + wxT( ")" ) );
|
||||
wxT( "(wxT( " ) + aReference + wxT( " ))" ) );
|
||||
|
||||
return text;
|
||||
}
|
||||
|
|
|
@ -399,8 +399,8 @@ void DIALOG_SHIM::OnPaint( wxPaintEvent &event )
|
|||
|
||||
void DIALOG_SHIM::OnModify()
|
||||
{
|
||||
if( !GetTitle().StartsWith( "*" ) )
|
||||
SetTitle( "*" + GetTitle() );
|
||||
if( !GetTitle().StartsWith( wxT( "*" ) ) )
|
||||
SetTitle( wxT( "*" ) + GetTitle() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -488,8 +488,8 @@ void DIALOG_SHIM::EndQuasiModal( int retCode )
|
|||
|
||||
if( !IsQuasiModal() )
|
||||
{
|
||||
wxFAIL_MSG( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal"
|
||||
"wasn't called" );
|
||||
wxFAIL_MSG( wxT( "either DIALOG_SHIM::EndQuasiModal called twice or ShowQuasiModal" )
|
||||
wxT( "wasn't called" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ bool DIALOG_CONFIGURE_PATHS::TransferDataToWindow()
|
|||
|
||||
for( auto it = paths->begin(); it != paths->end(); ++it )
|
||||
{
|
||||
if ( !( *it ).m_Alias.StartsWith( "${" ) && !( *it ).m_Alias.StartsWith( "$(" ) )
|
||||
if ( !( *it ).m_Alias.StartsWith( wxT( "${" ) ) && !( *it ).m_Alias.StartsWith( wxT( "$(" ) ) )
|
||||
{
|
||||
AppendSearchPath( it->m_Alias, it->m_Pathvar, it->m_Description );
|
||||
|
||||
|
@ -172,7 +172,7 @@ bool DIALOG_CONFIGURE_PATHS::TransferDataToWindow()
|
|||
const wxString& path = it->second.GetValue();
|
||||
AppendEnvVar( it->first, path, it->second.GetDefinedExternally() );
|
||||
|
||||
if( m_curdir.IsEmpty() && !path.StartsWith( "${" ) && !path.StartsWith( "$(" ) )
|
||||
if( m_curdir.IsEmpty() && !path.StartsWith( wxT( "${" ) ) && !path.StartsWith( wxT( "$(" ) ) )
|
||||
m_curdir = path;
|
||||
}
|
||||
|
||||
|
@ -639,19 +639,19 @@ void DIALOG_CONFIGURE_PATHS::OnHelp( wxCommandEvent& event )
|
|||
"level. Environment variables defined at the system or user level "
|
||||
"take precedence over the ones defined in this table. This means the "
|
||||
"values in this table are ignored." );
|
||||
msg << "<br><br><b>";
|
||||
msg << wxT( "<br><br><b>" );
|
||||
msg << _( "To ensure environment variable names are valid on all platforms, the name field "
|
||||
"will only accept upper case letters, digits, and the underscore characters." );
|
||||
msg << "</b>";
|
||||
msg << wxT( "</b>" );
|
||||
|
||||
for( const auto& var : ENV_VAR::GetPredefinedEnvVars() )
|
||||
{
|
||||
msg << "<br><br><b>" << var << "</b>";
|
||||
msg << wxT( "<br><br><b>" ) << var << wxT( "</b>" );
|
||||
|
||||
const auto desc = ENV_VAR::LookUpEnvVarHelp( var );
|
||||
|
||||
if( desc.size() > 0 )
|
||||
msg << ": " << desc;
|
||||
msg << wxT( ": " ) << desc;
|
||||
|
||||
}
|
||||
|
||||
|
|
|
@ -231,7 +231,7 @@ void PANEL_HOTKEYS_EDITOR::dumpHotkeys()
|
|||
|
||||
wxFileName fn( filename );
|
||||
|
||||
wxFFileOutputStream fileStream( fn.GetFullPath(), "w" );
|
||||
wxFFileOutputStream fileStream( fn.GetFullPath(), wxT( "w" ) );
|
||||
wxTextOutputStream stream( fileStream );
|
||||
|
||||
if( !fn.IsDirWritable() || ( fn.Exists() && !fn.IsFileWritable() ) )
|
||||
|
|
|
@ -384,7 +384,7 @@ static void gridRowToNetclass( EDA_UNITS aUnits, wxGrid* grid, int row, const NE
|
|||
nc->SetSchematicColor( wxColour( grid->GetCellValue( row, GRID_SCHEMATIC_COLOR ) ) );
|
||||
|
||||
nc->SetLineStyle( g_lineStyleNames.Index( grid->GetCellValue( row, GRID_LINESTYLE ) ) );
|
||||
wxASSERT_MSG( nc->GetLineStyle() >= 0, "Line style name not found." );
|
||||
wxASSERT_MSG( nc->GetLineStyle() >= 0, wxT( "Line style name not found." ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -189,20 +189,20 @@ wxString WX_HTML_REPORT_PANEL::generateHtml( const REPORT_LINE& aLine )
|
|||
switch( aLine.severity )
|
||||
{
|
||||
case RPT_SEVERITY_ERROR:
|
||||
retv = "<font color=#F04040 size=3>" + _( "Error:" ) + " </font>"
|
||||
"<font size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font color=#F04040 size=3>" ) + _( "Error:" ) + " </font>"
|
||||
wxT( "<font size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
break;
|
||||
case RPT_SEVERITY_WARNING:
|
||||
retv = "<font size=3>" + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font size=3>" ) + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
|
||||
break;
|
||||
case RPT_SEVERITY_INFO:
|
||||
retv = "<font color=#909090 size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font color=#909090 size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
break;
|
||||
case RPT_SEVERITY_ACTION:
|
||||
retv = "<font color=#60D060 size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font color=#60D060 size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
break;
|
||||
default:
|
||||
retv = "<font size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -210,26 +210,26 @@ wxString WX_HTML_REPORT_PANEL::generateHtml( const REPORT_LINE& aLine )
|
|||
switch( aLine.severity )
|
||||
{
|
||||
case RPT_SEVERITY_ERROR:
|
||||
retv = "<font color=#D00000 size=3>" + _( "Error:" ) + " </font>"
|
||||
"<font size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font color=#D00000 size=3>" ) + _( "Error:" ) + " </font>"
|
||||
wxT( "<font size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
break;
|
||||
case RPT_SEVERITY_WARNING:
|
||||
retv = "<font size=3>" + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font size=3>" ) + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
|
||||
break;
|
||||
case RPT_SEVERITY_INFO:
|
||||
retv = "<font color=#808080 size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font color=#808080 size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
break;
|
||||
case RPT_SEVERITY_ACTION:
|
||||
retv = "<font color=#008000 size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font color=#008000 size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
break;
|
||||
default:
|
||||
retv = "<font size=3>" + aLine.message + "</font><br>";
|
||||
retv = wxT( "<font size=3>" ) + aLine.message + wxT( "</font><br>" );
|
||||
}
|
||||
}
|
||||
|
||||
// wxHtmlWindow fails to do correct baseline alignment between Japanese/Chinese cells and
|
||||
// Roman cells. This keeps the line in a single cell.
|
||||
retv.Replace( " ", " " );
|
||||
retv.Replace( wxT( " " ), wxT( " " ) );
|
||||
|
||||
return retv;
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ wxString WX_HTML_REPORT_PANEL::generatePlainText( const REPORT_LINE& aLine )
|
|||
void WX_HTML_REPORT_PANEL::onRightClick( wxMouseEvent& event )
|
||||
{
|
||||
wxMenu popup;
|
||||
popup.Append( wxID_COPY, "Copy" );
|
||||
popup.Append( wxID_COPY, wxT( "Copy" ) );
|
||||
PopupMenu( &popup );
|
||||
}
|
||||
|
||||
|
@ -376,7 +376,7 @@ void WX_HTML_REPORT_PANEL::onBtnSaveToFile( wxCommandEvent& event )
|
|||
if( fn.GetExt().IsEmpty() )
|
||||
fn.SetExt( "txt" );
|
||||
|
||||
wxFFile f( fn.GetFullPath(), "wb" );
|
||||
wxFFile f( fn.GetFullPath(), wxT( "wb" ) );
|
||||
|
||||
if( !f.IsOpened() )
|
||||
{
|
||||
|
|
|
@ -899,7 +899,7 @@ bool DS_DATA_MODEL::LoadDrawingSheet( const wxString& aFullFileName, bool Append
|
|||
}
|
||||
}
|
||||
|
||||
wxFFile wksFile( fullFileName, "rb" );
|
||||
wxFFile wksFile( fullFileName, wxT( "rb" ) );
|
||||
|
||||
if( ! wksFile.IsOpened() )
|
||||
{
|
||||
|
@ -939,7 +939,7 @@ bool DS_DATA_MODEL::LoadDrawingSheet( const wxString& aFullFileName, bool Append
|
|||
}
|
||||
catch( const std::bad_alloc& )
|
||||
{
|
||||
wxLogMessage( "Memory exhaustion reading drawing sheet" );
|
||||
wxLogMessage( wxT( "Memory exhaustion reading drawing sheet" ) );
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -142,12 +142,12 @@ wxString DS_DRAW_ITEM_LIST::BuildFullText( const wxString& aTextbase )
|
|||
}
|
||||
else if( token->IsSameAs( wxT( "PAPER" ) ) )
|
||||
{
|
||||
*token = m_paperFormat ? *m_paperFormat : wxString( "" );
|
||||
*token = m_paperFormat ? *m_paperFormat : wxString( wxT( "" ) );
|
||||
tokenUpdated = true;
|
||||
}
|
||||
else if( token->IsSameAs( wxT( "LAYER" ) ) )
|
||||
{
|
||||
*token = m_sheetLayer ? *m_sheetLayer : wxString( "" );
|
||||
*token = m_sheetLayer ? *m_sheetLayer : wxString( wxT( "" ) );
|
||||
tokenUpdated = true;
|
||||
}
|
||||
else if( m_titleBlock )
|
||||
|
|
|
@ -183,7 +183,7 @@ wxWindow* EDA_BASE_FRAME::findQuasiModalDialog()
|
|||
// so we have to look for it separately.
|
||||
if( m_ident == FRAME_SCH )
|
||||
{
|
||||
wxWindow* cvpcb = wxWindow::FindWindowByName( "CvpcbFrame" );
|
||||
wxWindow* cvpcb = wxWindow::FindWindowByName( wxT( "CvpcbFrame" ) );
|
||||
|
||||
if( cvpcb )
|
||||
return cvpcb;
|
||||
|
@ -332,7 +332,7 @@ bool EDA_BASE_FRAME::doAutoSave()
|
|||
|
||||
void EDA_BASE_FRAME::OnCharHook( wxKeyEvent& aKeyEvent )
|
||||
{
|
||||
wxLogTrace( kicadTraceKeyEvent, "EDA_BASE_FRAME::OnCharHook %s", dump( aKeyEvent ) );
|
||||
wxLogTrace( kicadTraceKeyEvent, wxT( "EDA_BASE_FRAME::OnCharHook %s" ), dump( aKeyEvent ) );
|
||||
|
||||
// Key events can be filtered here.
|
||||
// Currently no filtering is made.
|
||||
|
@ -535,7 +535,7 @@ void EDA_BASE_FRAME::OnSize( wxSizeEvent& aEvent )
|
|||
|
||||
if( m_displayIndex >= 0 && currentDisplay >= 0 && currentDisplay != m_displayIndex )
|
||||
{
|
||||
wxLogTrace( traceDisplayLocation, "OnSize: current display changed %d to %d",
|
||||
wxLogTrace( traceDisplayLocation, wxT( "OnSize: current display changed %d to %d" ),
|
||||
m_displayIndex, currentDisplay );
|
||||
m_displayIndex = currentDisplay;
|
||||
ensureWindowIsOnScreen();
|
||||
|
@ -569,7 +569,7 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
|
|||
m_frameSize.x = aState.size_x;
|
||||
m_frameSize.y = aState.size_y;
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Config position (%d, %d) with size (%d, %d)",
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Config position (%d, %d) with size (%d, %d)" ),
|
||||
m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
|
||||
|
||||
// Ensure minimum size is set if the stored config was zero-initialized
|
||||
|
@ -578,15 +578,15 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
|
|||
m_frameSize = defaultSize( m_ident );
|
||||
wasDefault = true;
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Using minimum size (%d, %d)",
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Using minimum size (%d, %d)" ),
|
||||
m_frameSize.x, m_frameSize.y );
|
||||
}
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Number of displays: %d", wxDisplay::GetCount() );
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Number of displays: %d" ), wxDisplay::GetCount() );
|
||||
|
||||
if( aState.display >= wxDisplay::GetCount() )
|
||||
{
|
||||
wxLogTrace( traceDisplayLocation, "Previous display not found" );
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Previous display not found" ) );
|
||||
|
||||
// If it isn't attached, use the first display
|
||||
// Warning wxDisplay has 2 ctor variants. the parameter needs a type:
|
||||
|
@ -622,11 +622,11 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
|
|||
upperLeft.y > yLimBottom )
|
||||
{
|
||||
m_framePos = wxDefaultPosition;
|
||||
wxLogTrace( traceDisplayLocation, "Resetting to default position" );
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Resetting to default position" ) );
|
||||
}
|
||||
}
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Final window position (%d, %d) with size (%d, %d)",
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Final window position (%d, %d) with size (%d, %d)" ),
|
||||
m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
|
||||
|
||||
SetSize( m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
|
||||
|
@ -634,7 +634,7 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
|
|||
// Center the window if we reset to default
|
||||
if( m_framePos.x == -1 )
|
||||
{
|
||||
wxLogTrace( traceDisplayLocation, "Centering window" );
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Centering window" ) );
|
||||
Center();
|
||||
m_framePos = GetPosition();
|
||||
}
|
||||
|
@ -646,7 +646,7 @@ void EDA_BASE_FRAME::LoadWindowState( const WINDOW_STATE& aState )
|
|||
// Maximize if we were maximized before
|
||||
if( aState.maximized || ( wasDefault && m_maximizeByDefault ) )
|
||||
{
|
||||
wxLogTrace( traceDisplayLocation, "Maximizing window" );
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Maximizing window" ) );
|
||||
Maximize();
|
||||
}
|
||||
|
||||
|
@ -662,13 +662,13 @@ void EDA_BASE_FRAME::ensureWindowIsOnScreen()
|
|||
wxSize size = GetWindowSize();
|
||||
|
||||
wxLogTrace( traceDisplayLocation,
|
||||
"ensureWindowIsOnScreen: clientArea (%d, %d) w %d h %d", clientSize.x, clientSize.y,
|
||||
wxT( "ensureWindowIsOnScreen: clientArea (%d, %d) w %d h %d" ), clientSize.x, clientSize.y,
|
||||
clientSize.width, clientSize.height );
|
||||
|
||||
if( pos.y < clientSize.y )
|
||||
{
|
||||
wxLogTrace( traceDisplayLocation,
|
||||
"ensureWindowIsOnScreen: y pos %d below minimum, setting to %d", pos.y,
|
||||
wxT( "ensureWindowIsOnScreen: y pos %d below minimum, setting to %d" ), pos.y,
|
||||
clientSize.y );
|
||||
pos.y = clientSize.y;
|
||||
}
|
||||
|
@ -676,7 +676,7 @@ void EDA_BASE_FRAME::ensureWindowIsOnScreen()
|
|||
if( pos.x < clientSize.x )
|
||||
{
|
||||
wxLogTrace( traceDisplayLocation,
|
||||
"ensureWindowIsOnScreen: x pos %d is off the client rect, setting to %d", pos.x,
|
||||
wxT( "ensureWindowIsOnScreen: x pos %d is off the client rect, setting to %d" ), pos.x,
|
||||
clientSize.x );
|
||||
pos.x = clientSize.x;
|
||||
}
|
||||
|
@ -685,7 +685,7 @@ void EDA_BASE_FRAME::ensureWindowIsOnScreen()
|
|||
{
|
||||
int newWidth = clientSize.width - ( pos.x - clientSize.x );
|
||||
wxLogTrace( traceDisplayLocation,
|
||||
"ensureWindowIsOnScreen: effective width %d above available %d, setting to %d",
|
||||
wxT( "ensureWindowIsOnScreen: effective width %d above available %d, setting to %d" ),
|
||||
pos.x + size.x, clientSize.width, newWidth );
|
||||
size.x = newWidth;
|
||||
}
|
||||
|
@ -694,12 +694,12 @@ void EDA_BASE_FRAME::ensureWindowIsOnScreen()
|
|||
{
|
||||
int newHeight = clientSize.height - ( pos.y - clientSize.y );
|
||||
wxLogTrace( traceDisplayLocation,
|
||||
"ensureWindowIsOnScreen: effective height %d above available %d, setting to %d",
|
||||
wxT( "ensureWindowIsOnScreen: effective height %d above available %d, setting to %d" ),
|
||||
pos.y + size.y, clientSize.height, newHeight );
|
||||
size.y = newHeight;
|
||||
}
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Updating window position (%d, %d) with size (%d, %d)",
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Updating window position (%d, %d) with size (%d, %d)" ),
|
||||
pos.x, pos.y, size.x, size.y );
|
||||
|
||||
SetSize( pos.x, pos.y, size.x, size.y );
|
||||
|
@ -748,9 +748,9 @@ void EDA_BASE_FRAME::SaveWindowSettings( WINDOW_SETTINGS* aCfg )
|
|||
aCfg->state.maximized = IsMaximized();
|
||||
aCfg->state.display = wxDisplay::GetFromWindow( this );
|
||||
|
||||
wxLogTrace( traceDisplayLocation, "Saving window maximized: %s",
|
||||
IsMaximized() ? "true" : "false" );
|
||||
wxLogTrace( traceDisplayLocation, "Saving config position (%d, %d) with size (%d, %d)",
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Saving window maximized: %s" ),
|
||||
IsMaximized() ? wxT( "true" ) : wxT( "false" ) );
|
||||
wxLogTrace( traceDisplayLocation, wxT( "Saving config position (%d, %d) with size (%d, %d)" ),
|
||||
m_framePos.x, m_framePos.y, m_frameSize.x, m_frameSize.y );
|
||||
|
||||
// TODO(JE) should auto-save in common settings be overwritten by every app?
|
||||
|
@ -845,7 +845,7 @@ void EDA_BASE_FRAME::CreateInfoBar()
|
|||
#else
|
||||
m_infoBar = new WX_INFOBAR( this, &m_auimgr );
|
||||
|
||||
m_auimgr.AddPane( m_infoBar, EDA_PANE().InfoBar().Name( "InfoBar" ).Top().Layer(1) );
|
||||
m_auimgr.AddPane( m_infoBar, EDA_PANE().InfoBar().Name( wxT( "InfoBar" ) ).Top().Layer(1) );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -860,7 +860,7 @@ void EDA_BASE_FRAME::FinishAUIInitialization()
|
|||
m_auimgr.Update();
|
||||
|
||||
// We don't want the infobar displayed right away
|
||||
m_auimgr.GetPane( "InfoBar" ).Hide();
|
||||
m_auimgr.GetPane( wxT( "InfoBar" ) ).Hide();
|
||||
m_auimgr.Update();
|
||||
#endif
|
||||
}
|
||||
|
@ -1224,7 +1224,7 @@ void EDA_BASE_FRAME::OnMaximize( wxMaximizeEvent& aEvent )
|
|||
m_normalFrameSize = GetWindowSize();
|
||||
m_normalFramePos = GetPosition();
|
||||
wxLogTrace( traceDisplayLocation,
|
||||
"Maximizing window - Saving position (%d, %d) with size (%d, %d)",
|
||||
wxT( "Maximizing window - Saving position (%d, %d) with size (%d, %d)" ),
|
||||
m_normalFramePos.x, m_normalFramePos.y,
|
||||
m_normalFrameSize.x, m_normalFrameSize.y );
|
||||
}
|
||||
|
|
|
@ -356,7 +356,7 @@ void EDA_DRAW_FRAME::PrintPage( const RENDER_SETTINGS* aSettings )
|
|||
|
||||
void EDA_DRAW_FRAME::OnSelectGrid( wxCommandEvent& event )
|
||||
{
|
||||
wxCHECK_RET( m_gridSelectBox, "m_gridSelectBox uninitialized" );
|
||||
wxCHECK_RET( m_gridSelectBox, wxT( "m_gridSelectBox uninitialized" ) );
|
||||
|
||||
int idx = m_gridSelectBox->GetCurrentSelection();
|
||||
|
||||
|
@ -453,7 +453,7 @@ void EDA_DRAW_FRAME::UpdateZoomSelectBox()
|
|||
|
||||
void EDA_DRAW_FRAME::OnSelectZoom( wxCommandEvent& event )
|
||||
{
|
||||
wxCHECK_RET( m_zoomSelectBox, "m_zoomSelectBox uninitialized" );
|
||||
wxCHECK_RET( m_zoomSelectBox, wxT( "m_zoomSelectBox uninitialized" ) );
|
||||
|
||||
int id = m_zoomSelectBox->GetCurrentSelection();
|
||||
|
||||
|
@ -519,7 +519,7 @@ void EDA_DRAW_FRAME::DisplayGridMsg()
|
|||
{
|
||||
wxString line;
|
||||
|
||||
line.Printf( "grid %s",
|
||||
line.Printf( wxT( "grid %s" ),
|
||||
MessageTextFromValue( GetUserUnits(), GetCanvas()->GetGAL()->GetGridSize().x,
|
||||
false ) );
|
||||
|
||||
|
@ -990,7 +990,7 @@ bool EDA_DRAW_FRAME::LibraryFileBrowser( bool doOpen, wxFileName& aFilename,
|
|||
{
|
||||
// Ensure the file has a dummy name, otherwise GTK will display the regex from the filter
|
||||
if( aFilename.GetName().empty() )
|
||||
aFilename.SetName( "Library" );
|
||||
aFilename.SetName( wxT( "Library" ) );
|
||||
|
||||
if( !aIsGlobal && GetMruPath().IsEmpty() )
|
||||
{
|
||||
|
|
|
@ -143,7 +143,7 @@ bool EDA_PATTERN_MATCH_WILDCARD::SetPattern( const wxString& aPattern )
|
|||
}
|
||||
else if( to_replace.Find( c ) != wxNOT_FOUND )
|
||||
{
|
||||
regex += "\\";
|
||||
regex += wxT( "\\" );
|
||||
regex += c;
|
||||
}
|
||||
else
|
||||
|
@ -192,7 +192,7 @@ bool EDA_PATTERN_MATCH_WILDCARD_EXPLICIT::SetPattern( const wxString& aPattern )
|
|||
}
|
||||
else if( to_replace.Find( c ) != wxNOT_FOUND )
|
||||
{
|
||||
regex += "\\";
|
||||
regex += wxT( "\\" );
|
||||
regex += c;
|
||||
}
|
||||
else
|
||||
|
@ -221,20 +221,20 @@ bool EDA_PATTERN_MATCH_RELATIONAL::SetPattern( const wxString& aPattern )
|
|||
|
||||
m_key = key.Lower();
|
||||
|
||||
if( rel == "<" )
|
||||
if( rel == wxT( "<" ) )
|
||||
m_relation = LT;
|
||||
else if( rel == "<=" )
|
||||
else if( rel == wxT( "<=" ) )
|
||||
m_relation = LE;
|
||||
else if( rel == "=" )
|
||||
else if( rel == wxT( "=" ) )
|
||||
m_relation = EQ;
|
||||
else if( rel == ">=" )
|
||||
else if( rel == wxT( ">=" ) )
|
||||
m_relation = GE;
|
||||
else if( rel == ">" )
|
||||
else if( rel == wxT( ">" ) )
|
||||
m_relation = GT;
|
||||
else
|
||||
return false;
|
||||
|
||||
if( val == "" )
|
||||
if( val == wxT( "" ) )
|
||||
{
|
||||
// Matching on empty values keeps the match list from going empty when
|
||||
// the user types the relational operator character, which helps prevent
|
||||
|
@ -333,19 +333,19 @@ wxRegEx EDA_PATTERN_MATCH_RELATIONAL::m_regex_description(
|
|||
wxRegEx EDA_PATTERN_MATCH_RELATIONAL::m_regex_search(
|
||||
R"(^(\w+)(<|<=|=|>=|>)([-+]?[\d.]*)(\w*)$)", wxRE_ADVANCED );
|
||||
const std::map<wxString, double> EDA_PATTERN_MATCH_RELATIONAL::m_units = {
|
||||
{ "p", 1e-12 },
|
||||
{ "n", 1e-9 },
|
||||
{ "u", 1e-6 },
|
||||
{ "m", 1e-3 },
|
||||
{ "", 1. },
|
||||
{ "k", 1e3 },
|
||||
{ "meg",1e6 },
|
||||
{ "g", 1e9 },
|
||||
{ "t", 1e12 },
|
||||
{ "ki", 1024. },
|
||||
{ "mi", 1048576. },
|
||||
{ "gi", 1073741824. },
|
||||
{ "ti", 1099511627776. } };
|
||||
{ wxT( "p" ), 1e-12 },
|
||||
{ wxT( "n" ), 1e-9 },
|
||||
{ wxT( "u" ), 1e-6 },
|
||||
{ wxT( "m" ), 1e-3 },
|
||||
{ wxT( "" ), 1. },
|
||||
{ wxT( "k" ), 1e3 },
|
||||
{ wxT( "meg" ),1e6 },
|
||||
{ wxT( "g" ), 1e9 },
|
||||
{ wxT( "t" ), 1e12 },
|
||||
{ wxT( "ki" ), 1024. },
|
||||
{ wxT( "mi" ), 1048576. },
|
||||
{ wxT( "gi" ), 1073741824. },
|
||||
{ wxT( "ti" ), 1099511627776. } };
|
||||
|
||||
|
||||
EDA_COMBINED_MATCHER::EDA_COMBINED_MATCHER( const wxString& aPattern )
|
||||
|
|
|
@ -72,13 +72,13 @@ wxString EDA_SHAPE::SHAPE_T_asString() const
|
|||
{
|
||||
switch( m_shape )
|
||||
{
|
||||
case SHAPE_T::SEGMENT: return "S_SEGMENT";
|
||||
case SHAPE_T::RECT: return "S_RECT";
|
||||
case SHAPE_T::ARC: return "S_ARC";
|
||||
case SHAPE_T::CIRCLE: return "S_CIRCLE";
|
||||
case SHAPE_T::POLY: return "S_POLYGON";
|
||||
case SHAPE_T::BEZIER: return "S_CURVE";
|
||||
case SHAPE_T::LAST: return "!S_LAST!"; // Synthetic value, but if we come across it then
|
||||
case SHAPE_T::SEGMENT: return wxT( "S_SEGMENT" );
|
||||
case SHAPE_T::RECT: return wxT( "S_RECT" );
|
||||
case SHAPE_T::ARC: return wxT( "S_ARC" );
|
||||
case SHAPE_T::CIRCLE: return wxT( "S_CIRCLE" );
|
||||
case SHAPE_T::POLY: return wxT( "S_POLYGON" );
|
||||
case SHAPE_T::BEZIER: return wxT( "S_CURVE" );
|
||||
case SHAPE_T::LAST: return wxT( "!S_LAST!" ); // Synthetic value, but if we come across it then
|
||||
// we're going to want to know.
|
||||
}
|
||||
|
||||
|
@ -572,7 +572,7 @@ void EDA_SHAPE::ShapeGetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PA
|
|||
case SHAPE_T::POLY:
|
||||
aList.emplace_back( shape, _( "Polygon" ) );
|
||||
|
||||
msg.Printf( "%d", GetPolyShape().Outline(0).PointCount() );
|
||||
msg.Printf( wxT( "%d" ), GetPolyShape().Outline(0).PointCount() );
|
||||
aList.emplace_back( _( "Points" ), msg );
|
||||
break;
|
||||
|
||||
|
|
|
@ -27,8 +27,8 @@
|
|||
static bool normalizeAbsolutePaths( const wxFileName& aPathA, const wxFileName& aPathB,
|
||||
wxString* aResultPath )
|
||||
{
|
||||
wxCHECK_MSG( aPathA.IsAbsolute(), false, aPathA.GetPath() + " is not an absolute path." );
|
||||
wxCHECK_MSG( aPathB.IsAbsolute(), false, aPathB.GetPath() + " is not an absolute path." );
|
||||
wxCHECK_MSG( aPathA.IsAbsolute(), false, aPathA.GetPath() + wxT( " is not an absolute path." ) );
|
||||
wxCHECK_MSG( aPathB.IsAbsolute(), false, aPathB.GetPath() + wxT( " is not an absolute path." ) );
|
||||
|
||||
if( aPathA.GetPath() == aPathB.GetPath() )
|
||||
return true;
|
||||
|
@ -141,7 +141,7 @@ wxString NormalizePath( const wxFileName& aFilePath, const ENV_VAR_MAP* aEnvVars
|
|||
if( aProject )
|
||||
return NormalizePath( aFilePath, aEnvVars, aProject->GetProjectPath() );
|
||||
else
|
||||
return NormalizePath( aFilePath, aEnvVars, "" );
|
||||
return NormalizePath( aFilePath, aEnvVars, wxT( "" ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -34,14 +34,14 @@ using STRING_MAP = std::map<wxString, wxString>;
|
|||
* (where they are originally defined)
|
||||
*/
|
||||
static const ENV_VAR::ENV_VAR_LIST predefinedEnvVars = {
|
||||
"KIPRJMOD",
|
||||
"KICAD6_SYMBOL_DIR",
|
||||
"KICAD6_3DMODEL_DIR",
|
||||
"KICAD6_FOOTPRINT_DIR",
|
||||
"KICAD6_TEMPLATE_DIR",
|
||||
"KICAD_USER_TEMPLATE_DIR",
|
||||
"KICAD_PTEMPLATES",
|
||||
"KICAD6_3RD_PARTY",
|
||||
wxT( "KIPRJMOD" ),
|
||||
wxT( "KICAD6_SYMBOL_DIR" ),
|
||||
wxT( "KICAD6_3DMODEL_DIR" ),
|
||||
wxT( "KICAD6_FOOTPRINT_DIR" ),
|
||||
wxT( "KICAD6_TEMPLATE_DIR" ),
|
||||
wxT( "KICAD_USER_TEMPLATE_DIR" ),
|
||||
wxT( "KICAD_PTEMPLATES" ),
|
||||
wxT( "KICAD6_3RD_PARTY" ),
|
||||
};
|
||||
|
||||
|
||||
|
@ -67,40 +67,40 @@ static void initialiseEnvVarHelp( STRING_MAP& aMap )
|
|||
{
|
||||
// Set up dynamically, as we want to be able to use _() translations,
|
||||
// which can't be done statically
|
||||
aMap["KICAD6_FOOTPRINT_DIR"] =
|
||||
aMap[wxT( "KICAD6_FOOTPRINT_DIR" )] =
|
||||
_( "The base path of locally installed system "
|
||||
"footprint libraries (.pretty folders).");
|
||||
aMap["KICAD6_3DMODEL_DIR"] =
|
||||
aMap[wxT( "KICAD6_3DMODEL_DIR" )] =
|
||||
_( "The base path of system footprint 3D shapes (.3Dshapes folders).");
|
||||
aMap["KICAD6_SYMBOL_DIR"] =
|
||||
aMap[wxT( "KICAD6_SYMBOL_DIR" )] =
|
||||
_( "The base path of the locally installed symbol libraries.");
|
||||
aMap["KICAD6_TEMPLATE_DIR"] =
|
||||
aMap[wxT( "KICAD6_TEMPLATE_DIR" )] =
|
||||
_( "A directory containing project templates installed with KiCad.");
|
||||
aMap["KICAD_USER_TEMPLATE_DIR"] =
|
||||
aMap[wxT( "KICAD_USER_TEMPLATE_DIR" )] =
|
||||
_( "Optional. Can be defined if you want to create your own project "
|
||||
"templates folder.");
|
||||
aMap["KICAD6_3RD_PARTY"] =
|
||||
aMap[wxT( "KICAD6_3RD_PARTY" )] =
|
||||
_( "A directory containing 3rd party plugins, libraries and other "
|
||||
"downloadable content.");
|
||||
aMap["KIPRJMOD"] =
|
||||
aMap[wxT( "KIPRJMOD" )] =
|
||||
_("Internally defined by KiCad (cannot be edited) and is set "
|
||||
"to the absolute path of the currently loaded project file. This environment "
|
||||
"variable can be used to define files and paths relative to the currently loaded "
|
||||
"project. For instance, ${KIPRJMOD}/libs/footprints.pretty can be defined as a "
|
||||
"folder containing a project specific footprint library named footprints.pretty." );
|
||||
aMap["KICAD6_SCRIPTING_DIR"] =
|
||||
aMap[wxT( "KICAD6_SCRIPTING_DIR" )] =
|
||||
_( "A directory containing system-wide scripts installed with KiCad" );
|
||||
aMap["KICAD6_USER_SCRIPTING_DIR"] =
|
||||
aMap[wxT( "KICAD6_USER_SCRIPTING_DIR" )] =
|
||||
_( "A directory containing user-specific scripts installed with KiCad" );
|
||||
|
||||
// Deprecated vars
|
||||
aMap["KICAD_PTEMPLATES"] =
|
||||
aMap[wxT( "KICAD_PTEMPLATES" )] =
|
||||
_( "Deprecated version of KICAD_TEMPLATE_DIR.");
|
||||
aMap["KISYS3DMOD"] =
|
||||
aMap[wxT( "KISYS3DMOD" )] =
|
||||
_( "Deprecated version of KICAD6_3DMODEL_DIR." );
|
||||
aMap["KISYSMOD"] =
|
||||
aMap[wxT( "KISYSMOD" )] =
|
||||
_( "Deprecated version of KICAD6_FOOTPRINT_DIR." );
|
||||
aMap["KICAD_SYMBOL_DIR"] =
|
||||
aMap[wxT( "KICAD_SYMBOL_DIR" )] =
|
||||
_( "Deprecated version of KICAD_SYMBOL_DIR.");
|
||||
}
|
||||
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
const wxString IO_ERROR::What() const
|
||||
{
|
||||
#ifdef DEBUG
|
||||
return wxString( "IO_ERROR: " ) + Problem() + "\n\n" + Where();
|
||||
return wxString( wxT( "IO_ERROR: " ) ) + Problem() + wxT( "\n\n" ) + Where();
|
||||
#else
|
||||
return Problem();
|
||||
#endif
|
||||
|
|
|
@ -28,19 +28,19 @@
|
|||
|
||||
// TODO Executable names TODO
|
||||
#ifdef __WINDOWS__
|
||||
const wxString CVPCB_EXE ( "cvpcb.exe" );
|
||||
const wxString PCBNEW_EXE ( "pcbnew.exe" );
|
||||
const wxString EESCHEMA_EXE ( "eeschema.exe" );
|
||||
const wxString GERBVIEW_EXE ( "gerbview.exe" );
|
||||
const wxString BITMAPCONVERTER_EXE ( "bitmap2component.exe" );
|
||||
const wxString PCB_CALCULATOR_EXE ( "pcb_calculator.exe" );
|
||||
const wxString PL_EDITOR_EXE ( "pl_editor.exe" );
|
||||
const wxString CVPCB_EXE ( wxT( "cvpcb.exe" ) );
|
||||
const wxString PCBNEW_EXE ( wxT( "pcbnew.exe" ) );
|
||||
const wxString EESCHEMA_EXE ( wxT( "eeschema.exe" ) );
|
||||
const wxString GERBVIEW_EXE ( wxT( "gerbview.exe" ) );
|
||||
const wxString BITMAPCONVERTER_EXE ( wxT( "bitmap2component.exe" ) );
|
||||
const wxString PCB_CALCULATOR_EXE ( wxT( "pcb_calculator.exe" ) );
|
||||
const wxString PL_EDITOR_EXE ( wxT( "pl_editor.exe" ) );
|
||||
#else
|
||||
const wxString CVPCB_EXE ( "cvpcb" );
|
||||
const wxString PCBNEW_EXE ( "pcbnew" );
|
||||
const wxString EESCHEMA_EXE ( "eeschema" );
|
||||
const wxString GERBVIEW_EXE ( "gerbview" );
|
||||
const wxString BITMAPCONVERTER_EXE ( "bitmap2component" );
|
||||
const wxString PCB_CALCULATOR_EXE ( "pcb_calculator" );
|
||||
const wxString PL_EDITOR_EXE ( "pl_editor" );
|
||||
const wxString CVPCB_EXE ( wxT( "cvpcb" ) );
|
||||
const wxString PCBNEW_EXE ( wxT( "pcbnew" ) );
|
||||
const wxString EESCHEMA_EXE ( wxT( "eeschema" ) );
|
||||
const wxString GERBVIEW_EXE ( wxT( "gerbview" ) );
|
||||
const wxString BITMAPCONVERTER_EXE ( wxT( "bitmap2component" ) );
|
||||
const wxString PCB_CALCULATOR_EXE ( wxT( "pcb_calculator" ) );
|
||||
const wxString PL_EDITOR_EXE ( wxT( "pl_editor" ) );
|
||||
#endif
|
||||
|
|
|
@ -44,7 +44,7 @@
|
|||
#define ERRFLG_RELPATH (2)
|
||||
#define ERRFLG_ENVPATH (4)
|
||||
|
||||
#define MASK_3D_RESOLVER "3D_RESOLVER"
|
||||
#define MASK_3D_RESOLVER wxT( "3D_RESOLVER" )
|
||||
|
||||
static std::mutex mutex_resolver;
|
||||
|
||||
|
@ -64,7 +64,7 @@ bool FILENAME_RESOLVER::Set3DConfigDir( const wxString& aConfigDir )
|
|||
if( aConfigDir.empty() )
|
||||
return false;
|
||||
|
||||
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), "" );
|
||||
wxFileName cfgdir( ExpandEnvVarSubstitutions( aConfigDir, m_project ), wxT( "" ) );
|
||||
|
||||
cfgdir.Normalize();
|
||||
|
||||
|
@ -85,7 +85,7 @@ bool FILENAME_RESOLVER::SetProject( PROJECT* aProject, bool* flgChanged )
|
|||
if( !aProject )
|
||||
return false;
|
||||
|
||||
wxFileName projdir( ExpandEnvVarSubstitutions( aProject->GetProjectPath(), aProject ), "" );
|
||||
wxFileName projdir( ExpandEnvVarSubstitutions( aProject->GetProjectPath(), aProject ), wxT( "" ) );
|
||||
|
||||
projdir.Normalize();
|
||||
|
||||
|
@ -100,8 +100,8 @@ bool FILENAME_RESOLVER::SetProject( PROJECT* aProject, bool* flgChanged )
|
|||
if( m_paths.empty() )
|
||||
{
|
||||
SEARCH_PATH al;
|
||||
al.m_Alias = "${KIPRJMOD}";
|
||||
al.m_Pathvar = "${KIPRJMOD}";
|
||||
al.m_Alias = wxT( "${KIPRJMOD}" );
|
||||
al.m_Pathvar = wxT( "${KIPRJMOD}" );
|
||||
al.m_Pathexp = m_curProjDir;
|
||||
m_paths.push_back( al );
|
||||
|
||||
|
@ -129,7 +129,7 @@ bool FILENAME_RESOLVER::SetProject( PROJECT* aProject, bool* flgChanged )
|
|||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
ostr << " * [INFO] changed project dir to ";
|
||||
ostr << m_paths.front().m_Pathexp.ToUTF8();
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -168,8 +168,8 @@ bool FILENAME_RESOLVER::createPathList()
|
|||
// the user may change this later with a call to SetProjectDir()
|
||||
|
||||
SEARCH_PATH lpath;
|
||||
lpath.m_Alias = "${KIPRJMOD}";
|
||||
lpath.m_Pathvar = "${KIPRJMOD}";
|
||||
lpath.m_Alias = wxT( "${KIPRJMOD}" );
|
||||
lpath.m_Pathvar = wxT( "${KIPRJMOD}" );
|
||||
lpath.m_Pathexp = m_curProjDir;
|
||||
m_paths.push_back( lpath );
|
||||
wxFileName fndummy;
|
||||
|
@ -188,7 +188,7 @@ bool FILENAME_RESOLVER::createPathList()
|
|||
}
|
||||
else
|
||||
{
|
||||
fndummy.Assign( pathVal, "" );
|
||||
fndummy.Assign( pathVal, wxT( "" ) );
|
||||
fndummy.Normalize();
|
||||
lpath.m_Pathexp = fndummy.GetFullPath();
|
||||
}
|
||||
|
@ -210,12 +210,12 @@ bool FILENAME_RESOLVER::createPathList()
|
|||
return false;
|
||||
|
||||
#ifdef DEBUG
|
||||
wxLogTrace( MASK_3D_RESOLVER, " * [3D model] search paths:\n" );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( " * [3D model] search paths:\n" ) );
|
||||
std::list< SEARCH_PATH >::const_iterator sPL = m_paths.begin();
|
||||
|
||||
while( sPL != m_paths.end() )
|
||||
{
|
||||
wxLogTrace( MASK_3D_RESOLVER, " + %s : '%s'\n", (*sPL).m_Alias.GetData(),
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( " + %s : '%s'\n" ), (*sPL).m_Alias.GetData(),
|
||||
(*sPL).m_Pathexp.GetData() );
|
||||
++sPL;
|
||||
}
|
||||
|
@ -274,7 +274,7 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
|
||||
// special case: if a path begins with ${ENV_VAR} but is not in the resolver's path list
|
||||
// then add it.
|
||||
if( aFileName.StartsWith( "${" ) || aFileName.StartsWith( "$(" ) )
|
||||
if( aFileName.StartsWith( wxT( "${" ) ) || aFileName.StartsWith( wxT( "$(" ) ) )
|
||||
checkEnvVarPath( aFileName );
|
||||
|
||||
return tname;
|
||||
|
@ -282,15 +282,15 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
|
||||
// if a path begins with ${ENV_VAR}/$(ENV_VAR) and is not resolved then the file either does
|
||||
// not exist or the ENV_VAR is not defined
|
||||
if( aFileName.StartsWith( "${" ) || aFileName.StartsWith( "$(" ) )
|
||||
if( aFileName.StartsWith( wxT( "${" ) ) || aFileName.StartsWith( wxT( "$(" ) ) )
|
||||
{
|
||||
if( !( m_errflags & ERRFLG_ENVPATH ) )
|
||||
{
|
||||
m_errflags |= ERRFLG_ENVPATH;
|
||||
wxString errmsg = "[3D File Resolver] No such path; ensure the environment var is defined";
|
||||
errmsg.append( "\n" );
|
||||
wxString errmsg = wxT( "[3D File Resolver] No such path; ensure the environment var is defined" );
|
||||
errmsg.append( wxT( "\n" ) );
|
||||
errmsg.append( tname );
|
||||
errmsg.append( "\n" );
|
||||
errmsg.append( wxT( "\n" ) );
|
||||
wxLogTrace( tracePathsAndFiles, errmsg );
|
||||
}
|
||||
|
||||
|
@ -306,9 +306,9 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
// been checked. This case accounts for partial paths which do not contain ${KIPRJMOD}.
|
||||
// This check is performed before checking the path relative to ${KICAD6_3DMODEL_DIR} so that
|
||||
// users can potentially override a model within ${KICAD6_3DMODEL_DIR}.
|
||||
if( !m_paths.begin()->m_Pathexp.empty() && !tname.StartsWith( ":" ) )
|
||||
if( !m_paths.begin()->m_Pathexp.empty() && !tname.StartsWith( wxT( ":" ) ) )
|
||||
{
|
||||
tmpFN.Assign( m_paths.begin()->m_Pathexp, "" );
|
||||
tmpFN.Assign( m_paths.begin()->m_Pathexp, wxT( "" ) );
|
||||
wxString fullPath = tmpFN.GetPathWithSep() + tname;
|
||||
|
||||
fullPath = ExpandEnvVarSubstitutions( fullPath, m_project );
|
||||
|
@ -324,10 +324,10 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
}
|
||||
|
||||
// check the partial path relative to ${KICAD6_3DMODEL_DIR} (legacy behavior)
|
||||
if( !tname.StartsWith( ":" ) )
|
||||
if( !tname.StartsWith( wxT( ":" ) ) )
|
||||
{
|
||||
wxFileName fpath;
|
||||
wxString fullPath( "${KICAD6_3DMODEL_DIR}" );
|
||||
wxString fullPath( wxT( "${KICAD6_3DMODEL_DIR}" ) );
|
||||
fullPath.Append( fpath.GetPathSeparator() );
|
||||
fullPath.Append( tname );
|
||||
fullPath = ExpandEnvVarSubstitutions( fullPath, m_project );
|
||||
|
@ -352,10 +352,10 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
// this can happen if the file was intended to be relative to ${KICAD6_3DMODEL_DIR}
|
||||
// but ${KICAD6_3DMODEL_DIR} is not set or is incorrect.
|
||||
m_errflags |= ERRFLG_RELPATH;
|
||||
wxString errmsg = "[3D File Resolver] No such path";
|
||||
errmsg.append( "\n" );
|
||||
wxString errmsg = wxT( "[3D File Resolver] No such path" );
|
||||
errmsg.append( wxT( "\n" ) );
|
||||
errmsg.append( tname );
|
||||
errmsg.append( "\n" );
|
||||
errmsg.append( wxT( "\n" ) );
|
||||
wxLogTrace( tracePathsAndFiles, errmsg );
|
||||
}
|
||||
|
||||
|
@ -365,7 +365,7 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
for( const SEARCH_PATH& path : m_paths )
|
||||
{
|
||||
// ${ENV_VAR} paths have already been checked; skip them
|
||||
if( path.m_Alias.StartsWith( "${" ) || path.m_Alias.StartsWith( "$(" ) )
|
||||
if( path.m_Alias.StartsWith( wxT( "${" ) ) || path.m_Alias.StartsWith( wxT( "$(" ) ) )
|
||||
continue;
|
||||
|
||||
if( path.m_Alias == alias && !path.m_Pathexp.empty() )
|
||||
|
@ -392,10 +392,10 @@ wxString FILENAME_RESOLVER::ResolvePath( const wxString& aFileName )
|
|||
if( !( m_errflags & ERRFLG_ALIAS ) )
|
||||
{
|
||||
m_errflags |= ERRFLG_ALIAS;
|
||||
wxString errmsg = "[3D File Resolver] No such path; ensure the path alias is defined";
|
||||
errmsg.append( "\n" );
|
||||
wxString errmsg = wxT( "[3D File Resolver] No such path; ensure the path alias is defined" );
|
||||
errmsg.append( wxT( "\n" ) );
|
||||
errmsg.append( tname.substr( 1 ) );
|
||||
errmsg.append( "\n" );
|
||||
errmsg.append( wxT( "\n" ) );
|
||||
wxLogTrace( tracePathsAndFiles, errmsg );
|
||||
}
|
||||
|
||||
|
@ -420,15 +420,15 @@ bool FILENAME_RESOLVER::addPath( const SEARCH_PATH& aPath )
|
|||
tpath.m_Pathvar.erase( tpath.m_Pathvar.length() - 1 );
|
||||
#endif
|
||||
|
||||
wxFileName path( ExpandEnvVarSubstitutions( tpath.m_Pathvar, m_project ), "" );
|
||||
wxFileName path( ExpandEnvVarSubstitutions( tpath.m_Pathvar, m_project ), wxT( "" ) );
|
||||
|
||||
path.Normalize();
|
||||
|
||||
if( !path.DirExists() )
|
||||
{
|
||||
if( aPath.m_Pathvar == "${KICAD6_3DMODEL_DIR}"
|
||||
|| aPath.m_Pathvar == "${KIPRJMOD}" || aPath.m_Pathvar == "$(KIPRJMOD)"
|
||||
|| aPath.m_Pathvar == "${KISYS3DMOD}" || aPath.m_Pathvar == "$(KISYS3DMOD)" )
|
||||
if( aPath.m_Pathvar == wxT( "${KICAD6_3DMODEL_DIR}" )
|
||||
|| aPath.m_Pathvar == wxT( "${KIPRJMOD}" ) || aPath.m_Pathvar == wxT( "$(KIPRJMOD)" )
|
||||
|| aPath.m_Pathvar == wxT( "${KISYS3DMOD}" ) || aPath.m_Pathvar == wxT( "$(KISYS3DMOD)" ) )
|
||||
{
|
||||
// suppress the message if the missing pathvar is a system variable
|
||||
}
|
||||
|
@ -465,10 +465,10 @@ bool FILENAME_RESOLVER::addPath( const SEARCH_PATH& aPath )
|
|||
wxString msg = _( "Alias: " );
|
||||
msg.append( tpath.m_Alias );
|
||||
msg.append( wxT( "\n" ) );
|
||||
msg.append( _( "This path:" ) + wxS( " " ) );
|
||||
msg.append( _( "This path:wxT( " ) + wxS( " ) " ) );
|
||||
msg.append( tpath.m_Pathvar );
|
||||
msg.append( wxT( "\n" ) );
|
||||
msg.append( _( "Existing path:" ) + wxS( " " ) );
|
||||
msg.append( _( "Existing path:wxT( " ) + wxS( " ) " ) );
|
||||
msg.append( sPL->m_Pathvar );
|
||||
wxMessageBox( msg, _( "Bad alias (duplicate name)" ) );
|
||||
|
||||
|
@ -489,9 +489,9 @@ bool FILENAME_RESOLVER::readPathList()
|
|||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "3D configuration directory is unknown";
|
||||
ostr << " * " << errmsg.ToUTF8();
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxString errmsg = wxT( "3D configuration directory is unknown" );
|
||||
ostr << wxT( " * " ) << errmsg.ToUTF8();
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -508,10 +508,10 @@ bool FILENAME_RESOLVER::readPathList()
|
|||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "no 3D configuration file";
|
||||
wxString errmsg = wxT( "no 3D configuration file" );
|
||||
ostr << " * " << errmsg.ToUTF8() << " '";
|
||||
ostr << cfgname.ToUTF8() << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -521,9 +521,9 @@ bool FILENAME_RESOLVER::readPathList()
|
|||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "Could not open configuration file";
|
||||
wxString errmsg = wxT( "Could not open configuration file" );
|
||||
ostr << " * " << errmsg.ToUTF8() << " '" << cfgname.ToUTF8() << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -566,9 +566,9 @@ bool FILENAME_RESOLVER::readPathList()
|
|||
|
||||
// Don't add KICAD6_3DMODEL_DIR, one of its legacy equivalents, or KIPRJMOD from a
|
||||
// config file. They're system variables are are defined at runtime.
|
||||
if( al.m_Alias == "${KICAD6_3DMODEL_DIR}"
|
||||
|| al.m_Alias == "${KIPRJMOD}" || al.m_Alias == "$(KIPRJMOD)"
|
||||
|| al.m_Alias == "${KISYS3DMOD}" || al.m_Alias == "$(KISYS3DMOD)" )
|
||||
if( al.m_Alias == wxT( "${KICAD6_3DMODEL_DIR}" )
|
||||
|| al.m_Alias == wxT( "${KIPRJMOD}" ) || al.m_Alias == wxT( "$(KIPRJMOD)" )
|
||||
|| al.m_Alias == wxT( "${KISYS3DMOD}" ) || al.m_Alias == wxT( "$(KISYS3DMOD)" ) )
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
@ -600,7 +600,7 @@ bool FILENAME_RESOLVER::WritePathList( const wxString& aDir, const wxString& aFi
|
|||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = _( "3D configuration directory is unknown" );
|
||||
ostr << " * " << errmsg.ToUTF8();
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
wxMessageBox( errmsg, _( "Write 3D search path list" ) );
|
||||
|
||||
return false;
|
||||
|
@ -613,7 +613,7 @@ bool FILENAME_RESOLVER::WritePathList( const wxString& aDir, const wxString& aFi
|
|||
// skip all ${ENV_VAR} alias names
|
||||
|
||||
while( sPL != m_paths.end()
|
||||
&& ( sPL->m_Alias.StartsWith( "${" ) || sPL->m_Alias.StartsWith( "$(" ) ) )
|
||||
&& ( sPL->m_Alias.StartsWith( wxT( "${" ) ) || sPL->m_Alias.StartsWith( wxT( "$(" ) ) ) )
|
||||
{
|
||||
++sPL;
|
||||
}
|
||||
|
@ -631,7 +631,7 @@ bool FILENAME_RESOLVER::WritePathList( const wxString& aDir, const wxString& aFi
|
|||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = _( "Could not open configuration file" );
|
||||
ostr << " * " << errmsg.ToUTF8() << " '" << cfgname.ToUTF8() << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
wxMessageBox( errmsg, _( "Write 3D search path list" ) );
|
||||
|
||||
return false;
|
||||
|
@ -677,17 +677,17 @@ void FILENAME_RESOLVER::checkEnvVarPath( const wxString& aPath )
|
|||
{
|
||||
bool useParen = false;
|
||||
|
||||
if( aPath.StartsWith( "$(" ) )
|
||||
if( aPath.StartsWith( wxT( "$(" ) ) )
|
||||
useParen = true;
|
||||
else if( !aPath.StartsWith( "${" ) )
|
||||
else if( !aPath.StartsWith( wxT( "${" ) ) )
|
||||
return;
|
||||
|
||||
size_t pEnd;
|
||||
|
||||
if( useParen )
|
||||
pEnd = aPath.find( ")" );
|
||||
pEnd = aPath.find( wxT( ")" ) );
|
||||
else
|
||||
pEnd = aPath.find( "}" );
|
||||
pEnd = aPath.find( wxT( "}" ) );
|
||||
|
||||
if( pEnd == wxString::npos )
|
||||
return;
|
||||
|
@ -704,7 +704,7 @@ void FILENAME_RESOLVER::checkEnvVarPath( const wxString& aPath )
|
|||
if( sPL->m_Alias == envar )
|
||||
return;
|
||||
|
||||
if( !sPL->m_Alias.StartsWith( "${" ) )
|
||||
if( !sPL->m_Alias.StartsWith( wxT( "${" ) ) )
|
||||
break;
|
||||
|
||||
++sPL;
|
||||
|
@ -713,7 +713,7 @@ void FILENAME_RESOLVER::checkEnvVarPath( const wxString& aPath )
|
|||
SEARCH_PATH lpath;
|
||||
lpath.m_Alias = envar;
|
||||
lpath.m_Pathvar = lpath.m_Alias;
|
||||
wxFileName tmpFN( ExpandEnvVarSubstitutions( lpath.m_Alias, m_project ), "" );
|
||||
wxFileName tmpFN( ExpandEnvVarSubstitutions( lpath.m_Alias, m_project ), wxT( "" ) );
|
||||
|
||||
wxUniChar psep = tmpFN.GetPathSeparator();
|
||||
tmpFN.Normalize();
|
||||
|
@ -758,7 +758,7 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
|
|||
wxFileName fpath;
|
||||
|
||||
// in the case of aliases, ensure that we use the most recent definition
|
||||
if( sL->m_Alias.StartsWith( "${" ) || sL->m_Alias.StartsWith( "$(" ) )
|
||||
if( sL->m_Alias.StartsWith( wxT( "${" ) ) || sL->m_Alias.StartsWith( wxT( "$(" ) ) )
|
||||
{
|
||||
wxString tpath = ExpandEnvVarSubstitutions( sL->m_Alias, m_project );
|
||||
|
||||
|
@ -789,19 +789,19 @@ wxString FILENAME_RESOLVER::ShortenPath( const wxString& aFullPathName )
|
|||
fname.Replace( wxT( "\\" ), wxT( "/" ) );
|
||||
#endif
|
||||
|
||||
if( sL->m_Alias.StartsWith( "${" ) || sL->m_Alias.StartsWith( "$(" ) )
|
||||
if( sL->m_Alias.StartsWith( wxT( "${" ) ) || sL->m_Alias.StartsWith( wxT( "$(" ) ) )
|
||||
{
|
||||
// old style ENV_VAR
|
||||
tname = sL->m_Alias;
|
||||
tname.Append( "/" );
|
||||
tname.Append( wxT( "/" ) );
|
||||
tname.append( fname );
|
||||
}
|
||||
else
|
||||
{
|
||||
// new style alias
|
||||
tname = ":";
|
||||
tname = wxT( ":" );
|
||||
tname.append( sL->m_Alias );
|
||||
tname.append( ":" );
|
||||
tname.append( wxT( ":" ) );
|
||||
tname.append( fname );
|
||||
}
|
||||
|
||||
|
@ -864,9 +864,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
|
|||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "bad Hollerith string on line";
|
||||
wxString errmsg = wxT( "bad Hollerith string on line" );
|
||||
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -877,9 +877,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
|
|||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "missing opening quote mark in config file";
|
||||
wxString errmsg = wxT( "missing opening quote mark in config file" );
|
||||
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -890,9 +890,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
|
|||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "invalid entry (unexpected end of line)";
|
||||
wxString errmsg = wxT( "invalid entry (unexpected end of line)" );
|
||||
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -906,9 +906,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
|
|||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "bad Hollerith string on line";
|
||||
wxString errmsg = wxT( "bad Hollerith string on line" );
|
||||
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -922,9 +922,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
|
|||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "invalid entry (unexpected end of line)";
|
||||
wxString errmsg = wxT( "invalid entry (unexpected end of line)" );
|
||||
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -939,9 +939,9 @@ static bool getHollerith( const std::string& aString, size_t& aIndex, wxString&
|
|||
{
|
||||
std::ostringstream ostr;
|
||||
ostr << __FILE__ << ": " << __FUNCTION__ << ": " << __LINE__ << "\n";
|
||||
wxString errmsg = "missing closing quote mark in config file";
|
||||
wxString errmsg = wxT( "missing closing quote mark in config file" );
|
||||
ostr << " * " << errmsg.ToUTF8() << "\n'" << aString << "'";
|
||||
wxLogTrace( MASK_3D_RESOLVER, "%s\n", ostr.str().c_str() );
|
||||
wxLogTrace( MASK_3D_RESOLVER, wxT( "%s\n" ), ostr.str().c_str() );
|
||||
|
||||
return false;
|
||||
}
|
||||
|
@ -1015,9 +1015,9 @@ bool FILENAME_RESOLVER::ValidateFileName( const wxString& aFileName, bool& hasAl
|
|||
// environment string before testing
|
||||
aliasEnd = wxString::npos;
|
||||
|
||||
if( aFileName.StartsWith( "${" ) )
|
||||
if( aFileName.StartsWith( wxT( "${" ) ) )
|
||||
aliasEnd = aFileName.find( '}' );
|
||||
else if( aFileName.StartsWith( "$(" ) )
|
||||
else if( aFileName.StartsWith( wxT( "$(" ) ) )
|
||||
aliasEnd = aFileName.find( ')' );
|
||||
|
||||
if( aliasEnd != wxString::npos )
|
||||
|
@ -1031,8 +1031,8 @@ bool FILENAME_RESOLVER::ValidateFileName( const wxString& aFileName, bool& hasAl
|
|||
// So remove separators
|
||||
wxString lpath_no_sep = lpath;
|
||||
#ifdef __WINDOWS__
|
||||
lpath_no_sep.Replace( "/", " " );
|
||||
lpath_no_sep.Replace( "\\", " " );
|
||||
lpath_no_sep.Replace( wxT( "/" ), wxT( " " ) );
|
||||
lpath_no_sep.Replace( wxT( "\\" ), wxT( " " ) );
|
||||
|
||||
// A disk identifier is allowed, and therefore remove its separator
|
||||
if( lpath_no_sep.Length() > 1 && lpath_no_sep[1] == ':' )
|
||||
|
@ -1064,32 +1064,32 @@ bool FILENAME_RESOLVER::GetKicadPaths( std::list< wxString >& paths ) const
|
|||
while( mS != mE )
|
||||
{
|
||||
// filter out URLs, template directories, and known system paths
|
||||
if( mS->first == wxString( "KICAD_PTEMPLATES" )
|
||||
|| mS->first == wxString( "KICAD6_FOOTPRINT_DIR" ) )
|
||||
if( mS->first == wxString( wxT( "KICAD_PTEMPLATES" ) )
|
||||
|| mS->first == wxString( wxT( "KICAD6_FOOTPRINT_DIR" ) ) )
|
||||
{
|
||||
++mS;
|
||||
continue;
|
||||
}
|
||||
|
||||
if( wxString::npos != mS->second.GetValue().find( wxString( "://" ) ) )
|
||||
if( wxString::npos != mS->second.GetValue().find( wxString( wxT( "://" ) ) ) )
|
||||
{
|
||||
++mS;
|
||||
continue;
|
||||
}
|
||||
|
||||
wxString tmp( "${" );
|
||||
wxString tmp( wxT( "${" ) );
|
||||
tmp.Append( mS->first );
|
||||
tmp.Append( "}" );
|
||||
tmp.Append( wxT( "}" ) );
|
||||
paths.push_back( tmp );
|
||||
|
||||
if( tmp == "${KICAD6_3DMODEL_DIR}" )
|
||||
if( tmp == wxT( "${KICAD6_3DMODEL_DIR}" ) )
|
||||
hasKisys3D = true;
|
||||
|
||||
++mS;
|
||||
}
|
||||
|
||||
if( !hasKisys3D )
|
||||
paths.emplace_back("${KICAD6_3DMODEL_DIR}" );
|
||||
paths.emplace_back(wxT( "${KICAD6_3DMODEL_DIR}" ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -139,7 +139,7 @@ bool FOOTPRINT_FILTER_IT::FootprintFilterMatch( FOOTPRINT_INFO& aItem )
|
|||
// If the filter contains a ':' character, include the library name in the pattern
|
||||
if( each_filter->GetPattern().Contains( ":" ) )
|
||||
{
|
||||
name = aItem.GetLibNickname().Lower() + ":";
|
||||
name = aItem.GetLibNickname().Lower() + wxT( ":" );
|
||||
}
|
||||
|
||||
name += aItem.GetFootprintName().Lower();
|
||||
|
|
|
@ -107,7 +107,7 @@ void FOOTPRINT_LIST::DisplayErrors( wxTopLevelWindow* aWindow )
|
|||
wxString tmp = error->Problem();
|
||||
|
||||
// Preserve new lines in error messages so queued errors don't run together.
|
||||
tmp.Replace( "\n", "<BR>" );
|
||||
tmp.Replace( wxT( "\n" ), wxT( "<BR>" ) );
|
||||
msg += wxT( "<p>" ) + tmp + wxT( "</p>" );
|
||||
}
|
||||
|
||||
|
@ -148,7 +148,7 @@ FOOTPRINT_LIST* FOOTPRINT_LIST::GetInstance( KIWAY& aKiway )
|
|||
return nullptr;
|
||||
|
||||
if( !footprintInfo->GetCount() )
|
||||
footprintInfo->ReadCacheFromFile( aKiway.Prj().GetProjectPath() + "fp-info-cache" );
|
||||
footprintInfo->ReadCacheFromFile( aKiway.Prj().GetProjectPath() + wxT( "fp-info-cache" ) );
|
||||
|
||||
return footprintInfo;
|
||||
}
|
||||
|
|
|
@ -474,7 +474,7 @@ FOOTPRINT* FP_LIB_TABLE::FootprintLoadWithOptionalNickname( const LIB_ID& aFootp
|
|||
|
||||
const wxString FP_LIB_TABLE::GlobalPathEnvVariableName()
|
||||
{
|
||||
return "KICAD6_FOOTPRINT_DIR";
|
||||
return wxT( "KICAD6_FOOTPRINT_DIR" );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -59,7 +59,7 @@ static OPT<double> getKiCadConfiguredScale( const COMMON_SETTINGS& aConfig )
|
|||
|
||||
if( scale )
|
||||
{
|
||||
wxLogTrace( traceHiDpi, "Scale factor (configured): %f", *scale );
|
||||
wxLogTrace( traceHiDpi, wxT( "Scale factor (configured): %f" ), *scale );
|
||||
}
|
||||
|
||||
return scale;
|
||||
|
@ -85,7 +85,7 @@ static OPT<double> getEnvironmentScale()
|
|||
|
||||
if( scale )
|
||||
{
|
||||
wxLogTrace( traceHiDpi, "Scale factor (environment): %f", *scale );
|
||||
wxLogTrace( traceHiDpi, wxT( "Scale factor (environment): %f" ), *scale );
|
||||
}
|
||||
|
||||
return scale;
|
||||
|
@ -118,14 +118,14 @@ double DPI_SCALING::GetScaleFactor() const
|
|||
// On Linux, this will not work until WX 3.2 and GTK >= 3.10
|
||||
// Otherwise it returns 1.0
|
||||
val = KIPLATFORM::UI::GetSystemScaleFactor( m_window );
|
||||
wxLogTrace( traceHiDpi, "Scale factor (WX): %f", *val );
|
||||
wxLogTrace( traceHiDpi, wxT( "Scale factor (WX): %f" ), *val );
|
||||
}
|
||||
|
||||
if( !val )
|
||||
{
|
||||
// Nothing else we can do, give it a default value
|
||||
val = GetDefaultScaleFactor();
|
||||
wxLogTrace( traceHiDpi, "Scale factor (default): %f", *val );
|
||||
wxLogTrace( traceHiDpi, wxT( "Scale factor (default): %f" ), *val );
|
||||
}
|
||||
|
||||
return *val;
|
||||
|
@ -141,14 +141,14 @@ bool DPI_SCALING::GetCanvasIsAutoScaled() const
|
|||
}
|
||||
|
||||
const bool automatic = getKiCadConfiguredScale( *m_config ) == boost::none;
|
||||
wxLogTrace( traceHiDpi, "Scale is automatic: %d", automatic );
|
||||
wxLogTrace( traceHiDpi, wxT( "Scale is automatic: %d" ), automatic );
|
||||
return automatic;
|
||||
}
|
||||
|
||||
|
||||
void DPI_SCALING::SetDpiConfig( bool aAuto, double aValue )
|
||||
{
|
||||
wxCHECK_RET( m_config != nullptr, "Setting DPI config without a config store." );
|
||||
wxCHECK_RET( m_config != nullptr, wxT( "Setting DPI config without a config store." ) );
|
||||
|
||||
const double value = aAuto ? 0.0 : aValue;
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ GAL_DISPLAY_OPTIONS::GAL_DISPLAY_OPTIONS()
|
|||
|
||||
void GAL_DISPLAY_OPTIONS::ReadWindowSettings( WINDOW_SETTINGS& aCfg )
|
||||
{
|
||||
wxLogTrace( traceGalDispOpts, "Reading app-specific options" );
|
||||
wxLogTrace( traceGalDispOpts, wxT( "Reading app-specific options" ) );
|
||||
|
||||
m_gridStyle = UTIL::GetValFromConfig( gridStyleConfigVals, aCfg.grid.style );
|
||||
m_gridSnapping = UTIL::GetValFromConfig( gridSnapConfigVals, aCfg.grid.snap );
|
||||
|
@ -91,7 +91,7 @@ void GAL_DISPLAY_OPTIONS::ReadWindowSettings( WINDOW_SETTINGS& aCfg )
|
|||
|
||||
void GAL_DISPLAY_OPTIONS::ReadCommonConfig( COMMON_SETTINGS& aSettings, wxWindow* aWindow )
|
||||
{
|
||||
wxLogTrace( traceGalDispOpts, "Reading common config" );
|
||||
wxLogTrace( traceGalDispOpts, wxT( "Reading common config" ) );
|
||||
|
||||
gl_antialiasing_mode = static_cast<KIGFX::OPENGL_ANTIALIASING_MODE>(
|
||||
aSettings.m_Graphics.opengl_aa_mode );
|
||||
|
@ -109,7 +109,7 @@ void GAL_DISPLAY_OPTIONS::ReadCommonConfig( COMMON_SETTINGS& aSettings, wxWindow
|
|||
void GAL_DISPLAY_OPTIONS::ReadConfig( COMMON_SETTINGS& aCommonConfig,
|
||||
WINDOW_SETTINGS& aWindowConfig, wxWindow* aWindow )
|
||||
{
|
||||
wxLogTrace( traceGalDispOpts, "Reading common and app config" );
|
||||
wxLogTrace( traceGalDispOpts, wxT( "Reading common and app config" ) );
|
||||
|
||||
ReadWindowSettings( aWindowConfig );
|
||||
|
||||
|
@ -119,7 +119,7 @@ void GAL_DISPLAY_OPTIONS::ReadConfig( COMMON_SETTINGS& aCommonConfig,
|
|||
|
||||
void GAL_DISPLAY_OPTIONS::WriteConfig( WINDOW_SETTINGS& aCfg )
|
||||
{
|
||||
wxLogTrace( traceGalDispOpts, "Writing window settings" );
|
||||
wxLogTrace( traceGalDispOpts, wxT( "Writing window settings" ) );
|
||||
|
||||
aCfg.grid.style = UTIL::GetConfigForVal( gridStyleConfigVals, m_gridStyle );
|
||||
aCfg.grid.snap = UTIL::GetConfigForVal( gridSnapConfigVals, m_gridSnapping );
|
||||
|
@ -143,7 +143,7 @@ void GAL_DISPLAY_OPTIONS::UpdateScaleFactor()
|
|||
|
||||
void GAL_DISPLAY_OPTIONS::NotifyChanged()
|
||||
{
|
||||
wxLogTrace( traceGalDispOpts, "Change notification" );
|
||||
wxLogTrace( traceGalDispOpts, wxT( "Change notification" ) );
|
||||
|
||||
Notify( &GAL_DISPLAY_OPTIONS_OBSERVER::OnGalDisplayOptionsChanged, *this );
|
||||
}
|
||||
|
|
|
@ -62,12 +62,12 @@ CACHED_CONTAINER_GPU::CACHED_CONTAINER_GPU( unsigned int aSize ) :
|
|||
// disable glCopyBuffer, causes crashes/freezes on certain driver versions
|
||||
// Note, Intel's GL_VENDOR string varies depending on GPU/driver generation
|
||||
// But generally always starts with Intel at least
|
||||
if( vendor.StartsWith( "Intel" ) || vendor.Contains( "etnaviv" ) )
|
||||
if( vendor.StartsWith( wxT( "Intel" ) ) || vendor.Contains( "etnaviv" ) )
|
||||
{
|
||||
m_useCopyBuffer = false;
|
||||
}
|
||||
|
||||
KI_TRACE( traceGalProfile, "VBO initial size: %d\n", m_currentSize );
|
||||
KI_TRACE( traceGalProfile, wxT( "VBO initial size: %d\n" ), m_currentSize );
|
||||
|
||||
glGenBuffers( 1, &m_glBufferHandle );
|
||||
glBindBuffer( GL_ARRAY_BUFFER, m_glBufferHandle );
|
||||
|
@ -213,14 +213,14 @@ bool CACHED_CONTAINER_GPU::defragmentResize( unsigned int aNewSize )
|
|||
#ifdef KICAD_GAL_PROFILE
|
||||
totalTime.Stop();
|
||||
|
||||
wxLogTrace( traceGalCachedContainerGpu, "Defragmented container storing %d vertices / %.1f ms",
|
||||
wxLogTrace( traceGalCachedContainerGpu, wxT( "Defragmented container storing %d vertices / %.1f ms" ),
|
||||
m_currentSize - m_freeSpace, totalTime.msecs() );
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
m_freeSpace += ( aNewSize - m_currentSize );
|
||||
m_currentSize = aNewSize;
|
||||
|
||||
KI_TRACE( traceGalProfile, "VBO size %d used %d\n", m_currentSize, AllItemsSize() );
|
||||
KI_TRACE( traceGalProfile, wxT( "VBO size %d used %d\n" ), m_currentSize, AllItemsSize() );
|
||||
|
||||
// Now there is only one big chunk of free memory
|
||||
m_freeChunks.clear();
|
||||
|
@ -280,14 +280,14 @@ bool CACHED_CONTAINER_GPU::defragmentResizeMemcpy( unsigned int aNewSize )
|
|||
#ifdef KICAD_GAL_PROFILE
|
||||
totalTime.Stop();
|
||||
|
||||
wxLogTrace( traceGalCachedContainerGpu, "Defragmented container storing %d vertices / %.1f ms",
|
||||
wxLogTrace( traceGalCachedContainerGpu, wxT( "Defragmented container storing %d vertices / %.1f ms" ),
|
||||
m_currentSize - m_freeSpace, totalTime.msecs() );
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
m_freeSpace += ( aNewSize - m_currentSize );
|
||||
m_currentSize = aNewSize;
|
||||
|
||||
KI_TRACE( traceGalProfile, "VBO size %d used: %d \n", m_currentSize, AllItemsSize() );
|
||||
KI_TRACE( traceGalProfile, wxT( "VBO size %d used: %d \n" ), m_currentSize, AllItemsSize() );
|
||||
|
||||
// Now there is only one big chunk of free memory
|
||||
m_freeChunks.clear();
|
||||
|
|
|
@ -118,7 +118,7 @@ bool CACHED_CONTAINER_RAM::defragmentResize( unsigned int aNewSize )
|
|||
#ifdef KICAD_GAL_PROFILE
|
||||
totalTime.Stop();
|
||||
|
||||
wxLogTrace( traceGalCachedContainer, "Defragmented container storing %d vertices / %.1f ms",
|
||||
wxLogTrace( traceGalCachedContainer, wxT( "Defragmented container storing %d vertices / %.1f ms" ),
|
||||
m_currentSize - m_freeSpace, totalTime.msecs() );
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
|
||||
|
|
|
@ -452,7 +452,7 @@ void OPENGL_GAL::BeginDrawing()
|
|||
}
|
||||
catch( const std::runtime_error& )
|
||||
{
|
||||
wxLogVerbose( "Could not create a framebuffer for overlays.\n" );
|
||||
wxLogVerbose( wxT( "Could not create a framebuffer for overlays.\n" ) );
|
||||
m_overlayBuffer = 0;
|
||||
}
|
||||
|
||||
|
@ -579,7 +579,7 @@ void OPENGL_GAL::BeginDrawing()
|
|||
|
||||
void OPENGL_GAL::EndDrawing()
|
||||
{
|
||||
wxASSERT_MSG( m_isContextLocked, "What happened to the context lock?" );
|
||||
wxASSERT_MSG( m_isContextLocked, wxT( "What happened to the context lock?" ) );
|
||||
|
||||
PROF_TIMER cntTotal("gl-end-total");
|
||||
PROF_TIMER cntEndCached("gl-end-cached");
|
||||
|
@ -629,7 +629,7 @@ void OPENGL_GAL::EndDrawing()
|
|||
|
||||
cntTotal.Stop();
|
||||
|
||||
KI_TRACE( traceGalProfile, "Timing: %s %s %s %s %s %s\n", cntTotal.to_string(),
|
||||
KI_TRACE( traceGalProfile, wxT( "Timing: %s %s %s %s %s %s\n" ), cntTotal.to_string(),
|
||||
cntEndCached.to_string(), cntEndNoncached.to_string(), cntEndOverlay.to_string(),
|
||||
cntComposite.to_string(), cntSwap.to_string() );
|
||||
}
|
||||
|
@ -637,7 +637,7 @@ void OPENGL_GAL::EndDrawing()
|
|||
|
||||
void OPENGL_GAL::LockContext( int aClientCookie )
|
||||
{
|
||||
wxASSERT_MSG( !m_isContextLocked, "Context already locked." );
|
||||
wxASSERT_MSG( !m_isContextLocked, wxT( "Context already locked." ) );
|
||||
m_isContextLocked = true;
|
||||
m_lockClientCookie = aClientCookie;
|
||||
|
||||
|
@ -2232,7 +2232,7 @@ void OPENGL_GAL::init()
|
|||
{
|
||||
wxASSERT( IsShownOnScreen() );
|
||||
|
||||
wxASSERT_MSG( m_isContextLocked, "This should only be called from within a locked context." );
|
||||
wxASSERT_MSG( m_isContextLocked, wxT( "This should only be called from within a locked context." ) );
|
||||
|
||||
// IsDisplayAttr() handles WX_GL_{MAJOR,MINOR}_VERSION correctly only in 3.0.4
|
||||
// starting with 3.1.0 one should use wxGLContext::IsOk() (done by GL_CONTEXT_MANAGER)
|
||||
|
|
|
@ -74,41 +74,41 @@ int checkGlError( const std::string& aInfo, const char* aFile, int aLine, bool a
|
|||
switch( status )
|
||||
{
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_ATTACHMENT_EXT:
|
||||
errorMsg = "The framebuffer attachment points are incomplete.";
|
||||
errorMsg = wxT( "The framebuffer attachment points are incomplete." );
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT_EXT:
|
||||
errorMsg = "No images attached to the framebuffer.";
|
||||
errorMsg = wxT( "No images attached to the framebuffer." );
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_DRAW_BUFFER_EXT:
|
||||
errorMsg = "The framebuffer does not have at least one image attached to it.";
|
||||
errorMsg = wxT( "The framebuffer does not have at least one image attached to it." );
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_READ_BUFFER_EXT:
|
||||
errorMsg = "The framebuffer read buffer is incomplete.";
|
||||
errorMsg = wxT( "The framebuffer read buffer is incomplete." );
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_UNSUPPORTED_EXT:
|
||||
errorMsg = "The combination of internal formats of the attached images violates "
|
||||
"an implementation dependent set of restrictions.";
|
||||
errorMsg = wxT( "The combination of internal formats of the attached images violates " )
|
||||
wxT( "an implementation dependent set of restrictions." );
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_MULTISAMPLE_EXT:
|
||||
errorMsg = "GL_RENDERBUFFER_SAMPLES is not the same for all attached render "
|
||||
"buffers.";
|
||||
errorMsg = wxT( "GL_RENDERBUFFER_SAMPLES is not the same for all attached render " )
|
||||
wxT( "buffers." );
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_LAYER_TARGETS_EXT:
|
||||
errorMsg = "Framebuffer incomplete layer targets errors.";
|
||||
errorMsg = wxT( "Framebuffer incomplete layer targets errors." );
|
||||
break;
|
||||
|
||||
case GL_FRAMEBUFFER_INCOMPLETE_DIMENSIONS_EXT:
|
||||
errorMsg = "Framebuffer attachments have different dimensions";
|
||||
errorMsg = wxT( "Framebuffer attachments have different dimensions" );
|
||||
break;
|
||||
|
||||
default:
|
||||
errorMsg.Printf( "Unknown incomplete framebuffer error id %X", status );
|
||||
errorMsg.Printf( wxT( "Unknown incomplete framebuffer error id %X" ), status );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -140,7 +140,7 @@ int checkGlError( const std::string& aInfo, const char* aFile, int aLine, bool a
|
|||
if( aThrow )
|
||||
{
|
||||
wxLogTrace( traceGalOpenGlError, wxT( "Throwing exception for glGetError() '%s' "
|
||||
"in file '%s' on line %d." ),
|
||||
wxT( "in file '%s' on line %d." ) ),
|
||||
errorMsg,
|
||||
aFile,
|
||||
aLine );
|
||||
|
@ -154,7 +154,7 @@ int checkGlError( const std::string& aInfo, const char* aFile, int aLine, bool a
|
|||
aFile,
|
||||
aLine );
|
||||
|
||||
DisplayErrorMessage( nullptr, "OpenGL Error", errorMsg );
|
||||
DisplayErrorMessage( nullptr, wxT( "OpenGL Error" ), errorMsg );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -170,13 +170,13 @@ static void GLAPIENTRY debugMsgCallback( GLenum aSource, GLenum aType, GLuint aI
|
|||
{
|
||||
switch( aSeverity )
|
||||
{
|
||||
case GL_DEBUG_SEVERITY_HIGH: wxLogDebug( "OpenGL ERROR: " ); break;
|
||||
case GL_DEBUG_SEVERITY_MEDIUM: wxLogDebug( "OpenGL WARNING: " ); break;
|
||||
case GL_DEBUG_SEVERITY_LOW: wxLogDebug( "OpenGL INFO: " ); break;
|
||||
case GL_DEBUG_SEVERITY_HIGH: wxLogDebug( wxT( "OpenGL ERROR: " ) ); break;
|
||||
case GL_DEBUG_SEVERITY_MEDIUM: wxLogDebug( wxT( "OpenGL WARNING: " ) ); break;
|
||||
case GL_DEBUG_SEVERITY_LOW: wxLogDebug( wxT( "OpenGL INFO: " ) ); break;
|
||||
case GL_DEBUG_SEVERITY_NOTIFICATION: return;
|
||||
}
|
||||
|
||||
wxLogDebug( "%s\n", aMessage );
|
||||
wxLogDebug( wxT( "%s\n" ), aMessage );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -182,7 +182,7 @@ size_t hash_fp_item( const EDA_ITEM* aItem, int aFlags )
|
|||
break;
|
||||
|
||||
default:
|
||||
wxASSERT_MSG( false, "Unhandled type in function hash_fp_item() (exporter_gencad.cpp)" );
|
||||
wxASSERT_MSG( false, wxT( "Unhandled type in function hash_fp_item() (exporter_gencad.cpp)" ) );
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
|
|
@ -329,7 +329,7 @@ void ReadHotKeyConfig( const wxString& aFileName, std::map<std::string, int>& aH
|
|||
|
||||
if( fileName.IsEmpty() )
|
||||
{
|
||||
wxFileName fn( "user" );
|
||||
wxFileName fn( wxT( "user" ) );
|
||||
fn.SetExt( HotkeyFileExtension );
|
||||
fn.SetPath( SETTINGS_MANAGER::GetUserSettingsPath() );
|
||||
fileName = fn.GetFullPath();
|
||||
|
@ -338,19 +338,19 @@ void ReadHotKeyConfig( const wxString& aFileName, std::map<std::string, int>& aH
|
|||
if( !wxFile::Exists( fileName ) )
|
||||
return;
|
||||
|
||||
wxFFile file( fileName, "rb" );
|
||||
wxFFile file( fileName, wxT( "rb" ) );
|
||||
|
||||
if( !file.IsOpened() ) // There is a problem to open file
|
||||
return;
|
||||
|
||||
wxString input;
|
||||
file.ReadAll( &input );
|
||||
input.Replace( "\r\n", "\n" ); // Convert Windows files to Unix line-ends
|
||||
wxStringTokenizer fileTokenizer( input, "\n", wxTOKEN_STRTOK );
|
||||
input.Replace( wxT( "\r\n" ), wxT( "\n" ) ); // Convert Windows files to Unix line-ends
|
||||
wxStringTokenizer fileTokenizer( input, wxT( "\n" ), wxTOKEN_STRTOK );
|
||||
|
||||
while( fileTokenizer.HasMoreTokens() )
|
||||
{
|
||||
wxStringTokenizer lineTokenizer( fileTokenizer.GetNextToken(), "\t" );
|
||||
wxStringTokenizer lineTokenizer( fileTokenizer.GetNextToken(), wxT( "\t" ) );
|
||||
|
||||
wxString cmdName = lineTokenizer.GetNextToken();
|
||||
wxString keyName = lineTokenizer.GetNextToken();
|
||||
|
@ -364,7 +364,7 @@ void ReadHotKeyConfig( const wxString& aFileName, std::map<std::string, int>& aH
|
|||
int WriteHotKeyConfig( const std::map<std::string, TOOL_ACTION*>& aActionMap )
|
||||
{
|
||||
std::map<std::string, int> hotkeys;
|
||||
wxFileName fn( "user" );
|
||||
wxFileName fn( wxT( "user" ) );
|
||||
|
||||
fn.SetExt( HotkeyFileExtension );
|
||||
fn.SetPath( SETTINGS_MANAGER::GetUserSettingsPath() );
|
||||
|
@ -418,7 +418,7 @@ int ReadLegacyHotkeyConfigFile( const wxString& aFilename, std::map<std::string,
|
|||
if( !wxFile::Exists( fn.GetFullPath() ) )
|
||||
return 0;
|
||||
|
||||
wxFFile cfgfile( fn.GetFullPath(), "rb" );
|
||||
wxFFile cfgfile( fn.GetFullPath(), wxT( "rb" ) );
|
||||
|
||||
if( !cfgfile.IsOpened() ) // There is a problem to open file
|
||||
return 0;
|
||||
|
@ -433,7 +433,7 @@ int ReadLegacyHotkeyConfigFile( const wxString& aFilename, std::map<std::string,
|
|||
|
||||
// Is this the wxConfig format? If so, remove "Keys=" and parse the newlines.
|
||||
if( data.StartsWith( wxT("Keys="), &data ) )
|
||||
data.Replace( "\\n", "\n", true );
|
||||
data.Replace( wxT( "\\n" ), wxT( "\n" ), true );
|
||||
|
||||
// parse
|
||||
wxStringTokenizer tokenizer( data, L"\r\n", wxTOKEN_STRTOK );
|
||||
|
|
|
@ -116,7 +116,7 @@ KICAD_CURL_EASY::KICAD_CURL_EASY() : m_headers( nullptr )
|
|||
|
||||
if( !m_CURL )
|
||||
{
|
||||
THROW_IO_ERROR( "Unable to initialize CURL session" );
|
||||
THROW_IO_ERROR( wxT( "Unable to initialize CURL session" ) );
|
||||
}
|
||||
|
||||
curl_easy_setopt( m_CURL, CURLOPT_WRITEFUNCTION, write_callback );
|
||||
|
@ -133,23 +133,23 @@ KICAD_CURL_EASY::KICAD_CURL_EASY() : m_headers( nullptr )
|
|||
wxPlatformInfo platformInfo;
|
||||
wxString application( Pgm().App().GetAppName() );
|
||||
wxString version( GetBuildVersion() );
|
||||
wxString platform = "(" + wxGetOsDescription() + ";" + GetPlatformGetBitnessName();
|
||||
wxString platform = wxT( "(" ) + wxGetOsDescription() + wxT( ";" ) + GetPlatformGetBitnessName();
|
||||
|
||||
#if defined( KICAD_BUILD_ARCH_X64 )
|
||||
platform << ";64-bit";
|
||||
platform << wxT( ";64-bit" );
|
||||
#elif defined( KICAD_BUILD_ARCH_X86 )
|
||||
platform << ";32-bit";
|
||||
platform << wxT( ";32-bit" );
|
||||
#elif defined( KICAD_BUILD_ARCH_ARM )
|
||||
platform << ";ARM 32-bit";
|
||||
platform << wxT( ";ARM 32-bit" );
|
||||
#elif defined( KICAD_BUILD_ARCH_ARM64 )
|
||||
platform << ";ARM 64-bit";
|
||||
platform << wxT( ";ARM 64-bit" );
|
||||
#endif
|
||||
|
||||
platform << ")";
|
||||
platform << wxT( ")" );
|
||||
|
||||
wxString user_agent = "KiCad/" + version + " " + platform + " " + application;
|
||||
wxString user_agent = wxT( "KiCad/" ) + version + wxT( " " ) + platform + wxT( " " ) + application;
|
||||
|
||||
user_agent << "/" << GetBuildDate();
|
||||
user_agent << wxT( "/" ) << GetBuildDate();
|
||||
setOption<const char*>( CURLOPT_USERAGENT, user_agent.ToStdString().c_str() );
|
||||
setOption( CURLOPT_ACCEPT_ENCODING, "gzip,deflate" );
|
||||
}
|
||||
|
|
|
@ -88,7 +88,7 @@ KIID::KIID()
|
|||
}
|
||||
catch( const boost::uuids::entropy_error& )
|
||||
{
|
||||
wxLogFatalError( "A Boost UUID entropy exception was thrown in %s:%s.",
|
||||
wxLogFatalError( wxT( "A Boost UUID entropy exception was thrown in %s:%s." ),
|
||||
__FILE__, __FUNCTION__ );
|
||||
}
|
||||
#endif
|
||||
|
@ -140,7 +140,7 @@ KIID::KIID( const wxString& aString ) : m_uuid(), m_cached_timestamp( 0 )
|
|||
}
|
||||
catch( const boost::uuids::entropy_error& )
|
||||
{
|
||||
wxLogFatalError( "A Boost UUID entropy exception was thrown in %s:%s.",
|
||||
wxLogFatalError( wxT( "A Boost UUID entropy exception was thrown in %s:%s." ),
|
||||
__FILE__, __FUNCTION__ );
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -37,7 +37,7 @@ bool LaunchExternal( const wxString& aPath )
|
|||
|
||||
wxString PATH, xdg_open;
|
||||
|
||||
if( wxGetEnv( "PATH", &PATH ) && wxFindFileInPath( &xdg_open, PATH, "xdg-open" ) )
|
||||
if( wxGetEnv( wxT( "PATH" ), &PATH ) && wxFindFileInPath( &xdg_open, PATH, wxT( "xdg-open" ) ) )
|
||||
{
|
||||
const char* argv[3];
|
||||
argv[0] = xdg_open.fn_str();
|
||||
|
|
|
@ -88,7 +88,7 @@ void LIB_TABLE_ROW::Format( OUTPUTFORMATTER* out, int nestLevel ) const
|
|||
|
||||
if( !GetIsEnabled() )
|
||||
{
|
||||
extraOptions += "(disabled)";
|
||||
extraOptions += wxT( "(disabled)" );
|
||||
}
|
||||
|
||||
out->Print( nestLevel, "(lib (name %s)(type %s)(uri %s)(options %s)(descr %s)%s)\n",
|
||||
|
@ -206,7 +206,7 @@ LIB_TABLE_ROW* LIB_TABLE::findRow( const wxString& aNickName, bool aCheckIfEnabl
|
|||
for( const std::pair<const wxString, int>& entry : cur->nickIndex )
|
||||
{
|
||||
wxString legacyLibName = entry.first;
|
||||
legacyLibName.Replace( " ", "_" );
|
||||
legacyLibName.Replace( wxT( " " ), wxT( "_" ) );
|
||||
|
||||
if( legacyLibName == aNickName )
|
||||
{
|
||||
|
@ -236,7 +236,7 @@ const LIB_TABLE_ROW* LIB_TABLE::FindRowByURI( const wxString& aURI )
|
|||
{
|
||||
wxString tmp = cur->rows[i].GetFullURI( true );
|
||||
|
||||
if( tmp.Find( "://" ) != wxNOT_FOUND )
|
||||
if( tmp.Find( wxT( "://" ) ) != wxNOT_FOUND )
|
||||
{
|
||||
if( tmp == aURI )
|
||||
return &cur->rows[i]; // found as URI
|
||||
|
|
|
@ -146,7 +146,7 @@ LIB_TREE_NODE_UNIT::LIB_TREE_NODE_UNIT( LIB_TREE_NODE* aParent, LIB_TREE_ITEM* a
|
|||
m_Unit = aUnit;
|
||||
m_LibId = aParent->m_LibId;
|
||||
|
||||
m_Name = namePrefix + " " + aItem->GetUnitReference( aUnit );
|
||||
m_Name = namePrefix + wxT( " " ) + aItem->GetUnitReference( aUnit );
|
||||
m_Desc = wxEmptyString;
|
||||
m_MatchName = wxEmptyString;
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ LIB_TREE_MODEL_ADAPTER::LIB_TREE_MODEL_ADAPTER( EDA_BASE_FRAME* aParent,
|
|||
// Read the pinned entries from the project config
|
||||
PROJECT_FILE& project = m_parent->Kiway().Prj().GetProjectFile();
|
||||
|
||||
std::vector<wxString>& entries = ( m_pinnedKey == "pinned_symbol_libs" ) ?
|
||||
std::vector<wxString>& entries = ( m_pinnedKey == wxT( "pinned_symbol_libs" ) ) ?
|
||||
project.m_PinnedSymbolLibs :
|
||||
project.m_PinnedFootprintLibs;
|
||||
|
||||
|
@ -117,7 +117,7 @@ void LIB_TREE_MODEL_ADAPTER::SavePinnedItems()
|
|||
{
|
||||
PROJECT_FILE& project = m_parent->Kiway().Prj().GetProjectFile();
|
||||
|
||||
std::vector<wxString>& entries = ( m_pinnedKey == "pinned_symbol_libs" ) ?
|
||||
std::vector<wxString>& entries = ( m_pinnedKey == wxT( "pinned_symbol_libs" ) ) ?
|
||||
project.m_PinnedSymbolLibs :
|
||||
project.m_PinnedFootprintLibs;
|
||||
|
||||
|
@ -283,7 +283,7 @@ void LIB_TREE_MODEL_ADAPTER::AttachTo( wxDataViewCtrl* aDataViewCtrl )
|
|||
|
||||
// The extent of the text doesn't take into account the space on either side
|
||||
// in the header, so artificially pad it
|
||||
wxSize partHeadMinWidth = KIUI::GetTextSize( partHead + "MMM", aDataViewCtrl );
|
||||
wxSize partHeadMinWidth = KIUI::GetTextSize( partHead + wxT( "MMM" ), aDataViewCtrl );
|
||||
|
||||
// Ensure the part column is wider than the smallest allowable width
|
||||
if( m_colWidths[PART_COL] < partHeadMinWidth.x )
|
||||
|
|
|
@ -39,12 +39,12 @@ std::unique_ptr<wxSingleInstanceChecker> LockFile( const wxString& aFileName )
|
|||
|
||||
fn.MakeAbsolute();
|
||||
|
||||
wxString lockFileName = fn.GetFullPath() + ".lock";
|
||||
wxString lockFileName = fn.GetFullPath() + wxT( ".lock" );
|
||||
|
||||
lockFileName.Replace( "/", "_" );
|
||||
lockFileName.Replace( wxT( "/" ), wxT( "_" ) );
|
||||
|
||||
// We can have filenames coming from Windows, so also convert Windows separator
|
||||
lockFileName.Replace( "\\", "_" );
|
||||
lockFileName.Replace( wxT( "\\" ), wxT( "_" ) );
|
||||
|
||||
auto p = std::make_unique<wxSingleInstanceChecker>( lockFileName,
|
||||
GetKicadLockFilePath() );
|
||||
|
@ -65,24 +65,24 @@ wxString GetKicadLockFilePath()
|
|||
|
||||
#if defined( __WXMAC__ )
|
||||
// In OSX use the standard per user cache directory
|
||||
lockpath.AppendDir( "Library" );
|
||||
lockpath.AppendDir( "Caches" );
|
||||
lockpath.AppendDir( "kicad" );
|
||||
lockpath.AppendDir( wxT( "Library" ) );
|
||||
lockpath.AppendDir( wxT( "Caches" ) );
|
||||
lockpath.AppendDir( wxT( "kicad" ) );
|
||||
#elif defined( __UNIX__ )
|
||||
wxString envstr;
|
||||
// Try first the standard XDG_RUNTIME_DIR, falling back to XDG_CACHE_HOME
|
||||
if( wxGetEnv( "XDG_RUNTIME_DIR", &envstr ) && !envstr.IsEmpty() )
|
||||
if( wxGetEnv( wxT( "XDG_RUNTIME_DIR" ), &envstr ) && !envstr.IsEmpty() )
|
||||
{
|
||||
lockpath.AssignDir( envstr );
|
||||
}
|
||||
else if( wxGetEnv( "XDG_CACHE_HOME", &envstr ) && !envstr.IsEmpty() )
|
||||
else if( wxGetEnv( wxT( "XDG_CACHE_HOME" ), &envstr ) && !envstr.IsEmpty() )
|
||||
{
|
||||
lockpath.AssignDir( envstr );
|
||||
}
|
||||
else
|
||||
{
|
||||
// If all fails, just use ~/.cache
|
||||
lockpath.AppendDir( ".cache" );
|
||||
lockpath.AppendDir( wxT( ".cache" ) );
|
||||
}
|
||||
|
||||
lockpath.AppendDir( wxString::Format( "kicad_v%s", GetMajorMinorVersion() ) );
|
||||
|
|
|
@ -30,9 +30,9 @@
|
|||
|
||||
// lowercase or pretty case depending on platform
|
||||
#if defined( __WXMAC__ ) || defined( __WXMSW__ )
|
||||
#define KICAD_PATH_STR "KiCad"
|
||||
#define KICAD_PATH_STR wxT( "KiCad" )
|
||||
#else
|
||||
#define KICAD_PATH_STR "kicad"
|
||||
#define KICAD_PATH_STR wxT( "kicad" )
|
||||
#endif
|
||||
|
||||
|
||||
|
@ -55,7 +55,7 @@ wxString PATHS::GetUserPluginsPath()
|
|||
wxFileName tmp;
|
||||
getUserDocumentPath( tmp );
|
||||
|
||||
tmp.AppendDir( "plugins" );
|
||||
tmp.AppendDir( wxT( "plugins" ) );
|
||||
|
||||
return tmp.GetPath();
|
||||
}
|
||||
|
@ -66,7 +66,7 @@ wxString PATHS::GetUserPlugins3DPath()
|
|||
wxFileName tmp;
|
||||
|
||||
tmp.AssignDir( PATHS::GetUserPluginsPath() );
|
||||
tmp.AppendDir( "3d" );
|
||||
tmp.AppendDir( wxT( "3d" ) );
|
||||
|
||||
return tmp.GetPath();
|
||||
}
|
||||
|
@ -77,7 +77,7 @@ wxString PATHS::GetUserScriptingPath()
|
|||
wxFileName tmp;
|
||||
getUserDocumentPath( tmp );
|
||||
|
||||
tmp.AppendDir( "scripting" );
|
||||
tmp.AppendDir( wxT( "scripting" ) );
|
||||
|
||||
return tmp.GetPath();
|
||||
}
|
||||
|
@ -88,7 +88,7 @@ wxString PATHS::GetUserTemplatesPath()
|
|||
wxFileName tmp;
|
||||
getUserDocumentPath( tmp );
|
||||
|
||||
tmp.AppendDir( "template" );
|
||||
tmp.AppendDir( wxT( "template" ) );
|
||||
|
||||
return tmp.GetPathWithSep();
|
||||
}
|
||||
|
@ -99,7 +99,7 @@ wxString PATHS::GetDefaultUserSymbolsPath()
|
|||
wxFileName tmp;
|
||||
getUserDocumentPath( tmp );
|
||||
|
||||
tmp.AppendDir( "symbols" );
|
||||
tmp.AppendDir( wxT( "symbols" ) );
|
||||
|
||||
return tmp.GetPath();
|
||||
}
|
||||
|
@ -110,7 +110,7 @@ wxString PATHS::GetDefaultUserFootprintsPath()
|
|||
wxFileName tmp;
|
||||
getUserDocumentPath( tmp );
|
||||
|
||||
tmp.AppendDir( "footprints" );
|
||||
tmp.AppendDir( wxT( "footprints" ) );
|
||||
|
||||
return tmp.GetPath();
|
||||
}
|
||||
|
@ -121,7 +121,7 @@ wxString PATHS::GetDefaultUser3DModelsPath()
|
|||
wxFileName tmp;
|
||||
getUserDocumentPath( tmp );
|
||||
|
||||
tmp.AppendDir( "3dmodels" );
|
||||
tmp.AppendDir( wxT( "3dmodels" ) );
|
||||
|
||||
return tmp.GetPath();
|
||||
}
|
||||
|
@ -131,7 +131,7 @@ wxString PATHS::GetDefault3rdPartyPath()
|
|||
wxFileName tmp;
|
||||
getUserDocumentPath( tmp );
|
||||
|
||||
tmp.AppendDir( "3rdparty" );
|
||||
tmp.AppendDir( wxT( "3rdparty" ) );
|
||||
|
||||
return tmp.GetPath();
|
||||
}
|
||||
|
@ -141,7 +141,7 @@ wxString PATHS::GetDefaultUserProjectsPath()
|
|||
wxFileName tmp;
|
||||
getUserDocumentPath( tmp );
|
||||
|
||||
tmp.AppendDir( "projects" );
|
||||
tmp.AppendDir( wxT( "projects" ) );
|
||||
|
||||
return tmp.GetPath();
|
||||
}
|
||||
|
@ -263,7 +263,7 @@ wxString PATHS::GetStockPlugins3DPath()
|
|||
// KICAD_PLUGINDIR = CMAKE_INSTALL_FULL_LIBDIR path is the absolute path
|
||||
// corresponding to the install path used for constructing KICAD_USER_PLUGIN
|
||||
wxString tfname = wxString::FromUTF8Unchecked( KICAD_PLUGINDIR );
|
||||
fn.Assign( tfname, "" );
|
||||
fn.Assign( tfname, wxT( "" ) );
|
||||
fn.AppendDir( wxT( "kicad" ) );
|
||||
fn.AppendDir( wxT( "plugins" ) );
|
||||
#elif defined( __WXMAC__ )
|
||||
|
@ -273,7 +273,7 @@ wxString PATHS::GetStockPlugins3DPath()
|
|||
fn.AppendDir( wxT( "plugins" ) );
|
||||
#endif
|
||||
|
||||
fn.AppendDir( "3d" );
|
||||
fn.AppendDir( wxT( "3d" ) );
|
||||
|
||||
return fn.GetPathWithSep();
|
||||
}
|
||||
|
@ -309,7 +309,7 @@ wxString PATHS::GetDocumentationPath()
|
|||
#if defined( __WXMAC__ )
|
||||
path = GetOSXKicadDataDir();
|
||||
#elif defined( __WXMSW__ )
|
||||
path = getWindowsKiCadRoot() + "share/doc/kicad";
|
||||
path = getWindowsKiCadRoot() + wxT( "share/doc/kicad" );
|
||||
#else
|
||||
path = wxString::FromUTF8Unchecked( KICAD_DOCS );
|
||||
#endif
|
||||
|
@ -360,9 +360,9 @@ wxString PATHS::GetOSXKicadUserDataDir()
|
|||
wxFileName udir( wxStandardPaths::Get().GetUserDataDir(), wxEmptyString );
|
||||
|
||||
// Since appname is different if started via launcher or standalone binary
|
||||
// map all to "kicad" here
|
||||
// map all to wxT( "kicad" ) here
|
||||
udir.RemoveLastDir();
|
||||
udir.AppendDir( "kicad" );
|
||||
udir.AppendDir( wxT( "kicad" ) );
|
||||
|
||||
return udir.GetPath();
|
||||
}
|
||||
|
@ -407,7 +407,7 @@ wxString PATHS::GetOSXKicadDataDir()
|
|||
#ifdef __WXWINDOWS__
|
||||
wxString PATHS::getWindowsKiCadRoot()
|
||||
{
|
||||
wxFileName root( Pgm().GetExecutablePath() + "/../" );
|
||||
wxFileName root( Pgm().GetExecutablePath() + wxT( "/../" ) );
|
||||
root.Normalize();
|
||||
|
||||
return root.GetPathWithSep();
|
||||
|
|
|
@ -98,7 +98,7 @@ LANGUAGE_DESCR LanguagesList[] =
|
|||
wxT( "简体中文" ), true },
|
||||
{ wxLANGUAGE_CHINESE_TRADITIONAL, ID_LANGUAGE_CHINESE_TRADITIONAL,
|
||||
wxT( "繁體中文" ), false },
|
||||
{ 0, 0, "", false } // Sentinel
|
||||
{ 0, 0, wxT( "" ), false } // Sentinel
|
||||
};
|
||||
#undef _
|
||||
#define _(s) wxGetTranslation((s))
|
||||
|
@ -151,13 +151,13 @@ const wxString& PGM_BASE::GetTextEditor( bool aCanShowFileChooser )
|
|||
|
||||
if( !editorname )
|
||||
{
|
||||
if( !wxGetEnv( "EDITOR", &editorname ) )
|
||||
if( !wxGetEnv( wxT( "EDITOR" ), &editorname ) )
|
||||
{
|
||||
// If there is no EDITOR variable set, try the desktop default
|
||||
#ifdef __WXMAC__
|
||||
editorname = "/usr/bin/open -e";
|
||||
editorname = wxT( "/usr/bin/open -e" );
|
||||
#elif __WXX11__
|
||||
editorname = "/usr/bin/xdg-open";
|
||||
editorname = wxT( "/usr/bin/xdg-open" );
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
@ -215,7 +215,7 @@ bool PGM_BASE::InitPgm( bool aHeadless, bool aSkipPyInit )
|
|||
wxInitAllImageHandlers();
|
||||
|
||||
#ifndef __WINDOWS__
|
||||
if( wxString( wxGetenv( "HOME" ) ).IsEmpty() )
|
||||
if( wxString( wxGetenv( wxT( "HOME" ) ) ).IsEmpty() )
|
||||
{
|
||||
DisplayErrorMessage( nullptr, _( "Environment variable HOME is empty. "
|
||||
"Unable to continue." ) );
|
||||
|
@ -226,7 +226,7 @@ bool PGM_BASE::InitPgm( bool aHeadless, bool aSkipPyInit )
|
|||
// Init KiCad environment
|
||||
// the environment variable KICAD (if exists) gives the kicad path:
|
||||
// something like set KICAD=d:\kicad
|
||||
bool isDefined = wxGetEnv( "KICAD", &m_kicad_env );
|
||||
bool isDefined = wxGetEnv( wxT( "KICAD" ), &m_kicad_env );
|
||||
|
||||
if( isDefined ) // ensure m_kicad_env ends by "/"
|
||||
{
|
||||
|
@ -237,7 +237,7 @@ bool PGM_BASE::InitPgm( bool aHeadless, bool aSkipPyInit )
|
|||
}
|
||||
|
||||
// Init parameters for configuration
|
||||
App().SetVendorName( "KiCad" );
|
||||
App().SetVendorName( wxT( "KiCad" ) );
|
||||
App().SetAppName( pgm_name );
|
||||
|
||||
// Install some image handlers, mainly for help
|
||||
|
@ -351,7 +351,7 @@ void PGM_BASE::loadCommonSettings()
|
|||
|
||||
for( const std::pair<wxString, ENV_VAR_ITEM> it : GetCommonSettings()->m_Env.vars )
|
||||
{
|
||||
wxLogTrace( traceEnvVars, "PGM_BASE::loadSettings: Found entry %s = %s",
|
||||
wxLogTrace( traceEnvVars, wxT( "PGM_BASE::loadSettings: Found entry %s = %s" ),
|
||||
it.first, it.second.GetValue() );
|
||||
|
||||
// Do not store the env var PROJECT_VAR_NAME ("KIPRJMOD") definition if for some reason
|
||||
|
@ -408,7 +408,7 @@ bool PGM_BASE::SetLanguage( wxString& aErrMsg, bool first_time )
|
|||
}
|
||||
|
||||
// dictionary file name without extend (full name is kicad.mo)
|
||||
wxString dictionaryName( "kicad" );
|
||||
wxString dictionaryName( wxT( "kicad" ) );
|
||||
|
||||
delete m_locale;
|
||||
m_locale = new wxLocale;
|
||||
|
@ -417,7 +417,7 @@ bool PGM_BASE::SetLanguage( wxString& aErrMsg, bool first_time )
|
|||
// false just because it failed to load wxstd catalog
|
||||
if( !m_locale->Init( m_language_id, wxLOCALE_DONT_LOAD_DEFAULT ) )
|
||||
{
|
||||
wxLogTrace( traceLocale, "This language is not supported by the system." );
|
||||
wxLogTrace( traceLocale, wxT( "This language is not supported by the system." ) );
|
||||
|
||||
setLanguageId( wxLANGUAGE_DEFAULT );
|
||||
delete m_locale;
|
||||
|
@ -430,7 +430,7 @@ bool PGM_BASE::SetLanguage( wxString& aErrMsg, bool first_time )
|
|||
}
|
||||
else if( !first_time )
|
||||
{
|
||||
wxLogTrace( traceLocale, "Search for dictionary %s.mo in %s",
|
||||
wxLogTrace( traceLocale, wxT( "Search for dictionary %s.mo in %s" ),
|
||||
dictionaryName, m_locale->GetName() );
|
||||
}
|
||||
|
||||
|
@ -467,7 +467,7 @@ bool PGM_BASE::SetLanguage( wxString& aErrMsg, bool first_time )
|
|||
// the verification is skipped.
|
||||
if( !m_locale->IsLoaded( dictionaryName ) && m_language_id != wxLANGUAGE_ENGLISH )
|
||||
{
|
||||
wxLogTrace( traceLocale, "Unable to load dictionary %s.mo in %s",
|
||||
wxLogTrace( traceLocale, wxT( "Unable to load dictionary %s.mo in %s" ),
|
||||
dictionaryName, m_locale->GetName() );
|
||||
|
||||
setLanguageId( wxLANGUAGE_DEFAULT );
|
||||
|
@ -489,7 +489,7 @@ bool PGM_BASE::SetDefaultLanguage( wxString& aErrMsg )
|
|||
setLanguageId( wxLANGUAGE_DEFAULT );
|
||||
|
||||
// dictionary file name without extend (full name is kicad.mo)
|
||||
wxString dictionaryName( "kicad" );
|
||||
wxString dictionaryName( wxT( "kicad" ) );
|
||||
|
||||
delete m_locale;
|
||||
m_locale = new wxLocale;
|
||||
|
@ -505,7 +505,7 @@ bool PGM_BASE::SetDefaultLanguage( wxString& aErrMsg )
|
|||
// the verification is skipped.
|
||||
if( !m_locale->IsLoaded( dictionaryName ) && m_language_id != wxLANGUAGE_ENGLISH )
|
||||
{
|
||||
wxLogTrace( traceLocale, "Unable to load dictionary %s.mo in %s",
|
||||
wxLogTrace( traceLocale, wxT( "Unable to load dictionary %s.mo in %s" ),
|
||||
dictionaryName, m_locale->GetName() );
|
||||
|
||||
setLanguageId( wxLANGUAGE_DEFAULT );
|
||||
|
@ -524,7 +524,7 @@ bool PGM_BASE::SetDefaultLanguage( wxString& aErrMsg )
|
|||
|
||||
void PGM_BASE::SetLanguageIdentifier( int menu_id )
|
||||
{
|
||||
wxLogTrace( traceLocale, "Select language ID %d from %d possible languages.",
|
||||
wxLogTrace( traceLocale, wxT( "Select language ID %d from %d possible languages." ),
|
||||
menu_id, (int)arrayDim( LanguagesList )-1 );
|
||||
|
||||
for( unsigned ii = 0; LanguagesList[ii].m_KI_Lang_Identifier != 0; ii++ )
|
||||
|
@ -550,23 +550,23 @@ void PGM_BASE::SetLanguagePath()
|
|||
wxFileName fn( guesses[i], wxEmptyString );
|
||||
|
||||
// Append path for Windows and unix KiCad package install
|
||||
fn.AppendDir( "share" );
|
||||
fn.AppendDir( "internat" );
|
||||
fn.AppendDir( wxT( "share" ) );
|
||||
fn.AppendDir( wxT( "internat" ) );
|
||||
|
||||
if( fn.IsDirReadable() )
|
||||
{
|
||||
wxLogTrace( traceLocale, "Adding locale lookup path: " + fn.GetPath() );
|
||||
wxLogTrace( traceLocale, wxT( "Adding locale lookup path: " ) + fn.GetPath() );
|
||||
wxLocale::AddCatalogLookupPathPrefix( fn.GetPath() );
|
||||
}
|
||||
|
||||
// Append path for unix standard install
|
||||
fn.RemoveLastDir();
|
||||
fn.AppendDir( "kicad" );
|
||||
fn.AppendDir( "internat" );
|
||||
fn.AppendDir( wxT( "kicad" ) );
|
||||
fn.AppendDir( wxT( "internat" ) );
|
||||
|
||||
if( fn.IsDirReadable() )
|
||||
{
|
||||
wxLogTrace( traceLocale, "Adding locale lookup path: " + fn.GetPath() );
|
||||
wxLogTrace( traceLocale, wxT( "Adding locale lookup path: " ) + fn.GetPath() );
|
||||
wxLocale::AddCatalogLookupPathPrefix( fn.GetPath() );
|
||||
}
|
||||
|
||||
|
@ -574,11 +574,11 @@ void PGM_BASE::SetLanguagePath()
|
|||
fn.RemoveLastDir();
|
||||
fn.RemoveLastDir();
|
||||
fn.RemoveLastDir();
|
||||
fn.AppendDir( "internat" );
|
||||
fn.AppendDir( wxT( "internat" ) );
|
||||
|
||||
if( fn.IsDirReadable() )
|
||||
{
|
||||
wxLogTrace( traceLocale, "Adding locale lookup path: " + fn.GetPath() );
|
||||
wxLogTrace( traceLocale, wxT( "Adding locale lookup path: " ) + fn.GetPath() );
|
||||
wxLocale::AddCatalogLookupPathPrefix( fn.GetPath() );
|
||||
}
|
||||
}
|
||||
|
@ -587,7 +587,7 @@ void PGM_BASE::SetLanguagePath()
|
|||
{
|
||||
wxFileName fn( Pgm().GetExecutablePath() );
|
||||
fn.RemoveLastDir();
|
||||
fn.AppendDir( "translation" );
|
||||
fn.AppendDir( wxT( "translation" ) );
|
||||
wxLocale::AddCatalogLookupPathPrefix( fn.GetPath() );
|
||||
}
|
||||
}
|
||||
|
@ -600,7 +600,7 @@ bool PGM_BASE::SetLocalEnvVariable( const wxString& aName, const wxString& aValu
|
|||
if( aName.IsEmpty() )
|
||||
{
|
||||
wxLogTrace( traceEnvVars,
|
||||
"PGM_BASE::SetLocalEnvVariable: Attempt to set empty variable to value %s",
|
||||
wxT( "PGM_BASE::SetLocalEnvVariable: Attempt to set empty variable to value %s" ),
|
||||
aValue );
|
||||
return false;
|
||||
}
|
||||
|
@ -609,13 +609,13 @@ bool PGM_BASE::SetLocalEnvVariable( const wxString& aName, const wxString& aValu
|
|||
if( wxGetEnv( aName, &env ) )
|
||||
{
|
||||
wxLogTrace( traceEnvVars,
|
||||
"PGM_BASE::SetLocalEnvVariable: Environment variable %s already set to %s",
|
||||
wxT( "PGM_BASE::SetLocalEnvVariable: Environment variable %s already set to %s" ),
|
||||
aName, env );
|
||||
return env == aValue;
|
||||
}
|
||||
|
||||
wxLogTrace( traceEnvVars,
|
||||
"PGM_BASE::SetLocalEnvVariable: Setting local environment variable %s to %s",
|
||||
wxT( "PGM_BASE::SetLocalEnvVariable: Setting local environment variable %s to %s" ),
|
||||
aName, aValue );
|
||||
|
||||
return wxSetEnv( aName, aValue );
|
||||
|
@ -629,7 +629,7 @@ void PGM_BASE::SetLocalEnvVariables()
|
|||
for( const std::pair<wxString, ENV_VAR_ITEM> m_local_env_var : GetCommonSettings()->m_Env.vars )
|
||||
{
|
||||
wxLogTrace( traceEnvVars,
|
||||
"PGM_BASE::SetLocalEnvVariables: Setting local environment variable %s to %s",
|
||||
wxT( "PGM_BASE::SetLocalEnvVariables: Setting local environment variable %s to %s" ),
|
||||
m_local_env_var.first,
|
||||
m_local_env_var.second.GetValue() );
|
||||
wxSetEnv( m_local_env_var.first, m_local_env_var.second.GetValue() );
|
||||
|
|
|
@ -250,7 +250,7 @@ bool GERBER_PLOTTER::StartPlot()
|
|||
|
||||
// Create a temp file in system temp to avoid potential network share buffer issues for
|
||||
// the final read and save.
|
||||
m_workFilename = wxFileName::CreateTempFileName( "" );
|
||||
m_workFilename = wxFileName::CreateTempFileName( wxT( "" ) );
|
||||
workFile = wxFopen( m_workFilename, wxT( "wt" ));
|
||||
m_outputFile = workFile;
|
||||
wxASSERT( m_outputFile );
|
||||
|
@ -402,7 +402,7 @@ void GERBER_PLOTTER::SetCurrentLineWidth( int aWidth, void* aData )
|
|||
else if( aWidth == USE_DEFAULT_LINE_WIDTH )
|
||||
aWidth = m_renderSettings->GetDefaultPenWidth();
|
||||
|
||||
wxASSERT_MSG( aWidth >= 0, "Plotter called to set negative pen width" );
|
||||
wxASSERT_MSG( aWidth >= 0, wxT( "Plotter called to set negative pen width" ) );
|
||||
|
||||
GBR_METADATA* gbr_metadata = static_cast<GBR_METADATA*>( aData );
|
||||
int aperture_attribute = gbr_metadata ? gbr_metadata->GetApertureAttrib() : 0;
|
||||
|
@ -1601,7 +1601,7 @@ void GERBER_PLOTTER::plotRoundRectAsRegion( const wxPoint& aRectCenter, const wx
|
|||
|
||||
#if 0 // For test only:
|
||||
if( last_pt != first_pt )
|
||||
wxLogMessage( "first pt %d %d last pt %d %d",
|
||||
wxLogMessage( wxT( "first pt %d %d last pt %d %d" ),
|
||||
first_pt.x, first_pt.y, last_pt.x, last_pt.y );
|
||||
#endif
|
||||
|
||||
|
@ -1811,7 +1811,7 @@ void GERBER_PLOTTER::FlashPadChamferRoundRect( const wxPoint& aShapePos, const w
|
|||
break;
|
||||
|
||||
default:
|
||||
wxLogMessage( "FlashPadChamferRoundRect(): Unexpected number of corners (%d)",
|
||||
wxLogMessage( wxT( "FlashPadChamferRoundRect(): Unexpected number of corners (%d)" ),
|
||||
(int)cornerList.size() );
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -473,7 +473,7 @@ void HPGL_PLOTTER::PlotPoly( const std::vector<wxPoint>& aCornerList, FILL_T aFi
|
|||
// Draw the filled area
|
||||
SetCurrentLineWidth( USE_DEFAULT_LINE_WIDTH );
|
||||
|
||||
m_current_item->content << wxString( "PM 0;\n" ); // Start polygon
|
||||
m_current_item->content << wxString( wxT( "PM 0;\n" ) ); // Start polygon
|
||||
|
||||
for( unsigned ii = 1; ii < aCornerList.size(); ++ii )
|
||||
LineTo( aCornerList[ii] );
|
||||
|
|
|
@ -150,7 +150,7 @@ void PDF_PLOTTER::SetCurrentLineWidth( int aWidth, void* aData )
|
|||
if( aWidth == 0 )
|
||||
aWidth = 1;
|
||||
|
||||
wxASSERT_MSG( aWidth > 0, "Plotter called to set negative pen width" );
|
||||
wxASSERT_MSG( aWidth > 0, wxT( "Plotter called to set negative pen width" ) );
|
||||
|
||||
if( aWidth != m_currentPenWidth )
|
||||
fprintf( workFile, "%g w\n", userToDeviceSize( aWidth ) );
|
||||
|
|
|
@ -157,7 +157,7 @@ void PlotDrawingSheet( PLOTTER* plotter, const PROJECT* aProject, const TITLE_BL
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "PlotDrawingSheet(): Unknown drawing sheet item." );
|
||||
wxFAIL_MSG( wxT( "PlotDrawingSheet(): Unknown drawing sheet item." ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -151,7 +151,7 @@ std::map<wxString, wxString> ALTIUM_PARSER::ReadProperties()
|
|||
// If the key starts with '%UTF8%' we have to parse the value using UTF8
|
||||
wxString value;
|
||||
|
||||
if( canonicalKey.StartsWith( "%UTF8%" ) )
|
||||
if( canonicalKey.StartsWith( wxT( "%UTF8%" ) ) )
|
||||
value = wxString( valueS.c_str(), wxConvUTF8 );
|
||||
else
|
||||
value = wxString( valueS.c_str(), wxConvISO8859_1 );
|
||||
|
@ -231,7 +231,7 @@ bool ALTIUM_PARSER::ReadBool( const std::map<wxString, wxString>& aProps, const
|
|||
if( value == aProps.end() )
|
||||
return aDefault;
|
||||
else
|
||||
return value->second == "T" || value->second == "TRUE";
|
||||
return value->second == wxT( "T" ) || value->second == wxT( "TRUE" );
|
||||
}
|
||||
|
||||
|
||||
|
@ -242,7 +242,7 @@ int32_t ALTIUM_PARSER::ReadKicadUnit( const std::map<wxString, wxString>& aProps
|
|||
|
||||
wxString prefix;
|
||||
|
||||
if( !value.EndsWith( "mil", &prefix ) )
|
||||
if( !value.EndsWith( wxT( "mil" ), &prefix ) )
|
||||
{
|
||||
wxLogError( _( "Unit '%s' does not end with 'mil'." ), value );
|
||||
return 0;
|
||||
|
@ -263,7 +263,7 @@ int32_t ALTIUM_PARSER::ReadKicadUnit( const std::map<wxString, wxString>& aProps
|
|||
wxString ALTIUM_PARSER::ReadString( const std::map<wxString, wxString>& aProps,
|
||||
const wxString& aKey, const wxString& aDefault )
|
||||
{
|
||||
const auto& utf8Value = aProps.find( wxString( "%UTF8%" ) + aKey );
|
||||
const auto& utf8Value = aProps.find( wxString( wxT( "%UTF8%" ) ) + aKey );
|
||||
|
||||
if( utf8Value != aProps.end() )
|
||||
return utf8Value->second;
|
||||
|
|
|
@ -80,7 +80,7 @@ public:
|
|||
else
|
||||
{
|
||||
m_error = true;
|
||||
return wxString( "" );
|
||||
return wxString( wxT( "" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -32,7 +32,7 @@ LIB_ID AltiumToKiCadLibID( const wxString& aLibName, const wxString& aLibReferen
|
|||
{
|
||||
wxString libReference = EscapeString( aLibReference, CTX_LIBID );
|
||||
|
||||
wxString key = !aLibName.empty() ? ( aLibName + ":" + libReference ) : libReference;
|
||||
wxString key = !aLibName.empty() ? ( aLibName + wxT( ":" ) + libReference ) : libReference;
|
||||
|
||||
LIB_ID libId;
|
||||
libId.Parse( key, true );
|
||||
|
@ -54,7 +54,7 @@ wxString AltiumPropertyToKiCadString( const wxString& aString )
|
|||
{
|
||||
if( !inOverbar )
|
||||
{
|
||||
converted += "~{";
|
||||
converted += wxT( "~{" );
|
||||
inOverbar = true;
|
||||
}
|
||||
|
||||
|
@ -65,7 +65,7 @@ wxString AltiumPropertyToKiCadString( const wxString& aString )
|
|||
{
|
||||
if( inOverbar )
|
||||
{
|
||||
converted += "}";
|
||||
converted += wxT( "}" );
|
||||
inOverbar = false;
|
||||
}
|
||||
|
||||
|
@ -93,13 +93,13 @@ wxString AltiumSpecialStringsToKiCadVariables( const wxString&
|
|||
size_t escaping_start = 0;
|
||||
do
|
||||
{
|
||||
delimiter = aString.find( "+", start );
|
||||
escaping_start = aString.find( "'", start );
|
||||
delimiter = aString.find( wxT( "+" ), start );
|
||||
escaping_start = aString.find( wxT( "'" ), start );
|
||||
|
||||
if( escaping_start < delimiter )
|
||||
{
|
||||
size_t text_start = escaping_start + 1;
|
||||
size_t escaping_end = aString.find( "'", text_start );
|
||||
size_t escaping_end = aString.find( wxT( "'" ), text_start );
|
||||
|
||||
if( escaping_end == wxString::npos )
|
||||
{
|
||||
|
@ -114,7 +114,7 @@ wxString AltiumSpecialStringsToKiCadVariables( const wxString&
|
|||
{
|
||||
wxString specialString = aString.substr( start, delimiter - start ).Trim().Trim( false );
|
||||
|
||||
if( specialString.StartsWith( "\"" ) && specialString.EndsWith( "\"" ) )
|
||||
if( specialString.StartsWith( wxT( "\"" ) ) && specialString.EndsWith( wxT( "\"" ) ) )
|
||||
specialString = specialString.Mid( 1, specialString.Length() - 2 );
|
||||
|
||||
if( !specialString.IsEmpty() )
|
||||
|
|
|
@ -836,7 +836,7 @@ wxString CADSTAR_ARCHIVE_PARSER::ParseTextFields( const wxString& aTextString,
|
|||
{
|
||||
// Assume the last two characters are "@>"
|
||||
wxASSERT_MSG( remainingStr.EndsWith( wxT( "@>" ) ),
|
||||
"Expected '@>' at the end of a hyperlink" );
|
||||
wxT( "Expected '@>' at the end of a hyperlink" ) );
|
||||
|
||||
fieldValue = remainingStr.SubString( valueStart + splitPos + 1,
|
||||
remainingStr.Length() - 3 );
|
||||
|
@ -2429,7 +2429,7 @@ wxString CADSTAR_ARCHIVE_PARSER::GetXmlAttributeIDString( XNODE* aNode, unsigned
|
|||
bool aIsRequired )
|
||||
{
|
||||
wxString attrName, retVal;
|
||||
attrName = "attr";
|
||||
attrName = wxT( "attr" );
|
||||
attrName << aID;
|
||||
|
||||
if( !aNode->GetAttribute( attrName, &retVal ) )
|
||||
|
@ -2633,7 +2633,7 @@ void CADSTAR_ARCHIVE_PARSER::FixTextPositionNoAlignment( EDA_TEXT* aKiCadTextIte
|
|||
|
||||
//Count num of additional lines
|
||||
wxString text = aKiCadTextItem->GetText();
|
||||
int numExtraLines = text.Replace( "\n", "\n" );
|
||||
int numExtraLines = text.Replace( wxT( "\n" ), wxT( "\n" ) );
|
||||
numExtraLines -= text.at( text.size() - 1 ) == '\n'; // Ignore new line character at end
|
||||
positionOffset.x *= numExtraLines;
|
||||
positionOffset.y *= numExtraLines;
|
||||
|
|
|
@ -41,7 +41,7 @@ wxString escapeName( const wxString& aNetName )
|
|||
{
|
||||
wxString ret( aNetName );
|
||||
|
||||
ret.Replace( "!", "~" );
|
||||
ret.Replace( wxT( "!" ), wxT( "~" ) );
|
||||
|
||||
return ConvertToNewOverbarNotation( ret );
|
||||
}
|
||||
|
@ -172,12 +172,12 @@ int Convert<int>( const wxString& aValue )
|
|||
template <>
|
||||
bool Convert<bool>( const wxString& aValue )
|
||||
{
|
||||
if( aValue != "yes" && aValue != "no" )
|
||||
if( aValue != wxT( "yes" ) && aValue != wxT( "no" ) )
|
||||
throw XML_PARSER_ERROR( "Conversion to bool failed. Original value, '" +
|
||||
aValue.ToStdString() +
|
||||
"', is neither 'yes' nor 'no'." );
|
||||
|
||||
return aValue == "yes";
|
||||
return aValue == wxT( "yes" );
|
||||
}
|
||||
|
||||
|
||||
|
@ -298,23 +298,23 @@ static int parseAlignment( const wxString& aAlignment )
|
|||
{
|
||||
// (bottom-left | bottom-center | bottom-right | center-left |
|
||||
// center | center-right | top-left | top-center | top-right)
|
||||
if( aAlignment == "center" )
|
||||
if( aAlignment == wxT( "center" ) )
|
||||
return ETEXT::CENTER;
|
||||
else if( aAlignment == "center-right" )
|
||||
else if( aAlignment == wxT( "center-right" ) )
|
||||
return ETEXT::CENTER_RIGHT;
|
||||
else if( aAlignment == "top-left" )
|
||||
else if( aAlignment == wxT( "top-left" ) )
|
||||
return ETEXT::TOP_LEFT;
|
||||
else if( aAlignment == "top-center" )
|
||||
else if( aAlignment == wxT( "top-center" ) )
|
||||
return ETEXT::TOP_CENTER;
|
||||
else if( aAlignment == "top-right" )
|
||||
else if( aAlignment == wxT( "top-right" ) )
|
||||
return ETEXT::TOP_RIGHT;
|
||||
else if( aAlignment == "bottom-left" )
|
||||
else if( aAlignment == wxT( "bottom-left" ) )
|
||||
return ETEXT::BOTTOM_LEFT;
|
||||
else if( aAlignment == "bottom-center" )
|
||||
else if( aAlignment == wxT( "bottom-center" ) )
|
||||
return ETEXT::BOTTOM_CENTER;
|
||||
else if( aAlignment == "bottom-right" )
|
||||
else if( aAlignment == wxT( "bottom-right" ) )
|
||||
return ETEXT::BOTTOM_RIGHT;
|
||||
else if( aAlignment == "center-left" )
|
||||
else if( aAlignment == wxT( "center-left" ) )
|
||||
return ETEXT::CENTER_LEFT;
|
||||
|
||||
return DEFAULT_ALIGNMENT;
|
||||
|
@ -339,30 +339,30 @@ EWIRE::EWIRE( wxXmlNode* aWire )
|
|||
>
|
||||
*/
|
||||
|
||||
x1 = parseRequiredAttribute<ECOORD>( aWire, "x1" );
|
||||
y1 = parseRequiredAttribute<ECOORD>( aWire, "y1" );
|
||||
x2 = parseRequiredAttribute<ECOORD>( aWire, "x2" );
|
||||
y2 = parseRequiredAttribute<ECOORD>( aWire, "y2" );
|
||||
width = parseRequiredAttribute<ECOORD>( aWire, "width" );
|
||||
layer = parseRequiredAttribute<int>( aWire, "layer" );
|
||||
curve = parseOptionalAttribute<double>( aWire, "curve" );
|
||||
x1 = parseRequiredAttribute<ECOORD>( aWire, wxT( "x1" ) );
|
||||
y1 = parseRequiredAttribute<ECOORD>( aWire, wxT( "y1" ) );
|
||||
x2 = parseRequiredAttribute<ECOORD>( aWire, wxT( "x2" ) );
|
||||
y2 = parseRequiredAttribute<ECOORD>( aWire, wxT( "y2" ) );
|
||||
width = parseRequiredAttribute<ECOORD>( aWire, wxT( "width" ) );
|
||||
layer = parseRequiredAttribute<int>( aWire, wxT( "layer" ) );
|
||||
curve = parseOptionalAttribute<double>( aWire, wxT( "curve" ) );
|
||||
|
||||
opt_wxString s = parseOptionalAttribute<wxString>( aWire, "style" );
|
||||
opt_wxString s = parseOptionalAttribute<wxString>( aWire, wxT( "style" ) );
|
||||
|
||||
if( s == "continuous" )
|
||||
if( s == wxT( "continuous" ) )
|
||||
style = EWIRE::CONTINUOUS;
|
||||
else if( s == "longdash" )
|
||||
else if( s == wxT( "longdash" ) )
|
||||
style = EWIRE::LONGDASH;
|
||||
else if( s == "shortdash" )
|
||||
else if( s == wxT( "shortdash" ) )
|
||||
style = EWIRE::SHORTDASH;
|
||||
else if( s == "dashdot" )
|
||||
else if( s == wxT( "dashdot" ) )
|
||||
style = EWIRE::DASHDOT;
|
||||
|
||||
s = parseOptionalAttribute<wxString>( aWire, "cap" );
|
||||
s = parseOptionalAttribute<wxString>( aWire, wxT( "cap" ) );
|
||||
|
||||
if( s == "round" )
|
||||
if( s == wxT( "round" ) )
|
||||
cap = EWIRE::ROUND;
|
||||
else if( s == "flat" )
|
||||
else if( s == wxT( "flat" ) )
|
||||
cap = EWIRE::FLAT;
|
||||
}
|
||||
|
||||
|
@ -377,8 +377,8 @@ EJUNCTION::EJUNCTION( wxXmlNode* aJunction )
|
|||
>
|
||||
*/
|
||||
|
||||
x = parseRequiredAttribute<ECOORD>( aJunction, "x" );
|
||||
y = parseRequiredAttribute<ECOORD>( aJunction, "y" );
|
||||
x = parseRequiredAttribute<ECOORD>( aJunction, wxT( "x" ) );
|
||||
y = parseRequiredAttribute<ECOORD>( aJunction, wxT( "y" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -398,12 +398,12 @@ ELABEL::ELABEL( wxXmlNode* aLabel, const wxString& aNetName )
|
|||
>
|
||||
*/
|
||||
|
||||
x = parseRequiredAttribute<ECOORD>( aLabel, "x" );
|
||||
y = parseRequiredAttribute<ECOORD>( aLabel, "y" );
|
||||
size = parseRequiredAttribute<ECOORD>( aLabel, "size" );
|
||||
layer = parseRequiredAttribute<int>( aLabel, "layer" );
|
||||
rot = parseOptionalAttribute<EROT>( aLabel, "rot" );
|
||||
xref = parseOptionalAttribute<wxString>( aLabel, "xref" );
|
||||
x = parseRequiredAttribute<ECOORD>( aLabel, wxT( "x" ) );
|
||||
y = parseRequiredAttribute<ECOORD>( aLabel, wxT( "y" ) );
|
||||
size = parseRequiredAttribute<ECOORD>( aLabel, wxT( "size" ) );
|
||||
layer = parseRequiredAttribute<int>( aLabel, wxT( "layer" ) );
|
||||
rot = parseOptionalAttribute<EROT>( aLabel, wxT( "rot" ) );
|
||||
xref = parseOptionalAttribute<wxString>( aLabel, wxT( "xref" ) );
|
||||
netname = aNetName;
|
||||
}
|
||||
|
||||
|
@ -423,15 +423,15 @@ EVIA::EVIA( wxXmlNode* aVia )
|
|||
>
|
||||
*/
|
||||
|
||||
x = parseRequiredAttribute<ECOORD>( aVia, "x" );
|
||||
y = parseRequiredAttribute<ECOORD>( aVia, "y" );
|
||||
x = parseRequiredAttribute<ECOORD>( aVia, wxT( "x" ) );
|
||||
y = parseRequiredAttribute<ECOORD>( aVia, wxT( "y" ) );
|
||||
|
||||
wxString ext = parseRequiredAttribute<wxString>( aVia, "extent" );
|
||||
wxString ext = parseRequiredAttribute<wxString>( aVia, wxT( "extent" ) );
|
||||
sscanf( ext.c_str(), "%d-%d", &layer_front_most, &layer_back_most );
|
||||
|
||||
drill = parseRequiredAttribute<ECOORD>( aVia, "drill" );
|
||||
diam = parseOptionalAttribute<ECOORD>( aVia, "diameter" );
|
||||
shape = parseOptionalAttribute<wxString>( aVia, "shape" );
|
||||
drill = parseRequiredAttribute<ECOORD>( aVia, wxT( "drill" ) );
|
||||
diam = parseOptionalAttribute<ECOORD>( aVia, wxT( "diameter" ) );
|
||||
shape = parseOptionalAttribute<wxString>( aVia, wxT( "shape" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -448,11 +448,11 @@ ECIRCLE::ECIRCLE( wxXmlNode* aCircle )
|
|||
>
|
||||
*/
|
||||
|
||||
x = parseRequiredAttribute<ECOORD>( aCircle, "x" );
|
||||
y = parseRequiredAttribute<ECOORD>( aCircle, "y" );
|
||||
radius = parseRequiredAttribute<ECOORD>( aCircle, "radius" );
|
||||
width = parseRequiredAttribute<ECOORD>( aCircle, "width" );
|
||||
layer = parseRequiredAttribute<int>( aCircle, "layer" );
|
||||
x = parseRequiredAttribute<ECOORD>( aCircle, wxT( "x" ) );
|
||||
y = parseRequiredAttribute<ECOORD>( aCircle, wxT( "y" ) );
|
||||
radius = parseRequiredAttribute<ECOORD>( aCircle, wxT( "radius" ) );
|
||||
width = parseRequiredAttribute<ECOORD>( aCircle, wxT( "width" ) );
|
||||
layer = parseRequiredAttribute<int>( aCircle, wxT( "layer" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -470,12 +470,12 @@ ERECT::ERECT( wxXmlNode* aRect )
|
|||
>
|
||||
*/
|
||||
|
||||
x1 = parseRequiredAttribute<ECOORD>( aRect, "x1" );
|
||||
y1 = parseRequiredAttribute<ECOORD>( aRect, "y1" );
|
||||
x2 = parseRequiredAttribute<ECOORD>( aRect, "x2" );
|
||||
y2 = parseRequiredAttribute<ECOORD>( aRect, "y2" );
|
||||
layer = parseRequiredAttribute<int>( aRect, "layer" );
|
||||
rot = parseOptionalAttribute<EROT>( aRect, "rot" );
|
||||
x1 = parseRequiredAttribute<ECOORD>( aRect, wxT( "x1" ) );
|
||||
y1 = parseRequiredAttribute<ECOORD>( aRect, wxT( "y1" ) );
|
||||
x2 = parseRequiredAttribute<ECOORD>( aRect, wxT( "x2" ) );
|
||||
y2 = parseRequiredAttribute<ECOORD>( aRect, wxT( "y2" ) );
|
||||
layer = parseRequiredAttribute<int>( aRect, wxT( "layer" ) );
|
||||
rot = parseOptionalAttribute<EROT>( aRect, wxT( "rot" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -498,30 +498,30 @@ EATTR::EATTR( wxXmlNode* aTree )
|
|||
>
|
||||
*/
|
||||
|
||||
name = parseRequiredAttribute<wxString>( aTree, "name" );
|
||||
value = parseOptionalAttribute<wxString>( aTree, "value" );
|
||||
name = parseRequiredAttribute<wxString>( aTree, wxT( "name" ) );
|
||||
value = parseOptionalAttribute<wxString>( aTree, wxT( "value" ) );
|
||||
|
||||
x = parseOptionalAttribute<ECOORD>( aTree, "x" );
|
||||
y = parseOptionalAttribute<ECOORD>( aTree, "y" );
|
||||
size = parseOptionalAttribute<ECOORD>( aTree, "size" );
|
||||
x = parseOptionalAttribute<ECOORD>( aTree, wxT( "x" ) );
|
||||
y = parseOptionalAttribute<ECOORD>( aTree, wxT( "y" ) );
|
||||
size = parseOptionalAttribute<ECOORD>( aTree, wxT( "size" ) );
|
||||
|
||||
layer = parseOptionalAttribute<int>( aTree, "layer" );
|
||||
ratio = parseOptionalAttribute<double>( aTree, "ratio" );
|
||||
rot = parseOptionalAttribute<EROT>( aTree, "rot" );
|
||||
layer = parseOptionalAttribute<int>( aTree, wxT( "layer" ) );
|
||||
ratio = parseOptionalAttribute<double>( aTree, wxT( "ratio" ) );
|
||||
rot = parseOptionalAttribute<EROT>( aTree, wxT( "rot" ) );
|
||||
|
||||
opt_wxString stemp = parseOptionalAttribute<wxString>( aTree, "display" );
|
||||
opt_wxString stemp = parseOptionalAttribute<wxString>( aTree, wxT( "display" ) );
|
||||
|
||||
// (off | value | name | both)
|
||||
if( stemp == "off" )
|
||||
if( stemp == wxT( "off" ) )
|
||||
display = EATTR::Off;
|
||||
else if( stemp == "name" )
|
||||
else if( stemp == wxT( "name" ) )
|
||||
display = EATTR::NAME;
|
||||
else if( stemp == "both" )
|
||||
else if( stemp == wxT( "both" ) )
|
||||
display = EATTR::BOTH;
|
||||
else // "value" is the default
|
||||
display = EATTR::VALUE;
|
||||
|
||||
stemp = parseOptionalAttribute<wxString>( aTree, "align" );
|
||||
stemp = parseOptionalAttribute<wxString>( aTree, wxT( "align" ) );
|
||||
|
||||
align = stemp ? parseAlignment( *stemp ) : DEFAULT_ALIGNMENT;
|
||||
}
|
||||
|
@ -543,14 +543,14 @@ EDIMENSION::EDIMENSION( wxXmlNode* aDimension )
|
|||
>
|
||||
*/
|
||||
|
||||
x1 = parseRequiredAttribute<ECOORD>( aDimension, "x1" );
|
||||
y1 = parseRequiredAttribute<ECOORD>( aDimension, "y1" );
|
||||
x2 = parseRequiredAttribute<ECOORD>( aDimension, "x2" );
|
||||
y2 = parseRequiredAttribute<ECOORD>( aDimension, "y2" );
|
||||
x3 = parseRequiredAttribute<ECOORD>( aDimension, "x3" );
|
||||
y3 = parseRequiredAttribute<ECOORD>( aDimension, "y3" );
|
||||
layer = parseRequiredAttribute<int>( aDimension, "layer" );
|
||||
dimensionType = parseOptionalAttribute<wxString>( aDimension, "dtype" );
|
||||
x1 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "x1" ) );
|
||||
y1 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "y1" ) );
|
||||
x2 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "x2" ) );
|
||||
y2 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "y2" ) );
|
||||
x3 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "x3" ) );
|
||||
y3 = parseRequiredAttribute<ECOORD>( aDimension, wxT( "y3" ) );
|
||||
layer = parseRequiredAttribute<int>( aDimension, wxT( "layer" ) );
|
||||
dimensionType = parseOptionalAttribute<wxString>( aDimension, wxT( "dtype" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -571,16 +571,16 @@ ETEXT::ETEXT( wxXmlNode* aText )
|
|||
*/
|
||||
|
||||
text = aText->GetNodeContent();
|
||||
x = parseRequiredAttribute<ECOORD>( aText, "x" );
|
||||
y = parseRequiredAttribute<ECOORD>( aText, "y" );
|
||||
size = parseRequiredAttribute<ECOORD>( aText, "size" );
|
||||
layer = parseRequiredAttribute<int>( aText, "layer" );
|
||||
x = parseRequiredAttribute<ECOORD>( aText, wxT( "x" ) );
|
||||
y = parseRequiredAttribute<ECOORD>( aText, wxT( "y" ) );
|
||||
size = parseRequiredAttribute<ECOORD>( aText, wxT( "size" ) );
|
||||
layer = parseRequiredAttribute<int>( aText, wxT( "layer" ) );
|
||||
|
||||
font = parseOptionalAttribute<wxString>( aText, "font" );
|
||||
ratio = parseOptionalAttribute<double>( aText, "ratio" );
|
||||
rot = parseOptionalAttribute<EROT>( aText, "rot" );
|
||||
font = parseOptionalAttribute<wxString>( aText, wxT( "font" ) );
|
||||
ratio = parseOptionalAttribute<double>( aText, wxT( "ratio" ) );
|
||||
rot = parseOptionalAttribute<EROT>( aText, wxT( "rot" ) );
|
||||
|
||||
opt_wxString stemp = parseOptionalAttribute<wxString>( aText, "align" );
|
||||
opt_wxString stemp = parseOptionalAttribute<wxString>( aText, wxT( "align" ) );
|
||||
|
||||
align = stemp ? parseAlignment( *stemp ) : DEFAULT_ALIGNMENT;
|
||||
}
|
||||
|
@ -594,11 +594,11 @@ wxSize ETEXT::ConvertSize() const
|
|||
{
|
||||
const wxString& fontName = font.CGet();
|
||||
|
||||
if( fontName == "vector" )
|
||||
if( fontName == wxT( "vector" ) )
|
||||
{
|
||||
textsize = wxSize( size.ToSchUnits(), size.ToSchUnits() );
|
||||
}
|
||||
else if( fontName == "fixed" )
|
||||
else if( fontName == wxT( "fixed" ) )
|
||||
{
|
||||
textsize = wxSize( size.ToSchUnits(), size.ToSchUnits() * 0.80 );
|
||||
}
|
||||
|
@ -639,29 +639,29 @@ EFRAME::EFRAME( wxXmlNode* aFrameNode )
|
|||
border_right = true;
|
||||
border_bottom = true;
|
||||
|
||||
x1 = parseRequiredAttribute<ECOORD>( aFrameNode, "x1" );
|
||||
y1 = parseRequiredAttribute<ECOORD>( aFrameNode, "y1" );
|
||||
x2 = parseRequiredAttribute<ECOORD>( aFrameNode, "x2" );
|
||||
y2 = parseRequiredAttribute<ECOORD>( aFrameNode, "y2" );
|
||||
columns = parseRequiredAttribute<int>( aFrameNode, "columns" );
|
||||
rows = parseRequiredAttribute<int>( aFrameNode, "rows" );
|
||||
layer = parseRequiredAttribute<int>( aFrameNode, "layer" );
|
||||
border_left = parseOptionalAttribute<bool>( aFrameNode, "border-left" );
|
||||
border_top = parseOptionalAttribute<bool>( aFrameNode, "border-top" );
|
||||
border_right = parseOptionalAttribute<bool>( aFrameNode, "border-right" );
|
||||
border_bottom = parseOptionalAttribute<bool>( aFrameNode, "border-bottom" );
|
||||
x1 = parseRequiredAttribute<ECOORD>( aFrameNode, wxT( "x1" ) );
|
||||
y1 = parseRequiredAttribute<ECOORD>( aFrameNode, wxT( "y1" ) );
|
||||
x2 = parseRequiredAttribute<ECOORD>( aFrameNode, wxT( "x2" ) );
|
||||
y2 = parseRequiredAttribute<ECOORD>( aFrameNode, wxT( "y2" ) );
|
||||
columns = parseRequiredAttribute<int>( aFrameNode, wxT( "columns" ) );
|
||||
rows = parseRequiredAttribute<int>( aFrameNode, wxT( "rows" ) );
|
||||
layer = parseRequiredAttribute<int>( aFrameNode, wxT( "layer" ) );
|
||||
border_left = parseOptionalAttribute<bool>( aFrameNode, wxT( "border-left" ) );
|
||||
border_top = parseOptionalAttribute<bool>( aFrameNode, wxT( "border-top" ) );
|
||||
border_right = parseOptionalAttribute<bool>( aFrameNode, wxT( "border-right" ) );
|
||||
border_bottom = parseOptionalAttribute<bool>( aFrameNode, wxT( "border-bottom" ) );
|
||||
}
|
||||
|
||||
|
||||
EPAD_COMMON::EPAD_COMMON( wxXmlNode* aPad )
|
||||
{
|
||||
// #REQUIRED says DTD, throw exception if not found
|
||||
name = parseRequiredAttribute<wxString>( aPad, "name" );
|
||||
x = parseRequiredAttribute<ECOORD>( aPad, "x" );
|
||||
y = parseRequiredAttribute<ECOORD>( aPad, "y" );
|
||||
rot = parseOptionalAttribute<EROT>( aPad, "rot" );
|
||||
stop = parseOptionalAttribute<bool>( aPad, "stop" );
|
||||
thermals = parseOptionalAttribute<bool>( aPad, "thermals" );
|
||||
name = parseRequiredAttribute<wxString>( aPad, wxT( "name" ) );
|
||||
x = parseRequiredAttribute<ECOORD>( aPad, wxT( "x" ) );
|
||||
y = parseRequiredAttribute<ECOORD>( aPad, wxT( "y" ) );
|
||||
rot = parseOptionalAttribute<EROT>( aPad, wxT( "rot" ) );
|
||||
stop = parseOptionalAttribute<bool>( aPad, wxT( "stop" ) );
|
||||
thermals = parseOptionalAttribute<bool>( aPad, wxT( "thermals" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -685,26 +685,26 @@ EPAD::EPAD( wxXmlNode* aPad )
|
|||
*/
|
||||
|
||||
// #REQUIRED says DTD, throw exception if not found
|
||||
drill = parseRequiredAttribute<ECOORD>( aPad, "drill" );
|
||||
drill = parseRequiredAttribute<ECOORD>( aPad, wxT( "drill" ) );
|
||||
|
||||
// Optional attributes
|
||||
diameter = parseOptionalAttribute<ECOORD>( aPad, "diameter" );
|
||||
diameter = parseOptionalAttribute<ECOORD>( aPad, wxT( "diameter" ) );
|
||||
|
||||
opt_wxString s = parseOptionalAttribute<wxString>( aPad, "shape" );
|
||||
opt_wxString s = parseOptionalAttribute<wxString>( aPad, wxT( "shape" ) );
|
||||
|
||||
// (square | round | octagon | long | offset)
|
||||
if( s == "square" )
|
||||
if( s == wxT( "square" ) )
|
||||
shape = EPAD::SQUARE;
|
||||
else if( s == "round" )
|
||||
else if( s == wxT( "round" ) )
|
||||
shape = EPAD::ROUND;
|
||||
else if( s == "octagon" )
|
||||
else if( s == wxT( "octagon" ) )
|
||||
shape = EPAD::OCTAGON;
|
||||
else if( s == "long" )
|
||||
else if( s == wxT( "long" ) )
|
||||
shape = EPAD::LONG;
|
||||
else if( s == "offset" )
|
||||
else if( s == wxT( "offset" ) )
|
||||
shape = EPAD::OFFSET;
|
||||
|
||||
first = parseOptionalAttribute<bool>( aPad, "first" );
|
||||
first = parseOptionalAttribute<bool>( aPad, wxT( "first" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -728,12 +728,12 @@ ESMD::ESMD( wxXmlNode* aSMD )
|
|||
*/
|
||||
|
||||
// DTD #REQUIRED, throw exception if not found
|
||||
dx = parseRequiredAttribute<ECOORD>( aSMD, "dx" );
|
||||
dy = parseRequiredAttribute<ECOORD>( aSMD, "dy" );
|
||||
layer = parseRequiredAttribute<int>( aSMD, "layer" );
|
||||
dx = parseRequiredAttribute<ECOORD>( aSMD, wxT( "dx" ) );
|
||||
dy = parseRequiredAttribute<ECOORD>( aSMD, wxT( "dy" ) );
|
||||
layer = parseRequiredAttribute<int>( aSMD, wxT( "layer" ) );
|
||||
|
||||
roundness = parseOptionalAttribute<int>( aSMD, "roundness" );
|
||||
cream = parseOptionalAttribute<bool>( aSMD, "cream" );
|
||||
roundness = parseOptionalAttribute<int>( aSMD, wxT( "roundness" ) );
|
||||
cream = parseOptionalAttribute<bool>( aSMD, wxT( "cream" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -755,16 +755,16 @@ EPIN::EPIN( wxXmlNode* aPin )
|
|||
*/
|
||||
|
||||
// DTD #REQUIRED, throw exception if not found
|
||||
name = parseRequiredAttribute<wxString>( aPin, "name" );
|
||||
x = parseRequiredAttribute<ECOORD>( aPin, "x" );
|
||||
y = parseRequiredAttribute<ECOORD>( aPin, "y" );
|
||||
name = parseRequiredAttribute<wxString>( aPin, wxT( "name" ) );
|
||||
x = parseRequiredAttribute<ECOORD>( aPin, wxT( "x" ) );
|
||||
y = parseRequiredAttribute<ECOORD>( aPin, wxT( "y" ) );
|
||||
|
||||
visible = parseOptionalAttribute<wxString>( aPin, "visible" );
|
||||
length = parseOptionalAttribute<wxString>( aPin, "length" );
|
||||
direction = parseOptionalAttribute<wxString>( aPin, "direction" );
|
||||
function = parseOptionalAttribute<wxString>( aPin, "function" );
|
||||
swaplevel = parseOptionalAttribute<int>( aPin, "swaplevel" );
|
||||
rot = parseOptionalAttribute<EROT>( aPin, "rot" );
|
||||
visible = parseOptionalAttribute<wxString>( aPin, wxT( "visible" ) );
|
||||
length = parseOptionalAttribute<wxString>( aPin, wxT( "length" ) );
|
||||
direction = parseOptionalAttribute<wxString>( aPin, wxT( "direction" ) );
|
||||
function = parseOptionalAttribute<wxString>( aPin, wxT( "function" ) );
|
||||
swaplevel = parseOptionalAttribute<int>( aPin, wxT( "swaplevel" ) );
|
||||
rot = parseOptionalAttribute<EROT>( aPin, wxT( "rot" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -779,9 +779,9 @@ EVERTEX::EVERTEX( wxXmlNode* aVertex )
|
|||
>
|
||||
*/
|
||||
|
||||
x = parseRequiredAttribute<ECOORD>( aVertex, "x" );
|
||||
y = parseRequiredAttribute<ECOORD>( aVertex, "y" );
|
||||
curve = parseOptionalAttribute<double>( aVertex, "curve" );
|
||||
x = parseRequiredAttribute<ECOORD>( aVertex, wxT( "x" ) );
|
||||
y = parseRequiredAttribute<ECOORD>( aVertex, wxT( "y" ) );
|
||||
curve = parseOptionalAttribute<double>( aVertex, wxT( "curve" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -801,25 +801,25 @@ EPOLYGON::EPOLYGON( wxXmlNode* aPolygon )
|
|||
>
|
||||
*/
|
||||
|
||||
width = parseRequiredAttribute<ECOORD>( aPolygon, "width" );
|
||||
layer = parseRequiredAttribute<int>( aPolygon, "layer" );
|
||||
width = parseRequiredAttribute<ECOORD>( aPolygon, wxT( "width" ) );
|
||||
layer = parseRequiredAttribute<int>( aPolygon, wxT( "layer" ) );
|
||||
|
||||
spacing = parseOptionalAttribute<ECOORD>( aPolygon, "spacing" );
|
||||
isolate = parseOptionalAttribute<ECOORD>( aPolygon, "isolate" );
|
||||
opt_wxString s = parseOptionalAttribute<wxString>( aPolygon, "pour" );
|
||||
spacing = parseOptionalAttribute<ECOORD>( aPolygon, wxT( "spacing" ) );
|
||||
isolate = parseOptionalAttribute<ECOORD>( aPolygon, wxT( "isolate" ) );
|
||||
opt_wxString s = parseOptionalAttribute<wxString>( aPolygon, wxT( "pour" ) );
|
||||
|
||||
// default pour to solid fill
|
||||
pour = EPOLYGON::SOLID;
|
||||
|
||||
// (solid | hatch | cutout)
|
||||
if( s == "hatch" )
|
||||
if( s == wxT( "hatch" ) )
|
||||
pour = EPOLYGON::HATCH;
|
||||
else if( s == "cutout" )
|
||||
else if( s == wxT( "cutout" ) )
|
||||
pour = EPOLYGON::CUTOUT;
|
||||
|
||||
orphans = parseOptionalAttribute<bool>( aPolygon, "orphans" );
|
||||
thermals = parseOptionalAttribute<bool>( aPolygon, "thermals" );
|
||||
rank = parseOptionalAttribute<int>( aPolygon, "rank" );
|
||||
orphans = parseOptionalAttribute<bool>( aPolygon, wxT( "orphans" ) );
|
||||
thermals = parseOptionalAttribute<bool>( aPolygon, wxT( "thermals" ) );
|
||||
rank = parseOptionalAttribute<int>( aPolygon, wxT( "rank" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -835,9 +835,9 @@ EHOLE::EHOLE( wxXmlNode* aHole )
|
|||
*/
|
||||
|
||||
// #REQUIRED:
|
||||
x = parseRequiredAttribute<ECOORD>( aHole, "x" );
|
||||
y = parseRequiredAttribute<ECOORD>( aHole, "y" );
|
||||
drill = parseRequiredAttribute<ECOORD>( aHole, "drill" );
|
||||
x = parseRequiredAttribute<ECOORD>( aHole, wxT( "x" ) );
|
||||
y = parseRequiredAttribute<ECOORD>( aHole, wxT( "y" ) );
|
||||
drill = parseRequiredAttribute<ECOORD>( aHole, wxT( "drill" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -859,20 +859,20 @@ EELEMENT::EELEMENT( wxXmlNode* aElement )
|
|||
*/
|
||||
|
||||
// #REQUIRED
|
||||
name = parseRequiredAttribute<wxString>( aElement, "name" );
|
||||
library = parseRequiredAttribute<wxString>( aElement, "library" );
|
||||
value = parseRequiredAttribute<wxString>( aElement, "value" );
|
||||
std::string p = parseRequiredAttribute<std::string>( aElement, "package" );
|
||||
name = parseRequiredAttribute<wxString>( aElement, wxT( "name" ) );
|
||||
library = parseRequiredAttribute<wxString>( aElement, wxT( "library" ) );
|
||||
value = parseRequiredAttribute<wxString>( aElement, wxT( "value" ) );
|
||||
std::string p = parseRequiredAttribute<std::string>( aElement, wxT( "package" ) );
|
||||
ReplaceIllegalFileNameChars( &p, '_' );
|
||||
package = wxString::FromUTF8( p.c_str() );
|
||||
|
||||
x = parseRequiredAttribute<ECOORD>( aElement, "x" );
|
||||
y = parseRequiredAttribute<ECOORD>( aElement, "y" );
|
||||
x = parseRequiredAttribute<ECOORD>( aElement, wxT( "x" ) );
|
||||
y = parseRequiredAttribute<ECOORD>( aElement, wxT( "y" ) );
|
||||
|
||||
// optional
|
||||
locked = parseOptionalAttribute<bool>( aElement, "locked" );
|
||||
smashed = parseOptionalAttribute<bool>( aElement, "smashed" );
|
||||
rot = parseOptionalAttribute<EROT>( aElement, "rot" );
|
||||
locked = parseOptionalAttribute<bool>( aElement, wxT( "locked" ) );
|
||||
smashed = parseOptionalAttribute<bool>( aElement, wxT( "smashed" ) );
|
||||
rot = parseOptionalAttribute<EROT>( aElement, wxT( "rot" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -890,12 +890,12 @@ ELAYER::ELAYER( wxXmlNode* aLayer )
|
|||
>
|
||||
*/
|
||||
|
||||
number = parseRequiredAttribute<int>( aLayer, "number" );
|
||||
name = parseRequiredAttribute<wxString>( aLayer, "name" );
|
||||
color = parseRequiredAttribute<int>( aLayer, "color" );
|
||||
number = parseRequiredAttribute<int>( aLayer, wxT( "number" ) );
|
||||
name = parseRequiredAttribute<wxString>( aLayer, wxT( "name" ) );
|
||||
color = parseRequiredAttribute<int>( aLayer, wxT( "color" ) );
|
||||
fill = 1; // Temporary value.
|
||||
visible = parseOptionalAttribute<bool>( aLayer, "visible" );
|
||||
active = parseOptionalAttribute<bool>( aLayer, "active" );
|
||||
visible = parseOptionalAttribute<bool>( aLayer, wxT( "visible" ) );
|
||||
active = parseOptionalAttribute<bool>( aLayer, wxT( "active" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -913,39 +913,39 @@ EPART::EPART( wxXmlNode* aPart )
|
|||
* >
|
||||
*/
|
||||
// #REQUIRED
|
||||
name = parseRequiredAttribute<wxString>( aPart, "name" );
|
||||
library = parseRequiredAttribute<wxString>( aPart, "library" );
|
||||
deviceset = parseRequiredAttribute<wxString>( aPart, "deviceset" );
|
||||
device = parseRequiredAttribute<wxString>( aPart, "device" );
|
||||
technology = parseOptionalAttribute<wxString>( aPart, "technology" );
|
||||
value = parseOptionalAttribute<wxString>( aPart, "value" );
|
||||
name = parseRequiredAttribute<wxString>( aPart, wxT( "name" ) );
|
||||
library = parseRequiredAttribute<wxString>( aPart, wxT( "library" ) );
|
||||
deviceset = parseRequiredAttribute<wxString>( aPart, wxT( "deviceset" ) );
|
||||
device = parseRequiredAttribute<wxString>( aPart, wxT( "device" ) );
|
||||
technology = parseOptionalAttribute<wxString>( aPart, wxT( "technology" ) );
|
||||
value = parseOptionalAttribute<wxString>( aPart, wxT( "value" ) );
|
||||
|
||||
for( wxXmlNode* child = aPart->GetChildren(); child; child = child->GetNext() )
|
||||
{
|
||||
if( child->GetName() == "attribute" )
|
||||
if( child->GetName() == wxT( "attribute" ) )
|
||||
{
|
||||
std::string aname, avalue;
|
||||
|
||||
for( wxXmlAttribute* x = child->GetAttributes(); x; x = x->GetNext() )
|
||||
{
|
||||
if( x->GetName() == "name" )
|
||||
if( x->GetName() == wxT( "name" ) )
|
||||
aname = x->GetValue();
|
||||
else if( x->GetName() == "value" )
|
||||
else if( x->GetName() == wxT( "value" ) )
|
||||
avalue = x->GetValue();
|
||||
}
|
||||
|
||||
if( aname.size() && avalue.size() )
|
||||
attribute[aname] = avalue;
|
||||
}
|
||||
else if( child->GetName() == "variant" )
|
||||
else if( child->GetName() == wxT( "variant" ) )
|
||||
{
|
||||
std::string aname, avalue;
|
||||
|
||||
for( wxXmlAttribute* x = child->GetAttributes(); x; x = x->GetNext() )
|
||||
{
|
||||
if( x->GetName() == "name" )
|
||||
if( x->GetName() == wxT( "name" ) )
|
||||
aname = x->GetValue();
|
||||
else if( x->GetName() == "value" )
|
||||
else if( x->GetName() == wxT( "value" ) )
|
||||
avalue = x->GetValue();
|
||||
}
|
||||
|
||||
|
@ -969,15 +969,15 @@ EINSTANCE::EINSTANCE( wxXmlNode* aInstance )
|
|||
* rot %Rotation; "R0"
|
||||
* >
|
||||
*/
|
||||
part = parseRequiredAttribute<wxString>( aInstance, "part" );
|
||||
gate = parseRequiredAttribute<wxString>( aInstance, "gate" );
|
||||
part = parseRequiredAttribute<wxString>( aInstance, wxT( "part" ) );
|
||||
gate = parseRequiredAttribute<wxString>( aInstance, wxT( "gate" ) );
|
||||
|
||||
x = parseRequiredAttribute<ECOORD>( aInstance, "x" );
|
||||
y = parseRequiredAttribute<ECOORD>( aInstance, "y" );
|
||||
x = parseRequiredAttribute<ECOORD>( aInstance, wxT( "x" ) );
|
||||
y = parseRequiredAttribute<ECOORD>( aInstance, wxT( "y" ) );
|
||||
|
||||
// optional
|
||||
smashed = parseOptionalAttribute<bool>( aInstance, "smashed" );
|
||||
rot = parseOptionalAttribute<EROT>( aInstance, "rot" );
|
||||
smashed = parseOptionalAttribute<bool>( aInstance, wxT( "smashed" ) );
|
||||
rot = parseOptionalAttribute<EROT>( aInstance, wxT( "rot" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -995,24 +995,24 @@ EGATE::EGATE( wxXmlNode* aGate )
|
|||
* >
|
||||
*/
|
||||
|
||||
name = parseRequiredAttribute<wxString>( aGate, "name" );
|
||||
symbol = parseRequiredAttribute<wxString>( aGate, "symbol" );
|
||||
name = parseRequiredAttribute<wxString>( aGate, wxT( "name" ) );
|
||||
symbol = parseRequiredAttribute<wxString>( aGate, wxT( "symbol" ) );
|
||||
|
||||
x = parseRequiredAttribute<ECOORD>( aGate, "x" );
|
||||
y = parseRequiredAttribute<ECOORD>( aGate, "y" );
|
||||
x = parseRequiredAttribute<ECOORD>( aGate, wxT( "x" ) );
|
||||
y = parseRequiredAttribute<ECOORD>( aGate, wxT( "y" ) );
|
||||
|
||||
opt_wxString stemp = parseOptionalAttribute<wxString>( aGate, "addlevel" );
|
||||
opt_wxString stemp = parseOptionalAttribute<wxString>( aGate, wxT( "addlevel" ) );
|
||||
|
||||
// (off | value | name | both)
|
||||
if( stemp == "must" )
|
||||
if( stemp == wxT( "must" ) )
|
||||
addlevel = EGATE::MUST;
|
||||
else if( stemp == "can" )
|
||||
else if( stemp == wxT( "can" ) )
|
||||
addlevel = EGATE::CAN;
|
||||
else if( stemp == "next" )
|
||||
else if( stemp == wxT( "next" ) )
|
||||
addlevel = EGATE::NEXT;
|
||||
else if( stemp == "request" )
|
||||
else if( stemp == wxT( "request" ) )
|
||||
addlevel = EGATE::REQUEST;
|
||||
else if( stemp == "always" )
|
||||
else if( stemp == wxT( "always" ) )
|
||||
addlevel = EGATE::ALWAYS;
|
||||
else
|
||||
addlevel = EGATE::NEXT;
|
||||
|
@ -1030,9 +1030,9 @@ ECONNECT::ECONNECT( wxXmlNode* aConnect )
|
|||
* route %ContactRoute; "all"
|
||||
* >
|
||||
*/
|
||||
gate = parseRequiredAttribute<wxString>( aConnect, "gate" );
|
||||
pin = parseRequiredAttribute<wxString>( aConnect, "pin" );
|
||||
pad = parseRequiredAttribute<wxString>( aConnect, "pad" );
|
||||
gate = parseRequiredAttribute<wxString>( aConnect, wxT( "gate" ) );
|
||||
pin = parseRequiredAttribute<wxString>( aConnect, wxT( "pin" ) );
|
||||
pad = parseRequiredAttribute<wxString>( aConnect, wxT( "pad" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1045,8 +1045,8 @@ EDEVICE::EDEVICE( wxXmlNode* aDevice )
|
|||
package %String; #IMPLIED
|
||||
>
|
||||
*/
|
||||
name = parseRequiredAttribute<wxString>( aDevice, "name" );
|
||||
opt_wxString pack = parseOptionalAttribute<wxString>( aDevice, "package" );
|
||||
name = parseRequiredAttribute<wxString>( aDevice, wxT( "name" ) );
|
||||
opt_wxString pack = parseOptionalAttribute<wxString>( aDevice, wxT( "package" ) );
|
||||
|
||||
if( pack )
|
||||
{
|
||||
|
@ -1056,7 +1056,7 @@ EDEVICE::EDEVICE( wxXmlNode* aDevice )
|
|||
}
|
||||
|
||||
NODE_MAP aDeviceChildren = MapChildren( aDevice );
|
||||
wxXmlNode* connectNode = getChildrenNodes( aDeviceChildren, "connects" );
|
||||
wxXmlNode* connectNode = getChildrenNodes( aDeviceChildren, wxT( "connects" ) );
|
||||
|
||||
while( connectNode )
|
||||
{
|
||||
|
@ -1077,23 +1077,23 @@ EDEVICE_SET::EDEVICE_SET( wxXmlNode* aDeviceSet )
|
|||
>
|
||||
*/
|
||||
|
||||
name = parseRequiredAttribute<wxString>( aDeviceSet, "name" );
|
||||
prefix = parseOptionalAttribute<wxString>( aDeviceSet, "prefix" );
|
||||
uservalue = parseOptionalAttribute<bool>( aDeviceSet, "uservalue" );
|
||||
name = parseRequiredAttribute<wxString>( aDeviceSet, wxT( "name" ) );
|
||||
prefix = parseOptionalAttribute<wxString>( aDeviceSet, wxT( "prefix" ) );
|
||||
uservalue = parseOptionalAttribute<bool>( aDeviceSet, wxT( "uservalue" ) );
|
||||
|
||||
/* Russell: Parsing of devices and gates moved to sch_eagle_plugin.cpp
|
||||
*
|
||||
//TODO: description
|
||||
|
||||
NODE_MAP aDeviceSetChildren = MapChildren(aDeviceSet);
|
||||
wxXmlNode* deviceNode = getChildrenNodes(aDeviceSetChildren, "device");
|
||||
wxXmlNode* deviceNode = getChildrenNodes(aDeviceSetChildren, wxT( "device" ));
|
||||
|
||||
while(deviceNode){
|
||||
devices.push_back(EDEVICE(deviceNode));
|
||||
deviceNode->GetNext();
|
||||
}
|
||||
|
||||
wxXmlNode* gateNode = getChildrenNodes(aDeviceSetChildren, "gate");
|
||||
wxXmlNode* gateNode = getChildrenNodes(aDeviceSetChildren, wxT( "gate" ));
|
||||
|
||||
while(gateNode){
|
||||
gates.push_back(EGATE(gateNode));
|
||||
|
@ -1106,15 +1106,15 @@ EDEVICE_SET::EDEVICE_SET( wxXmlNode* aDeviceSet )
|
|||
|
||||
ECLASS::ECLASS( wxXmlNode* aClass )
|
||||
{
|
||||
number = parseRequiredAttribute<wxString>( aClass, "number" );
|
||||
name = parseRequiredAttribute<wxString>( aClass, "name" );
|
||||
number = parseRequiredAttribute<wxString>( aClass, wxT( "number" ) );
|
||||
name = parseRequiredAttribute<wxString>( aClass, wxT( "name" ) );
|
||||
|
||||
for( wxXmlNode* child = aClass->GetChildren(); child; child = child->GetNext() )
|
||||
{
|
||||
if( child->GetName() == "clearance" )
|
||||
if( child->GetName() == wxT( "clearance" ) )
|
||||
{
|
||||
wxString to = parseRequiredAttribute<wxString>( child, "class" );
|
||||
ECOORD value = parseRequiredAttribute<ECOORD>( child, "value" );
|
||||
wxString to = parseRequiredAttribute<wxString>( child, wxT( "class" ) );
|
||||
ECOORD value = parseRequiredAttribute<ECOORD>( child, wxT( "value" ) );
|
||||
|
||||
clearanceMap[to] = value;
|
||||
}
|
||||
|
|
|
@ -111,7 +111,7 @@ void ARC_ASSISTANT::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
|
|||
|
||||
double degs = getNormDeciDegFromRad( initAngle );
|
||||
|
||||
cursorStrings.push_back( DimensionLabel( "r", m_constructMan.GetRadius(), m_units ) );
|
||||
cursorStrings.push_back( DimensionLabel( wxT( "r" ), m_constructMan.GetRadius(), m_units ) );
|
||||
cursorStrings.push_back( DimensionLabel( wxString::FromUTF8( "θ" ), degs,
|
||||
EDA_UNITS::DEGREES ) );
|
||||
}
|
||||
|
|
|
@ -36,7 +36,7 @@ wxString KIGFX::PREVIEW::DimensionLabel( const wxString& prefix, double aVal, ED
|
|||
wxString str;
|
||||
|
||||
if( prefix.size() )
|
||||
str << prefix << ": ";
|
||||
str << prefix << wxT( ": " );
|
||||
|
||||
wxString fmtStr;
|
||||
|
||||
|
@ -55,7 +55,7 @@ wxString KIGFX::PREVIEW::DimensionLabel( const wxString& prefix, double aVal, ED
|
|||
str << wxString::Format( fmtStr, To_User_Unit( aUnits, aVal ) );
|
||||
|
||||
if( aIncludeUnits )
|
||||
str << " " << GetAbbreviatedUnitsLabel( aUnits );
|
||||
str << wxT( " " ) << GetAbbreviatedUnitsLabel( aUnits );
|
||||
|
||||
return str;
|
||||
}
|
||||
|
|
|
@ -67,10 +67,10 @@ static void drawCursorStrings( KIGFX::VIEW* aView, const VECTOR2D& aCursor,
|
|||
if( aFlipY )
|
||||
temp.y = -temp.y;
|
||||
|
||||
cursorStrings.push_back( DimensionLabel( "x", temp.x, aUnits ) );
|
||||
cursorStrings.push_back( DimensionLabel( "y", temp.y, aUnits ) );
|
||||
cursorStrings.push_back( DimensionLabel( wxT( "x" ), temp.x, aUnits ) );
|
||||
cursorStrings.push_back( DimensionLabel( wxT( "y" ), temp.y, aUnits ) );
|
||||
|
||||
cursorStrings.push_back( DimensionLabel( "r", aRulerVec.EuclideanNorm(), aUnits ) );
|
||||
cursorStrings.push_back( DimensionLabel( wxT( "r" ), aRulerVec.EuclideanNorm(), aUnits ) );
|
||||
|
||||
double degs = RAD2DECIDEG( -aRulerVec.Angle() );
|
||||
cursorStrings.push_back( DimensionLabel( wxString::FromUTF8( "θ" ), degs,
|
||||
|
@ -221,7 +221,7 @@ void drawTicksAlongLine( KIGFX::VIEW* aView, const VECTOR2D& aOrigin, const VECT
|
|||
|
||||
if( drawLabel )
|
||||
{
|
||||
wxString label = DimensionLabel( "", tickSpace * i, aUnits, false );
|
||||
wxString label = DimensionLabel( wxT( "" ), tickSpace * i, aUnits, false );
|
||||
gal->SetLineWidth( textThickness );
|
||||
gal->StrokeText( label, tickPos + labelOffset, labelAngle );
|
||||
}
|
||||
|
|
|
@ -77,19 +77,19 @@ void TWO_POINT_ASSISTANT::ViewDraw( int aLayer, KIGFX::VIEW* aView ) const
|
|||
|
||||
if( m_shape == GEOM_SHAPE::SEGMENT )
|
||||
{
|
||||
cursorStrings.push_back( DimensionLabel( "l", radVec.EuclideanNorm(), m_units ) );
|
||||
cursorStrings.push_back( DimensionLabel( wxT( "l" ), radVec.EuclideanNorm(), m_units ) );
|
||||
}
|
||||
else if( m_shape == GEOM_SHAPE::RECT )
|
||||
{
|
||||
cursorStrings.push_back( DimensionLabel( "x", std::abs( radVec.x ), m_units ) );
|
||||
cursorStrings.push_back( DimensionLabel( "y", std::abs( radVec.y ), m_units ) );
|
||||
cursorStrings.push_back( DimensionLabel( wxT( "x" ), std::abs( radVec.x ), m_units ) );
|
||||
cursorStrings.push_back( DimensionLabel( wxT( "y" ), std::abs( radVec.y ), m_units ) );
|
||||
}
|
||||
else if( m_shape == GEOM_SHAPE::CIRCLE )
|
||||
{
|
||||
KIGFX::PREVIEW::DRAW_CONTEXT preview_ctx( *aView );
|
||||
preview_ctx.DrawLine( origin, end, false );
|
||||
|
||||
cursorStrings.push_back( DimensionLabel( "r", radVec.EuclideanNorm(), m_units ) );
|
||||
cursorStrings.push_back( DimensionLabel( wxT( "r" ), radVec.EuclideanNorm(), m_units ) );
|
||||
}
|
||||
|
||||
// place the text next to cursor, on opposite side from drawing
|
||||
|
|
|
@ -93,7 +93,7 @@ void PROJECT::setProjectFullName( const wxString& aFullPathAndName )
|
|||
{
|
||||
Clear(); // clear the data when the project changes.
|
||||
|
||||
wxLogTrace( tracePathsAndFiles, "%s: old:'%s' new:'%s'", __func__,
|
||||
wxLogTrace( tracePathsAndFiles, wxT( "%s: old:'%s' new:'%s'" ), __func__,
|
||||
TO_UTF8( GetProjectFullName() ), TO_UTF8( aFullPathAndName ) );
|
||||
|
||||
m_project_name = aFullPathAndName;
|
||||
|
@ -139,13 +139,13 @@ bool PROJECT::IsNullProject() const
|
|||
|
||||
const wxString PROJECT::SymbolLibTableName() const
|
||||
{
|
||||
return libTableName( "sym-lib-table" );
|
||||
return libTableName( wxT( "sym-lib-table" ) );
|
||||
}
|
||||
|
||||
|
||||
const wxString PROJECT::FootprintLibTblName() const
|
||||
{
|
||||
return libTableName( "fp-lib-table" );
|
||||
return libTableName( wxT( "fp-lib-table" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -181,7 +181,7 @@ const wxString PROJECT::libTableName( const wxString& aLibTableName ) const
|
|||
* until the project file being edited is saved. It is then moved to the correct
|
||||
* file in the folder where the project file is saved.
|
||||
*/
|
||||
fn.SetName( "prj-" + aLibTableName );
|
||||
fn.SetName( wxT( "prj-" ) + aLibTableName );
|
||||
}
|
||||
else // normal path.
|
||||
{
|
||||
|
|
|
@ -123,14 +123,14 @@ void PROPERTY_MANAGER::AddTypeCast( TYPE_CAST_BASE* aCast )
|
|||
TYPE_ID derivedHash = aCast->DerivedHash();
|
||||
CLASS_DESC& classDesc = getClass( aCast->BaseHash() );
|
||||
auto& typeCasts = classDesc.m_typeCasts;
|
||||
wxASSERT_MSG( typeCasts.count( derivedHash ) == 0, "Such converter already exists" );
|
||||
wxASSERT_MSG( typeCasts.count( derivedHash ) == 0, wxT( "Such converter already exists" ) );
|
||||
typeCasts.emplace( derivedHash, aCast );
|
||||
}
|
||||
|
||||
|
||||
void PROPERTY_MANAGER::InheritsAfter( TYPE_ID aDerived, TYPE_ID aBase )
|
||||
{
|
||||
wxASSERT_MSG( aDerived != aBase, "Class cannot inherit from itself" );
|
||||
wxASSERT_MSG( aDerived != aBase, wxT( "Class cannot inherit from itself" ) );
|
||||
|
||||
CLASS_DESC& derived = getClass( aDerived );
|
||||
CLASS_DESC& base = getClass( aBase );
|
||||
|
@ -138,7 +138,7 @@ void PROPERTY_MANAGER::InheritsAfter( TYPE_ID aDerived, TYPE_ID aBase )
|
|||
m_dirty = true;
|
||||
|
||||
wxASSERT_MSG( derived.m_bases.size() == 1 || derived.m_typeCasts.count( aBase ) == 1,
|
||||
"You need to add a TYPE_CAST for classes inheriting from multiple bases" );
|
||||
wxT( "You need to add a TYPE_CAST for classes inheriting from multiple bases" ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ wxString GetRefDesUnannotated( const wxString& aSource )
|
|||
int GetRefDesNumber( const wxString& aRefDes )
|
||||
{
|
||||
int retval = -1; // negative to indicate not found
|
||||
size_t firstnum = aRefDes.find_first_of( "0123456789" );
|
||||
size_t firstnum = aRefDes.find_first_of( wxT( "0123456789" ) );
|
||||
|
||||
if( firstnum != wxString::npos )
|
||||
{
|
||||
|
|
|
@ -245,7 +245,7 @@ void INFOBAR_REPORTER::Finalize()
|
|||
case RPT_SEVERITY_IGNORE: icon = wxICON_INFORMATION; break;
|
||||
}
|
||||
|
||||
if( m_message->EndsWith( "\n" ) )
|
||||
if( m_message->EndsWith( wxT( "\n" ) ) )
|
||||
*m_message = m_message->Left( m_message->Length() - 1 );
|
||||
|
||||
if( HasMessage() )
|
||||
|
|
|
@ -268,7 +268,7 @@ void SCINTILLA_TRICKS::onCharHook( wxKeyEvent& aEvent )
|
|||
for( int ii = startLine; ii <= endLine; ++ii )
|
||||
{
|
||||
if( comment )
|
||||
m_te->InsertText( m_te->PositionFromLine( ii ), "#" );
|
||||
m_te->InsertText( m_te->PositionFromLine( ii ), wxT( "#" ) );
|
||||
else if( firstNonWhitespace( ii, &whitespaceCount ) == '#' )
|
||||
m_te->DeleteRange( m_te->PositionFromLine( ii ) + whitespaceCount, 1 );
|
||||
}
|
||||
|
|
|
@ -202,11 +202,11 @@ const wxString SEARCH_STACK::LastVisitedPath( const wxString& aSubPathToSearch )
|
|||
#if defined(DEBUG)
|
||||
void SEARCH_STACK::Show( const wxString& aPrefix ) const
|
||||
{
|
||||
wxLogTrace( tracePathsAndFiles, "%s SEARCH_STACK:", aPrefix );
|
||||
wxLogTrace( tracePathsAndFiles, wxT( "%s SEARCH_STACK:" ), aPrefix );
|
||||
|
||||
for( unsigned i=0; i<GetCount(); ++i )
|
||||
{
|
||||
wxLogTrace( tracePathsAndFiles, " [%2u]:%s", i, TO_UTF8( (*this)[i] ) );
|
||||
wxLogTrace( tracePathsAndFiles, wxT( " [%2u]:%s" ), i, TO_UTF8( (*this)[i] ) );
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -41,7 +41,7 @@ wxString SearchHelpFileFullPath( const wxString& aBaseName )
|
|||
SystemDirsAppend( &basePaths );
|
||||
|
||||
#if defined( DEBUG )
|
||||
basePaths.Show( wxString( __func__ ) + ": basePaths" );
|
||||
basePaths.Show( wxString( __func__ ) + wxT( ": basePaths" ) );
|
||||
#endif
|
||||
|
||||
// By default, the documentation from kicad-doc is installed to a folder called "help" with
|
||||
|
@ -61,7 +61,7 @@ wxString SearchHelpFileFullPath( const wxString& aBaseName )
|
|||
localeNameDirs.Add( currentLocale->GetName().BeforeLast( '_' ) );
|
||||
|
||||
// plain English (in case a localised version of the help file cannot be found)
|
||||
localeNameDirs.Add( "en" );
|
||||
localeNameDirs.Add( wxT( "en" ) );
|
||||
|
||||
for( wxString& locale : localeNameDirs )
|
||||
{
|
||||
|
@ -72,37 +72,37 @@ wxString SearchHelpFileFullPath( const wxString& aBaseName )
|
|||
wxFileName path( base, wxEmptyString );
|
||||
|
||||
// add <base>/help/<locale>/
|
||||
path.AppendDir( "help" );
|
||||
path.AppendDir( wxT( "help" ) );
|
||||
path.AppendDir( locale );
|
||||
docPaths.AddPaths( path.GetPath() );
|
||||
|
||||
// add <base>/doc/help/<locale>/
|
||||
path.InsertDir( path.GetDirCount() - 2, "doc" );
|
||||
path.InsertDir( path.GetDirCount() - 2, wxT( "doc" ) );
|
||||
docPaths.AddPaths( path.GetPath() );
|
||||
|
||||
// add <base>/doc/kicad/help/<locale>/
|
||||
path.InsertDir( path.GetDirCount() - 2, "kicad" );
|
||||
path.InsertDir( path.GetDirCount() - 2, wxT( "kicad" ) );
|
||||
docPaths.AddPaths( path.GetPath() );
|
||||
}
|
||||
|
||||
#if defined( DEBUG )
|
||||
docPaths.Show( wxString( __func__ ) + ": docPaths (" + locale + ")" );
|
||||
docPaths.Show( wxString( __func__ ) + wxT( ": docPaths (" ) + locale + wxT( ")" ) );
|
||||
#endif
|
||||
|
||||
// search HTML first, as it is the preferred format for help files
|
||||
wxLogTrace( tracePathsAndFiles, "Checking SEARCH_STACK for file %s.html", aBaseName );
|
||||
helpFile = docPaths.FindValidPath( aBaseName + ".html" );
|
||||
wxLogTrace( tracePathsAndFiles, wxT( "Checking SEARCH_STACK for file %s.html" ), aBaseName );
|
||||
helpFile = docPaths.FindValidPath( aBaseName + wxT( ".html" ) );
|
||||
|
||||
if( !helpFile.IsEmpty() )
|
||||
{
|
||||
// prepend URI protocol to open the file in a browser
|
||||
helpFile = "file://" + helpFile;
|
||||
helpFile = wxT( "file://" ) + helpFile;
|
||||
break;
|
||||
}
|
||||
|
||||
// search PDF only when no corresponding HTML file was found
|
||||
wxLogTrace( tracePathsAndFiles, "Checking SEARCH_STACK for file %s.pdf", aBaseName );
|
||||
helpFile = docPaths.FindValidPath( aBaseName + ".pdf" );
|
||||
wxLogTrace( tracePathsAndFiles, wxT( "Checking SEARCH_STACK for file %s.pdf" ), aBaseName );
|
||||
helpFile = docPaths.FindValidPath( aBaseName + wxT( ".pdf" ) );
|
||||
|
||||
if( !helpFile.IsEmpty() )
|
||||
break;
|
||||
|
|
|
@ -233,7 +233,7 @@ struct APP_SINGLE_TOP : public wxApp
|
|||
}
|
||||
catch( const std::exception& e )
|
||||
{
|
||||
wxLogError( "Unhandled exception class: %s what: %s",
|
||||
wxLogError( wxT( "Unhandled exception class: %s what: %s" ),
|
||||
FROM_UTF8( typeid(e).name() ),
|
||||
FROM_UTF8( e.what() ) );
|
||||
}
|
||||
|
@ -243,7 +243,7 @@ struct APP_SINGLE_TOP : public wxApp
|
|||
}
|
||||
catch(...)
|
||||
{
|
||||
wxLogError( "Unhandled exception of unknown type" );
|
||||
wxLogError( wxT( "Unhandled exception of unknown type" ) );
|
||||
}
|
||||
|
||||
return false; // continue on. Return false to abort program
|
||||
|
@ -340,7 +340,7 @@ bool PGM_SINGLE_TOP::OnPgmInit()
|
|||
|
||||
wxString frameName;
|
||||
|
||||
if( parser.Found( "frame", &frameName ) )
|
||||
if( parser.Found( wxT( "frame" ), &frameName ) )
|
||||
{
|
||||
appType = FRAME_T_COUNT;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ wxString ConvertToNewOverbarNotation( const wxString& aOldStr )
|
|||
bool inOverbar = false;
|
||||
|
||||
// Don't get tripped up by the legacy empty-string token.
|
||||
if( aOldStr == "~" )
|
||||
if( aOldStr == wxT( "~" ) )
|
||||
return aOldStr;
|
||||
|
||||
for( wxString::const_iterator chIt = aOldStr.begin(); chIt != aOldStr.end(); ++chIt )
|
||||
|
@ -62,12 +62,12 @@ wxString ConvertToNewOverbarNotation( const wxString& aOldStr )
|
|||
{
|
||||
// This way the subsequent opening curly brace will not start an
|
||||
// overbar.
|
||||
newStr << "~~{}";
|
||||
newStr << wxT( "~~{}" );
|
||||
continue;
|
||||
}
|
||||
|
||||
// Two subsequent tildes mean a tilde.
|
||||
newStr << "~";
|
||||
newStr << wxT( "~" );
|
||||
++chIt;
|
||||
continue;
|
||||
}
|
||||
|
@ -81,12 +81,12 @@ wxString ConvertToNewOverbarNotation( const wxString& aOldStr )
|
|||
{
|
||||
if( inOverbar )
|
||||
{
|
||||
newStr << "}";
|
||||
newStr << wxT( "}" );
|
||||
inOverbar = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
newStr << "~{";
|
||||
newStr << wxT( "~{" );
|
||||
inOverbar = true;
|
||||
}
|
||||
|
||||
|
@ -96,7 +96,7 @@ wxString ConvertToNewOverbarNotation( const wxString& aOldStr )
|
|||
else if( ( *chIt == ' ' || *chIt == '}' || *chIt == ')' ) && inOverbar )
|
||||
{
|
||||
// Spaces were used to terminate overbar as well
|
||||
newStr << "}";
|
||||
newStr << wxT( "}" );
|
||||
inOverbar = false;
|
||||
}
|
||||
|
||||
|
@ -105,7 +105,7 @@ wxString ConvertToNewOverbarNotation( const wxString& aOldStr )
|
|||
|
||||
// Explicitly end the overbar even if there was no terminating '~' in the aOldStr.
|
||||
if( inOverbar )
|
||||
newStr << "}";
|
||||
newStr << wxT( "}" );
|
||||
|
||||
return newStr;
|
||||
}
|
||||
|
@ -147,78 +147,78 @@ wxString EscapeString( const wxString& aSource, ESCAPE_CONTEXT aContext )
|
|||
if( aContext == CTX_NETNAME )
|
||||
{
|
||||
if( c == '/' )
|
||||
converted += "{slash}";
|
||||
converted += wxT( "{slash}" );
|
||||
else if( c == '\n' || c == '\r' )
|
||||
converted += ""; // drop
|
||||
converted += wxT( "" ); // drop
|
||||
else
|
||||
converted += c;
|
||||
}
|
||||
else if( aContext == CTX_LIBID )
|
||||
{
|
||||
if( c == '{' )
|
||||
converted += "{brace}";
|
||||
converted += wxT( "{brace}" );
|
||||
else if( c == '/' )
|
||||
converted += "{slash}";
|
||||
converted += wxT( "{slash}" );
|
||||
else if( c == '\\' )
|
||||
converted += "{backslash}";
|
||||
converted += wxT( "{backslash}" );
|
||||
else if( c == '<' )
|
||||
converted += "{lt}";
|
||||
converted += wxT( "{lt}" );
|
||||
else if( c == '>' )
|
||||
converted += "{gt}";
|
||||
converted += wxT( "{gt}" );
|
||||
else if( c == ':' )
|
||||
converted += "{colon}";
|
||||
converted += wxT( "{colon}" );
|
||||
else if( c == '\"' )
|
||||
converted += "{dblquote}";
|
||||
converted += wxT( "{dblquote}" );
|
||||
else if( c == '\n' || c == '\r' )
|
||||
converted += ""; // drop
|
||||
converted += wxT( "" ); // drop
|
||||
else
|
||||
converted += c;
|
||||
}
|
||||
else if( aContext == CTX_QUOTED_STR )
|
||||
{
|
||||
if( c == '\"' )
|
||||
converted += "{dblquote}";
|
||||
converted += wxT( "{dblquote}" );
|
||||
else
|
||||
converted += c;
|
||||
}
|
||||
else if( aContext == CTX_LINE )
|
||||
{
|
||||
if( c == '\n' || c == '\r' )
|
||||
converted += "{return}";
|
||||
converted += wxT( "{return}" );
|
||||
else
|
||||
converted += c;
|
||||
}
|
||||
else if( aContext == CTX_FILENAME )
|
||||
{
|
||||
if( c == '{' )
|
||||
converted += "{brace}";
|
||||
converted += wxT( "{brace}" );
|
||||
else if( c == '/' )
|
||||
converted += "{slash}";
|
||||
converted += wxT( "{slash}" );
|
||||
else if( c == '\\' )
|
||||
converted += "{backslash}";
|
||||
converted += wxT( "{backslash}" );
|
||||
else if( c == '\"' )
|
||||
converted += "{dblquote}";
|
||||
converted += wxT( "{dblquote}" );
|
||||
else if( c == '<' )
|
||||
converted += "{lt}";
|
||||
converted += wxT( "{lt}" );
|
||||
else if( c == '>' )
|
||||
converted += "{gt}";
|
||||
converted += wxT( "{gt}" );
|
||||
else if( c == '|' )
|
||||
converted += "{bar}";
|
||||
converted += wxT( "{bar}" );
|
||||
else if( c == ':' )
|
||||
converted += "{colon}";
|
||||
converted += wxT( "{colon}" );
|
||||
else if( c == '\t' )
|
||||
converted += "{tab}";
|
||||
converted += wxT( "{tab}" );
|
||||
else if( c == '\n' || c == '\r' )
|
||||
converted += "{return}";
|
||||
converted += wxT( "{return}" );
|
||||
else
|
||||
converted += c;
|
||||
}
|
||||
else if( aContext == CTX_NO_SPACE )
|
||||
{
|
||||
if( c == ' ' )
|
||||
converted += "{space}";
|
||||
converted += wxT( "{space}" );
|
||||
else if( c == '{' )
|
||||
converted += "{brace}";
|
||||
converted += wxT( "{brace}" );
|
||||
else
|
||||
converted += c;
|
||||
}
|
||||
|
@ -285,7 +285,7 @@ wxString UnescapeString( const wxString& aSource )
|
|||
else if( token.IsEmpty() ) newbuf.append( wxS( "{" ) );
|
||||
else
|
||||
{
|
||||
newbuf.append( "{" + UnescapeString( token ) + "}" );
|
||||
newbuf.append( wxT( "{" ) + UnescapeString( token ) + wxT( "}" ) );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -416,8 +416,8 @@ std::string EscapedUTF8( const wxString& aString )
|
|||
wxString str = aString;
|
||||
|
||||
// No new-lines allowed in quoted strings
|
||||
str.Replace( "\r\n", "\r" );
|
||||
str.Replace( "\n", "\r" );
|
||||
str.Replace( wxT( "\r\n" ), wxT( "\r" ) );
|
||||
str.Replace( wxT( "\n" ), wxT( "\r" ) );
|
||||
|
||||
std::string utf8 = TO_UTF8( aString );
|
||||
|
||||
|
@ -457,15 +457,15 @@ wxString EscapeHTML( const wxString& aString )
|
|||
for( wxUniChar c : aString )
|
||||
{
|
||||
if( c == '\"' )
|
||||
converted += """;
|
||||
converted += wxT( """ );
|
||||
else if( c == '\'' )
|
||||
converted += "'";
|
||||
converted += wxT( "'" );
|
||||
else if( c == '&' )
|
||||
converted += "&";
|
||||
converted += wxT( "&" );
|
||||
else if( c == '<' )
|
||||
converted += "<";
|
||||
converted += wxT( "<" );
|
||||
else if( c == '>' )
|
||||
converted += ">";
|
||||
converted += wxT( ">" );
|
||||
else
|
||||
converted += c;
|
||||
}
|
||||
|
|
|
@ -78,7 +78,7 @@ void ACTION_MANAGER::SetConditions( const TOOL_ACTION& aAction,
|
|||
m_uiConditions[aAction.GetId()] = aConditions;
|
||||
|
||||
wxLogTrace( kicadTraceToolStack,
|
||||
"ACTION_MANAGER::SetConditions: Registering conditions for ID %d - %s",
|
||||
wxT( "ACTION_MANAGER::SetConditions: Registering conditions for ID %d - %s" ),
|
||||
aAction.GetId(), aAction.GetName() );
|
||||
|
||||
// Register a new handler with the new conditions
|
||||
|
@ -126,7 +126,7 @@ bool ACTION_MANAGER::RunHotKey( int aHotKey ) const
|
|||
if( key >= 'a' && key <= 'z' )
|
||||
key = std::toupper( key );
|
||||
|
||||
wxLogTrace( kicadTraceToolStack, "ACTION_MANAGER::RunHotKey Key: %s",
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "ACTION_MANAGER::RunHotKey Key: %s" ),
|
||||
KeyNameFromKeyCode( aHotKey ) );
|
||||
|
||||
HOTKEY_LIST::const_iterator it = m_actionHotKeys.find( key | mod );
|
||||
|
@ -138,7 +138,7 @@ bool ACTION_MANAGER::RunHotKey( int aHotKey ) const
|
|||
if( it == m_actionHotKeys.end() )
|
||||
{
|
||||
wxLogTrace( kicadTraceToolStack,
|
||||
"ACTION_MANAGER::RunHotKey No actions found, searching with key: %s",
|
||||
wxT( "ACTION_MANAGER::RunHotKey No actions found, searching with key: %s" ),
|
||||
KeyNameFromKeyCode( key | ( mod & ~MD_SHIFT ) ) );
|
||||
|
||||
it = m_actionHotKeys.find( key | ( mod & ~MD_SHIFT ) );
|
||||
|
@ -192,8 +192,8 @@ bool ACTION_MANAGER::RunHotKey( int aHotKey ) const
|
|||
runAction = aCond->enableCondition( sel );
|
||||
|
||||
wxLogTrace( kicadTraceToolStack,
|
||||
"ACTION_MANAGER::RunHotKey %s context action: %s for hotkey %s",
|
||||
runAction ? "Running" : "Not running",
|
||||
wxT( "ACTION_MANAGER::RunHotKey %s context action: %s for hotkey %s" ),
|
||||
runAction ? wxT( "Running" ) : wxT( "Not running" ),
|
||||
context->GetName(),
|
||||
KeyNameFromKeyCode( aHotKey ) );
|
||||
|
||||
|
@ -210,8 +210,8 @@ bool ACTION_MANAGER::RunHotKey( int aHotKey ) const
|
|||
runAction = aCond->enableCondition( sel );
|
||||
|
||||
wxLogTrace( kicadTraceToolStack,
|
||||
"ACTION_MANAGER::RunHotKey %s global action: %s for hotkey %s",
|
||||
runAction ? "Running" : "Not running",
|
||||
wxT( "ACTION_MANAGER::RunHotKey %s global action: %s for hotkey %s" ),
|
||||
runAction ? wxT( "Running" ) : wxT( "Not running" ),
|
||||
act->GetName(),
|
||||
KeyNameFromKeyCode( aHotKey ) );
|
||||
|
||||
|
@ -221,7 +221,7 @@ bool ACTION_MANAGER::RunHotKey( int aHotKey ) const
|
|||
}
|
||||
|
||||
wxLogTrace( kicadTraceToolStack,
|
||||
"ACTION_MANAGER::RunHotKey No action found for key %s",
|
||||
wxT( "ACTION_MANAGER::RunHotKey No action found for key %s" ),
|
||||
KeyNameFromKeyCode( aHotKey ) );
|
||||
|
||||
return false;
|
||||
|
|
|
@ -134,7 +134,7 @@ void ACTION_MENU::DisplayTitle( bool aDisplay )
|
|||
|
||||
wxMenuItem* ACTION_MENU::Add( const wxString& aLabel, int aId, BITMAPS aIcon )
|
||||
{
|
||||
wxASSERT_MSG( FindItem( aId ) == nullptr, "Duplicate menu IDs!" );
|
||||
wxASSERT_MSG( FindItem( aId ) == nullptr, wxT( "Duplicate menu IDs!" ) );
|
||||
|
||||
wxMenuItem* item = new wxMenuItem( this, aId, aLabel, wxEmptyString, wxITEM_NORMAL );
|
||||
|
||||
|
@ -148,7 +148,7 @@ wxMenuItem* ACTION_MENU::Add( const wxString& aLabel, int aId, BITMAPS aIcon )
|
|||
wxMenuItem* ACTION_MENU::Add( const wxString& aLabel, const wxString& aTooltip, int aId,
|
||||
BITMAPS aIcon, bool aIsCheckmarkEntry )
|
||||
{
|
||||
wxASSERT_MSG( FindItem( aId ) == nullptr, "Duplicate menu IDs!" );
|
||||
wxASSERT_MSG( FindItem( aId ) == nullptr, wxT( "Duplicate menu IDs!" ) );
|
||||
|
||||
wxMenuItem* item = new wxMenuItem( this, aId, aLabel, aTooltip,
|
||||
aIsCheckmarkEntry ? wxITEM_CHECK : wxITEM_NORMAL );
|
||||
|
@ -186,7 +186,7 @@ wxMenuItem* ACTION_MENU::Add( ACTION_MENU* aMenu )
|
|||
ACTION_MENU* menuCopy = aMenu->Clone();
|
||||
m_submenus.push_back( menuCopy );
|
||||
|
||||
wxASSERT_MSG( !menuCopy->m_title.IsEmpty(), "Set a title for ACTION_MENU using SetTitle()" );
|
||||
wxASSERT_MSG( !menuCopy->m_title.IsEmpty(), wxT( "Set a title for ACTION_MENU using SetTitle()" ) );
|
||||
|
||||
if( !!aMenu->m_icon )
|
||||
{
|
||||
|
@ -527,7 +527,7 @@ void ACTION_MENU::OnMenuEvent( wxMenuEvent& aEvent )
|
|||
// clients that don't supply a tool will have to check GetSelected() themselves
|
||||
if( evt && m_tool )
|
||||
{
|
||||
wxLogTrace( kicadTraceToolStack, "ACTION_MENU::OnMenuEvent %s", evt->Format() );
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "ACTION_MENU::OnMenuEvent %s" ), evt->Format() );
|
||||
|
||||
// WARNING: if you're squeamish, look away.
|
||||
// What follows is a series of egregious hacks necessitated by a lack of information from
|
||||
|
@ -653,7 +653,7 @@ wxMenuItem* ACTION_MENU::appendCopy( const wxMenuItem* aSource )
|
|||
if( aSource->IsSubMenu() )
|
||||
{
|
||||
ACTION_MENU* menu = dynamic_cast<ACTION_MENU*>( aSource->GetSubMenu() );
|
||||
wxASSERT_MSG( menu, "Submenus are expected to be a ACTION_MENU" );
|
||||
wxASSERT_MSG( menu, wxT( "Submenus are expected to be a ACTION_MENU" ) );
|
||||
|
||||
if( menu )
|
||||
{
|
||||
|
|
|
@ -57,7 +57,7 @@ wxBitmap MakeDisabledBitmap( const wxBitmap& aSource )
|
|||
ACTION_GROUP::ACTION_GROUP( const std::string& aName,
|
||||
const std::vector<const TOOL_ACTION*>& aActions )
|
||||
{
|
||||
wxASSERT_MSG( aActions.size() > 0, "Action groups must have at least one action" );
|
||||
wxASSERT_MSG( aActions.size() > 0, wxT( "Action groups must have at least one action" ) );
|
||||
|
||||
// The default action is just the first action in the vector
|
||||
m_actions = aActions;
|
||||
|
@ -83,7 +83,7 @@ void ACTION_GROUP::SetDefaultAction( const TOOL_ACTION& aDefault )
|
|||
return aAction->GetId() == aDefault.GetId();
|
||||
} );
|
||||
|
||||
wxASSERT_MSG( valid, "Action must be present in a group to be the default" );
|
||||
wxASSERT_MSG( valid, wxT( "Action must be present in a group to be the default" ) );
|
||||
|
||||
m_defaultAction = &aDefault;
|
||||
}
|
||||
|
@ -230,7 +230,7 @@ ACTION_TOOLBAR::~ACTION_TOOLBAR()
|
|||
void ACTION_TOOLBAR::Add( const TOOL_ACTION& aAction, bool aIsToggleEntry, bool aIsCancellable )
|
||||
{
|
||||
wxASSERT( GetParent() );
|
||||
wxASSERT_MSG( !( aIsCancellable && !aIsToggleEntry ), "aIsCancellable requires aIsToggleEntry" );
|
||||
wxASSERT_MSG( !( aIsCancellable && !aIsToggleEntry ), wxT( "aIsCancellable requires aIsToggleEntry" ) );
|
||||
|
||||
int toolId = aAction.GetUIId();
|
||||
wxBitmap bmp = KiScaledBitmap( aAction.GetIcon(), GetParent() );
|
||||
|
|
|
@ -43,36 +43,36 @@
|
|||
#include <eda_doc.h>
|
||||
#include <wx/msgdlg.h>
|
||||
|
||||
#define URL_GET_INVOLVED "https://kicad.org/contribute/"
|
||||
#define URL_DONATE "https://go.kicad.org/app-donate"
|
||||
#define URL_DOCUMENTATION "https://docs.kicad.org/"
|
||||
#define URL_GET_INVOLVED wxT( "https://kicad.org/contribute/" )
|
||||
#define URL_DONATE wxT( "https://go.kicad.org/app-donate" )
|
||||
#define URL_DOCUMENTATION wxT( "https://docs.kicad.org/" )
|
||||
|
||||
|
||||
/// URL to launch a new issue with pre-populated description
|
||||
wxString COMMON_CONTROL::m_bugReportUrl =
|
||||
"https://gitlab.com/kicad/code/kicad/issues/new?issue[description]=%s";
|
||||
wxT( "https://gitlab.com/kicad/code/kicad/issues/new?issue[description]=%s" );
|
||||
|
||||
|
||||
/// Issue template to use for reporting bugs (this should not be translated)
|
||||
wxString COMMON_CONTROL::m_bugReportTemplate =
|
||||
"<!-- Before Creating a New Issue:\n"
|
||||
"* Search the issue tracker to verify the issue has not already been reported.\n"
|
||||
"* Only report one problem per issue. -->\n"
|
||||
"\n"
|
||||
"# Description\n"
|
||||
"<!-- What is the current behavior and what is the expected behavior? -->\n"
|
||||
"<!-- Please attach screenshots if they will help explain the problem. -->\n"
|
||||
"\n"
|
||||
"# Steps to reproduce\n"
|
||||
"<!-- Please include a screen recording if it will help explain how to reproduce. -->\n"
|
||||
"<!-- If this issue is specific to a project, please attach it. -->\n"
|
||||
"1.\n"
|
||||
"2.\n"
|
||||
"# KiCad Version\n"
|
||||
"\n"
|
||||
"```\n"
|
||||
"%s\n"
|
||||
"```";
|
||||
wxT( "<!-- Before Creating a New Issue:\n" )
|
||||
wxT( "* Search the issue tracker to verify the issue has not already been reported.\n" )
|
||||
wxT( "* Only report one problem per issue. -->\n" )
|
||||
wxT( "\n" )
|
||||
wxT( "# Description\n" )
|
||||
wxT( "<!-- What is the current behavior and what is the expected behavior? -->\n" )
|
||||
wxT( "<!-- Please attach screenshots if they will help explain the problem. -->\n" )
|
||||
wxT( "\n" )
|
||||
wxT( "# Steps to reproduce\n" )
|
||||
wxT( "<!-- Please include a screen recording if it will help explain how to reproduce. -->\n" )
|
||||
wxT( "<!-- If this issue is specific to a project, please attach it. -->\n" )
|
||||
wxT( "1.\n" )
|
||||
wxT( "2.\n" )
|
||||
wxT( "# KiCad Version\n" )
|
||||
wxT( "\n" )
|
||||
wxT( "```\n" )
|
||||
wxT( "%s\n" )
|
||||
wxT( "```" );
|
||||
|
||||
|
||||
void COMMON_CONTROL::Reset( RESET_REASON aReason )
|
||||
|
@ -164,7 +164,7 @@ int COMMON_CONTROL::ShowPlayer( const TOOL_EVENT& aEvent )
|
|||
KIWAY_PLAYER* editor = m_frame->Kiway().Player( playerType, true );
|
||||
|
||||
// editor can be null if Player() fails:
|
||||
wxCHECK_MSG( editor != nullptr, 0, "Cannot open/create the editor frame" );
|
||||
wxCHECK_MSG( editor != nullptr, 0, wxT( "Cannot open/create the editor frame" ) );
|
||||
|
||||
// Needed on Windows, other platforms do not use it, but it creates no issue
|
||||
if( editor->IsIconized() )
|
||||
|
@ -186,9 +186,9 @@ int COMMON_CONTROL::ShowHelp( const TOOL_EVENT& aEvent )
|
|||
wxString helpFile;
|
||||
wxString msg;
|
||||
|
||||
// the URL of help files is "https://docs.kicad.org/<version>/<language>/<name>/"
|
||||
const wxString baseUrl = URL_DOCUMENTATION + GetMajorMinorVersion() + "/"
|
||||
+ Pgm().GetLocale()->GetName().BeforeLast( '_' ) + "/";
|
||||
// the URL of help files is wxT( "https://docs.kicad.org/<version>/<language>/<name>/" )
|
||||
const wxString baseUrl = URL_DOCUMENTATION + GetMajorMinorVersion() + wxT( "/" )
|
||||
+ Pgm().GetLocale()->GetName().BeforeLast( '_' ) + wxT( "/" );
|
||||
|
||||
/* We have to get document for beginners,
|
||||
* or the full specific doc
|
||||
|
@ -225,7 +225,7 @@ int COMMON_CONTROL::ShowHelp( const TOOL_EVENT& aEvent )
|
|||
if( dlg.ShowModal() != wxID_YES )
|
||||
return -1;
|
||||
|
||||
helpFile = baseUrl + names[0] + "/";
|
||||
helpFile = baseUrl + names[0] + wxT( "/" );
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -245,7 +245,7 @@ int COMMON_CONTROL::ShowHelp( const TOOL_EVENT& aEvent )
|
|||
if( dlg.ShowModal() != wxID_YES )
|
||||
return -1;
|
||||
|
||||
helpFile = baseUrl + base_name + "/";
|
||||
helpFile = baseUrl + base_name + wxT( "/" );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ void COMMON_TOOLS::SetLastUnits( EDA_UNITS aUnit )
|
|||
else if( EDA_UNIT_UTILS::IsMetricUnit( aUnit ) )
|
||||
m_metricUnit = aUnit;
|
||||
else
|
||||
wxASSERT_MSG( false, "Invalid unit" );
|
||||
wxASSERT_MSG( false, wxT( "Invalid unit" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -150,7 +150,7 @@ int COMMON_TOOLS::CursorControl( const TOOL_EVENT& aEvent )
|
|||
return 0;
|
||||
}
|
||||
default:
|
||||
wxFAIL_MSG( "CursorControl(): unexpected request" );
|
||||
wxFAIL_MSG( wxT( "CursorControl(): unexpected request" ) );
|
||||
}
|
||||
|
||||
getViewControls()->SetCursorPosition( cursor, true, true, type );
|
||||
|
@ -515,7 +515,7 @@ int COMMON_TOOLS::SwitchUnits( const TOOL_EVENT& aEvent )
|
|||
else if( EDA_UNIT_UTILS::IsImperialUnit( newUnit ) )
|
||||
m_imperialUnit = newUnit;
|
||||
else
|
||||
wxASSERT_MSG( false, "Invalid unit for the frame" );
|
||||
wxASSERT_MSG( false, wxT( "Invalid unit for the frame" ) );
|
||||
|
||||
m_frame->ChangeUserUnits( newUnit );
|
||||
return 0;
|
||||
|
|
|
@ -89,7 +89,7 @@ wxString TOOL_ACTION::GetLabel() const
|
|||
wxString TOOL_ACTION::GetMenuItem() const
|
||||
{
|
||||
wxString label = wxGetTranslation( m_label );
|
||||
label.Replace( "&", "&&" );
|
||||
label.Replace( wxT( "&" ), wxT( "&&" ) );
|
||||
return AddHotkeyName( label, m_hotKey, IS_HOTKEY );
|
||||
}
|
||||
|
||||
|
|
|
@ -360,7 +360,7 @@ OPT<TOOL_EVENT> TOOL_DISPATCHER::GetToolEvent( wxKeyEvent* aKeyEvent, bool* keyI
|
|||
return evt;
|
||||
}
|
||||
|
||||
wxLogTrace( kicadTraceKeyEvent, "TOOL_DISPATCHER::GetToolEvent %s", dump( *aKeyEvent ) );
|
||||
wxLogTrace( kicadTraceKeyEvent, wxT( "TOOL_DISPATCHER::GetToolEvent %s" ), dump( *aKeyEvent ) );
|
||||
|
||||
// if the key event must be skipped, skip it here if the event is a wxEVT_CHAR_HOOK
|
||||
// and do nothing.
|
||||
|
@ -512,7 +512,7 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
|
|||
{
|
||||
wxKeyEvent* ke = static_cast<wxKeyEvent*>( &aEvent );
|
||||
|
||||
wxLogTrace( kicadTraceKeyEvent, "TOOL_DISPATCHER::DispatchWxEvent %s", dump( *ke ) );
|
||||
wxLogTrace( kicadTraceKeyEvent, wxT( "TOOL_DISPATCHER::DispatchWxEvent %s" ), dump( *ke ) );
|
||||
|
||||
// Do not process wxEVT_CHAR_HOOK for a shift-modified key, as ACTION_MANAGER::RunHotKey
|
||||
// will run the un-shifted key and that's not what we want. Wait to get the translated
|
||||
|
@ -593,12 +593,12 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
|
|||
|
||||
if( evt )
|
||||
{
|
||||
wxLogTrace( kicadTraceToolStack, "TOOL_DISPATCHER::DispatchWxEvent %s", evt->Format() );
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "TOOL_DISPATCHER::DispatchWxEvent %s" ), evt->Format() );
|
||||
|
||||
handled = m_toolMgr->ProcessEvent( *evt );
|
||||
|
||||
wxLogTrace( kicadTraceToolStack, "TOOL_DISPATCHER::DispatchWxEvent - Handled: %s %s",
|
||||
( handled ? "true" : "false" ), evt->Format() );
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "TOOL_DISPATCHER::DispatchWxEvent - Handled: %s %s" ),
|
||||
( handled ? wxT( "true" ) : wxT( "false" ) ), evt->Format() );
|
||||
}
|
||||
|
||||
// pass the event to the GUI, it might still be interested in it
|
||||
|
@ -629,6 +629,6 @@ void TOOL_DISPATCHER::DispatchWxEvent( wxEvent& aEvent )
|
|||
&& !keyIsEscape )
|
||||
aEvent.Skip();
|
||||
|
||||
wxLogTrace( kicadTraceToolStack, "TOOL_DISPATCHER::DispatchWxEvent - Wx event skipped: %s",
|
||||
( aEvent.GetSkipped() ? "true" : "false" ) );
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "TOOL_DISPATCHER::DispatchWxEvent - Wx event skipped: %s" ),
|
||||
( aEvent.GetSkipped() ? wxT( "true" ) : wxT( "false" ) ) );
|
||||
}
|
||||
|
|
|
@ -76,7 +76,7 @@ void TOOL_EVENT::init()
|
|||
VECTOR2D TOOL_EVENT::returnCheckedPosition( const VECTOR2D& aPos ) const
|
||||
{
|
||||
#ifdef WX_COMPATIBILITY
|
||||
wxCHECK_MSG( HasPosition(), VECTOR2D(), "Attempted to get position from non-position event" );
|
||||
wxCHECK_MSG( HasPosition(), VECTOR2D(), wxT( "Attempted to get position from non-position event" ) );
|
||||
#else
|
||||
assert( HasPosition() );
|
||||
#endif
|
||||
|
|
|
@ -256,7 +256,7 @@ bool TOOL_MANAGER::InvokeTool( TOOL_ID aToolId )
|
|||
if( tool && tool->GetType() == INTERACTIVE )
|
||||
return invokeTool( tool );
|
||||
|
||||
wxLogTrace( kicadTraceToolStack, "TOOL_MANAGER::InvokeTool - no tool with ID %d",
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "TOOL_MANAGER::InvokeTool - no tool with ID %d" ),
|
||||
aToolId );
|
||||
|
||||
return false; // there is no tool with the given id
|
||||
|
@ -270,7 +270,7 @@ bool TOOL_MANAGER::InvokeTool( const std::string& aToolName )
|
|||
if( tool && tool->GetType() == INTERACTIVE )
|
||||
return invokeTool( tool );
|
||||
|
||||
wxLogTrace( kicadTraceToolStack, "TOOL_MANAGER::InvokeTool - no tool with name %s",
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "TOOL_MANAGER::InvokeTool - no tool with name %s" ),
|
||||
aToolName );
|
||||
|
||||
return false; // there is no tool with the given name
|
||||
|
@ -411,7 +411,7 @@ bool TOOL_MANAGER::runTool( TOOL_BASE* aTool )
|
|||
|
||||
TOOL_ID id = aTool->GetId();
|
||||
|
||||
wxLogTrace( kicadTraceToolStack, "TOOL_MANAGER::runTool - running tool %s",
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "TOOL_MANAGER::runTool - running tool %s" ),
|
||||
aTool->GetName() );
|
||||
|
||||
if( aTool->GetType() == INTERACTIVE )
|
||||
|
@ -464,7 +464,7 @@ void TOOL_MANAGER::ShutdownTool( TOOL_ID aToolId )
|
|||
if( tool && tool->GetType() == INTERACTIVE )
|
||||
ShutdownTool( tool );
|
||||
|
||||
wxLogTrace( kicadTraceToolStack, "TOOL_MANAGER::ShutdownTool - no tool with ID %d",
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "TOOL_MANAGER::ShutdownTool - no tool with ID %d" ),
|
||||
aToolId );
|
||||
}
|
||||
|
||||
|
@ -476,7 +476,7 @@ void TOOL_MANAGER::ShutdownTool( const std::string& aToolName )
|
|||
if( tool && tool->GetType() == INTERACTIVE )
|
||||
ShutdownTool( tool );
|
||||
|
||||
wxLogTrace( kicadTraceToolStack, "TOOL_MANAGER::ShutdownTool - no tool with name %s",
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "TOOL_MANAGER::ShutdownTool - no tool with name %s" ),
|
||||
aToolName );
|
||||
}
|
||||
|
||||
|
@ -505,7 +505,7 @@ void TOOL_MANAGER::ShutdownTool( TOOL_BASE* aTool )
|
|||
if( st->cofunc )
|
||||
{
|
||||
wxLogTrace( kicadTraceToolStack,
|
||||
"TOOL_MANAGER::ShutdownTool - Shutting down tool %s",
|
||||
wxT( "TOOL_MANAGER::ShutdownTool - Shutting down tool %s" ),
|
||||
st->theTool->GetName() );
|
||||
|
||||
setActiveState( st );
|
||||
|
@ -577,7 +577,7 @@ void TOOL_MANAGER::InitTools()
|
|||
|
||||
if( !tool->Init() )
|
||||
{
|
||||
wxLogTrace( kicadTraceToolStack, "TOOL_MANAGER initialization of tool '%s' failed",
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "TOOL_MANAGER initialization of tool '%s' failed" ),
|
||||
tool->GetName() );
|
||||
|
||||
// Unregister the tool
|
||||
|
@ -663,7 +663,7 @@ bool TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent )
|
|||
{
|
||||
bool handled = false;
|
||||
|
||||
wxLogTrace( kicadTraceToolStack, "TOOL_MANAGER::dispatchInternal - received event: %s",
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "TOOL_MANAGER::dispatchInternal - received event: %s" ),
|
||||
aEvent.Format() );
|
||||
|
||||
auto it = m_activeTools.begin();
|
||||
|
@ -699,7 +699,7 @@ bool TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent )
|
|||
st->waitEvents.clear();
|
||||
|
||||
wxLogTrace( kicadTraceToolStack,
|
||||
"TOOL_MANAGER::dispatchInternal - Waking tool %s for event: %s",
|
||||
wxT( "TOOL_MANAGER::dispatchInternal - Waking tool %s for event: %s" ),
|
||||
st->theTool->GetName(), aEvent.Format() );
|
||||
|
||||
setActiveState( st );
|
||||
|
@ -715,7 +715,7 @@ bool TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent )
|
|||
if( !st->wakeupEvent.PassEvent() )
|
||||
{
|
||||
wxLogTrace( kicadTraceToolStack,
|
||||
"TOOL_MANAGER::dispatchInternal - tool %s stopped passing event: %s",
|
||||
wxT( "TOOL_MANAGER::dispatchInternal - tool %s stopped passing event: %s" ),
|
||||
st->theTool->GetName(), aEvent.Format() );
|
||||
|
||||
return true;
|
||||
|
@ -759,7 +759,7 @@ bool TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent )
|
|||
st->transitions.clear();
|
||||
|
||||
wxLogTrace( kicadTraceToolStack,
|
||||
"TOOL_MANAGER::dispatchInternal - Running tool %s for event: %s",
|
||||
wxT( "TOOL_MANAGER::dispatchInternal - Running tool %s for event: %s" ),
|
||||
st->theTool->GetName(), aEvent.Format() );
|
||||
|
||||
// got match? Run the handler.
|
||||
|
@ -784,8 +784,8 @@ bool TOOL_MANAGER::dispatchInternal( TOOL_EVENT& aEvent )
|
|||
break; // only the first tool gets the event
|
||||
}
|
||||
|
||||
wxLogTrace( kicadTraceToolStack, "TOOL_MANAGER::dispatchInternal - %s handle event: %s",
|
||||
( handled ? "Did" : "Did not" ), aEvent.Format() );
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "TOOL_MANAGER::dispatchInternal - %s handle event: %s" ),
|
||||
( handled ? wxT( "Did" ) : wxT( "Did not" ) ), aEvent.Format() );
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
@ -802,7 +802,7 @@ bool TOOL_MANAGER::DispatchHotKey( const TOOL_EVENT& aEvent )
|
|||
|
||||
bool TOOL_MANAGER::dispatchActivation( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
wxLogTrace( kicadTraceToolStack, "TOOL_MANAGER::dispatchActivation - Received event: %s",
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "TOOL_MANAGER::dispatchActivation - Received event: %s" ),
|
||||
aEvent.Format() );
|
||||
|
||||
if( aEvent.IsActivate() )
|
||||
|
@ -814,7 +814,7 @@ bool TOOL_MANAGER::dispatchActivation( const TOOL_EVENT& aEvent )
|
|||
if( tool != m_toolNameIndex.end() )
|
||||
{
|
||||
wxLogTrace( kicadTraceToolStack,
|
||||
"TOOL_MANAGER::dispatchActivation - Running tool %s for event: %s",
|
||||
wxT( "TOOL_MANAGER::dispatchActivation - Running tool %s for event: %s" ),
|
||||
tool->second->theTool->GetName(), aEvent.Format() );
|
||||
|
||||
runTool( tool->second->theTool );
|
||||
|
@ -1115,7 +1115,7 @@ void TOOL_MANAGER::applyViewControls( const TOOL_STATE* aState )
|
|||
|
||||
bool TOOL_MANAGER::processEvent( const TOOL_EVENT& aEvent )
|
||||
{
|
||||
wxLogTrace( kicadTraceToolStack, "TOOL_MANAGER::processEvent - %s", aEvent.Format() );
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "TOOL_MANAGER::processEvent - %s" ), aEvent.Format() );
|
||||
|
||||
// First try to dispatch the action associated with the event if it is a key press event
|
||||
bool handled = DispatchHotKey( aEvent );
|
||||
|
@ -1153,8 +1153,8 @@ bool TOOL_MANAGER::processEvent( const TOOL_EVENT& aEvent )
|
|||
}
|
||||
}
|
||||
|
||||
wxLogTrace( kicadTraceToolStack, "TOOL_MANAGER::processEvent - %s handle event: %s",
|
||||
( handled ? "Did" : "Did not" ), aEvent.Format() );
|
||||
wxLogTrace( kicadTraceToolStack, wxT( "TOOL_MANAGER::processEvent - %s handle event: %s" ),
|
||||
( handled ? wxT( "Did" ) : wxT( "Did not" ) ), aEvent.Format() );
|
||||
|
||||
return handled;
|
||||
}
|
||||
|
|
|
@ -224,37 +224,37 @@ wxString GetKeyName( const wxKeyEvent &aEvent )
|
|||
return wxString::Format( "'%c'", uc );
|
||||
#endif
|
||||
|
||||
return "unknown";
|
||||
return wxT( "unknown" );
|
||||
}
|
||||
|
||||
|
||||
wxString dump( const wxKeyEvent& aEvent )
|
||||
{
|
||||
wxString msg;
|
||||
wxString eventType = "unknown";
|
||||
wxString eventType = wxT( "unknown" );
|
||||
|
||||
if( aEvent.GetEventType() == wxEVT_KEY_DOWN )
|
||||
eventType = "KeyDown";
|
||||
eventType = wxT( "KeyDown" );
|
||||
else if( aEvent.GetEventType() == wxEVT_KEY_UP )
|
||||
eventType = "KeyUp";
|
||||
eventType = wxT( "KeyUp" );
|
||||
else if( aEvent.GetEventType() == wxEVT_CHAR )
|
||||
eventType = "Char";
|
||||
eventType = wxT( "Char" );
|
||||
else if( aEvent.GetEventType() == wxEVT_CHAR_HOOK )
|
||||
eventType = "Hook";
|
||||
eventType = wxT( "Hook" );
|
||||
|
||||
// event key_name KeyCode modifiers Unicode raw_code raw_flags pos
|
||||
msg.Printf( "%7s %15s %5d %c%c%c%c"
|
||||
msg.Printf( wxT( "%7s %15s %5d %c%c%c%c" )
|
||||
#if wxUSE_UNICODE
|
||||
"%5d (U+%04x)"
|
||||
wxT( "%5d (U+%04x)" )
|
||||
#else
|
||||
" none "
|
||||
wxT( " none " )
|
||||
#endif
|
||||
#ifdef wxHAS_RAW_KEY_CODES
|
||||
" %7lu 0x%08lx"
|
||||
wxT( " %7lu 0x%08lx" )
|
||||
#else
|
||||
" not-set not-set"
|
||||
wxT( " not-set not-set" )
|
||||
#endif
|
||||
" (%5d,%5d)",
|
||||
wxT( " (%5d,%5d)" ),
|
||||
eventType,
|
||||
GetKeyName( aEvent ),
|
||||
aEvent.GetKeyCode(),
|
||||
|
|
|
@ -108,7 +108,7 @@ int UTF8::uni_forward( const unsigned char* aSequence, unsigned* aResult )
|
|||
default:
|
||||
case 0:
|
||||
if( aResult )
|
||||
wxFAIL_MSG( "uni_forward: invalid start byte" );
|
||||
wxFAIL_MSG( wxT( "uni_forward: invalid start byte" ) );
|
||||
|
||||
return 0;
|
||||
break;
|
||||
|
@ -117,7 +117,7 @@ int UTF8::uni_forward( const unsigned char* aSequence, unsigned* aResult )
|
|||
if( ( s[1] & 0xc0 ) != 0x80 )
|
||||
{
|
||||
if( aResult )
|
||||
wxFAIL_MSG( "uni_forward: invalid continuation byte" );
|
||||
wxFAIL_MSG( wxT( "uni_forward: invalid continuation byte" ) );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -136,7 +136,7 @@ int UTF8::uni_forward( const unsigned char* aSequence, unsigned* aResult )
|
|||
)
|
||||
{
|
||||
if( aResult )
|
||||
wxFAIL_MSG( "uni_forward: invalid continuation byte" );
|
||||
wxFAIL_MSG( wxT( "uni_forward: invalid continuation byte" ) );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
@ -156,7 +156,7 @@ int UTF8::uni_forward( const unsigned char* aSequence, unsigned* aResult )
|
|||
(s[0] == 0xF4 && s[1] > 0x8F) )
|
||||
{
|
||||
if( aResult )
|
||||
wxFAIL_MSG( "uni_forward: invalid continuation byte" );
|
||||
wxFAIL_MSG( wxT( "uni_forward: invalid continuation byte" ) );
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
|
@ -377,7 +377,7 @@ void KIUI::ValidatorTransferToWindowWithoutEvents( wxValidator& aValidator )
|
|||
{
|
||||
wxWindow* ctrl = aValidator.GetWindow();
|
||||
|
||||
wxCHECK_RET( ctrl != nullptr, "Transferring validator data without a control" );
|
||||
wxCHECK_RET( ctrl != nullptr, wxT( "Transferring validator data without a control" ) );
|
||||
|
||||
wxEventBlocker orient_update_blocker( ctrl, wxEVT_ANY );
|
||||
aValidator.TransferToWindow();
|
||||
|
|
|
@ -1159,7 +1159,7 @@ void VIEW::Redraw()
|
|||
|
||||
#ifdef KICAD_GAL_PROFILE
|
||||
totalRealTime.Stop();
|
||||
wxLogTrace( traceGalProfile, "VIEW::Redraw(): %.1f ms", totalRealTime.msecs() );
|
||||
wxLogTrace( traceGalProfile, wxT( "VIEW::Redraw(): %.1f ms" ), totalRealTime.msecs() );
|
||||
#endif /* KICAD_GAL_PROFILE */
|
||||
}
|
||||
|
||||
|
@ -1474,7 +1474,7 @@ void VIEW::UpdateItems()
|
|||
}
|
||||
}
|
||||
|
||||
KI_TRACE( traceGalProfile, "View update: total items %u, geom %u updates %u\n", cntTotal,
|
||||
KI_TRACE( traceGalProfile, wxT( "View update: total items %u, geom %u updates %u\n" ), cntTotal,
|
||||
cntGeomUpdate, cntAnyUpdate );
|
||||
}
|
||||
|
||||
|
|
|
@ -120,7 +120,7 @@ COLOR_SWATCH::COLOR_SWATCH( wxWindow* aParent, const COLOR4D& aColor, int aID,
|
|||
m_readOnly( false ),
|
||||
m_supportsOpacity( true )
|
||||
{
|
||||
wxASSERT_MSG( aSwatchSize != SWATCH_EXPAND, "SWATCH_EXPAND not supported in COLOR_SWATCH" );
|
||||
wxASSERT_MSG( aSwatchSize != SWATCH_EXPAND, wxT( "SWATCH_EXPAND not supported in COLOR_SWATCH" ) );
|
||||
|
||||
switch( aSwatchSize )
|
||||
{
|
||||
|
|
|
@ -81,7 +81,7 @@ void FOOTPRINT_CHOICE::OnDrawItem( wxDC& aDC, wxRect const& aRect, int aItem, in
|
|||
y = aRect.y;
|
||||
}
|
||||
|
||||
// If this item has a footprint and that footprint has a ":" delimiter, find the
|
||||
// If this item has a footprint and that footprint has a wxT( ":" ) delimiter, find the
|
||||
// library component, then find that in the display string and grey it out.
|
||||
|
||||
size_t start_grey = 0;
|
||||
|
@ -123,7 +123,7 @@ void FOOTPRINT_CHOICE::OnDrawItem( wxDC& aDC, wxRect const& aRect, int aItem, in
|
|||
|
||||
wxCoord FOOTPRINT_CHOICE::OnMeasureItem( size_t aItem ) const
|
||||
{
|
||||
if( SafeGetString( aItem ) == "" )
|
||||
if( SafeGetString( aItem ) == wxT( "" ) )
|
||||
return 11;
|
||||
else
|
||||
return wxOwnerDrawnComboBox::OnMeasureItem( aItem );
|
||||
|
@ -132,7 +132,7 @@ wxCoord FOOTPRINT_CHOICE::OnMeasureItem( size_t aItem ) const
|
|||
|
||||
wxCoord FOOTPRINT_CHOICE::OnMeasureItemWidth( size_t aItem ) const
|
||||
{
|
||||
if( SafeGetString( aItem ) == "" )
|
||||
if( SafeGetString( aItem ) == wxT( "" ) )
|
||||
return GetTextRect().GetWidth() - 2;
|
||||
else
|
||||
return wxOwnerDrawnComboBox::OnMeasureItemWidth( aItem );
|
||||
|
@ -150,7 +150,7 @@ void FOOTPRINT_CHOICE::TryVetoMouse( wxMouseEvent& aEvent )
|
|||
{
|
||||
int item = GetVListBoxComboPopup()->VirtualHitTest( aEvent.GetPosition().y );
|
||||
|
||||
if( SafeGetString( item ) != "" )
|
||||
if( SafeGetString( item ) != wxT( "" ) )
|
||||
aEvent.Skip();
|
||||
}
|
||||
|
||||
|
@ -163,7 +163,7 @@ void FOOTPRINT_CHOICE::TryVetoSelect( wxCommandEvent& aEvent, bool aInner )
|
|||
{
|
||||
wxString text = SafeGetString( sel );
|
||||
|
||||
if( text == "" )
|
||||
if( text == wxT( "" ) )
|
||||
{
|
||||
SetSelectionEither( aInner, m_last_selection );
|
||||
}
|
||||
|
|
|
@ -139,14 +139,14 @@ bool FOOTPRINT_SELECT_WIDGET::UpdateList()
|
|||
|
||||
m_fp_sel_ctrl->Append( m_default_footprint.IsEmpty() ?
|
||||
_( "No default footprint" ) :
|
||||
"[" + _( "Default" ) + "] " + m_default_footprint,
|
||||
wxT( "[" ) + _( "Default" ) + "] " + m_default_footprint,
|
||||
new wxStringClientData( m_default_footprint ) );
|
||||
|
||||
if( !m_zero_filter )
|
||||
{
|
||||
for( FOOTPRINT_INFO& fpinfo : m_fp_filter )
|
||||
{
|
||||
wxString display_name( fpinfo.GetLibNickname() + ":" + fpinfo.GetFootprintName() );
|
||||
wxString display_name( fpinfo.GetLibNickname() + wxT( ":" ) + fpinfo.GetFootprintName() );
|
||||
|
||||
m_fp_sel_ctrl->Append( display_name, new wxStringClientData( display_name ) );
|
||||
++n_items;
|
||||
|
|
|
@ -47,7 +47,7 @@ void GRID_BITMAP_TOGGLE_RENDERER::Draw( wxGrid& aGrid, wxGridCellAttr& aAttr, wx
|
|||
// erase background
|
||||
wxGridCellRenderer::Draw( aGrid, aAttr, aDc, aRect, aRow, aCol, aIsSelected );
|
||||
|
||||
bool checked = aGrid.GetCellValue( aRow, aCol ) == "1";
|
||||
bool checked = aGrid.GetCellValue( aRow, aCol ) == wxT( "1" );
|
||||
const wxBitmap& bitmap = checked ? m_bitmapChecked : m_bitmapUnchecked;
|
||||
|
||||
int x = std::max( 0, ( aRect.GetWidth() - m_bitmapChecked.GetWidth() ) / 2 );
|
||||
|
|
|
@ -138,9 +138,9 @@ void NUMBER_BADGE::computeSize()
|
|||
|
||||
// Determine the size using the string "-999+" where the - on the front is for spacing from
|
||||
// the start of the rectangle so the number isn't close to the curved edge.
|
||||
test = "-";
|
||||
test = wxT( "-" );
|
||||
test.Pad( len, '9' );
|
||||
test += "+";
|
||||
test += wxT( "+" );
|
||||
|
||||
dc.SetFont( wxFont( m_textSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, BADGE_FONTWEIGHT ) );
|
||||
wxSize size = dc.GetTextExtent( test );
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
|
||||
SPLIT_BUTTON::SPLIT_BUTTON( wxWindow* aParent, wxWindowID aId, const wxString& aLabel,
|
||||
const wxPoint& aPos, const wxSize& aSize ) :
|
||||
wxPanel( aParent, aId, aPos, aSize, wxBORDER_NONE | wxTAB_TRAVERSAL, "DropDownButton" ),
|
||||
wxPanel( aParent, aId, aPos, aSize, wxBORDER_NONE | wxTAB_TRAVERSAL, wxT( "DropDownButton" ) ),
|
||||
m_label( aLabel )
|
||||
{
|
||||
m_colorNormal = GetForegroundColour();
|
||||
|
|
|
@ -91,7 +91,7 @@ wxFont KIUI::GetMonospacedUIFont()
|
|||
#ifdef __WXMAC__
|
||||
// https://trac.wxwidgets.org/ticket/19210
|
||||
if( font.GetFaceName().IsEmpty() )
|
||||
font.SetFaceName( "Menlo" );
|
||||
font.SetFaceName( wxT( "Menlo" ) );
|
||||
#endif
|
||||
|
||||
return font;
|
||||
|
@ -119,7 +119,7 @@ wxFont getGUIFont( wxWindow* aWindow, int aRelativeSize )
|
|||
#ifdef __WXMAC__
|
||||
// https://trac.wxwidgets.org/ticket/19210
|
||||
if( font.GetFaceName().IsEmpty() )
|
||||
font.SetFaceName( "San Francisco" );
|
||||
font.SetFaceName( wxT( "San Francisco" ) );
|
||||
// OSX 10.1 .. 10.9: Lucida Grande
|
||||
// OSX 10.10: Helvetica Neue
|
||||
// OSX 10.11 .. : San Francisco
|
||||
|
|
|
@ -274,7 +274,7 @@ WIDGET_HOTKEY_CLIENT_DATA* WIDGET_HOTKEY_LIST::getExpectedHkClientData( wxTreeLi
|
|||
|
||||
// This probably means a hotkey-only action is being attempted on
|
||||
// a row that is not a hotkey (like a section heading)
|
||||
wxASSERT_MSG( hkdata != nullptr, "No hotkey data found for list item" );
|
||||
wxASSERT_MSG( hkdata != nullptr, wxT( "No hotkey data found for list item" ) );
|
||||
|
||||
return hkdata;
|
||||
}
|
||||
|
@ -298,7 +298,7 @@ void WIDGET_HOTKEY_LIST::updateFromClientData()
|
|||
|
||||
// mark unsaved changes
|
||||
if( changed_hk.m_EditKeycode != changed_hk.m_Actions[ 0 ]->GetHotKey() )
|
||||
label += " *";
|
||||
label += wxT( " *" );
|
||||
|
||||
SetItemText( i, 0, label );
|
||||
SetItemText( i, 1, key_text);
|
||||
|
@ -461,7 +461,7 @@ WIDGET_HOTKEY_LIST::WIDGET_HOTKEY_LIST( wxWindow* aParent, HOTKEY_STORE& aHotkey
|
|||
wxString command_header = _( "Command" );
|
||||
|
||||
if( !m_readOnly )
|
||||
command_header << " " << _( "(double-click to edit)" );
|
||||
command_header << wxT( " " ) << _( "(double-click to edit)" );
|
||||
|
||||
AppendColumn( command_header, 450, wxALIGN_LEFT, wxCOL_RESIZABLE | wxCOL_SORTABLE );
|
||||
AppendColumn( _( "Hotkey" ), 120, wxALIGN_LEFT, wxCOL_RESIZABLE | wxCOL_SORTABLE );
|
||||
|
@ -488,8 +488,8 @@ WIDGET_HOTKEY_LIST::WIDGET_HOTKEY_LIST( wxWindow* aParent, HOTKEY_STORE& aHotkey
|
|||
|
||||
std::vector<wxString> reserved_keys =
|
||||
{
|
||||
"Ctrl+Tab",
|
||||
"Ctrl+Shift+Tab"
|
||||
wxT( "Ctrl+Tab" ),
|
||||
wxT( "Ctrl+Shift+Tab" )
|
||||
};
|
||||
|
||||
for( auto& key : reserved_keys )
|
||||
|
@ -500,7 +500,7 @@ WIDGET_HOTKEY_LIST::WIDGET_HOTKEY_LIST( wxWindow* aParent, HOTKEY_STORE& aHotkey
|
|||
m_reservedHotkeys[code] = key;
|
||||
else
|
||||
{
|
||||
wxLogWarning( "Unknown reserved keycode %s\n", key );
|
||||
wxLogWarning( wxT( "Unknown reserved keycode %s\n" ), key );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -28,7 +28,7 @@ WX_ELLIPSIZED_STATIC_TEXT::WX_ELLIPSIZED_STATIC_TEXT( wxWindow* aParent, wxWindo
|
|||
const wxString& aLabel, const wxPoint& aPos,
|
||||
const wxSize& aSize, long aStyle )
|
||||
: wxStaticText( aParent, aID, aLabel, aPos, aSize, aStyle ),
|
||||
m_minimumString( "M...M" )
|
||||
m_minimumString( wxT( "M...M" ) )
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -271,7 +271,7 @@ int WX_GRID::GetVisibleWidth( int aCol, bool aHeader, bool aContents, bool aKeep
|
|||
// the normal font.
|
||||
// TODO: use a better way to evaluate the text size, for bold font
|
||||
for( int row = 0; aContents && row < GetNumberRows(); row++ )
|
||||
size = std::max( size, int( GetTextExtent( GetRowLabelValue( row ) + "M" ).x * 1.1 ) );
|
||||
size = std::max( size, int( GetTextExtent( GetRowLabelValue( row ) + wxT( "M" ) ).x * 1.1 ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -286,14 +286,14 @@ int WX_GRID::GetVisibleWidth( int aCol, bool aHeader, bool aContents, bool aKeep
|
|||
|
||||
// The 1.1 scale factor is due to the fact headers use a bold font, bigger than
|
||||
// the normal font.
|
||||
size = std::max( size, int( GetTextExtent( GetColLabelValue( aCol ) + "M" ).x * 1.1 ) );
|
||||
size = std::max( size, int( GetTextExtent( GetColLabelValue( aCol ) + wxT( "M" ) ).x * 1.1 ) );
|
||||
}
|
||||
|
||||
for( int row = 0; aContents && row < GetNumberRows(); row++ )
|
||||
{
|
||||
// If we have text, get the size. Otherwise, use a placeholder for the checkbox
|
||||
if( GetTable()->CanGetValueAs( row, aCol, wxGRID_VALUE_STRING ) )
|
||||
size = std::max( size, GetTextExtent( GetCellValue( row, aCol ) + "M" ).x );
|
||||
size = std::max( size, GetTextExtent( GetCellValue( row, aCol ) + wxT( "M" ) ).x );
|
||||
else
|
||||
size = std::max( size, GetTextExtent( "MM" ).x );
|
||||
}
|
||||
|
|
|
@ -85,30 +85,30 @@ wxString AddFileExtListToFilter( const std::vector<std::string>& aExts )
|
|||
{
|
||||
// The "all files" wildcard is different on different systems
|
||||
wxString filter;
|
||||
filter << " (" << wxFileSelectorDefaultWildcardStr << ")|"
|
||||
filter << wxT( " (" ) << wxFileSelectorDefaultWildcardStr << wxT( ")|" )
|
||||
<< wxFileSelectorDefaultWildcardStr;
|
||||
return filter;
|
||||
}
|
||||
|
||||
wxString files_filter = " (";
|
||||
wxString files_filter = wxT( " (" );
|
||||
|
||||
// Add extensions to the info message:
|
||||
for( const std::string& ext : aExts )
|
||||
{
|
||||
if( files_filter.length() > 2 )
|
||||
files_filter << "; ";
|
||||
files_filter << wxT( "; " );
|
||||
|
||||
files_filter << "*." << ext;
|
||||
files_filter << wxT( "*." ) << ext;
|
||||
}
|
||||
|
||||
files_filter << ")|*.";
|
||||
files_filter << wxT( ")|*." );
|
||||
|
||||
// Add extensions to the filter list, using a formatted string (GTK specific):
|
||||
bool first = true;
|
||||
for( const auto& ext : aExts )
|
||||
{
|
||||
if( !first )
|
||||
files_filter << ";*.";
|
||||
files_filter << wxT( ";*." );
|
||||
|
||||
first = false;
|
||||
|
||||
|
|
Loading…
Reference in New Issue