Some more wxS
This commit is contained in:
parent
3c325f2e61
commit
789db0cecb
|
@ -42,10 +42,10 @@ ARRAY_AXIS::ARRAY_AXIS() : m_type( NUMBERING_TYPE::NUMBERING_NUMERIC ), m_offset
|
||||||
|
|
||||||
const wxString& ARRAY_AXIS::GetAlphabet() const
|
const wxString& ARRAY_AXIS::GetAlphabet() const
|
||||||
{
|
{
|
||||||
static const wxString alphaNumeric = "0123456789";
|
static const wxString alphaNumeric = wxS( "0123456789" );
|
||||||
static const wxString alphaHex = "0123456789ABCDEF";
|
static const wxString alphaHex = wxS( "0123456789ABCDEF" );
|
||||||
static const wxString alphaFull = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
|
static const wxString alphaFull = wxS( "ABCDEFGHIJKLMNOPQRSTUVWXYZ" );
|
||||||
static const wxString alphaNoIOSQXZ = "ABCDEFGHJKLMNPRTUVWY";
|
static const wxString alphaNoIOSQXZ = wxS( "ABCDEFGHJKLMNPRTUVWY" );
|
||||||
|
|
||||||
switch( m_type )
|
switch( m_type )
|
||||||
{
|
{
|
||||||
|
|
|
@ -57,16 +57,16 @@ BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER( const wxString& aFile )
|
||||||
// python <script_path>/script.py
|
// python <script_path>/script.py
|
||||||
// and *not* python <script_path>\script.py
|
// and *not* python <script_path>\script.py
|
||||||
// Otherwise the script does not find some auxiliary pythons scripts needed by this script
|
// Otherwise the script does not find some auxiliary pythons scripts needed by this script
|
||||||
if( extension == "xsl" )
|
if( extension == wxS( "xsl" ) )
|
||||||
{
|
{
|
||||||
m_info = readHeader( "-->" );
|
m_info = readHeader( wxS( "-->" ) );
|
||||||
m_cmd = wxString::Format( "xsltproc -o \"%%O%s\" \"%s\" \"%%I\"",
|
m_cmd = wxString::Format( "xsltproc -o \"%%O%s\" \"%s\" \"%%I\"",
|
||||||
getOutputExtension( m_info ),
|
getOutputExtension( m_info ),
|
||||||
m_file.GetFullPath() );
|
m_file.GetFullPath() );
|
||||||
}
|
}
|
||||||
else if( extension == "py" )
|
else if( extension == wxS( "py" ) )
|
||||||
{
|
{
|
||||||
m_info = readHeader( "\"\"\"" );
|
m_info = readHeader( wxS( "\"\"\"" ) );
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
m_cmd = wxString::Format( "python \"%s/%s\" \"%%I\" \"%%O%s\"",
|
m_cmd = wxString::Format( "python \"%s/%s\" \"%%I\" \"%%O%s\"",
|
||||||
m_file.GetPath(),
|
m_file.GetPath(),
|
||||||
|
@ -107,9 +107,9 @@ BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER( const wxString& aFile )
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
#ifdef __WINDOWS__
|
#ifdef __WINDOWS__
|
||||||
else if( extension == "pyw" )
|
else if( extension == wxS( "pyw" ) )
|
||||||
{
|
{
|
||||||
m_info = readHeader( "\"\"\"" );
|
m_info = readHeader( wxS( "\"\"\"" ) );
|
||||||
m_cmd = wxString::Format( "pythonw \"%s/%s\" \"%%I\" \"%%O%s\"",
|
m_cmd = wxString::Format( "pythonw \"%s/%s\" \"%%I\" \"%%O%s\"",
|
||||||
m_file.GetPath(),
|
m_file.GetPath(),
|
||||||
m_file.GetFullName(),
|
m_file.GetFullName(),
|
||||||
|
@ -130,7 +130,7 @@ bool BOM_GENERATOR_HANDLER::IsValidGenerator( const wxString& aFile )
|
||||||
wxFileName fn( aFile );
|
wxFileName fn( aFile );
|
||||||
wxString ext = fn.GetExt().Lower();
|
wxString ext = fn.GetExt().Lower();
|
||||||
|
|
||||||
for( const auto& pluginExt : { "xsl", "py", "pyw" } )
|
for( const auto& pluginExt : { wxS( "xsl" ), wxS( "py" ), wxS( "pyw" ) } )
|
||||||
{
|
{
|
||||||
if( pluginExt == ext )
|
if( pluginExt == ext )
|
||||||
return true;
|
return true;
|
||||||
|
@ -151,7 +151,7 @@ wxString BOM_GENERATOR_HANDLER::readHeader( const wxString& aEndSection )
|
||||||
if( !fdata.ReadAll( &data ) )
|
if( !fdata.ReadAll( &data ) )
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
|
|
||||||
const wxString header( "@package" );
|
const wxString header( wxS( "@package" ) );
|
||||||
|
|
||||||
// Extract substring between @package and endsection
|
// Extract substring between @package and endsection
|
||||||
int strstart = data.Find( header );
|
int strstart = data.Find( header );
|
||||||
|
@ -198,7 +198,7 @@ wxFileName BOM_GENERATOR_HANDLER::FindFilePath() const
|
||||||
{
|
{
|
||||||
if( m_file.IsAbsolute() && m_file.Exists( wxFILE_EXISTS_REGULAR ) )
|
if( m_file.IsAbsolute() && m_file.Exists( wxFILE_EXISTS_REGULAR ) )
|
||||||
{
|
{
|
||||||
wxLogTrace( BOM_TRACE, "%s found directly", m_file.GetFullPath() );
|
wxLogTrace( BOM_TRACE, wxS( "%s found directly" ), m_file.GetFullPath() );
|
||||||
return m_file;
|
return m_file;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ wxFileName BOM_GENERATOR_HANDLER::FindFilePath() const
|
||||||
|
|
||||||
if( test.Exists( wxFILE_EXISTS_REGULAR ) )
|
if( test.Exists( wxFILE_EXISTS_REGULAR ) )
|
||||||
{
|
{
|
||||||
wxLogTrace( BOM_TRACE, "%s found in user plugins path %s", m_file.GetFullName(),
|
wxLogTrace( BOM_TRACE, wxS( "%s found in user plugins path %s" ), m_file.GetFullName(),
|
||||||
PATHS::GetUserPluginsPath() );
|
PATHS::GetUserPluginsPath() );
|
||||||
return test;
|
return test;
|
||||||
}
|
}
|
||||||
|
@ -215,12 +215,12 @@ wxFileName BOM_GENERATOR_HANDLER::FindFilePath() const
|
||||||
|
|
||||||
if( test.Exists( wxFILE_EXISTS_REGULAR ) )
|
if( test.Exists( wxFILE_EXISTS_REGULAR ) )
|
||||||
{
|
{
|
||||||
wxLogTrace( BOM_TRACE, "%s found in stock plugins path %s", m_file.GetFullName(),
|
wxLogTrace( BOM_TRACE, wxS( "%s found in stock plugins path %s" ), m_file.GetFullName(),
|
||||||
PATHS::GetStockPluginsPath() );
|
PATHS::GetStockPluginsPath() );
|
||||||
return test;
|
return test;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxLogTrace( BOM_TRACE, "Could not find %s (checked %s, %s)", m_file.GetFullName(),
|
wxLogTrace( BOM_TRACE, wxS( "Could not find %s (checked %s, %s)" ), m_file.GetFullName(),
|
||||||
PATHS::GetUserPluginsPath(), PATHS::GetStockPluginsPath() );
|
PATHS::GetUserPluginsPath(), PATHS::GetStockPluginsPath() );
|
||||||
|
|
||||||
return m_file;
|
return m_file;
|
||||||
|
|
|
@ -220,13 +220,13 @@ void SCH_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
||||||
* The 100 mil grid is added to help conform to the KiCad Library Convention which states:
|
* The 100 mil grid is added to help conform to the KiCad Library Convention which states:
|
||||||
* "Using a 100mil grid, pin ends and origin must lie on grid nodes IEC-60617"
|
* "Using a 100mil grid, pin ends and origin must lie on grid nodes IEC-60617"
|
||||||
*/
|
*/
|
||||||
aCfg->m_Window.grid.sizes = { "100 mil",
|
aCfg->m_Window.grid.sizes = { wxS( "100 mil" ),
|
||||||
"50 mil",
|
wxS( "50 mil" ),
|
||||||
"25 mil",
|
wxS( "25 mil" ),
|
||||||
"10 mil",
|
wxS( "10 mil" ),
|
||||||
"5 mil",
|
wxS( "5 mil" ),
|
||||||
"2 mil",
|
wxS( "2 mil" ),
|
||||||
"1 mil" };
|
wxS( "1 mil" ) };
|
||||||
|
|
||||||
if( aCfg->m_Window.grid.last_size_idx > (int) aCfg->m_Window.grid.sizes.size() )
|
if( aCfg->m_Window.grid.last_size_idx > (int) aCfg->m_Window.grid.sizes.size() )
|
||||||
aCfg->m_Window.grid.last_size_idx = 1;
|
aCfg->m_Window.grid.last_size_idx = 1;
|
||||||
|
@ -246,7 +246,7 @@ void SCH_BASE_FRAME::LoadSettings( APP_SETTINGS_BASE* aCfg )
|
||||||
|
|
||||||
void SCH_BASE_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
void SCH_BASE_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( aCfg, "Call to SCH_BASE_FRAME::SaveSettings with null settings" );
|
wxCHECK_RET( aCfg, wxS( "Call to SCH_BASE_FRAME::SaveSettings with null settings" ) );
|
||||||
|
|
||||||
EDA_DRAW_FRAME::SaveSettings( aCfg );
|
EDA_DRAW_FRAME::SaveSettings( aCfg );
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue