More wxString wide literals.
This commit is contained in:
parent
9582457fef
commit
7ccac79192
|
@ -324,7 +324,7 @@ void S3D_PLUGIN_MANAGER::checkPluginPath( const wxString& aPath,
|
|||
if( aPath.StartsWith( wxT( "${" ) ) || aPath.StartsWith( wxT( "$(" ) ) )
|
||||
path.Assign( ExpandEnvVarSubstitutions( aPath, nullptr ), wxEmptyString );
|
||||
else
|
||||
path.Assign( aPath, "" );
|
||||
path.Assign( aPath, wxT( "" ) );
|
||||
|
||||
path.Normalize();
|
||||
|
||||
|
|
|
@ -323,8 +323,10 @@ SGNODE* S3D::ReadCache( const char* aFileName, void* aPluginMgr,
|
|||
|
||||
if( !rval )
|
||||
{
|
||||
wxLogTrace( MASK_3D_SG, "%s:%s:%d * [INFO] problems encountered reading cache file '%s'",
|
||||
__FILE__, __FUNCTION__, __LINE__, aFileName );
|
||||
wxLogTrace( MASK_3D_SG, wxT( "%s:%s:%d * [INFO] problems encountered reading cache file "
|
||||
"'%s'" ),
|
||||
__FILE__, __FUNCTION__, __LINE__,
|
||||
aFileName );
|
||||
|
||||
return nullptr;
|
||||
}
|
||||
|
|
|
@ -783,7 +783,7 @@ void EDA_3D_CANVAS::OnMouseMove( wxMouseEvent& event )
|
|||
m_3d_render_opengl->SetCurrentRollOverItem( nullptr );
|
||||
Request_refresh();
|
||||
|
||||
reporter.Report( "" );
|
||||
reporter.Report( wxEmptyString );
|
||||
}
|
||||
|
||||
m_currentRollOverItem = nullptr;
|
||||
|
|
|
@ -239,13 +239,16 @@ static double rotationFromString( const wxString& aValue )
|
|||
|
||||
wxString PANEL_PREVIEW_3D_MODEL::formatScaleValue( double aValue )
|
||||
{
|
||||
return wxString::Format( "%.4f", aValue );
|
||||
return wxString::Format( wxT( "%.4f" ),
|
||||
aValue );
|
||||
}
|
||||
|
||||
|
||||
wxString PANEL_PREVIEW_3D_MODEL::formatRotationValue( double aValue )
|
||||
{
|
||||
return wxString::Format( "%.2f%s", aValue, GetAbbreviatedUnitsLabel( EDA_UNITS::DEGREES ) );
|
||||
return wxString::Format( wxT( "%.2f%s" ),
|
||||
aValue,
|
||||
GetAbbreviatedUnitsLabel( EDA_UNITS::DEGREES ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -257,7 +260,9 @@ wxString PANEL_PREVIEW_3D_MODEL::formatOffsetValue( double aValue )
|
|||
else if( m_userUnits == EDA_UNITS::MILS )
|
||||
aValue /= 25.4 / 1e3;
|
||||
|
||||
return wxString::Format( "%.6f%s", aValue, GetAbbreviatedUnitsLabel( m_userUnits ) );
|
||||
return wxString::Format( wxT( "%.6f%s" ),
|
||||
aValue,
|
||||
GetAbbreviatedUnitsLabel( m_userUnits ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -357,8 +357,8 @@ bool PANEL_SYM_LIB_TABLE::verifyTables()
|
|||
wxYES_NO | wxCENTER | wxICON_QUESTION | wxYES_DEFAULT );
|
||||
badCellDlg.SetExtendedMessage( _( "Empty cells will result in all rows that are "
|
||||
"invalid to be removed from the table." ) );
|
||||
badCellDlg.SetYesNoLabels( wxMessageDialog::ButtonLabel( "Remove Invalid Cells" ),
|
||||
wxMessageDialog::ButtonLabel( "Cancel Table Update" ) );
|
||||
badCellDlg.SetYesNoLabels( wxMessageDialog::ButtonLabel( _( "Remove Invalid Cells" ) ),
|
||||
wxMessageDialog::ButtonLabel( _( "Cancel Table Update" ) ) );
|
||||
|
||||
if( badCellDlg.ShowModal() == wxID_NO )
|
||||
return false;
|
||||
|
|
|
@ -177,7 +177,7 @@ void ACTION_PLUGINS::register_action( ACTION_PLUGIN* aAction )
|
|||
|
||||
if ( !aAction->iconBitmap.IsOk() )
|
||||
{
|
||||
wxLogVerbose( "Failed to load icon " + icon_file_name + " for action plugin " );
|
||||
wxLogVerbose( wxT( "Failed to load icon " ) + icon_file_name + wxT( " for action plugin " ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1011,14 +1011,14 @@ wxString BOARD::ConvertCrossReferencesToKIIDs( const wxString& aSource ) const
|
|||
wxString test( remainder );
|
||||
|
||||
if( footprint->ResolveTextVar( &test ) )
|
||||
token = footprint->m_Uuid.AsString() + ":" + remainder;
|
||||
token = footprint->m_Uuid.AsString() + wxT( ":" ) + remainder;
|
||||
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
newbuf.append( "${" + token + "}" );
|
||||
newbuf.append( wxT( "${" ) + token + wxT( "}" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1060,10 +1060,13 @@ wxString BOARD::ConvertKIIDsToCrossReferences( const wxString& aSource ) const
|
|||
BOARD_ITEM* refItem = GetItem( KIID( ref ) );
|
||||
|
||||
if( refItem && refItem->Type() == PCB_FOOTPRINT_T )
|
||||
token = static_cast<FOOTPRINT*>( refItem )->GetReference() + ":" + remainder;
|
||||
{
|
||||
token = static_cast<FOOTPRINT*>( refItem )->GetReference() + wxT( ":" )
|
||||
+ remainder;
|
||||
}
|
||||
}
|
||||
|
||||
newbuf.append( "${" + token + "}" );
|
||||
newbuf.append( wxT( "${" ) + token + wxT( "}" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1189,11 +1192,11 @@ void BOARD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>
|
|||
}
|
||||
}
|
||||
|
||||
aList.emplace_back( _( "Pads" ), wxString::Format( "%d", padCount ) );
|
||||
aList.emplace_back( _( "Vias" ), wxString::Format( "%d", viaCount ) );
|
||||
aList.emplace_back( _( "Track Segments" ), wxString::Format( "%d", trackSegmentCount ) );
|
||||
aList.emplace_back( _( "Nets" ), wxString::Format( "%d", (int) netCodes.size() ) );
|
||||
aList.emplace_back( _( "Unrouted" ), wxString::Format( "%d", unconnected ) );
|
||||
aList.emplace_back( _( "Pads" ), wxString::Format( wxT( "%d" ), padCount ) );
|
||||
aList.emplace_back( _( "Vias" ), wxString::Format( wxT( "%d" ), viaCount ) );
|
||||
aList.emplace_back( _( "Track Segments" ), wxString::Format( wxT( "%d" ), trackSegmentCount ) );
|
||||
aList.emplace_back( _( "Nets" ), wxString::Format( wxT( "%d" ), (int) netCodes.size() ) );
|
||||
aList.emplace_back( _( "Unrouted" ), wxString::Format( wxT( "%d" ), unconnected ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -139,9 +139,9 @@ wxString BOARD_CONNECTED_ITEM::GetNetnameMsg() const
|
|||
if( !netname.length() )
|
||||
return wxT( "[<no net>]" );
|
||||
else if( GetNetCode() < 0 )
|
||||
return wxT( "[" + UnescapeString( netname ) + "](" + _( "Not Found" ) + ")" );
|
||||
return wxT( "[" ) + UnescapeString( netname ) + wxT( "](" ) + _( "Not Found" ) + wxT( ")" );
|
||||
else
|
||||
return wxT( "[" + UnescapeString( netname ) + "]" );
|
||||
return wxT( "[" ) + UnescapeString( netname ) + wxT( "]" );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -171,8 +171,8 @@ void BOARD_ITEM::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBu
|
|||
int aError, ERROR_LOC aErrorLoc,
|
||||
bool ignoreLineWidth ) const
|
||||
{
|
||||
wxASSERT_MSG( false,
|
||||
"Called TransformShapeWithClearanceToPolygon() on unsupported BOARD_ITEM." );
|
||||
wxASSERT_MSG( false, wxT( "Called TransformShapeWithClearanceToPolygon() on unsupported "
|
||||
"BOARD_ITEM." ) );
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -49,17 +49,17 @@ BOARD_STACKUP_ITEM::BOARD_STACKUP_ITEM( BOARD_STACKUP_ITEM_TYPE aType )
|
|||
|
||||
case BS_ITEM_TYPE_DIELECTRIC:
|
||||
m_TypeName = KEY_CORE; // or prepreg
|
||||
SetMaterial( "FR4" ); // or other dielectric name
|
||||
SetMaterial( wxT( "FR4" ) ); // or other dielectric name
|
||||
SetLossTangent( 0.02 ); // for FR4
|
||||
SetEpsilonR( 4.5 ); // for FR4
|
||||
break;
|
||||
|
||||
case BS_ITEM_TYPE_SOLDERPASTE:
|
||||
m_TypeName = "solderpaste";
|
||||
m_TypeName = wxT( "solderpaste" );
|
||||
break;
|
||||
|
||||
case BS_ITEM_TYPE_SOLDERMASK:
|
||||
m_TypeName = "soldermask";
|
||||
m_TypeName = wxT( "soldermask" );
|
||||
m_Color = NotSpecifiedPrm();
|
||||
SetMaterial( NotSpecifiedPrm() ); // or other solder mask material name
|
||||
SetThickness( GetMaskDefaultThickness() );
|
||||
|
@ -67,7 +67,7 @@ BOARD_STACKUP_ITEM::BOARD_STACKUP_ITEM( BOARD_STACKUP_ITEM_TYPE aType )
|
|||
break;
|
||||
|
||||
case BS_ITEM_TYPE_SILKSCREEN:
|
||||
m_TypeName = "silkscreen";
|
||||
m_TypeName = wxT( "silkscreen" );
|
||||
m_Color = NotSpecifiedPrm();
|
||||
SetMaterial( NotSpecifiedPrm() ); // or other silkscreen material name
|
||||
SetEpsilonR( DEFAULT_EPSILON_R_SILKSCREEN );
|
||||
|
@ -299,7 +299,7 @@ BOARD_STACKUP::BOARD_STACKUP()
|
|||
m_EdgeConnectorConstraints = BS_EDGE_CONNECTOR_NONE;
|
||||
m_CastellatedPads = false; // True if some castellated pads exist
|
||||
m_EdgePlating = false; // True if edge board is plated
|
||||
m_FinishType = "None"; // undefined finish type
|
||||
m_FinishType = wxT( "None" ); // undefined finish type
|
||||
}
|
||||
|
||||
|
||||
|
@ -550,12 +550,12 @@ void BOARD_STACKUP::BuildDefaultStackupList( const BOARD_DESIGN_SETTINGS* aSetti
|
|||
if( (dielectric_idx & 1) == 0 )
|
||||
{
|
||||
item->SetTypeName( KEY_CORE );
|
||||
item->SetMaterial( "FR4" );
|
||||
item->SetMaterial( wxT( "FR4" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
item->SetTypeName( KEY_PREPREG );
|
||||
item->SetMaterial( "FR4" );
|
||||
item->SetMaterial( wxT( "FR4" ) );
|
||||
}
|
||||
|
||||
Add( item );
|
||||
|
@ -617,7 +617,7 @@ void BOARD_STACKUP::FormatBoardStackup( OUTPUTFORMATTER* aFormatter,
|
|||
wxString layer_name;
|
||||
|
||||
if( item->GetBrdLayerId() == UNDEFINED_LAYER )
|
||||
layer_name.Printf( "dielectric %d", item->GetDielectricLayerId() );
|
||||
layer_name.Printf( wxT( "dielectric %d" ), item->GetDielectricLayerId() );
|
||||
else
|
||||
layer_name = LSET::Name( item->GetBrdLayerId() );
|
||||
|
||||
|
|
|
@ -56,21 +56,27 @@ wxString BuildStackupReport( BOARD_STACKUP& aStackup, EDA_UNITS aUnits )
|
|||
wxString sublayer_text;
|
||||
|
||||
if( item->GetSublayersCount() )
|
||||
sublayer_text.Printf( "\n sublayer \"1/%d\"", item->GetSublayersCount() );
|
||||
{
|
||||
sublayer_text.Printf( wxT( "\n sublayer \"1/%d\"" ),
|
||||
item->GetSublayersCount() );
|
||||
}
|
||||
|
||||
txt.Printf( "layer \"%s\" type \"%s\"%s",
|
||||
txt.Printf( wxT( "layer \"%s\" type \"%s\"%s" ),
|
||||
item->FormatDielectricLayerName(),
|
||||
item->GetTypeName(), sublayer_text );
|
||||
}
|
||||
else
|
||||
txt.Printf( "layer \"%s\" type \"%s\"", item->GetLayerName(),
|
||||
{
|
||||
txt.Printf( wxT( "layer \"%s\" type \"%s\"" ),
|
||||
item->GetLayerName(),
|
||||
item->GetTypeName() );
|
||||
}
|
||||
|
||||
report << txt;
|
||||
|
||||
if( item->IsColorEditable() )
|
||||
{
|
||||
txt.Printf( " Color \"%s\"", item->GetColor() );
|
||||
txt.Printf( wxT( " Color \"%s\"" ), item->GetColor() );
|
||||
report << txt;
|
||||
}
|
||||
|
||||
|
@ -78,38 +84,38 @@ wxString BuildStackupReport( BOARD_STACKUP& aStackup, EDA_UNITS aUnits )
|
|||
{
|
||||
if( idx ) // not printed for the main (first) layer.
|
||||
{
|
||||
txt.Printf( "\n sublayer \"%d/%d\"", idx+1, item->GetSublayersCount() );
|
||||
txt.Printf( wxT( "\n sublayer \"%d/%d\"" ), idx+1, item->GetSublayersCount() );
|
||||
report << txt;
|
||||
}
|
||||
|
||||
if( item->IsThicknessEditable() )
|
||||
{
|
||||
txt.Printf( " Thickness %s",
|
||||
txt.Printf( wxT( " Thickness %s" ),
|
||||
StringFromValue( aUnits, item->GetThickness( idx ), true ) );
|
||||
report << txt;
|
||||
|
||||
if( item->GetType() == BS_ITEM_TYPE_DIELECTRIC && item->IsThicknessLocked( idx ) )
|
||||
{
|
||||
txt.Printf( " Locked" );
|
||||
txt.Printf( wxT( " Locked" ) );
|
||||
report << txt;
|
||||
}
|
||||
}
|
||||
|
||||
if( item->IsMaterialEditable() )
|
||||
{
|
||||
txt.Printf( " Material \"%s\"", item->GetMaterial( idx ) );
|
||||
txt.Printf( wxT( " Material \"%s\"" ), item->GetMaterial( idx ) );
|
||||
report << txt;
|
||||
}
|
||||
|
||||
if( item->HasEpsilonRValue() )
|
||||
{
|
||||
txt.Printf( " EpsilonR %s", item->FormatEpsilonR( idx ) );
|
||||
txt.Printf( wxT( " EpsilonR %s" ), item->FormatEpsilonR( idx ) );
|
||||
report << txt;
|
||||
}
|
||||
|
||||
if( item->HasLossTangentValue() )
|
||||
{
|
||||
txt.Printf( " LossTg %s", item->FormatLossTangent( idx ) );
|
||||
txt.Printf( wxT( " LossTg %s" ), item->FormatLossTangent( idx ) );
|
||||
report << txt;
|
||||
}
|
||||
}
|
||||
|
@ -118,26 +124,26 @@ wxString BuildStackupReport( BOARD_STACKUP& aStackup, EDA_UNITS aUnits )
|
|||
}
|
||||
|
||||
// Finish and other options:
|
||||
txt.Printf( "Finish \"%s\"", aStackup.m_FinishType );
|
||||
txt.Printf( wxT( "Finish \"%s\"" ), aStackup.m_FinishType );
|
||||
report << txt;
|
||||
|
||||
if( aStackup.m_HasDielectricConstrains )
|
||||
report << " Option \"Impedance Controlled\"";
|
||||
report << wxT( " Option \"Impedance Controlled\"" );
|
||||
|
||||
if( aStackup.m_EdgePlating )
|
||||
report << " Option \"Plated edges\"";
|
||||
report << wxT( " Option \"Plated edges\"" );
|
||||
|
||||
if( aStackup.m_CastellatedPads )
|
||||
report << " Option \"Castellated Pads\"";
|
||||
report << wxT( " Option \"Castellated Pads\"" );
|
||||
|
||||
if( aStackup.m_EdgeConnectorConstraints != BS_EDGE_CONNECTOR_NONE )
|
||||
{
|
||||
wxString conn_txt = "yes";
|
||||
wxString conn_txt = wxT( "yes" );
|
||||
|
||||
if( aStackup.m_EdgeConnectorConstraints == BS_EDGE_CONNECTOR_BEVELLED )
|
||||
conn_txt << ",bevelled";
|
||||
conn_txt << wxT( ",bevelled" );
|
||||
|
||||
txt.Printf( " EdgeConnector \"%s\"", conn_txt );
|
||||
txt.Printf( wxT( " EdgeConnector \"%s\"" ), conn_txt );
|
||||
report << txt;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,31 +38,31 @@
|
|||
static DIELECTRIC_SUBSTRATE substrateMaterial[] =
|
||||
{
|
||||
{ NotSpecifiedPrm(), 0.0, 0.0 }, // Not specified, not in .gbrjob
|
||||
{ "FR4", 4.5, 0.02 }, // used in .gbrjob file
|
||||
{ "FR408-HR", 3.69, 0.0091 }, // used in .gbrjob file
|
||||
{ "Polyimide", 3.2, 0.004 }, // used in .gbrjob file
|
||||
{ "Kapton", 3.2, 0.004 }, // used in .gbrjob file
|
||||
{ "Polyolefin", 1.0, 0.0 }, // used in .gbrjob file
|
||||
{ "Al", 8.7, 0.001 }, // used in .gbrjob file
|
||||
{ "PTFE", 2.1, 0.0002 }, // used in .gbrjob file
|
||||
{ "Teflon", 2.1, 0.0002 }, // used in .gbrjob file
|
||||
{ "Ceramic", 1.0, 0.0 } // used in .gbrjob file
|
||||
{ wxT( "FR4" ), 4.5, 0.02 }, // used in .gbrjob file
|
||||
{ wxT( "FR408-HR" ), 3.69, 0.0091 }, // used in .gbrjob file
|
||||
{ wxT( "Polyimide" ), 3.2, 0.004 }, // used in .gbrjob file
|
||||
{ wxT( "Kapton" ), 3.2, 0.004 }, // used in .gbrjob file
|
||||
{ wxT( "Polyolefin" ), 1.0, 0.0 }, // used in .gbrjob file
|
||||
{ wxT( "Al" ), 8.7, 0.001 }, // used in .gbrjob file
|
||||
{ wxT( "PTFE" ), 2.1, 0.0002 }, // used in .gbrjob file
|
||||
{ wxT( "Teflon" ), 2.1, 0.0002 }, // used in .gbrjob file
|
||||
{ wxT( "Ceramic" ), 1.0, 0.0 } // used in .gbrjob file
|
||||
// Other names are free
|
||||
};
|
||||
|
||||
static DIELECTRIC_SUBSTRATE solderMaskMaterial[] =
|
||||
{
|
||||
{ NotSpecifiedPrm(), DEFAULT_EPSILON_R_SOLDERMASK, 0.0 }, // Not specified, not in .gbrjob
|
||||
{ "Epoxy", DEFAULT_EPSILON_R_SOLDERMASK, 0.0 }, // Epoxy Liquid material (usual)
|
||||
{ "Liquid Ink", DEFAULT_EPSILON_R_SOLDERMASK, 0.0 }, // Liquid Ink Photoimageable
|
||||
{ "Dry Film", DEFAULT_EPSILON_R_SOLDERMASK, 0.0 } // Dry Film Photoimageable
|
||||
{ wxT( "Epoxy" ), DEFAULT_EPSILON_R_SOLDERMASK, 0.0 }, // Epoxy Liquid material (usual)
|
||||
{ wxT( "Liquid Ink" ), DEFAULT_EPSILON_R_SOLDERMASK, 0.0 }, // Liquid Ink Photoimageable
|
||||
{ wxT( "Dry Film" ), DEFAULT_EPSILON_R_SOLDERMASK, 0.0 } // Dry Film Photoimageable
|
||||
};
|
||||
|
||||
static DIELECTRIC_SUBSTRATE silkscreenMaterial[] =
|
||||
{
|
||||
{ NotSpecifiedPrm(), DEFAULT_EPSILON_R_SILKSCREEN, 0.0 }, // Not specified, not in .gbrjob
|
||||
{ "Liquid Photo", DEFAULT_EPSILON_R_SILKSCREEN, 0.0 }, // Liquid Ink Photoimageable
|
||||
{ "Direct Printing", DEFAULT_EPSILON_R_SILKSCREEN, 0.0 } // Direct Legend Printing
|
||||
{ wxT( "Liquid Photo" ), DEFAULT_EPSILON_R_SILKSCREEN, 0.0 }, // Liquid Ink Photoimageable
|
||||
{ wxT( "Direct Printing" ), DEFAULT_EPSILON_R_SILKSCREEN, 0.0 } // Direct Legend Printing
|
||||
};
|
||||
|
||||
|
||||
|
|
|
@ -93,17 +93,17 @@ PANEL_SETUP_BOARD_STACKUP::PANEL_SETUP_BOARD_STACKUP( PAGED_DIALOG* aParent, PCB
|
|||
|
||||
// Calculates a good size for color swatches (icons) in this dialog
|
||||
wxClientDC dc( this );
|
||||
m_colorSwatchesSize = dc.GetTextExtent( "XX" );
|
||||
m_colorIconsSize = dc.GetTextExtent( "XXXX" );
|
||||
m_colorSwatchesSize = dc.GetTextExtent( wxT( "XX" ) );
|
||||
m_colorIconsSize = dc.GetTextExtent( wxT( "XXXX" ) );
|
||||
|
||||
// Calculates a good size for wxTextCtrl to enter Epsilon R and Loss tan
|
||||
// ("0.0000000" + margins)
|
||||
m_numericFieldsSize = dc.GetTextExtent( "X.XXXXXXX" );
|
||||
m_numericFieldsSize = dc.GetTextExtent( wxT( "X.XXXXXXX" ) );
|
||||
m_numericFieldsSize.y = -1; // Use default for the vertical size
|
||||
|
||||
// Calculates a minimal size for wxTextCtrl to enter a dim with units
|
||||
// ("000.0000000 mils" + margins)
|
||||
m_numericTextCtrlSize = dc.GetTextExtent( "XXX.XXXXXXX mils" );
|
||||
m_numericTextCtrlSize = dc.GetTextExtent( wxT( "XXX.XXXXXXX mils" ) );
|
||||
m_numericTextCtrlSize.y = -1; // Use default for the vertical size
|
||||
|
||||
// The grid column containing the lock checkbox is kept to a minimal
|
||||
|
@ -532,7 +532,7 @@ void PANEL_SETUP_BOARD_STACKUP::synchronizeWithBoard( bool aFullSync )
|
|||
auto bm_combo = dynamic_cast<wxBitmapComboBox*>( ui_row_item.m_ColorCtrl );
|
||||
int selected = 0; // The "not specified" item
|
||||
|
||||
if( item->GetColor().StartsWith( "#" ) ) // User defined color
|
||||
if( item->GetColor().StartsWith( wxT( "#" ) ) ) // User defined color
|
||||
{
|
||||
COLOR4D custom_color( item->GetColor() );
|
||||
|
||||
|
@ -703,7 +703,8 @@ BOARD_STACKUP_ROW_UI_ITEM PANEL_SETUP_BOARD_STACKUP::createRowData( int aRow,
|
|||
|
||||
if( item->GetSublayersCount() > 1 )
|
||||
{
|
||||
lname << " (" << aSublayerIdx+1 << "/" << item->GetSublayersCount() << ")";
|
||||
lname << wxT( " (" ) << aSublayerIdx+1 << wxT( "/" )
|
||||
<< item->GetSublayersCount() << wxT( ")" );
|
||||
}
|
||||
|
||||
wxStaticText* st_text = new wxStaticText( m_scGridWin, wxID_ANY, lname );
|
||||
|
@ -789,7 +790,7 @@ BOARD_STACKUP_ROW_UI_ITEM PANEL_SETUP_BOARD_STACKUP::createRowData( int aRow,
|
|||
|
||||
if( item->IsColorEditable() )
|
||||
{
|
||||
if( item->GetColor().StartsWith( "#" ) ) // User defined color
|
||||
if( item->GetColor().StartsWith( wxT( "#" ) ) ) // User defined color
|
||||
{
|
||||
ui_row_item.m_UserColor = COLOR4D( item->GetColor() ).ToColour();
|
||||
}
|
||||
|
@ -801,7 +802,7 @@ BOARD_STACKUP_ROW_UI_ITEM PANEL_SETUP_BOARD_STACKUP::createRowData( int aRow,
|
|||
|
||||
m_fgGridSizer->Add( bm_combo, 1, wxLEFT|wxRIGHT|wxALIGN_CENTER_VERTICAL|wxEXPAND, 2 );
|
||||
|
||||
if( item->GetColor().StartsWith( "#" ) )
|
||||
if( item->GetColor().StartsWith( wxT( "#" ) ) )
|
||||
{
|
||||
selected = GetColorUserDefinedListIdx( item->GetType() );
|
||||
bm_combo->SetString( selected, item->GetColor() );
|
||||
|
@ -1046,7 +1047,7 @@ bool PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup()
|
|||
success = false;
|
||||
|
||||
if( !error_msg.IsEmpty() )
|
||||
error_msg << "\n";
|
||||
error_msg << wxT( "\n" );
|
||||
|
||||
error_msg << _( "Incorrect value for Loss tg (Loss tg must be positive or null "
|
||||
"if not used)" );
|
||||
|
@ -1093,7 +1094,7 @@ bool PANEL_SETUP_BOARD_STACKUP::transferDataFromUIToStackup()
|
|||
success = false;
|
||||
|
||||
if( !error_msg.IsEmpty() )
|
||||
error_msg << "\n";
|
||||
error_msg << wxT( "\n" );
|
||||
|
||||
error_msg << _( "A layer thickness is < 0. Fix it" );
|
||||
}
|
||||
|
@ -1444,11 +1445,11 @@ wxColor PANEL_SETUP_BOARD_STACKUP::getColorIconItem( int aRow )
|
|||
|
||||
default:
|
||||
case BS_ITEM_TYPE_UNDEFINED:
|
||||
wxFAIL_MSG( "PANEL_SETUP_BOARD_STACKUP::getColorIconItem: unrecognized item type" );
|
||||
wxFAIL_MSG( wxT( "PANEL_SETUP_BOARD_STACKUP::getColorIconItem: unrecognized item type" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
wxASSERT_MSG( color.IsOk(), "Invalid color in PCB stackup" );
|
||||
wxASSERT_MSG( color.IsOk(), wxT( "Invalid color in PCB stackup" ) );
|
||||
|
||||
return color;
|
||||
}
|
||||
|
@ -1496,7 +1497,7 @@ wxBitmapComboBox* PANEL_SETUP_BOARD_STACKUP::createColorBox( BOARD_STACKUP_ITEM*
|
|||
|
||||
// Defined colors have a name, the user color uses HTML notation ( i.e. #FF000080)
|
||||
if( IsCustomColorIdx( itemType, ii )
|
||||
&& aStackupItem && aStackupItem->GetColor().StartsWith( "#" ) )
|
||||
&& aStackupItem && aStackupItem->GetColor().StartsWith( wxT( "#" ) ) )
|
||||
{
|
||||
label = aStackupItem->GetColor();
|
||||
curr_color = COLOR4D( label );
|
||||
|
|
|
@ -41,10 +41,10 @@
|
|||
#include <board_stackup_manager/board_stackup.h>
|
||||
|
||||
// Keyword used in file to identify the dielectric layer type
|
||||
#define KEY_CORE "core"
|
||||
#define KEY_PREPREG "prepreg"
|
||||
#define KEY_CORE wxT( "core" )
|
||||
#define KEY_PREPREG wxT( "prepreg" )
|
||||
|
||||
#define KEY_COPPER "copper"
|
||||
#define KEY_COPPER wxT( "copper" )
|
||||
|
||||
// key string used for not specified parameters
|
||||
// Can be translated in dialogs, and is also a keyword outside dialogs
|
||||
|
|
|
@ -60,7 +60,7 @@ wxString CLEANUP_ITEM::GetErrorText( int aCode, bool aTranslate ) const
|
|||
case CLEANUP_LINES_TO_RECT: msg = _HKI( "Convert lines to rectangle" ); break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "Missing cleanup item description" );
|
||||
wxFAIL_MSG( wxT( "Missing cleanup item description" ) );
|
||||
msg = _HKI( "Unknown cleanup action" );
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -498,25 +498,30 @@ void CN_CONNECTIVITY_ALGO::propagateConnections( BOARD_COMMIT* aCommit, PROPAGAT
|
|||
{
|
||||
bool skipConflicts = ( aMode == PROPAGATE_MODE::SKIP_CONFLICTS );
|
||||
|
||||
wxLogTrace( "CN", "propagateConnections: propagate skip conflicts? %d", skipConflicts );
|
||||
wxLogTrace( wxT( "CN" ), wxT( "propagateConnections: propagate skip conflicts? %d" ),
|
||||
skipConflicts );
|
||||
|
||||
for( const auto& cluster : m_connClusters )
|
||||
{
|
||||
if( skipConflicts && cluster->IsConflicting() )
|
||||
{
|
||||
wxLogTrace( "CN", "Conflicting nets in cluster %p; skipping update", cluster.get() );
|
||||
wxLogTrace( wxT( "CN" ), wxT( "Conflicting nets in cluster %p; skipping update" ),
|
||||
cluster.get() );
|
||||
}
|
||||
else if( cluster->IsOrphaned() )
|
||||
{
|
||||
wxLogTrace( "CN", "Skipping orphaned cluster %p [net: %s]", cluster.get(),
|
||||
wxLogTrace( wxT( "CN" ), wxT( "Skipping orphaned cluster %p [net: %s]" ),
|
||||
cluster.get(),
|
||||
(const char*) cluster->OriginNetName().c_str() );
|
||||
}
|
||||
else if( cluster->HasValidNet() )
|
||||
{
|
||||
if( cluster->IsConflicting() )
|
||||
{
|
||||
wxLogTrace( "CN", "Conflicting nets in cluster %p; chose %d (%s)", cluster.get(),
|
||||
cluster->OriginNet(), cluster->OriginNetName() );
|
||||
wxLogTrace( wxT( "CN" ), wxT( "Conflicting nets in cluster %p; chose %d (%s)" ),
|
||||
cluster.get(),
|
||||
cluster->OriginNet(),
|
||||
cluster->OriginNetName() );
|
||||
}
|
||||
|
||||
// normal cluster: just propagate from the pads
|
||||
|
@ -542,15 +547,19 @@ void CN_CONNECTIVITY_ALGO::propagateConnections( BOARD_COMMIT* aCommit, PROPAGAT
|
|||
|
||||
if( n_changed )
|
||||
{
|
||||
wxLogTrace( "CN", "Cluster %p : net : %d %s", cluster.get(),
|
||||
cluster->OriginNet(), (const char*) cluster->OriginNetName().c_str() );
|
||||
wxLogTrace( wxT( "CN" ), wxT( "Cluster %p : net : %d %s" ),
|
||||
cluster.get(),
|
||||
cluster->OriginNet(),
|
||||
(const char*) cluster->OriginNetName().c_str() );
|
||||
}
|
||||
else
|
||||
wxLogTrace( "CN", "Cluster %p : nothing to propagate", cluster.get() );
|
||||
wxLogTrace( wxT( "CN" ), wxT( "Cluster %p : nothing to propagate" ),
|
||||
cluster.get() );
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogTrace( "CN", "Cluster %p : connected to unused net", cluster.get() );
|
||||
wxLogTrace( wxT( "CN" ), wxT( "Cluster %p : connected to unused net" ),
|
||||
cluster.get() );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -590,7 +599,7 @@ void CN_CONNECTIVITY_ALGO::FindIsolatedCopperIslands( ZONE* aZone, PCB_LAYER_ID
|
|||
}
|
||||
}
|
||||
|
||||
wxLogTrace( "CN", "Found %u isolated islands\n", (unsigned)aIslands.size() );
|
||||
wxLogTrace( wxT( "CN" ), wxT( "Found %u isolated islands\n" ), (unsigned) aIslands.size() );
|
||||
}
|
||||
|
||||
void CN_CONNECTIVITY_ALGO::FindIsolatedCopperIslands( std::vector<CN_ZONE_ISOLATED_ISLAND_LIST>& aZones )
|
||||
|
|
|
@ -644,7 +644,7 @@ bool CONNECTIVITY_DATA::TestTrackEndpointDangling( PCB_TRACK* aTrack, VECTOR2I*
|
|||
// Not in the connectivity system. This is a bug!
|
||||
if( items.empty() )
|
||||
{
|
||||
wxFAIL_MSG( "track not in connectivity system" );
|
||||
wxFAIL_MSG( wxT( "track not in connectivity system" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -737,7 +737,7 @@ bool CONNECTIVITY_DATA::TestTrackEndpointDangling( PCB_TRACK* aTrack, VECTOR2I*
|
|||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG( "CONNECTIVITY_DATA::TestTrackEndpointDangling: unknown track type" );
|
||||
wxFAIL_MSG( wxT( "CONNECTIVITY_DATA::TestTrackEndpointDangling: unknown track type" ) );
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
@ -160,7 +160,7 @@ void CN_ITEM::Dump()
|
|||
for( CN_ITEM* i : m_connected )
|
||||
{
|
||||
PCB_TRACK* t = static_cast<PCB_TRACK*>( i->Parent() );
|
||||
wxLogDebug( " - %p %d\n", t, t->Type() );
|
||||
wxLogDebug( wxT( " - %p %d\n" ), t, t->Type() );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -458,12 +458,12 @@ void CN_CLUSTER::Dump()
|
|||
{
|
||||
for( auto item : m_items )
|
||||
{
|
||||
wxLogTrace( "CN", " - item : %p bitem : %p type : %d inet %s\n",
|
||||
wxLogTrace( wxT( "CN" ), wxT( " - item : %p bitem : %p type : %d inet %s\n" ),
|
||||
item,
|
||||
item->Parent(),
|
||||
item->Parent()->Type(),
|
||||
(const char*) item->Parent()->GetNetname().c_str() );
|
||||
wxLogTrace( "CN", "- item : %p bitem : %p type : %d inet %s\n",
|
||||
wxLogTrace( wxT( "CN" ), wxT( "- item : %p bitem : %p type : %d inet %s\n" ),
|
||||
item,
|
||||
item->Parent(),
|
||||
item->Parent()->Type(),
|
||||
|
|
|
@ -39,7 +39,7 @@ void FROM_TO_CACHE::buildEndpointList( )
|
|||
for( PAD* pad : footprint->Pads() )
|
||||
{
|
||||
FT_ENDPOINT ent;
|
||||
ent.name = footprint->GetReference() + "-" + pad->GetNumber();
|
||||
ent.name = footprint->GetReference() + wxT( "-" ) + pad->GetNumber();
|
||||
ent.parent = pad;
|
||||
m_ftEndpoints.push_back( ent );
|
||||
ent.name = footprint->GetReference();
|
||||
|
@ -140,7 +140,8 @@ int FROM_TO_CACHE::cacheFromToPaths( const wxString& aFrom, const wxString& aTo
|
|||
int count = 0;
|
||||
auto netName = path.from->GetNetname();
|
||||
|
||||
wxString fromName = path.from->GetParent()->GetReference() + "-" + path.from->GetNumber();
|
||||
wxString fromName = path.from->GetParent()->GetReference() + wxT( "-" )
|
||||
+ path.from->GetNumber();
|
||||
|
||||
const KICAD_T onlyRouting[] = { PCB_PAD_T, PCB_ARC_T, PCB_VIA_T, PCB_TRACE_T, EOT };
|
||||
|
||||
|
@ -157,7 +158,7 @@ int FROM_TO_CACHE::cacheFromToPaths( const wxString& aFrom, const wxString& aTo
|
|||
|
||||
const PAD *pad = static_cast<const PAD*>( pitem );
|
||||
|
||||
wxString toName = pad->GetParent()->GetReference() + "-" + pad->GetNumber();
|
||||
wxString toName = pad->GetParent()->GetReference() + wxT( "-" ) + pad->GetNumber();
|
||||
|
||||
|
||||
for ( const auto& endpoint : m_ftEndpoints )
|
||||
|
|
|
@ -953,13 +953,15 @@ bool isCopperOutside( const FOOTPRINT* aMod, SHAPE_POLY_SET& aShape )
|
|||
if( poly.OutlineCount() == 0 )
|
||||
{
|
||||
VECTOR2I padPos = pad->GetPosition();
|
||||
wxLogTrace( traceBoardOutline, "Tested pad (%d, %d): outside", padPos.x, padPos.y );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Tested pad (%d, %d): outside" ),
|
||||
padPos.x, padPos.y );
|
||||
padOutside = true;
|
||||
break;
|
||||
}
|
||||
|
||||
VECTOR2I padPos = pad->GetPosition();
|
||||
wxLogTrace( traceBoardOutline, "Tested pad (%d, %d): not outside", padPos.x, padPos.y );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Tested pad (%d, %d): not outside" ),
|
||||
padPos.x, padPos.y );
|
||||
}
|
||||
|
||||
return padOutside;
|
||||
|
@ -1021,7 +1023,7 @@ int findEndSegments( SHAPE_LINE_CHAIN& aChain, SEG& aStartSeg, SEG& aEndSeg )
|
|||
if( foundSegs == 0 )
|
||||
{
|
||||
// The first segment we encounter is the "start" segment
|
||||
wxLogTrace( traceBoardOutline, "Found start segment: (%d, %d)-(%d, %d)",
|
||||
wxLogTrace( traceBoardOutline, wxT( "Found start segment: (%d, %d)-(%d, %d)" ),
|
||||
seg.A.x, seg.A.y, seg.B.x, seg.B.y );
|
||||
aStartSeg = seg;
|
||||
foundSegs++;
|
||||
|
@ -1029,7 +1031,7 @@ int findEndSegments( SHAPE_LINE_CHAIN& aChain, SEG& aStartSeg, SEG& aEndSeg )
|
|||
else
|
||||
{
|
||||
// Once we find both start and end, we can stop
|
||||
wxLogTrace( traceBoardOutline, "Found end segment: (%d, %d)-(%d, %d)",
|
||||
wxLogTrace( traceBoardOutline, wxT( "Found end segment: (%d, %d)-(%d, %d)" ),
|
||||
seg.A.x, seg.A.y, seg.B.x, seg.B.y );
|
||||
aEndSeg = seg;
|
||||
foundSegs++;
|
||||
|
@ -1061,7 +1063,7 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
// No footprint loaded
|
||||
if( !footprint )
|
||||
{
|
||||
wxLogTrace( traceBoardOutline, "No footprint found on board" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "No footprint found on board" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -1091,12 +1093,12 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
// A closed outline was found on Edge_Cuts
|
||||
if( success )
|
||||
{
|
||||
wxLogTrace( traceBoardOutline, "Closed outline found" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Closed outline found" ) );
|
||||
|
||||
// If copper is outside a closed polygon, treat it as a hole
|
||||
if( isCopperOutside( footprint, outlines ) )
|
||||
{
|
||||
wxLogTrace( traceBoardOutline, "Treating outline as a hole" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Treating outline as a hole" ) );
|
||||
|
||||
buildBoardBoundingBoxPoly( aBoard, aOutlines );
|
||||
|
||||
|
@ -1120,7 +1122,7 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
// If all copper is inside, then the computed outline is the board outline
|
||||
else
|
||||
{
|
||||
wxLogTrace( traceBoardOutline, "Treating outline as board edge" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Treating outline as board edge" ) );
|
||||
aOutlines = outlines;
|
||||
}
|
||||
|
||||
|
@ -1129,7 +1131,7 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
// No board outlines were found, so use the bounding box
|
||||
else if( outlines.OutlineCount() == 0 )
|
||||
{
|
||||
wxLogTrace( traceBoardOutline, "Using footprint bounding box" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Using footprint bounding box" ) );
|
||||
buildBoardBoundingBoxPoly( aBoard, aOutlines );
|
||||
|
||||
return true;
|
||||
|
@ -1137,7 +1139,7 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
// There is an outline present, but it is not closed
|
||||
else
|
||||
{
|
||||
wxLogTrace( traceBoardOutline, "Trying to build outline" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Trying to build outline" ) );
|
||||
|
||||
std::vector<SHAPE_LINE_CHAIN> closedChains;
|
||||
std::vector<SHAPE_LINE_CHAIN> openChains;
|
||||
|
@ -1152,12 +1154,12 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
|
||||
if( hole.IsClosed() )
|
||||
{
|
||||
wxLogTrace( traceBoardOutline, "Found closed hole" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Found closed hole" ) );
|
||||
closedChains.push_back( hole );
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogTrace( traceBoardOutline, "Found open hole" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Found open hole" ) );
|
||||
openChains.push_back( hole );
|
||||
}
|
||||
}
|
||||
|
@ -1184,7 +1186,7 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
if( chain.SegmentCount() == 0 )
|
||||
{
|
||||
// Something is wrong, bail out with the overall footprint bounding box
|
||||
wxLogTrace( traceBoardOutline, "No line segments in provided outline" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "No line segments in provided outline" ) );
|
||||
aOutlines = bbox;
|
||||
return true;
|
||||
}
|
||||
|
@ -1192,7 +1194,7 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
{
|
||||
// This case means there is only 1 line segment making up the edge cuts of the
|
||||
// footprint, so we just need to use it to cut the bounding box in half.
|
||||
wxLogTrace( traceBoardOutline, "Only 1 line segment in provided outline" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Only 1 line segment in provided outline" ) );
|
||||
|
||||
startSeg = chain.Segment( 0 );
|
||||
|
||||
|
@ -1205,7 +1207,8 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
if( inter0 && inter2 && !inter1 && !inter3 )
|
||||
{
|
||||
// Intersects the vertical rectangle sides only
|
||||
wxLogTrace( traceBoardOutline, "Segment intersects only vertical bbox sides" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Segment intersects only vertical bbox "
|
||||
"sides" ) );
|
||||
|
||||
// The upper half
|
||||
upper.Append( *inter0 );
|
||||
|
@ -1224,7 +1227,8 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
else if( inter1 && inter3 && !inter0 && !inter2 )
|
||||
{
|
||||
// Intersects the horizontal rectangle sides only
|
||||
wxLogTrace( traceBoardOutline, "Segment intersects only horizontal bbox sides" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Segment intersects only horizontal bbox "
|
||||
"sides" ) );
|
||||
|
||||
// The left half
|
||||
upper.Append( *inter1 );
|
||||
|
@ -1243,7 +1247,8 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
else
|
||||
{
|
||||
// Angled line segment that cuts across a corner
|
||||
wxLogTrace( traceBoardOutline, "Segment intersects two perpendicular bbox sides" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Segment intersects two perpendicular bbox "
|
||||
"sides" ) );
|
||||
|
||||
// Figure out which actual lines are intersected, since IntersectLines assumes
|
||||
// an infinite line
|
||||
|
@ -1255,7 +1260,7 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
if( hit0 && hit1 )
|
||||
{
|
||||
// Cut across the upper left corner
|
||||
wxLogTrace( traceBoardOutline, "Segment cuts upper left corner" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Segment cuts upper left corner" ) );
|
||||
|
||||
// The upper half
|
||||
upper.Append( *inter0 );
|
||||
|
@ -1274,7 +1279,7 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
else if( hit1 && hit2 )
|
||||
{
|
||||
// Cut across the upper right corner
|
||||
wxLogTrace( traceBoardOutline, "Segment cuts upper right corner" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Segment cuts upper right corner" ) );
|
||||
|
||||
// The upper half
|
||||
upper.Append( *inter1 );
|
||||
|
@ -1293,7 +1298,7 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
else if( hit2 && hit3 )
|
||||
{
|
||||
// Cut across the lower right corner
|
||||
wxLogTrace( traceBoardOutline, "Segment cuts lower right corner" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Segment cuts lower right corner" ) );
|
||||
|
||||
// The upper half
|
||||
upper.Append( *inter2 );
|
||||
|
@ -1312,7 +1317,7 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
else
|
||||
{
|
||||
// Cut across the lower left corner
|
||||
wxLogTrace( traceBoardOutline, "Segment cuts upper left corner" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Segment cuts upper left corner" ) );
|
||||
|
||||
// The upper half
|
||||
upper.Append( *inter0 );
|
||||
|
@ -1333,7 +1338,7 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
else
|
||||
{
|
||||
// More than 1 segment
|
||||
wxLogTrace( traceBoardOutline, "Multiple segments in outline" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Multiple segments in outline" ) );
|
||||
|
||||
// Just a temporary thing
|
||||
aOutlines = bbox;
|
||||
|
@ -1352,19 +1357,19 @@ bool BuildFootprintPolygonOutlines( BOARD* aBoard, SHAPE_POLY_SET& aOutlines, in
|
|||
|
||||
if( isCopperOutside( footprint, poly1 ) )
|
||||
{
|
||||
wxLogTrace( traceBoardOutline, "Using lower shape" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Using lower shape" ) );
|
||||
aOutlines = poly2;
|
||||
}
|
||||
else
|
||||
{
|
||||
wxLogTrace( traceBoardOutline, "Using upper shape" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Using upper shape" ) );
|
||||
aOutlines = poly1;
|
||||
}
|
||||
|
||||
// Add all closed polys as holes to the main outline
|
||||
for( SHAPE_LINE_CHAIN& closedChain : closedChains )
|
||||
{
|
||||
wxLogTrace( traceBoardOutline, "Adding hole to main outline" );
|
||||
wxLogTrace( traceBoardOutline, wxT( "Adding hole to main outline" ) );
|
||||
aOutlines.AddHole( closedChain, -1 );
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ void PCB_EDIT_FRAME::ExecuteRemoteCommand( const char* cmdline )
|
|||
if( !crossProbingSettings.auto_highlight )
|
||||
return;
|
||||
|
||||
wxStringTokenizer netsTok = wxStringTokenizer( FROM_UTF8( text ), "," );
|
||||
wxStringTokenizer netsTok = wxStringTokenizer( FROM_UTF8( text ), wxT( "," ) );
|
||||
bool first = true;
|
||||
|
||||
while( netsTok.HasMoreTokens() )
|
||||
|
|
|
@ -492,7 +492,7 @@ static bool ModuleCompare( const RefDesInfo& aA, const RefDesInfo& aB )
|
|||
|
||||
wxString DIALOG_BOARD_REANNOTATE::CoordTowxString( int aX, int aY )
|
||||
{
|
||||
return wxString::Format( "%s, %s",
|
||||
return wxString::Format( wxT( "%s, %s" ),
|
||||
MessageTextFromValue( m_units, aX ),
|
||||
MessageTextFromValue( m_units, aY ) );
|
||||
}
|
||||
|
@ -522,14 +522,14 @@ void DIALOG_BOARD_REANNOTATE::LogChangePlan()
|
|||
(int) m_refDesTypes.size() );
|
||||
|
||||
for( RefDesTypeStr Type : m_refDesTypes ) // Show all the types of refdes
|
||||
message += Type.RefDesType + ( 0 == ( i++ % 16 ) ? "\n" : " " );
|
||||
message += Type.RefDesType + ( 0 == ( i++ % 16 ) ? wxT( "\n" ) : wxS( " " ) );
|
||||
|
||||
if( !m_excludeArray.empty() )
|
||||
{
|
||||
wxString excludes;
|
||||
|
||||
for( wxString& exclude : m_excludeArray ) // Show the refdes we are excluding
|
||||
excludes += exclude + " ";
|
||||
excludes += exclude + wxS( " " );
|
||||
|
||||
message += wxString::Format( _( "\nExcluding: %s from reannotation\n\n" ), excludes );
|
||||
}
|
||||
|
@ -538,10 +538,12 @@ void DIALOG_BOARD_REANNOTATE::LogChangePlan()
|
|||
|
||||
for( const RefDesChange& change : m_changeArray )
|
||||
{
|
||||
message += wxString::Format(
|
||||
"%s -> %s %s %s\n", change.OldRefDesString, change.NewRefDes,
|
||||
message += wxString::Format( wxT( "%s -> %s %s %s\n" ),
|
||||
change.OldRefDesString,
|
||||
change.NewRefDes,
|
||||
ActionMessage[change.Action],
|
||||
UpdateRefDes != change.Action ? _( " will be ignored" ) : wxT( "" ) );
|
||||
UpdateRefDes != change.Action ? _( " will be ignored" )
|
||||
: wxT( "" ) );
|
||||
}
|
||||
|
||||
ShowReport( message, RPT_SEVERITY_INFO );
|
||||
|
@ -591,16 +593,16 @@ bool DIALOG_BOARD_REANNOTATE::ReannotateBoard()
|
|||
|
||||
if( !BuildFootprintList( BadRefDes ) )
|
||||
{
|
||||
ShowReport( "Selected options resulted in errors! Change them and try again.",
|
||||
ShowReport( _( "Selected options resulted in errors! Change them and try again." ),
|
||||
RPT_SEVERITY_ERROR );
|
||||
return false;
|
||||
}
|
||||
|
||||
if( !BadRefDes.empty() )
|
||||
{
|
||||
message.Printf(
|
||||
_( "\nPCB has %d empty or invalid reference designations."
|
||||
"\nRecommend running DRC with 'Test for parity between PCB and schematic' checked.\n" ),
|
||||
message.Printf( _( "\nPCB has %d empty or invalid reference designations."
|
||||
"\nRecommend running DRC with 'Test for parity between PCB and "
|
||||
"schematic' checked.\n" ),
|
||||
(int) BadRefDes.size() );
|
||||
|
||||
for( const RefDesInfo& mod : BadRefDes )
|
||||
|
@ -612,7 +614,7 @@ bool DIALOG_BOARD_REANNOTATE::ReannotateBoard()
|
|||
CoordTowxString( mod.x, mod.y ) );
|
||||
}
|
||||
|
||||
ShowReport( message + badrefdes + "\n", RPT_SEVERITY_WARNING );
|
||||
ShowReport( message + badrefdes + wxT( "\n" ), RPT_SEVERITY_WARNING );
|
||||
message += _( "Reannotate anyway?" );
|
||||
|
||||
if( !IsOK( m_frame, message ) )
|
||||
|
@ -633,7 +635,7 @@ bool DIALOG_BOARD_REANNOTATE::ReannotateBoard()
|
|||
m_frame->GetCanvas()->GetView()->Update( footprint ); // Touch the footprint
|
||||
}
|
||||
|
||||
commit.Push( "Geographic reannotation" );
|
||||
commit.Push( wxT( "Geographic reannotation" ) );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -707,7 +709,7 @@ bool DIALOG_BOARD_REANNOTATE::BuildFootprintList( std::vector<RefDesInfo>& aBadR
|
|||
}
|
||||
else
|
||||
{
|
||||
firstnum = fpData.RefDesString.find_first_of( "0123456789" );
|
||||
firstnum = fpData.RefDesString.find_first_of( wxT( "0123456789" ) );
|
||||
|
||||
if( std::string::npos == firstnum )
|
||||
fpData.Action = InvalidRefDes; // do not change ref des such as 12 or +1, or L
|
||||
|
@ -797,7 +799,7 @@ bool DIALOG_BOARD_REANNOTATE::BuildFootprintList( std::vector<RefDesInfo>& aBadR
|
|||
{
|
||||
if( m_changeArray[i].NewRefDes == m_changeArray[j].NewRefDes )
|
||||
{
|
||||
ShowReport( "Duplicate instances of " + m_changeArray[j].NewRefDes,
|
||||
ShowReport( _( "Duplicate instances of " ) + m_changeArray[j].NewRefDes,
|
||||
RPT_SEVERITY_ERROR );
|
||||
|
||||
if( errorcount++ > MAXERROR )
|
||||
|
|
|
@ -122,8 +122,8 @@ DIALOG_BOARD_STATISTICS::DIALOG_BOARD_STATISTICS( PCB_EDIT_FRAME* aParentFrame )
|
|||
if( !s_savedDialogState.saveReportInitialized
|
||||
|| s_savedDialogState.m_project != Prj().GetProjectFullName() )
|
||||
{
|
||||
fn.SetName( fn.GetName() + "_report" );
|
||||
fn.SetExt( "txt" );
|
||||
fn.SetName( fn.GetName() + wxT( "_report" ) );
|
||||
fn.SetExt( wxT( "txt" ) );
|
||||
s_savedDialogState.saveReportName = fn.GetFullName();
|
||||
s_savedDialogState.saveReportFolder = wxPathOnly( Prj().GetProjectFullName() );
|
||||
s_savedDialogState.m_project = Prj().GetProjectFullName();
|
||||
|
@ -372,7 +372,7 @@ void DIALOG_BOARD_STATISTICS::updateWidets()
|
|||
}
|
||||
|
||||
m_gridPads->SetCellValue( currentRow, COL_LABEL, _( "Total:" ) );
|
||||
m_gridPads->SetCellValue( currentRow, COL_AMOUNT, wxString::Format( "%i ", totalPads ) );
|
||||
m_gridPads->SetCellValue( currentRow, COL_AMOUNT, wxString::Format( wxT( "%i " ), totalPads ) );
|
||||
|
||||
int totalVias = 0;
|
||||
currentRow = 0;
|
||||
|
@ -380,13 +380,13 @@ void DIALOG_BOARD_STATISTICS::updateWidets()
|
|||
for( const auto& type : m_viasTypes )
|
||||
{
|
||||
m_gridVias->SetCellValue( currentRow, COL_LABEL, type.title );
|
||||
m_gridVias->SetCellValue( currentRow, COL_AMOUNT, wxString::Format( "%i ", type.qty ) );
|
||||
m_gridVias->SetCellValue( currentRow, COL_AMOUNT, wxString::Format( wxT( "%i " ), type.qty ) );
|
||||
totalVias += type.qty;
|
||||
currentRow++;
|
||||
}
|
||||
|
||||
m_gridVias->SetCellValue( currentRow, COL_LABEL, _( "Total:" ) );
|
||||
m_gridVias->SetCellValue( currentRow, COL_AMOUNT, wxString::Format( "%i ", totalVias ) );
|
||||
m_gridVias->SetCellValue( currentRow, COL_AMOUNT, wxString::Format( wxT( "%i " ), totalVias ) );
|
||||
|
||||
|
||||
int totalFront = 0;
|
||||
|
@ -398,12 +398,13 @@ void DIALOG_BOARD_STATISTICS::updateWidets()
|
|||
for( const auto& type : m_componentsTypes )
|
||||
{
|
||||
m_gridComponents->SetCellValue( currentRow, COL_LABEL, type.title );
|
||||
m_gridComponents->SetCellValue(
|
||||
currentRow, COL_FRONT_SIDE, wxString::Format( "%i ", type.frontSideQty ) );
|
||||
m_gridComponents->SetCellValue(
|
||||
currentRow, COL_BOTTOM_SIDE, wxString::Format( "%i ", type.backSideQty ) );
|
||||
m_gridComponents->SetCellValue( currentRow, COL_FRONT_SIDE,
|
||||
wxString::Format( wxT( "%i " ), type.frontSideQty ) );
|
||||
m_gridComponents->SetCellValue( currentRow, COL_BOTTOM_SIDE,
|
||||
wxString::Format( wxT( "%i " ), type.backSideQty ) );
|
||||
m_gridComponents->SetCellValue( currentRow, 3,
|
||||
wxString::Format( wxT( "%i " ), type.frontSideQty + type.backSideQty ) );
|
||||
wxString::Format( wxT( "%i " ),
|
||||
type.frontSideQty + type.backSideQty ) );
|
||||
totalFront += type.frontSideQty;
|
||||
totalBack += type.backSideQty;
|
||||
currentRow++;
|
||||
|
@ -411,18 +412,20 @@ void DIALOG_BOARD_STATISTICS::updateWidets()
|
|||
|
||||
m_gridComponents->SetCellValue( currentRow, COL_LABEL, _( "Total:" ) );
|
||||
m_gridComponents->SetCellValue( currentRow, COL_FRONT_SIDE,
|
||||
wxString::Format( "%i ", totalFront ) );
|
||||
wxString::Format( wxT( "%i " ), totalFront ) );
|
||||
m_gridComponents->SetCellValue( currentRow, COL_BOTTOM_SIDE,
|
||||
wxString::Format( "%i ", totalBack ) );
|
||||
wxString::Format( wxT( "%i " ), totalBack ) );
|
||||
m_gridComponents->SetCellValue( currentRow, COL_TOTAL,
|
||||
wxString::Format( "%i ", totalFront + totalBack ) );
|
||||
wxString::Format( wxT( "%i " ), totalFront + totalBack ) );
|
||||
|
||||
if( m_hasOutline )
|
||||
{
|
||||
m_gridBoard->SetCellValue( ROW_BOARD_WIDTH, COL_AMOUNT,
|
||||
MessageTextFromValue( GetUserUnits(), m_boardWidth ) + " " );
|
||||
MessageTextFromValue( GetUserUnits(),
|
||||
m_boardWidth ) + wxS( " " ) );
|
||||
m_gridBoard->SetCellValue( ROW_BOARD_HEIGHT, COL_AMOUNT,
|
||||
MessageTextFromValue( GetUserUnits(), m_boardHeight ) + " " );
|
||||
MessageTextFromValue( GetUserUnits(),
|
||||
m_boardHeight ) + wxS( " " ) );
|
||||
m_gridBoard->SetCellValue( ROW_BOARD_AREA, COL_AMOUNT,
|
||||
MessageTextFromValue( GetUserUnits(), m_boardArea, true,
|
||||
EDA_DATA_TYPE::AREA ) );
|
||||
|
@ -482,7 +485,7 @@ void DIALOG_BOARD_STATISTICS::updateDrillGrid()
|
|||
stopLayerStr = board->GetLayerName( type.stopLayer );
|
||||
|
||||
m_gridDrills->SetCellValue(
|
||||
currentRow, drillType_t::COL_COUNT, wxString::Format( "%i", type.qty ) );
|
||||
currentRow, drillType_t::COL_COUNT, wxString::Format( wxT( "%i" ), type.qty ) );
|
||||
m_gridDrills->SetCellValue( currentRow, drillType_t::COL_SHAPE, shapeStr );
|
||||
m_gridDrills->SetCellValue( currentRow, drillType_t::COL_X_SIZE,
|
||||
MessageTextFromValue( GetUserUnits(), type.xSize ) );
|
||||
|
@ -529,44 +532,44 @@ void DIALOG_BOARD_STATISTICS::printGridToStringAsTable( wxGrid* aGrid, wxString&
|
|||
|
||||
// Print column labels.
|
||||
|
||||
aStr << "|";
|
||||
aStr << wxT( "|" );
|
||||
|
||||
if( aUseRowLabels )
|
||||
{
|
||||
aStr.Append( ' ', rowLabelsWidth );
|
||||
aStr << " |";
|
||||
aStr << wxT( " |" );
|
||||
}
|
||||
|
||||
for( int col = 0; col < aGrid->GetNumberCols(); col++ )
|
||||
{
|
||||
if( aUseColLabels )
|
||||
tmp.Printf( " %*s |", widths[col], aGrid->GetColLabelValue( col ) );
|
||||
tmp.Printf( wxT( " %*s |" ), widths[col], aGrid->GetColLabelValue( col ) );
|
||||
else
|
||||
tmp.Printf( " %*s |", widths[col], aGrid->GetCellValue( 0, col ) );
|
||||
tmp.Printf( wxT( " %*s |" ), widths[col], aGrid->GetCellValue( 0, col ) );
|
||||
|
||||
aStr << tmp;
|
||||
}
|
||||
|
||||
aStr << "\n";
|
||||
aStr << wxT( "\n" );
|
||||
|
||||
// Print column label horizontal separators.
|
||||
|
||||
aStr << "|";
|
||||
aStr << wxT( "|" );
|
||||
|
||||
if( aUseRowLabels )
|
||||
{
|
||||
aStr.Append( '-', rowLabelsWidth );
|
||||
aStr << "-|";
|
||||
aStr << wxT( "-|" );
|
||||
}
|
||||
|
||||
for( int col = 0; col < aGrid->GetNumberCols(); col++ )
|
||||
{
|
||||
aStr << "-";
|
||||
aStr << wxT( "-" );
|
||||
aStr.Append( '-', widths[col] );
|
||||
aStr << "-|";
|
||||
aStr << wxT( "-|" );
|
||||
}
|
||||
|
||||
aStr << "\n";
|
||||
aStr << wxT( "\n" );
|
||||
|
||||
// Print regular cells.
|
||||
|
||||
|
@ -581,21 +584,21 @@ void DIALOG_BOARD_STATISTICS::printGridToStringAsTable( wxGrid* aGrid, wxString&
|
|||
for( int row = firstRow; row < aGrid->GetNumberRows(); row++ )
|
||||
{
|
||||
if( aUseRowLabels )
|
||||
tmp.Printf( "|%-*s |", rowLabelsWidth, aGrid->GetRowLabelValue( row ) );
|
||||
tmp.Printf( wxT( "|%-*s |" ), rowLabelsWidth, aGrid->GetRowLabelValue( row ) );
|
||||
else if( aUseFirstColAsLabel )
|
||||
tmp.Printf( "|%-*s |", widths[0], aGrid->GetCellValue( row, 0 ) );
|
||||
tmp.Printf( wxT( "|%-*s |" ), widths[0], aGrid->GetCellValue( row, 0 ) );
|
||||
else
|
||||
tmp.Printf( "|" );
|
||||
tmp.Printf( wxT( "|" ) );
|
||||
|
||||
aStr << tmp;
|
||||
|
||||
for( int col = firstCol; col < aGrid->GetNumberCols(); col++ )
|
||||
{
|
||||
tmp.Printf( " %*s |", widths[col], aGrid->GetCellValue( row, col ) );
|
||||
tmp.Printf( wxT( " %*s |" ), widths[col], aGrid->GetCellValue( row, col ) );
|
||||
aStr << tmp;
|
||||
}
|
||||
|
||||
aStr << "\n";
|
||||
aStr << wxT( "\n" );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -655,7 +658,7 @@ void DIALOG_BOARD_STATISTICS::saveReportClicked( wxCommandEvent& aEvent )
|
|||
s_savedDialogState.saveReportFolder = wxPathOnly( saveFileDialog.GetPath() );
|
||||
s_savedDialogState.saveReportName = saveFileDialog.GetFilename();
|
||||
|
||||
outFile = wxFopen( saveFileDialog.GetPath(), "wt" );
|
||||
outFile = wxFopen( saveFileDialog.GetPath(), wxT( "wt" ) );
|
||||
|
||||
if( outFile == nullptr )
|
||||
{
|
||||
|
@ -664,47 +667,47 @@ void DIALOG_BOARD_STATISTICS::saveReportClicked( wxCommandEvent& aEvent )
|
|||
return;
|
||||
}
|
||||
|
||||
msg << _( "PCB statistics report\n=====================" ) << "\n";
|
||||
msg << wxS( "- " ) << _( "Date" ) << wxS( ": " ) << wxDateTime::Now().Format() << "\n";
|
||||
msg << wxS( "- " ) << _( "Project" ) << wxS( ": " )<< Prj().GetProjectName() << "\n";
|
||||
msg << wxS( "- " ) << _( "Board name" ) << wxS( ": " )<< boardName << "\n";
|
||||
msg << _( "PCB statistics report\n=====================" ) << wxT( "\n" );
|
||||
msg << wxS( "- " ) << _( "Date" ) << wxS( ": " ) << wxDateTime::Now().Format() << wxT( "\n" );
|
||||
msg << wxS( "- " ) << _( "Project" ) << wxS( ": " )<< Prj().GetProjectName() << wxT( "\n" );
|
||||
msg << wxS( "- " ) << _( "Board name" ) << wxS( ": " )<< boardName << wxT( "\n" );
|
||||
|
||||
msg << "\n";
|
||||
msg << _( "Board" ) << "\n-----\n";
|
||||
msg << wxT( "\n" );
|
||||
msg << _( "Board" ) << wxT( "\n-----\n" );
|
||||
|
||||
if( m_hasOutline )
|
||||
{
|
||||
msg << wxS( "- " ) << _( "Width" ) << wxS( ": " ) <<
|
||||
MessageTextFromValue( GetUserUnits(), m_boardWidth ) << "\n";
|
||||
MessageTextFromValue( GetUserUnits(), m_boardWidth ) << wxT( "\n" );
|
||||
msg << wxS( "- " ) << _( "Height" ) << wxS( ": " ) <<
|
||||
MessageTextFromValue( GetUserUnits(), m_boardHeight ) << "\n";
|
||||
MessageTextFromValue( GetUserUnits(), m_boardHeight ) << wxT( "\n" );
|
||||
msg << wxS( "- " ) << _( "Area" ) + wxS( ": " ) <<
|
||||
MessageTextFromValue( GetUserUnits(), m_boardArea, true, EDA_DATA_TYPE::AREA );
|
||||
msg << "\n";
|
||||
msg << wxT( "\n" );
|
||||
}
|
||||
else
|
||||
{
|
||||
msg << wxS( "- " ) << _( "Width" ) << wxS( ": " ) << _( "unknown" ) << "\n";
|
||||
msg << wxS( "- " ) << _( "Height" ) << wxS( ": " ) << _( "unknown" ) << "\n";
|
||||
msg << wxS( "- " ) << _( "Area" ) << wxS( ": " ) << _( "unknown" ) << "\n";
|
||||
msg << wxS( "- " ) << _( "Width" ) << wxS( ": " ) << _( "unknown" ) << wxT( "\n" );
|
||||
msg << wxS( "- " ) << _( "Height" ) << wxS( ": " ) << _( "unknown" ) << wxT( "\n" );
|
||||
msg << wxS( "- " ) << _( "Area" ) << wxS( ": " ) << _( "unknown" ) << wxT( "\n" );
|
||||
}
|
||||
|
||||
msg << "\n";
|
||||
msg << _( "Pads" ) << "\n----\n";
|
||||
msg << wxT( "\n" );
|
||||
msg << _( "Pads" ) << wxT( "\n----\n" );
|
||||
|
||||
for( auto& type : m_padsTypes )
|
||||
msg << "- " << type.title << " " << type.qty << "\n";
|
||||
msg << wxT( "- " ) << type.title << wxS( " " ) << type.qty << wxT( "\n" );
|
||||
|
||||
msg << "\n";
|
||||
msg << _( "Vias" ) << "\n----\n";
|
||||
msg << wxT( "\n" );
|
||||
msg << _( "Vias" ) << wxT( "\n----\n" );
|
||||
|
||||
for( auto& type : m_viasTypes )
|
||||
msg << "- " << type.title << " " << type.qty << "\n";
|
||||
msg << wxT( "- " ) << type.title << wxS( " " ) << type.qty << wxT( "\n" );
|
||||
|
||||
// We will save data about components in the table.
|
||||
// We have to calculate column widths
|
||||
std::vector<int> widths;
|
||||
std::vector<wxString> labels{ "", _( "Front Side" ), _( "Back Side" ), _( "Total" ) };
|
||||
std::vector<wxString> labels{ wxT( "" ), _( "Front Side" ), _( "Back Side" ), _( "Total" ) };
|
||||
wxString tmp;
|
||||
|
||||
widths.reserve( labels.size() );
|
||||
|
@ -724,23 +727,23 @@ void DIALOG_BOARD_STATISTICS::saveReportClicked( wxCommandEvent& aEvent )
|
|||
}
|
||||
|
||||
// Get maximum width for other columns
|
||||
tmp.Printf( "%i", frontTotal );
|
||||
tmp.Printf( wxT( "%i" ), frontTotal );
|
||||
widths[1] = std::max<int>( tmp.size(), widths[1] );
|
||||
tmp.Printf( "%i", backTotal );
|
||||
tmp.Printf( wxT( "%i" ), backTotal );
|
||||
widths[2] = std::max<int>( tmp.size(), widths[2] );
|
||||
tmp.Printf( "%i", frontTotal + backTotal );
|
||||
tmp.Printf( wxT( "%i" ), frontTotal + backTotal );
|
||||
widths[3] = std::max<int>( tmp.size(), widths[3] );
|
||||
|
||||
//Write components amount to file
|
||||
msg << "\n";
|
||||
msg << _( "Components" ) << "\n----------\n";
|
||||
msg << "\n";
|
||||
msg << wxT( "\n" );
|
||||
msg << _( "Components" ) << wxT( "\n----------\n" );
|
||||
msg << wxT( "\n" );
|
||||
|
||||
printGridToStringAsTable( m_gridComponents, msg, false, false, true );
|
||||
|
||||
msg << "\n";
|
||||
msg << _( "Drill holes" ) << "\n-----------\n";
|
||||
msg << "\n";
|
||||
msg << wxT( "\n" );
|
||||
msg << _( "Drill holes" ) << wxT( "\n-----------\n" );
|
||||
msg << wxT( "\n" );
|
||||
|
||||
printGridToStringAsTable( m_gridDrills, msg, false, true, false );
|
||||
|
||||
|
|
|
@ -50,9 +50,9 @@ void DIALOG_CONSTRAINTS_REPORTER::DeleteAllPages()
|
|||
|
||||
void DIALOG_CONSTRAINTS_REPORTER::OnErrorLinkClicked( wxHtmlLinkEvent& event )
|
||||
{
|
||||
if( event.GetLinkInfo().GetHref() == "boardsetup" )
|
||||
if( event.GetLinkInfo().GetHref() == wxT( "boardsetup" ) )
|
||||
m_frame->ShowBoardSetupDialog( _( "Custom Rules" ) );
|
||||
else if( event.GetLinkInfo().GetHref() == "drc" )
|
||||
else if( event.GetLinkInfo().GetHref() == wxT( "drc" ) )
|
||||
m_frame->GetToolManager()->RunAction( PCB_ACTIONS::runDRC, true );
|
||||
}
|
||||
|
||||
|
|
|
@ -688,7 +688,7 @@ void DIALOG_COPPER_ZONE::updateShowNetsFilter()
|
|||
netNameShowFilter = wxT( "*" );
|
||||
}
|
||||
|
||||
wxStringTokenizer showFilters( netNameShowFilter.Lower(), "," );
|
||||
wxStringTokenizer showFilters( netNameShowFilter.Lower(), wxT( "," ) );
|
||||
|
||||
m_showNetsFilter.clear();
|
||||
|
||||
|
@ -816,7 +816,7 @@ wxArrayString DIALOG_COPPER_ZONE::applyHideFilterIfRequired( const wxArrayString
|
|||
|
||||
bool DIALOG_COPPER_ZONE::isAutoGenerated( const wxString& netName )
|
||||
{
|
||||
return netName.StartsWith( "Net-(" ) || netName.StartsWith( "unconnected-(" );
|
||||
return netName.StartsWith( wxT( "Net-(" ) ) || netName.StartsWith( wxT( "unconnected-(" ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -57,8 +57,8 @@ struct CREATE_ARRAY_DIALOG_ENTRIES
|
|||
m_Grid2dArrayNumbering( 0 ), // linear numbering
|
||||
m_GridPrimaryAxisScheme( 0 ), // numeric
|
||||
m_GridSecondaryAxisScheme( 0 ), // numeric
|
||||
m_GridPrimaryNumOffset( "1" ), // numeric
|
||||
m_GridSecondaryNumOffset( "1" ), // numeric
|
||||
m_GridPrimaryNumOffset( wxT( "1" ) ), // numeric
|
||||
m_GridSecondaryNumOffset( wxT( "1" ) ), // numeric
|
||||
m_GridPrimaryAxisStep( 1 ),
|
||||
m_GridSecondaryAxisStep( 1 ),
|
||||
m_CircCentreX( 0 ),
|
||||
|
@ -66,7 +66,7 @@ struct CREATE_ARRAY_DIALOG_ENTRIES
|
|||
m_CircCount( 4 ),
|
||||
m_CircNumStartSet( 1 ), // use specified start
|
||||
m_GridCircNumScheme( 0 ),
|
||||
m_CircNumberingOffset( "1" ),
|
||||
m_CircNumberingOffset( wxT( "1" ) ),
|
||||
m_CircNumberingStep( 1 ),
|
||||
m_CircRotatationStep( false ),
|
||||
m_ArrayTypeTab( 0 ), // start on grid view
|
||||
|
@ -292,7 +292,7 @@ static bool validateAxisOptions( const wxTextCtrl& offsetEntry, const wxChoice&
|
|||
void* clientData = typeEntry.GetClientData( typeEntry.GetSelection() );
|
||||
const NUMBERING_LIST_DATA* numberingData = static_cast<NUMBERING_LIST_DATA*>( clientData );
|
||||
|
||||
wxCHECK_MSG( numberingData, false, "Failed to get client data from list control." );
|
||||
wxCHECK_MSG( numberingData, false, wxT( "Failed to get client data from list control." ) );
|
||||
|
||||
aAxis.SetAxisType( numberingData->m_numbering_type );
|
||||
|
||||
|
@ -444,7 +444,7 @@ bool DIALOG_CREATE_ARRAY::TransferDataFromWindow()
|
|||
if( errors.IsEmpty() )
|
||||
errorStr = _("Bad parameters");
|
||||
else
|
||||
errorStr = boost::algorithm::join( errors, "\n" );
|
||||
errorStr = boost::algorithm::join( errors, wxT( "\n" ) );
|
||||
|
||||
wxMessageBox( errorStr );
|
||||
return false;
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
class BOARD_DESIGN_SETTINGS;
|
||||
|
||||
|
||||
#define DIALOG_DRC_WINDOW_NAME "DialogDrcWindowName"
|
||||
#define DIALOG_DRC_WINDOW_NAME wxT( "DialogDrcWindowName" )
|
||||
|
||||
class
|
||||
DIALOG_DRC: public DIALOG_DRC_BASE, PROGRESS_REPORTER_BASE
|
||||
|
|
|
@ -178,7 +178,7 @@ void PCB_EDIT_FRAME::OnExportIDF3( wxCommandEvent& event )
|
|||
if( path.IsEmpty() )
|
||||
{
|
||||
wxFileName brdFile = GetBoard()->GetFileName();
|
||||
brdFile.SetExt( "emn" );
|
||||
brdFile.SetExt( wxT( "emn" ) );
|
||||
path = brdFile.GetFullPath();
|
||||
}
|
||||
|
||||
|
|
|
@ -128,7 +128,7 @@ DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aParent, const wxString&
|
|||
if( path.IsEmpty() )
|
||||
{
|
||||
wxFileName brdFile = m_parent->GetBoard()->GetFileName();
|
||||
brdFile.SetExt( "step" );
|
||||
brdFile.SetExt( wxT( "step" ) );
|
||||
path = brdFile.GetFullPath();
|
||||
}
|
||||
|
||||
|
@ -178,7 +178,7 @@ DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aParent, const wxString&
|
|||
wxString tmpStr;
|
||||
tmpStr << m_XOrg;
|
||||
m_STEP_Xorg->SetValue( tmpStr );
|
||||
tmpStr = "";
|
||||
tmpStr = wxEmptyString;
|
||||
tmpStr << m_YOrg;
|
||||
m_STEP_Yorg->SetValue( tmpStr );
|
||||
|
||||
|
@ -207,7 +207,7 @@ DIALOG_EXPORT_STEP::DIALOG_EXPORT_STEP( PCB_EDIT_FRAME* aParent, const wxString&
|
|||
if( !bad_scales.empty()
|
||||
&& !Pgm().GetCommonSettings()->m_DoNotShowAgain.scaled_3d_models_warning )
|
||||
{
|
||||
wxString extendedMsg = _( "Non-unity scaled models:" ) + "\n" + bad_scales;
|
||||
wxString extendedMsg = _( "Non-unity scaled models:" ) + wxT( "\n" ) + bad_scales;
|
||||
|
||||
KIDIALOG msgDlg( m_parent, _( "Scaled models detected. "
|
||||
"Model scaling is not reliable for mechanical export." ),
|
||||
|
@ -356,7 +356,8 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
|
|||
|
||||
FILENAME_RESOLVER* fnResolver = m_parent->Prj().Get3DFilenameResolver();
|
||||
|
||||
fnResolver->WritePathList( wxStandardPaths::Get().GetTempDir(), "ExportPaths.cfg", true );
|
||||
fnResolver->WritePathList( wxStandardPaths::Get().GetTempDir(), wxT( "ExportPaths.cfg" ),
|
||||
true );
|
||||
|
||||
DIALOG_EXPORT_STEP::STEP_ORG_OPT orgOpt = GetOriginOption();
|
||||
double xOrg = 0.0;
|
||||
|
@ -369,25 +370,25 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
|
|||
// On macOS, we have standalone applications inside the main bundle, so we handle that here:
|
||||
if( appK2S.GetPath().Find( "/Contents/Applications/pcbnew.app/Contents/MacOS" ) != wxNOT_FOUND )
|
||||
{
|
||||
appK2S.AppendDir( ".." );
|
||||
appK2S.AppendDir( ".." );
|
||||
appK2S.AppendDir( ".." );
|
||||
appK2S.AppendDir( ".." );
|
||||
appK2S.AppendDir( "MacOS" );
|
||||
appK2S.AppendDir( wxT( ".." ) );
|
||||
appK2S.AppendDir( wxT( ".." ) );
|
||||
appK2S.AppendDir( wxT( ".." ) );
|
||||
appK2S.AppendDir( wxT( ".." ) );
|
||||
appK2S.AppendDir( wxT( "MacOS" ) );
|
||||
}
|
||||
#endif
|
||||
|
||||
appK2S.SetName( "kicad2step" );
|
||||
appK2S.SetName( wxT( "kicad2step" ) );
|
||||
|
||||
wxString cmdK2S = "\"";
|
||||
wxString cmdK2S = wxT( "\"" );
|
||||
cmdK2S.Append( appK2S.GetFullPath() );
|
||||
cmdK2S.Append( "\"" );
|
||||
cmdK2S.Append( wxT( "\"" ) );
|
||||
|
||||
if( GetNoVirtOption() )
|
||||
cmdK2S.Append( " --no-virtual" );
|
||||
cmdK2S.Append( wxT( " --no-virtual" ) );
|
||||
|
||||
if( GetSubstOption() )
|
||||
cmdK2S.Append( " --subst-models" );
|
||||
cmdK2S.Append( wxT( " --subst-models" ) );
|
||||
|
||||
// Note: for some reason, using \" to insert a quote in a format string, under MacOS
|
||||
// wxString::Format does not work. So use a %c format in string
|
||||
|
@ -399,11 +400,11 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
|
|||
break;
|
||||
|
||||
case DIALOG_EXPORT_STEP::STEP_ORG_PLOT_AXIS:
|
||||
cmdK2S.Append( " --drill-origin" );
|
||||
cmdK2S.Append( wxT( " --drill-origin" ) );
|
||||
break;
|
||||
|
||||
case DIALOG_EXPORT_STEP::STEP_ORG_GRID_AXIS:
|
||||
cmdK2S.Append( " --grid-origin" );
|
||||
cmdK2S.Append( wxT( " --grid-origin" ) );
|
||||
break;
|
||||
|
||||
case DIALOG_EXPORT_STEP::STEP_ORG_USER:
|
||||
|
@ -419,7 +420,8 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
|
|||
}
|
||||
|
||||
LOCALE_IO dummy;
|
||||
cmdK2S.Append( wxString::Format( " --user-origin=%c%.6f x %.6f%c", quote, xOrg, yOrg, quote ) );
|
||||
cmdK2S.Append( wxString::Format( wxT( " --user-origin=%c%.6f x %.6f%c" ),
|
||||
quote, xOrg, yOrg, quote ) );
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -429,20 +431,23 @@ void DIALOG_EXPORT_STEP::onExportButton( wxCommandEvent& aEvent )
|
|||
xOrg = Iu2Millimeter( bbox.GetCenter().x );
|
||||
yOrg = Iu2Millimeter( bbox.GetCenter().y );
|
||||
LOCALE_IO dummy;
|
||||
cmdK2S.Append( wxString::Format( " --user-origin=%c%.6f x %.6f%c", quote, xOrg, yOrg, quote ) );
|
||||
cmdK2S.Append( wxString::Format( wxT( " --user-origin=%c%.6f x %.6f%c" ),
|
||||
quote, xOrg, yOrg, quote ) );
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
{
|
||||
LOCALE_IO dummy;
|
||||
cmdK2S.Append( wxString::Format( " --min-distance=%c%.3f mm%c", quote, tolerance, quote ) );
|
||||
cmdK2S.Append( wxString::Format( wxT( " --min-distance=%c%.3f mm%c" ),
|
||||
quote, tolerance, quote ) );
|
||||
}
|
||||
|
||||
cmdK2S.Append( wxString::Format( " -f -o %c%s%c", quote,
|
||||
m_filePickerSTEP->GetPath(), quote ) ); // input file path
|
||||
cmdK2S.Append( wxString::Format( wxT( " -f -o %c%s%c" ),
|
||||
quote, m_filePickerSTEP->GetPath(), quote ) ); // input file path
|
||||
|
||||
cmdK2S.Append( wxString::Format( " %c%s%c",quote, m_boardPath, quote ) ); // output file path
|
||||
cmdK2S.Append( wxString::Format( wxT( " %c%s%c" ),
|
||||
quote, m_boardPath, quote ) ); // output file path
|
||||
|
||||
wxExecute( cmdK2S, wxEXEC_ASYNC | wxEXEC_SHOW_CONSOLE );
|
||||
|
||||
|
|
|
@ -197,7 +197,7 @@ void PCB_EDIT_FRAME::OnExportVRML( wxCommandEvent& event )
|
|||
if( path.IsEmpty() )
|
||||
{
|
||||
wxFileName brdFile = GetBoard()->GetFileName();
|
||||
brdFile.SetExt( "wrl" );
|
||||
brdFile.SetExt( wxT( "wrl" ) );
|
||||
path = brdFile.GetFullPath();
|
||||
}
|
||||
|
||||
|
|
|
@ -103,7 +103,7 @@ void DIALOG_FOOTPRINT_WIZARD_LIST::initLists()
|
|||
// Put all wizards in the list
|
||||
for( int ii = 0; ii < n_wizards; ii++ )
|
||||
{
|
||||
wxString num = wxString::Format( "%d", ii+1 );
|
||||
wxString num = wxString::Format( wxT( "%d" ), ii+1 );
|
||||
FOOTPRINT_WIZARD *wizard = FOOTPRINT_WIZARD_LIST::GetWizard( ii );
|
||||
wxString name = wizard->GetName();
|
||||
wxString description = wizard->GetDescription();
|
||||
|
|
|
@ -83,7 +83,7 @@ bool DIALOG_GENCAD_EXPORT_OPTIONS::GetOption( GENCAD_EXPORT_OPT aOption ) const
|
|||
|
||||
if( it == m_options.end() )
|
||||
{
|
||||
wxASSERT_MSG( false, "Missing checkbox for an option" );
|
||||
wxASSERT_MSG( false, wxT( "Missing checkbox for an option" ) );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -220,7 +220,8 @@ void DIALOG_GENDRILL::onFileFormatSelection( wxCommandEvent& event )
|
|||
else
|
||||
{
|
||||
m_staticTextPrecision->Enable( true );
|
||||
m_staticTextPrecision->SetLabel( m_plotOpts.GetGerberPrecision() == 6 ? "4.6" : "4.5" );
|
||||
m_staticTextPrecision->SetLabel( m_plotOpts.GetGerberPrecision() == 6 ? wxT( "4.6" )
|
||||
: wxT( "4.5" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -254,7 +254,7 @@ void DIALOG_GLOBAL_DELETION::DoGlobalDeletions()
|
|||
}
|
||||
}
|
||||
|
||||
commit.Push( "Global delete" );
|
||||
commit.Push( wxT( "Global delete" ) );
|
||||
|
||||
if( m_delMarkers->GetValue() )
|
||||
board->DeleteMARKERs();
|
||||
|
|
|
@ -247,7 +247,7 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataToWindow()
|
|||
attr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER ); \
|
||||
attr->SetReadOnly(); \
|
||||
m_grid->SetAttr( aRow, aCol, attr ); \
|
||||
m_grid->SetCellValue( aRow, aCol, ( aValue ) ? "1" : "" )
|
||||
m_grid->SetCellValue( aRow, aCol, ( aValue ) ? wxT( "1" ) : wxT( "" ) )
|
||||
|
||||
const BOARD_DESIGN_SETTINGS& bds = m_parent->GetBoard()->GetDesignSettings();
|
||||
wxGridCellAttr* attr;
|
||||
|
@ -537,7 +537,7 @@ bool DIALOG_GLOBAL_EDIT_TEXT_AND_GRAPHICS::TransferDataFromWindow()
|
|||
}
|
||||
}
|
||||
|
||||
commit.Push( "Edit text and graphics properties" );
|
||||
commit.Push( wxT( "Edit text and graphics properties" ) );
|
||||
m_parent->GetCanvas()->Refresh();
|
||||
|
||||
return true;
|
||||
|
|
|
@ -27,13 +27,13 @@
|
|||
|
||||
wxString DIALOG_IMPORTED_LAYERS::WrapRequired( const wxString& aLayerName )
|
||||
{
|
||||
return aLayerName + " *";
|
||||
return aLayerName + wxT( " *" );
|
||||
}
|
||||
|
||||
|
||||
wxString DIALOG_IMPORTED_LAYERS::UnwrapRequired( const wxString& aLayerName )
|
||||
{
|
||||
if( !aLayerName.EndsWith( " *" ) )
|
||||
if( !aLayerName.EndsWith( wxT( " *" ) ) )
|
||||
return aLayerName;
|
||||
|
||||
return aLayerName.Left( aLayerName.Length() - 2 );
|
||||
|
@ -74,7 +74,7 @@ PCB_LAYER_ID DIALOG_IMPORTED_LAYERS::GetSelectedLayerID()
|
|||
// There should only be one selected (or none) as the list is set with wxLC_SINGLE_SEL style
|
||||
wxASSERT_MSG( ( m_kicad_layers_list->GetNextItem( itemIndex, wxLIST_NEXT_ALL,
|
||||
wxLIST_STATE_SELECTED ) ) == wxNOT_FOUND,
|
||||
"There are more than one KiCad layer selected (unexpected)" );
|
||||
wxT( "There are more than one KiCad layer selected (unexpected)" ) );
|
||||
|
||||
for( int layer = 0; layer < PCB_LAYER_ID_COUNT; ++layer )
|
||||
{
|
||||
|
@ -313,7 +313,7 @@ std::vector<wxString> DIALOG_IMPORTED_LAYERS::GetUnmappedRequiredLayers() const
|
|||
for( const wxString& layerName : m_unmatched_layer_names )
|
||||
{
|
||||
const INPUT_LAYER_DESC* layerDesc = GetLayerDescription( layerName );
|
||||
wxASSERT_MSG( layerDesc != nullptr, "Expected to find layer description" );
|
||||
wxASSERT_MSG( layerDesc != nullptr, wxT( "Expected to find layer description" ) );
|
||||
|
||||
if( layerDesc->Required )
|
||||
unmappedLayers.push_back( layerDesc->Name );
|
||||
|
|
|
@ -1007,7 +1007,7 @@ bool DIALOG_NET_INSPECTOR::netFilterMatches( NETINFO_ITEM* aNet ) const
|
|||
|
||||
// Show unconnected nets only if specifically asked for by filter
|
||||
if( m_netFilter.empty() )
|
||||
return !aNet->GetNetname().StartsWith( "unconnected-(" );
|
||||
return !aNet->GetNetname().StartsWith( wxT( "unconnected-(" ) );
|
||||
|
||||
wxString net_str = UnescapeString( aNet->GetNetname() ).Upper();
|
||||
|
||||
|
@ -1087,7 +1087,7 @@ void DIALOG_NET_INSPECTOR::updateDisplayedRowValues( const OPT<LIST_ITEM_ITER>&
|
|||
|
||||
wxString DIALOG_NET_INSPECTOR::formatNetCode( const NETINFO_ITEM* aNet ) const
|
||||
{
|
||||
return wxString::Format( "%.3d", aNet->GetNetCode() );
|
||||
return wxString::Format( wxT( "%.3d" ), aNet->GetNetCode() );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1099,7 +1099,7 @@ wxString DIALOG_NET_INSPECTOR::formatNetName( const NETINFO_ITEM* aNet ) const
|
|||
|
||||
wxString DIALOG_NET_INSPECTOR::formatCount( unsigned int aValue ) const
|
||||
{
|
||||
return wxString::Format( "%u", aValue );
|
||||
return wxString::Format( wxT( "%u" ), aValue );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1584,7 +1584,7 @@ void DIALOG_NET_INSPECTOR::buildNetsList()
|
|||
|
||||
void DIALOG_NET_INSPECTOR::onFilterChange( wxCommandEvent& aEvent )
|
||||
{
|
||||
wxStringTokenizer filters( m_textCtrlFilter->GetValue().Upper(), "," );
|
||||
wxStringTokenizer filters( m_textCtrlFilter->GetValue().Upper(), wxT( "," ) );
|
||||
m_netFilter.clear();
|
||||
|
||||
while( filters.HasMoreTokens() )
|
||||
|
@ -1600,7 +1600,7 @@ void DIALOG_NET_INSPECTOR::onFilterChange( wxCommandEvent& aEvent )
|
|||
}
|
||||
}
|
||||
|
||||
wxStringTokenizer group_filters( m_groupByText->GetValue(), "," );
|
||||
wxStringTokenizer group_filters( m_groupByText->GetValue(), wxT( "," ) );
|
||||
m_groupFilter.clear();
|
||||
|
||||
while( group_filters.HasMoreTokens() )
|
||||
|
@ -1718,15 +1718,15 @@ void DIALOG_NET_INSPECTOR::adjustListColumns()
|
|||
int w0, w1, w2, w3, w4, w5, w6, w7;
|
||||
|
||||
dc.GetTextExtent( COLUMN_NET.display_name, &w0, &h );
|
||||
dc.GetTextExtent( "MMMMMMMMMMMMM", &minw_col1, &h );
|
||||
dc.GetTextExtent( wxT( "MMMMMMMMMMMMM" ), &minw_col1, &h );
|
||||
dc.GetTextExtent( COLUMN_PAD_COUNT.display_name, &w2, &h );
|
||||
dc.GetTextExtent( COLUMN_VIA_COUNT.display_name, &w3, &h );
|
||||
dc.GetTextExtent( COLUMN_VIA_LENGTH.display_name, &w4, &h );
|
||||
dc.GetTextExtent( COLUMN_BOARD_LENGTH.display_name, &w5, &h );
|
||||
dc.GetTextExtent( COLUMN_CHIP_LENGTH.display_name, &w6, &h );
|
||||
dc.GetTextExtent( COLUMN_TOTAL_LENGTH.display_name, &w7, &h );
|
||||
dc.GetTextExtent( "00000,000 mm", &minw, &h );
|
||||
dc.GetTextExtent( "00000", &minw_col0, &h );
|
||||
dc.GetTextExtent( wxT( "00000,000 mm" ), &minw, &h );
|
||||
dc.GetTextExtent( wxT( "00000" ), &minw_col0, &h );
|
||||
|
||||
// Considering left and right margins.
|
||||
// For wxRenderGeneric it is 5px.
|
||||
|
@ -1842,7 +1842,7 @@ void DIALOG_NET_INSPECTOR::onRenameNet( wxCommandEvent& aEvent )
|
|||
wxString netPath;
|
||||
wxString shortNetName;
|
||||
|
||||
if( fullNetName.Contains( "/" ) )
|
||||
if( fullNetName.Contains( wxT( "/" ) ) )
|
||||
{
|
||||
netPath = fullNetName.BeforeLast( '/' ) + '/';
|
||||
shortNetName = fullNetName.AfterLast( '/' );
|
||||
|
@ -2001,7 +2001,7 @@ void DIALOG_NET_INSPECTOR::onReport( wxCommandEvent& aEvent )
|
|||
|
||||
// Print Header:
|
||||
for( auto&& col : m_data_model->columnDesc() )
|
||||
txt += '"' + col.csv_name + "\";";
|
||||
txt += '"' + col.csv_name + wxT( "\";" );
|
||||
|
||||
f.AddLine( txt );
|
||||
|
||||
|
@ -2020,7 +2020,7 @@ void DIALOG_NET_INSPECTOR::onReport( wxCommandEvent& aEvent )
|
|||
for( auto&& col : m_data_model->columnDesc() )
|
||||
{
|
||||
if( col.csv_flags & COLUMN_DESC::CSV_QUOTE )
|
||||
txt += '"' + m_data_model->valueAt( col.num, row ).GetString() + "\";";
|
||||
txt += '"' + m_data_model->valueAt( col.num, row ).GetString() + wxT( "\";" );
|
||||
else
|
||||
txt += m_data_model->valueAt( col.num, row ).GetString() + ';';
|
||||
}
|
||||
|
|
|
@ -294,7 +294,7 @@ bool DIALOG_PAD_PRIMITIVE_POLY_PROPS::TransferDataToWindow()
|
|||
for( unsigned row = 0; row < m_currPoints.size(); ++row )
|
||||
{
|
||||
// Row label is "Corner x"
|
||||
msg.Printf( "Corner %d", row+1 );
|
||||
msg.Printf( _( "Corner %d" ), row+1 );
|
||||
m_gridCornersList->SetRowLabelValue( row, msg );
|
||||
|
||||
msg = StringFromValue( GetUserUnits(), m_currPoints[row].x, true );
|
||||
|
|
|
@ -671,7 +671,7 @@ void DIALOG_PAD_PROPERTIES::initValues()
|
|||
// A small helper function, to display coordinates:
|
||||
static wxString formatCoord( EDA_UNITS aUnits, VECTOR2I aCoord )
|
||||
{
|
||||
return wxString::Format( "(X:%s Y:%s)",
|
||||
return wxString::Format( wxT( "(X:%s Y:%s)" ),
|
||||
MessageTextFromValue( aUnits, aCoord.x ),
|
||||
MessageTextFromValue( aUnits, aCoord.y ) );
|
||||
}
|
||||
|
@ -731,13 +731,13 @@ void DIALOG_PAD_PROPERTIES::displayPrimitivesList()
|
|||
break;
|
||||
|
||||
case SHAPE_T::POLY:
|
||||
bs_info[0] = "Polygon";
|
||||
bs_info[0] = _( "Polygon" );
|
||||
bs_info[1] = wxString::Format( _( "corners count %d" ),
|
||||
primitive->GetPolyShape().Outline( 0 ).PointCount() );
|
||||
break;
|
||||
|
||||
default:
|
||||
bs_info[0] = "Unknown primitive";
|
||||
bs_info[0] = _( "Unknown primitive" );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1877,7 +1877,7 @@ bool DIALOG_PAD_PROPERTIES::transferDataToPad( PAD* aPad )
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "DIALOG_PAD_PROPERTIES::transferDataToPad: unknown pad type" );
|
||||
wxFAIL_MSG( wxT( "DIALOG_PAD_PROPERTIES::transferDataToPad: unknown pad type" ) );
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -45,7 +45,7 @@
|
|||
* created by wxFormBuilder
|
||||
*/
|
||||
// The wxWidgets window name. Used to retrieve the dialog by window name
|
||||
#define PAD_PROPERTIES_DLG_NAME "pad_properties_dlg_name"
|
||||
#define PAD_PROPERTIES_DLG_NAME wxT( "pad_properties_dlg_name" )
|
||||
|
||||
class DIALOG_PAD_PROPERTIES : public DIALOG_PAD_PROPERTIES_BASE
|
||||
{
|
||||
|
|
|
@ -925,7 +925,7 @@ void DIALOG_PLOT::Plot( wxCommandEvent& event )
|
|||
// Pick the basename from the board file
|
||||
wxFileName fn( boardFilename );
|
||||
// Build gerber job file from basename
|
||||
BuildPlotFileName( &fn, outputDir.GetPath(), "job", GerberJobFileExtension );
|
||||
BuildPlotFileName( &fn, outputDir.GetPath(), wxT( "job" ), GerberJobFileExtension );
|
||||
jobfile_writer.CreateJobFile( fn.GetFullPath() );
|
||||
}
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
#include <widgets/unit_binder.h>
|
||||
|
||||
// the plot dialog window name, used by wxWidgets
|
||||
#define DLG_WINDOW_NAME "plot_dialog-window"
|
||||
#define DLG_WINDOW_NAME wxT( "plot_dialog-window" )
|
||||
|
||||
/**
|
||||
* A dialog to set the plot options and create plot files in various formats.
|
||||
|
|
|
@ -252,7 +252,7 @@ void DIALOG_POSITION_RELATIVE::UpdateAnchor( EDA_ITEM* aItem )
|
|||
reference = item->GetSelectMenuText( GetUserUnits() );
|
||||
}
|
||||
|
||||
m_referenceInfo->SetLabel( wxString::Format( "Reference item: %s", reference ) );
|
||||
m_referenceInfo->SetLabel( wxString::Format( _( "Reference item: %s" ), reference ) );
|
||||
|
||||
Show( true );
|
||||
}
|
||||
|
|
|
@ -160,7 +160,7 @@ DIALOG_TEXT_PROPERTIES::DIALOG_TEXT_PROPERTIES( PCB_BASE_EDIT_FRAME* aParent, BO
|
|||
double rot_list[] = { 0.0, 90.0, -90.0, 180.0 };
|
||||
|
||||
for( size_t ii = 0; ii < m_OrientCtrl->GetCount() && ii < 4; ++ii )
|
||||
m_OrientCtrl->SetString( ii, wxString::Format( "%.1f", rot_list[ii] ) );
|
||||
m_OrientCtrl->SetString( ii, wxString::Format( wxT( "%.1f" ), rot_list[ii] ) );
|
||||
|
||||
// Set font sizes
|
||||
m_statusLine->SetFont( KIUI::GetInfoFont( this ) );
|
||||
|
@ -382,11 +382,11 @@ bool DIALOG_TEXT_PROPERTIES::TransferDataFromWindow()
|
|||
#ifdef __WXMAC__
|
||||
// On macOS CTRL+Enter produces '\r' instead of '\n' regardless of EOL setting.
|
||||
// Replace it now.
|
||||
txt.Replace( "\r", "\n" );
|
||||
txt.Replace( wxT( "\r" ), wxT( "\n" ) );
|
||||
#elif defined( __WINDOWS__ )
|
||||
// On Windows, a new line is coded as \r\n. We use only \n in kicad files and in
|
||||
// drawing routines so strip the \r char.
|
||||
txt.Replace( "\r", "" );
|
||||
txt.Replace( wxT( "\r" ), wxT( "" ) );
|
||||
#endif
|
||||
m_edaText->SetText( EscapeString( txt, CTX_QUOTED_STR ) );
|
||||
}
|
||||
|
|
|
@ -307,7 +307,8 @@ DIALOG_TRACK_VIA_PROPERTIES::DIALOG_TRACK_VIA_PROPERTIES( PCB_BASE_FRAME* aParen
|
|||
{
|
||||
VIA_DIMENSION* viaDimension = &aParent->GetDesignSettings().m_ViasDimensionsList[ii];
|
||||
wxString msg = StringFromValue( m_frame->GetUserUnits(), viaDimension->m_Diameter )
|
||||
+ " / " + StringFromValue( m_frame->GetUserUnits(), viaDimension->m_Drill );
|
||||
+ wxT( " / " )
|
||||
+ StringFromValue( m_frame->GetUserUnits(), viaDimension->m_Drill );
|
||||
m_DesignRuleViasCtrl->Append( msg, viaDimension );
|
||||
|
||||
if( viaSelection == wxNOT_FOUND
|
||||
|
@ -405,7 +406,8 @@ void DIALOG_TRACK_VIA_PROPERTIES::onUnitsChanged( wxCommandEvent& aEvent )
|
|||
{
|
||||
VIA_DIMENSION* viaDimension = &m_frame->GetDesignSettings().m_ViasDimensionsList[ii];
|
||||
wxString msg = StringFromValue( m_frame->GetUserUnits(), viaDimension->m_Diameter )
|
||||
+ " / " + StringFromValue( m_frame->GetUserUnits(), viaDimension->m_Drill );
|
||||
+ wxT( " / " )
|
||||
+ StringFromValue( m_frame->GetUserUnits(), viaDimension->m_Drill );
|
||||
m_DesignRuleViasCtrl->Append( msg, viaDimension );
|
||||
}
|
||||
|
||||
|
@ -618,7 +620,7 @@ bool DIALOG_TRACK_VIA_PROPERTIES::TransferDataFromWindow()
|
|||
switch( v->GetViaType() )
|
||||
{
|
||||
default:
|
||||
wxFAIL_MSG( "Unhandled via type" );
|
||||
wxFAIL_MSG( wxT( "Unhandled via type" ) );
|
||||
KI_FALLTHROUGH;
|
||||
|
||||
case VIATYPE::THROUGH:
|
||||
|
|
|
@ -242,7 +242,7 @@ void PANEL_FP_EDITOR_DEFAULTS::loadFPSettings( FOOTPRINT_EDITOR_SETTINGS* aCfg )
|
|||
SET_MILS_CELL( i, COL_TEXT_WIDTH, aCfg->m_DesignSettings.m_TextSize[ i ].x );
|
||||
SET_MILS_CELL( i, COL_TEXT_HEIGHT, aCfg->m_DesignSettings.m_TextSize[ i ].y );
|
||||
SET_MILS_CELL( i, COL_TEXT_THICKNESS, aCfg->m_DesignSettings.m_TextThickness[ i ] );
|
||||
m_graphicsGrid->SetCellValue( i, COL_TEXT_ITALIC, aCfg->m_DesignSettings.m_TextItalic[ i ] ? "1" : "" );
|
||||
m_graphicsGrid->SetCellValue( i, COL_TEXT_ITALIC, aCfg->m_DesignSettings.m_TextItalic[ i ] ? wxT( "1" ) : wxT( "" ) );
|
||||
|
||||
auto attr = new wxGridCellAttr;
|
||||
attr->SetRenderer( new wxGridCellBoolRenderer() );
|
||||
|
|
|
@ -108,8 +108,8 @@ static const std::map<int, SUPPORTED_FILE_TYPE>& fileTypes()
|
|||
{
|
||||
{ ID_PANEL_FPLIB_ADD_KICADMOD,
|
||||
{
|
||||
"KiCad (folder with .kicad_mod files)", "", KiCadFootprintFileExtension,
|
||||
false, IO_MGR::KICAD_SEXP
|
||||
wxT( "KiCad (folder with .kicad_mod files)" ), wxT( "" ),
|
||||
KiCadFootprintFileExtension, false, IO_MGR::KICAD_SEXP
|
||||
}
|
||||
},
|
||||
{ ID_PANEL_FPLIB_ADD_ALTIUM,
|
||||
|
@ -119,18 +119,20 @@ static const std::map<int, SUPPORTED_FILE_TYPE>& fileTypes()
|
|||
},
|
||||
{ ID_PANEL_FPLIB_ADD_EAGLE6,
|
||||
{
|
||||
"Eagle 6.x (*.lbr)", EagleFootprintLibPathWildcard(), "", true, IO_MGR::EAGLE
|
||||
wxT( "Eagle 6.x (*.lbr)" ), EagleFootprintLibPathWildcard(), wxT( "" ),
|
||||
true, IO_MGR::EAGLE
|
||||
}
|
||||
},
|
||||
{ ID_PANEL_FPLIB_ADD_KICADLEGACY,
|
||||
{
|
||||
"KiCad legacy (*.mod)", LegacyFootprintLibPathWildcard(), "", true, IO_MGR::LEGACY
|
||||
wxT( "KiCad legacy (*.mod)" ), LegacyFootprintLibPathWildcard(), wxT( "" ),
|
||||
true, IO_MGR::LEGACY
|
||||
}
|
||||
},
|
||||
{ ID_PANEL_FPLIB_ADD_GEDA,
|
||||
{
|
||||
"Geda (folder with *.fp files)", "", GedaPcbFootprintLibFileExtension, false,
|
||||
IO_MGR::GEDA_PCB
|
||||
wxT( "Geda (folder with *.fp files)" ), wxT( "" ),
|
||||
GedaPcbFootprintLibFileExtension, false, IO_MGR::GEDA_PCB
|
||||
}
|
||||
},
|
||||
};
|
||||
|
@ -318,7 +320,7 @@ protected:
|
|||
// paste the FP_LIB_TABLE_ROWs of s-expression (fp_lib_table), starting
|
||||
// at column 0 regardless of current cursor column.
|
||||
|
||||
STRING_LINE_READER slr( TO_UTF8( cb_text ), "Clipboard" );
|
||||
STRING_LINE_READER slr( TO_UTF8( cb_text ), wxT( "Clipboard" ) );
|
||||
LIB_TABLE_LEXER lexer( &slr );
|
||||
FP_LIB_TABLE tmp_tbl;
|
||||
bool parsed = true;
|
||||
|
@ -545,8 +547,8 @@ bool PANEL_FP_LIB_TABLE::verifyTables()
|
|||
wxYES_NO | wxCENTER | wxICON_QUESTION | wxYES_DEFAULT );
|
||||
badCellDlg.SetExtendedMessage( _( "Empty cells will result in all rows that are "
|
||||
"invalid to be removed from the table." ) );
|
||||
badCellDlg.SetYesNoLabels( wxMessageDialog::ButtonLabel( "Remove Invalid Cells" ),
|
||||
wxMessageDialog::ButtonLabel( "Cancel Table Update" ) );
|
||||
badCellDlg.SetYesNoLabels( wxMessageDialog::ButtonLabel( _( "Remove Invalid Cells" ) ),
|
||||
wxMessageDialog::ButtonLabel( _( "Cancel Table Update" ) ) );
|
||||
|
||||
if( badCellDlg.ShowModal() == wxID_NO )
|
||||
return false;
|
||||
|
@ -790,7 +792,8 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
|||
|
||||
if( fileTypeIt == fileTypes().end() )
|
||||
{
|
||||
wxLogWarning( "File type selection event received but could not find the file type in the table" );
|
||||
wxLogWarning( wxT( "File type selection event received but could not find the file type "
|
||||
"in the table" ) );
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -863,7 +866,7 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
|||
wxString detailedMsg = _( "The following directories could not be opened: \n" );
|
||||
|
||||
for( const wxString& path : failedDirs )
|
||||
detailedMsg << path << "\n";
|
||||
detailedMsg << path << wxT( "\n" );
|
||||
|
||||
DisplayErrorMessage( this, _( "Failed to open directories to look for libraries" ),
|
||||
detailedMsg );
|
||||
|
@ -930,7 +933,7 @@ void PANEL_FP_LIB_TABLE::browseLibrariesHandler( wxCommandEvent& event )
|
|||
|
||||
// Do not use the project path in the global library table. This will almost
|
||||
// assuredly be wrong for a different project.
|
||||
if( m_pageNdx == 0 && path.Contains( "${KIPRJMOD}" ) )
|
||||
if( m_pageNdx == 0 && path.Contains( wxT( "${KIPRJMOD}" ) ) )
|
||||
path = fn.GetFullPath();
|
||||
|
||||
m_cur_grid->SetCellValue( last_row, COL_URI, path );
|
||||
|
|
|
@ -84,7 +84,7 @@ PANEL_FP_PROPERTIES_3D_MODEL::PANEL_FP_PROPERTIES_3D_MODEL(
|
|||
// Filename
|
||||
attr = new wxGridCellAttr;
|
||||
attr->SetEditor( new GRID_CELL_PATH_EDITOR( m_parentDialog, m_modelsGrid, &cfg->m_lastFootprint3dDir,
|
||||
"*.*", true, m_frame->Prj().GetProjectPath() ) );
|
||||
wxT( "*.*" ), true, m_frame->Prj().GetProjectPath() ) );
|
||||
m_modelsGrid->SetColAttr( COL_FILENAME, attr );
|
||||
|
||||
// Show checkbox
|
||||
|
@ -217,9 +217,9 @@ void PANEL_FP_PROPERTIES_3D_MODEL::On3DModelCellChanged( wxGridEvent& aEvent )
|
|||
// Perform cleanup and validation on the filename if it isn't empty
|
||||
if( !filename.empty() )
|
||||
{
|
||||
filename.Replace( "\n", "" );
|
||||
filename.Replace( "\r", "" );
|
||||
filename.Replace( "\t", "" );
|
||||
filename.Replace( wxT( "\n" ), wxT( "" ) );
|
||||
filename.Replace( wxT( "\r" ), wxT( "" ) );
|
||||
filename.Replace( wxT( "\t" ), wxT( "" ) );
|
||||
|
||||
res->ValidateFileName( filename, hasAlias );
|
||||
|
||||
|
@ -289,7 +289,7 @@ void PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel( wxCommandEvent& )
|
|||
// variable and fall back to the project path if necessary.
|
||||
if( initialpath.IsEmpty() )
|
||||
{
|
||||
if( !wxGetEnv( "KICAD6_3DMODEL_DIR", &initialpath ) || initialpath.IsEmpty() )
|
||||
if( !wxGetEnv( wxT( "KICAD6_3DMODEL_DIR" ), &initialpath ) || initialpath.IsEmpty() )
|
||||
initialpath = prj.GetProjectPath();
|
||||
}
|
||||
|
||||
|
@ -323,7 +323,7 @@ void PANEL_FP_PROPERTIES_3D_MODEL::OnAdd3DModel( wxCommandEvent& )
|
|||
|
||||
#ifdef __WINDOWS__
|
||||
// In KiCad files, filenames and paths are stored using Unix notation
|
||||
model.m_Filename.Replace( "\\", "/" );
|
||||
model.m_Filename.Replace( wxT( "\\" ), wxT( "/" ) );
|
||||
#endif
|
||||
|
||||
model.m_Show = true;
|
||||
|
|
|
@ -482,7 +482,7 @@ void PANEL_PCBNEW_COLOR_SETTINGS::createPreviewItems()
|
|||
m_page->SetHeightMils( 5000 );
|
||||
m_page->SetWidthMils( 6000 );
|
||||
|
||||
STRING_LINE_READER reader( g_previewBoard, "preview" );
|
||||
STRING_LINE_READER reader( g_previewBoard, wxT( "preview" ) );
|
||||
PCB_PLUGIN pi;
|
||||
|
||||
try
|
||||
|
|
|
@ -459,7 +459,7 @@ bool PANEL_SETUP_LAYERS::TransferDataFromWindow()
|
|||
if( !notremovableLayers.empty() )
|
||||
{
|
||||
for( unsigned int ii = 0; ii < notremovableLayers.size(); ii++ )
|
||||
msg << m_pcb->GetLayerName( notremovableLayers[ii] ) << "\n";
|
||||
msg << m_pcb->GetLayerName( notremovableLayers[ii] ) << wxT( "\n" );
|
||||
|
||||
if( !IsOK( this, wxString::Format( _( "Footprints have some items on removed layers:\n"
|
||||
"%s\n"
|
||||
|
|
|
@ -181,7 +181,7 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
int lineStart = m_textEditor->PositionFromLine( line );
|
||||
wxString beginning = m_textEditor->GetTextRange( lineStart, lineStart + 10 );
|
||||
|
||||
if( beginning.StartsWith( "(rule " ) )
|
||||
if( beginning.StartsWith( wxT( "(rule " ) ) )
|
||||
{
|
||||
startPos = lineStart;
|
||||
break;
|
||||
|
@ -201,15 +201,15 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
auto isDisallowToken =
|
||||
[]( const wxString& token ) -> bool
|
||||
{
|
||||
return token == "buried_via"
|
||||
|| token == "graphic"
|
||||
|| token == "hole"
|
||||
|| token == "micro_via"
|
||||
|| token == "pad"
|
||||
|| token == "text"
|
||||
|| token == "track"
|
||||
|| token == "via"
|
||||
|| token == "zone";
|
||||
return token == wxT( "buried_via" )
|
||||
|| token == wxT( "graphic" )
|
||||
|| token == wxT( "hole" )
|
||||
|| token == wxT( "micro_via" )
|
||||
|| token == wxT( "pad" )
|
||||
|| token == wxT( "text" )
|
||||
|| token == wxT( "track" )
|
||||
|| token == wxT( "via" )
|
||||
|| token == wxT( "zone" );
|
||||
};
|
||||
|
||||
std::stack<wxString> sexprs;
|
||||
|
@ -277,11 +277,11 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
}
|
||||
else if( c == ')' )
|
||||
{
|
||||
while( !sexprs.empty() && ( sexprs.top() == "assertion"
|
||||
|| sexprs.top() == "disallow"
|
||||
while( !sexprs.empty() && ( sexprs.top() == wxT( "assertion" )
|
||||
|| sexprs.top() == wxT( "disallow" )
|
||||
|| isDisallowToken( sexprs.top() )
|
||||
|| sexprs.top() == "min_resolved_spokes"
|
||||
|| sexprs.top() == "zone_connection" ) )
|
||||
|| sexprs.top() == wxT( "min_resolved_spokes" )
|
||||
|| sexprs.top() == wxT( "zone_connection" ) ) )
|
||||
{
|
||||
sexprs.pop();
|
||||
}
|
||||
|
@ -293,10 +293,10 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
}
|
||||
else if( c == ' ' )
|
||||
{
|
||||
if( context == SEXPR_OPEN && ( partial == "constraint"
|
||||
|| partial == "disallow"
|
||||
|| partial == "layer"
|
||||
|| partial == "severity" ) )
|
||||
if( context == SEXPR_OPEN && ( partial == wxT( "constraint" )
|
||||
|| partial == wxT( "disallow" )
|
||||
|| partial == wxT( "layer" )
|
||||
|| partial == wxT( "severity" ) ) )
|
||||
{
|
||||
m_textEditor->AutoCompCancel();
|
||||
sexprs.push( partial );
|
||||
|
@ -305,10 +305,10 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
context = SEXPR_TOKEN;
|
||||
continue;
|
||||
}
|
||||
else if( partial == "disallow"
|
||||
else if( partial == wxT( "disallow" )
|
||||
|| isDisallowToken( partial )
|
||||
|| partial == "min_resolved_spokes"
|
||||
|| partial == "zone_connection" )
|
||||
|| partial == wxT( "min_resolved_spokes" )
|
||||
|| partial == wxT( "zone_connection" ) )
|
||||
{
|
||||
m_textEditor->AutoCompCancel();
|
||||
sexprs.push( partial );
|
||||
|
@ -317,9 +317,9 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
context = SEXPR_TOKEN;
|
||||
continue;
|
||||
}
|
||||
else if( partial == "rule"
|
||||
|| partial == "assertion"
|
||||
|| partial == "condition" )
|
||||
else if( partial == wxT( "rule" )
|
||||
|| partial == wxT( "assertion" )
|
||||
|| partial == wxT( "condition" ) )
|
||||
{
|
||||
m_textEditor->AutoCompCancel();
|
||||
sexprs.push( partial );
|
||||
|
@ -343,19 +343,19 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
{
|
||||
if( sexprs.empty() )
|
||||
{
|
||||
tokens = "rule|"
|
||||
"version";
|
||||
tokens = wxT( "rule|"
|
||||
"version" );
|
||||
}
|
||||
else if( sexprs.top() == "rule" )
|
||||
else if( sexprs.top() == wxT( "rule" ) )
|
||||
{
|
||||
tokens = "condition|"
|
||||
tokens = wxT( "condition|"
|
||||
"constraint|"
|
||||
"layer|"
|
||||
"severity";
|
||||
"severity" );
|
||||
}
|
||||
else if( sexprs.top() == "constraint" )
|
||||
else if( sexprs.top() == wxT( "constraint" ) )
|
||||
{
|
||||
tokens = "max|min|opt";
|
||||
tokens = wxT( "max|min|opt" );
|
||||
}
|
||||
}
|
||||
else if( context == SEXPR_TOKEN )
|
||||
|
@ -364,9 +364,9 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
{
|
||||
/* badly formed grammar */
|
||||
}
|
||||
else if( sexprs.top() == "constraint" )
|
||||
else if( sexprs.top() == wxT( "constraint" ) )
|
||||
{
|
||||
tokens = "annular_width|"
|
||||
tokens = wxT( "annular_width|"
|
||||
"assertion|"
|
||||
"clearance|"
|
||||
"courtyard_clearance|"
|
||||
|
@ -390,11 +390,11 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
"track_width|"
|
||||
"via_count|"
|
||||
"via_diameter|"
|
||||
"zone_connection";
|
||||
"zone_connection" );
|
||||
}
|
||||
else if( sexprs.top() == "disallow" || isDisallowToken( sexprs.top() ) )
|
||||
else if( sexprs.top() == wxT( "disallow" ) || isDisallowToken( sexprs.top() ) )
|
||||
{
|
||||
tokens = "buried_via|"
|
||||
tokens = wxT( "buried_via|"
|
||||
"graphic|"
|
||||
"hole|"
|
||||
"micro_via|"
|
||||
|
@ -402,32 +402,32 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
"text|"
|
||||
"track|"
|
||||
"via|"
|
||||
"zone";
|
||||
"zone" );
|
||||
}
|
||||
else if( sexprs.top() == "zone_connection" )
|
||||
else if( sexprs.top() == wxT( "zone_connection" ) )
|
||||
{
|
||||
tokens = "none|solid|thermal_relief";
|
||||
tokens = wxT( "none|solid|thermal_relief" );
|
||||
}
|
||||
else if( sexprs.top() == "min_resolved_spokes" )
|
||||
else if( sexprs.top() == wxT( "min_resolved_spokes" ) )
|
||||
{
|
||||
tokens = "0|1|2|3|4";
|
||||
tokens = wxT( "0|1|2|3|4" );
|
||||
}
|
||||
else if( sexprs.top() == "layer" )
|
||||
else if( sexprs.top() == wxT( "layer" ) )
|
||||
{
|
||||
tokens = "inner|outer|\"x\"";
|
||||
tokens = wxT( "inner|outer|\"x\"" );
|
||||
}
|
||||
else if( sexprs.top() == "severity" )
|
||||
else if( sexprs.top() == wxT( "severity" ) )
|
||||
{
|
||||
tokens = "warning|error|ignore|exclusion";
|
||||
tokens = wxT( "warning|error|ignore|exclusion" );
|
||||
}
|
||||
}
|
||||
else if( context == SEXPR_STRING && !sexprs.empty()
|
||||
&& ( sexprs.top() == "condition" || sexprs.top() == "assertion" ) )
|
||||
&& ( sexprs.top() == wxT( "condition" ) || sexprs.top() == wxT( "assertion" ) ) )
|
||||
{
|
||||
m_textEditor->AddText( "\"" );
|
||||
m_textEditor->AddText( wxT( "\"" ) );
|
||||
}
|
||||
else if( context == STRING && !sexprs.empty()
|
||||
&& ( sexprs.top() == "condition" || sexprs.top() == "assertion" ) )
|
||||
&& ( sexprs.top() == wxT( "condition" ) || sexprs.top() == wxT( "assertion" ) ) )
|
||||
{
|
||||
if( expr_context == STRUCT_REF )
|
||||
{
|
||||
|
@ -441,18 +441,18 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
for( PROPERTY_BASE* prop : props )
|
||||
{
|
||||
wxString ref( prop->Name() );
|
||||
ref.Replace( " ", "_" );
|
||||
ref.Replace( wxT( " " ), wxT( "_" ) );
|
||||
propNames.insert( ref );
|
||||
}
|
||||
}
|
||||
|
||||
for( const wxString& propName : propNames )
|
||||
tokens += "|" + propName;
|
||||
tokens += wxT( "|" ) + propName;
|
||||
|
||||
PCB_EXPR_BUILTIN_FUNCTIONS& functions = PCB_EXPR_BUILTIN_FUNCTIONS::Instance();
|
||||
|
||||
for( const wxString& funcSig : functions.GetSignatures() )
|
||||
tokens += "|" + funcSig;
|
||||
tokens += wxT( "|" ) + funcSig;
|
||||
}
|
||||
else if( expr_context == STRING )
|
||||
{
|
||||
|
@ -462,18 +462,18 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
BOARD_DESIGN_SETTINGS& bds = board->GetDesignSettings();
|
||||
|
||||
for( const std::pair<const wxString, NETCLASSPTR>& entry : bds.GetNetClasses() )
|
||||
tokens += "|" + entry.first;
|
||||
tokens += wxT( "|" ) + entry.first;
|
||||
}
|
||||
else if( m_netNameRegex.Matches( last ) )
|
||||
{
|
||||
BOARD* board = m_frame->GetBoard();
|
||||
|
||||
for( const wxString& netnameCandidate : board->GetNetClassAssignmentCandidates() )
|
||||
tokens += "|" + netnameCandidate;
|
||||
tokens += wxT( "|" ) + netnameCandidate;
|
||||
}
|
||||
else if( m_typeRegex.Matches( last ) )
|
||||
{
|
||||
tokens = "Dimension|"
|
||||
tokens = wxT( "Dimension|"
|
||||
"Footprint|"
|
||||
"Graphic|"
|
||||
"Group|"
|
||||
|
@ -483,18 +483,18 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
"Text|"
|
||||
"Track|"
|
||||
"Via|"
|
||||
"Zone";
|
||||
"Zone" );
|
||||
}
|
||||
else if( m_padTypeRegex.Matches( last ) )
|
||||
{
|
||||
tokens = "Through-hole|"
|
||||
tokens = wxT( "Through-hole|"
|
||||
"SMD|"
|
||||
"Edge connector|"
|
||||
"NPTH, mechanical";
|
||||
"NPTH, mechanical" );
|
||||
}
|
||||
else if( m_pinTypeRegex.Matches( last ) )
|
||||
{
|
||||
tokens = "Input|"
|
||||
tokens = wxT( "Input|"
|
||||
"Output|"
|
||||
"Bidirectional|"
|
||||
"Tri-state|"
|
||||
|
@ -505,17 +505,17 @@ void PANEL_SETUP_RULES::onScintillaCharAdded( wxStyledTextEvent &aEvent )
|
|||
"Power output|"
|
||||
"Open collector|"
|
||||
"Open emitter|"
|
||||
"Unconnected";
|
||||
"Unconnected" );
|
||||
}
|
||||
else if( m_fabPropRegex.Matches( last ) )
|
||||
{
|
||||
tokens = "None|"
|
||||
tokens = wxT( "None|"
|
||||
"BGA pad|"
|
||||
"Fiducial, global to board|"
|
||||
"Fiducial, local to footprint|"
|
||||
"Test point pad|"
|
||||
"Heatsink pad|"
|
||||
"Castellated pad";
|
||||
"Castellated pad" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -539,7 +539,7 @@ void PANEL_SETUP_RULES::OnCompile( wxCommandEvent& event )
|
|||
}
|
||||
catch( PARSE_ERROR& pe )
|
||||
{
|
||||
wxString msg = wxString::Format( "%s <a href='%d:%d'>%s</a>%s",
|
||||
wxString msg = wxString::Format( wxT( "%s <a href='%d:%d'>%s</a>%s" ),
|
||||
_( "ERROR:" ),
|
||||
pe.lineNumber,
|
||||
pe.byteIndex,
|
||||
|
@ -651,7 +651,7 @@ void PANEL_SETUP_RULES::OnSyntaxHelp( wxHyperlinkEvent& aEvent )
|
|||
;
|
||||
|
||||
#ifdef __WXMAC__
|
||||
msg.Replace( "Ctrl+", "Cmd+" );
|
||||
msg.Replace( wxT( "Ctrl+" ), wxT( "Cmd+" ) );
|
||||
#endif
|
||||
|
||||
m_helpWindow = new HTML_MESSAGE_BOX( nullptr, _( "Syntax Help" ) );
|
||||
|
|
|
@ -76,7 +76,7 @@ PANEL_SETUP_TEXT_AND_GRAPHICS::PANEL_SETUP_TEXT_AND_GRAPHICS( PAGED_DIALOG* aPar
|
|||
// Gives a suitable size to m_grid columns
|
||||
// The default wxWidget col size is not very good
|
||||
// Calculate a min best size to handle longest usual numeric values:
|
||||
int min_best_width = m_grid->GetTextExtent( "555,555555 mils" ).x;
|
||||
int min_best_width = m_grid->GetTextExtent( wxT( "555,555555 mils" ) ).x;
|
||||
|
||||
for( int i = 0; i < m_grid->GetNumberCols(); ++i )
|
||||
{
|
||||
|
@ -148,8 +148,8 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataToWindow()
|
|||
SET_MILS_CELL( i, COL_TEXT_WIDTH, m_BrdSettings->m_TextSize[ i ].x );
|
||||
SET_MILS_CELL( i, COL_TEXT_HEIGHT, m_BrdSettings->m_TextSize[ i ].y );
|
||||
SET_MILS_CELL( i, COL_TEXT_THICKNESS, m_BrdSettings->m_TextThickness[ i ] );
|
||||
m_grid->SetCellValue( i, COL_TEXT_ITALIC, m_BrdSettings->m_TextItalic[ i ] ? "1" : "" );
|
||||
m_grid->SetCellValue( i, COL_TEXT_UPRIGHT, m_BrdSettings->m_TextUpright[ i ] ? "1" : "" );
|
||||
m_grid->SetCellValue( i, COL_TEXT_ITALIC, m_BrdSettings->m_TextItalic[ i ] ? wxT( "1" ) : wxT( "" ) );
|
||||
m_grid->SetCellValue( i, COL_TEXT_UPRIGHT, m_BrdSettings->m_TextUpright[ i ] ? wxT( "1" ) : wxT( "" ) );
|
||||
|
||||
auto attr = new wxGridCellAttr;
|
||||
attr->SetRenderer( new wxGridCellBoolRenderer() );
|
||||
|
@ -173,7 +173,8 @@ bool PANEL_SETUP_TEXT_AND_GRAPHICS::TransferDataToWindow()
|
|||
|
||||
Layout();
|
||||
|
||||
wxASSERT_MSG( m_BrdSettings->m_DimensionPrecision <= 4, "Unhandled dimension precision!" );
|
||||
wxASSERT_MSG( m_BrdSettings->m_DimensionPrecision <= 4,
|
||||
wxT( "Unhandled dimension precision!" ) );
|
||||
|
||||
int mode = static_cast<int>( m_BrdSettings->m_DimensionUnitsMode );
|
||||
m_dimensionUnits->SetSelection( mode );
|
||||
|
|
|
@ -86,7 +86,7 @@ PANEL_SETUP_TRACKS_AND_VIAS::PANEL_SETUP_TRACKS_AND_VIAS( PAGED_DIALOG* aParent,
|
|||
|
||||
// Ensure width of columns is enough to enter any reasonable value
|
||||
WX_GRID* grid_list[] = { m_trackWidthsGrid, m_viaSizesGrid, m_diffPairsGrid, nullptr };
|
||||
int min_linesize = m_trackWidthsGrid->GetTextExtent( "000.000000 mm " ).x;
|
||||
int min_linesize = m_trackWidthsGrid->GetTextExtent( wxT( "000.000000 mm " ) ).x;
|
||||
|
||||
for( int ii = 0; grid_list[ii]; ii++ )
|
||||
{
|
||||
|
|
|
@ -115,7 +115,7 @@ void PCB_EDIT_FRAME::Edit_Zone_Params( ZONE* aZone )
|
|||
|
||||
if( zone == nullptr )
|
||||
{
|
||||
wxASSERT_MSG( false, "Expected a zone after zone properties edit" );
|
||||
wxASSERT_MSG( false, wxT( "Expected a zone after zone properties edit" ) );
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -142,7 +142,7 @@ bool AskLoadBoardFileName( PCB_EDIT_FRAME* aParent, int* aCtl, wxString* aFileNa
|
|||
}
|
||||
|
||||
fileFilters = _( "All KiCad Board Files" ) + AddFileExtListToFilter( fileExtensions )
|
||||
+ "|" + fileFilters;
|
||||
+ wxT( "|" ) + fileFilters;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -157,11 +157,10 @@ bool AskLoadBoardFileName( PCB_EDIT_FRAME* aParent, int* aCtl, wxString* aFileNa
|
|||
|
||||
PLUGIN::RELEASER plugin( IO_MGR::PluginFind( loaders[ii].pluginType ) );
|
||||
wxCHECK( plugin, false );
|
||||
allWildcards += "*." + formatWildcardExt( plugin->GetFileExtension() ) + ";";
|
||||
allWildcards += wxT( "*." ) + formatWildcardExt( plugin->GetFileExtension() ) + wxT( ";" );
|
||||
}
|
||||
|
||||
fileFilters = _( "All supported formats|" ) + allWildcards
|
||||
+ "|" + fileFilters;
|
||||
fileFilters = _( "All supported formats|" ) + allWildcards + wxT( "|" ) + fileFilters;
|
||||
}
|
||||
|
||||
|
||||
|
@ -751,7 +750,7 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
SetBoard( loadedBoard, false, &progressReporter );
|
||||
|
||||
if( GFootprintList.GetCount() == 0 )
|
||||
GFootprintList.ReadCacheFromFile( Prj().GetProjectPath() + "fp-info-cache" );
|
||||
GFootprintList.ReadCacheFromFile( Prj().GetProjectPath() + wxT( "fp-info-cache" ) );
|
||||
|
||||
if( loadedBoard->m_LegacyDesignSettingsLoaded )
|
||||
{
|
||||
|
@ -798,7 +797,7 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
if( ( pluginType == IO_MGR::LEGACY )
|
||||
|| ( pluginType == IO_MGR::KICAD_SEXP
|
||||
&& loadedBoard->GetFileFormatVersionAtLoad() < SEXPR_BOARD_FILE_VERSION
|
||||
&& loadedBoard->GetGenerator().Lower() != "gerbview" ) )
|
||||
&& loadedBoard->GetGenerator().Lower() != wxT( "gerbview" ) ) )
|
||||
{
|
||||
m_infoBar->RemoveAllButtons();
|
||||
m_infoBar->AddCloseButton();
|
||||
|
@ -853,11 +852,13 @@ bool PCB_EDIT_FRAME::OpenProjectFiles( const std::vector<wxString>& aFileSet, in
|
|||
const wxString& project_env = PROJECT_VAR_NAME;
|
||||
wxString rel_path, env_path;
|
||||
|
||||
wxASSERT_MSG( wxGetEnv( project_env, &env_path ), "There is no project variable?" );
|
||||
wxASSERT_MSG( wxGetEnv( project_env, &env_path ),
|
||||
wxT( "There is no project variable?" ) );
|
||||
|
||||
wxString result( newLibPath );
|
||||
rel_path = result.Replace( env_path, wxString( "$(" + project_env + ")" ) ) ? result
|
||||
: "";
|
||||
rel_path = result.Replace( env_path, wxT( "$(" ) + project_env + wxT( ")" ) )
|
||||
? result
|
||||
: wxEmptyString;
|
||||
|
||||
FP_LIB_TABLE_ROW* row = new FP_LIB_TABLE_ROW( libNickName, rel_path,
|
||||
wxT( "KiCad" ), wxEmptyString );
|
||||
|
@ -1198,7 +1199,8 @@ bool PCB_EDIT_FRAME::doAutoSave()
|
|||
return false;
|
||||
}
|
||||
|
||||
wxLogTrace( traceAutoSave, "Creating auto save file <" + autoSaveFileName.GetFullPath() + ">" );
|
||||
wxLogTrace( traceAutoSave,
|
||||
wxT( "Creating auto save file <" ) + autoSaveFileName.GetFullPath() + wxT( ">" ) );
|
||||
|
||||
if( SavePcbFile( autoSaveFileName.GetFullPath(), false, false ) )
|
||||
{
|
||||
|
|
|
@ -562,7 +562,7 @@ void FOOTPRINT::Remove( BOARD_ITEM* aBoardItem, REMOVE_MODE aMode )
|
|||
case PCB_FP_TEXT_T:
|
||||
// Only user text can be removed this way.
|
||||
wxCHECK_RET( static_cast<FP_TEXT*>( aBoardItem )->GetType() == FP_TEXT::TEXT_is_DIVERS,
|
||||
"Please report this bug: Invalid remove operation on required text" );
|
||||
wxT( "Please report this bug: Invalid remove operation on required text" ) );
|
||||
KI_FALLTHROUGH;
|
||||
|
||||
case PCB_FP_DIM_ALIGNED_T:
|
||||
|
@ -990,7 +990,8 @@ void FOOTPRINT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
|
|||
|
||||
aList.emplace_back( _( "Status: " ) + status, _( "Attributes:" ) + wxS( " " ) + attrs );
|
||||
|
||||
aList.emplace_back( _( "Rotation" ), wxString::Format( "%.4g", GetOrientation().AsDegrees() ) );
|
||||
aList.emplace_back( _( "Rotation" ), wxString::Format( wxT( "%.4g" ),
|
||||
GetOrientation().AsDegrees() ) );
|
||||
|
||||
msg.Printf( _( "Footprint: %s" ), m_fpid.GetUniStringLibId() );
|
||||
msg2.Printf( _( "3D-Shape: %s" ), m_3D_Drawings.empty() ? _( "<none>" )
|
||||
|
@ -1345,7 +1346,7 @@ void FOOTPRINT::RunOnChildren( const std::function<void ( BOARD_ITEM*)>& aFuncti
|
|||
}
|
||||
catch( std::bad_function_call& )
|
||||
{
|
||||
wxFAIL_MSG( "Error running FOOTPRINT::RunOnChildren" );
|
||||
wxFAIL_MSG( wxT( "Error running FOOTPRINT::RunOnChildren" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1385,8 +1386,8 @@ void FOOTPRINT::ViewGetLayers( int aLayers[], int& aCount ) const
|
|||
switch( m_layer )
|
||||
{
|
||||
default:
|
||||
wxASSERT_MSG( false, "Illegal layer" ); // do you really have footprints placed on
|
||||
// other layers?
|
||||
wxASSERT_MSG( false, wxT( "Illegal layer" ) ); // do you really have footprints placed
|
||||
// on other layers?
|
||||
KI_FALLTHROUGH;
|
||||
|
||||
case F_Cu:
|
||||
|
@ -1883,7 +1884,7 @@ BOARD_ITEM* FOOTPRINT::DuplicateItem( const BOARD_ITEM* aItem, bool aAddToFootpr
|
|||
|
||||
default:
|
||||
// Un-handled item for duplication
|
||||
wxFAIL_MSG( "Duplication not supported for items of class " + aItem->GetClass() );
|
||||
wxFAIL_MSG( wxT( "Duplication not supported for items of class " ) + aItem->GetClass() );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1904,10 +1905,10 @@ wxString FOOTPRINT::GetNextPadNumber( const wxString& aLastPadNumber ) const
|
|||
wxString prefix = UTIL::GetRefDesPrefix( aLastPadNumber );
|
||||
int num = GetTrailingInt( aLastPadNumber );
|
||||
|
||||
while( usedNumbers.count( wxString::Format( "%s%d", prefix, num ) ) )
|
||||
while( usedNumbers.count( wxString::Format( wxT( "%s%d" ), prefix, num ) ) )
|
||||
num++;
|
||||
|
||||
return wxString::Format( "%s%d", prefix, num );
|
||||
return wxString::Format( wxT( "%s%d" ), prefix, num );
|
||||
}
|
||||
|
||||
|
||||
|
@ -2197,7 +2198,7 @@ void FOOTPRINT::CheckFootprintAttributes( const std::function<void( const wxStri
|
|||
msg.Printf( _( "Expected \"Other\" type but set to \"%s\"" ), GetTypeName() );
|
||||
}
|
||||
|
||||
msg = "(" + msg + ")";
|
||||
msg = wxT( "(" ) + msg + wxT( ")" );
|
||||
|
||||
(*aErrorHandler)( msg );
|
||||
}
|
||||
|
|
|
@ -521,7 +521,7 @@ BOARD_DESIGN_SETTINGS& FOOTPRINT_EDIT_FRAME::GetDesignSettings() const
|
|||
|
||||
const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const
|
||||
{
|
||||
wxFAIL_MSG( "Plotting not supported in Footprint Editor" );
|
||||
wxFAIL_MSG( wxT( "Plotting not supported in Footprint Editor" ) );
|
||||
|
||||
return PCB_BASE_FRAME::GetPlotSettings();
|
||||
}
|
||||
|
@ -529,7 +529,7 @@ const PCB_PLOT_PARAMS& FOOTPRINT_EDIT_FRAME::GetPlotSettings() const
|
|||
|
||||
void FOOTPRINT_EDIT_FRAME::SetPlotSettings( const PCB_PLOT_PARAMS& aSettings )
|
||||
{
|
||||
wxFAIL_MSG( "Plotting not supported in Footprint Editor" );
|
||||
wxFAIL_MSG( wxT( "Plotting not supported in Footprint Editor" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -721,8 +721,8 @@ void FOOTPRINT_EDIT_FRAME::doCloseWindow()
|
|||
// Do not show the layer manager during closing to avoid flicker
|
||||
// on some platforms (Windows) that generate useless redraw of items in
|
||||
// the Layer Manager
|
||||
m_auimgr.GetPane( "LayersManager" ).Show( false );
|
||||
m_auimgr.GetPane( "SelectionFilter" ).Show( false );
|
||||
m_auimgr.GetPane( wxT( "LayersManager" ) ).Show( false );
|
||||
m_auimgr.GetPane( wxT( "SelectionFilter" ) ).Show( false );
|
||||
|
||||
Clear_Pcb( false );
|
||||
|
||||
|
@ -730,7 +730,7 @@ void FOOTPRINT_EDIT_FRAME::doCloseWindow()
|
|||
|
||||
if( mgr->IsProjectOpen() && wxFileName::IsDirWritable( Prj().GetProjectPath() ) )
|
||||
{
|
||||
GFootprintList.WriteCacheToFile( Prj().GetProjectPath() + "fp-info-cache" );
|
||||
GFootprintList.WriteCacheToFile( Prj().GetProjectPath() + wxT( "fp-info-cache" ) );
|
||||
}
|
||||
|
||||
mgr->FlushAndRelease( GetSettings() );
|
||||
|
@ -818,7 +818,7 @@ void FOOTPRINT_EDIT_FRAME::OnModify()
|
|||
Update3DView( true, true );
|
||||
m_treePane->GetLibTree()->RefreshLibTree();
|
||||
|
||||
if( !GetTitle().StartsWith( "*" ) )
|
||||
if( !GetTitle().StartsWith( wxT( "*" ) ) )
|
||||
UpdateTitle();
|
||||
}
|
||||
|
||||
|
@ -836,8 +836,9 @@ void FOOTPRINT_EDIT_FRAME::UpdateTitle()
|
|||
title = wxT( "*" );
|
||||
|
||||
title += footprint->GetReference();
|
||||
title += wxS( " " ) + wxString::Format( _( "[from %s]" ),
|
||||
Prj().GetProjectName() + "." + PcbFileExtension );
|
||||
title += wxS( " " ) + wxString::Format( _( "[from %s]" ), Prj().GetProjectName()
|
||||
+ wxT( "." )
|
||||
+ PcbFileExtension );
|
||||
}
|
||||
else if( fpid.IsValid() )
|
||||
{
|
||||
|
@ -901,7 +902,7 @@ void FOOTPRINT_EDIT_FRAME::initLibraryTree()
|
|||
WX_PROGRESS_REPORTER progressReporter( this, _( "Loading Footprint Libraries" ), 2 );
|
||||
|
||||
if( GFootprintList.GetCount() == 0 )
|
||||
GFootprintList.ReadCacheFromFile( Prj().GetProjectPath() + "fp-info-cache" );
|
||||
GFootprintList.ReadCacheFromFile( Prj().GetProjectPath() + wxT( "fp-info-cache" ) );
|
||||
|
||||
GFootprintList.ReadFootprintFiles( fpTable, nullptr, &progressReporter );
|
||||
progressReporter.Show( false );
|
||||
|
@ -1225,7 +1226,7 @@ void FOOTPRINT_EDIT_FRAME::OnSaveFootprintAsPng( wxCommandEvent& event )
|
|||
}
|
||||
|
||||
wxFileName fn( id.GetLibItemName() );
|
||||
fn.SetExt( "png" );
|
||||
fn.SetExt( wxT( "png" ) );
|
||||
|
||||
wxString projectPath = wxPathOnly( Prj().GetProjectFullName() );
|
||||
|
||||
|
|
|
@ -246,7 +246,7 @@ void FOOTPRINT_EDIT_FRAME::OnEditItemRequest( BOARD_ITEM* aItem )
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "FOOTPRINT_EDIT_FRAME::OnEditItemRequest: unsupported item type "
|
||||
wxFAIL_MSG( wxT( "FOOTPRINT_EDIT_FRAME::OnEditItemRequest: unsupported item type " )
|
||||
+ aItem->GetClass() );
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -375,7 +375,7 @@ void FOOTPRINT_LIST_IMPL::WriteCacheToFile( const wxString& aFilePath )
|
|||
return;
|
||||
}
|
||||
|
||||
txtStream << wxString::Format( "%lld", m_list_timestamp ) << endl;
|
||||
txtStream << wxString::Format( wxT( "%lld" ), m_list_timestamp ) << endl;
|
||||
|
||||
for( std::unique_ptr<FOOTPRINT_INFO>& fpinfo : m_list )
|
||||
{
|
||||
|
@ -383,9 +383,9 @@ void FOOTPRINT_LIST_IMPL::WriteCacheToFile( const wxString& aFilePath )
|
|||
txtStream << fpinfo->GetName() << endl;
|
||||
txtStream << EscapeString( fpinfo->GetDescription(), CTX_LINE ) << endl;
|
||||
txtStream << EscapeString( fpinfo->GetKeywords(), CTX_LINE ) << endl;
|
||||
txtStream << wxString::Format( "%d", fpinfo->GetOrderNum() ) << endl;
|
||||
txtStream << wxString::Format( "%u", fpinfo->GetPadCount() ) << endl;
|
||||
txtStream << wxString::Format( "%u", fpinfo->GetUniquePadCount() ) << endl;
|
||||
txtStream << wxString::Format( wxT( "%d" ), fpinfo->GetOrderNum() ) << endl;
|
||||
txtStream << wxString::Format( wxT( "%u" ), fpinfo->GetPadCount() ) << endl;
|
||||
txtStream << wxString::Format( wxT( "%u" ), fpinfo->GetUniquePadCount() ) << endl;
|
||||
}
|
||||
|
||||
txtStream.Flush();
|
||||
|
|
|
@ -477,7 +477,7 @@ void FOOTPRINT_VIEWER_FRAME::ReCreateFootprintList()
|
|||
|
||||
for( const std::unique_ptr<FOOTPRINT_INFO>& footprint : fp_info_list->GetList() )
|
||||
{
|
||||
wxString search = footprint->GetFootprintName() + " " + footprint->GetSearchText();
|
||||
wxString search = footprint->GetFootprintName() + wxS( " " ) + footprint->GetSearchText();
|
||||
bool matched = matcher.Find( search.Lower(), matches, position );
|
||||
|
||||
if( !matched && term.IsNumber() )
|
||||
|
@ -805,7 +805,7 @@ void FOOTPRINT_VIEWER_FRAME::SaveSettings( APP_SETTINGS_BASE* aCfg )
|
|||
WINDOW_SETTINGS* FOOTPRINT_VIEWER_FRAME::GetWindowSettings( APP_SETTINGS_BASE* aCfg )
|
||||
{
|
||||
PCBNEW_SETTINGS* cfg = dynamic_cast<PCBNEW_SETTINGS*>( aCfg );
|
||||
wxCHECK_MSG( cfg, nullptr, "config not existing" );
|
||||
wxCHECK_MSG( cfg, nullptr, wxT( "config not existing" ) );
|
||||
|
||||
return &cfg->m_FootprintViewer;
|
||||
}
|
||||
|
@ -972,8 +972,8 @@ void FOOTPRINT_VIEWER_FRAME::OnIterateFootprintList( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
default:
|
||||
wxString id = wxString::Format( "%i", event.GetId() );
|
||||
wxFAIL_MSG( "FOOTPRINT_VIEWER_FRAME::OnIterateFootprintList error: id = " + id );
|
||||
wxString id = wxString::Format( wxT( "%i" ), event.GetId() );
|
||||
wxFAIL_MSG( wxT( "FOOTPRINT_VIEWER_FRAME::OnIterateFootprintList error: id = " ) + id );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -35,15 +35,15 @@
|
|||
#include <pcb_edit_frame.h>
|
||||
|
||||
// Allowable parameter types for PCB wizards
|
||||
const wxString WIZARD_PARAM_UNITS_MM = "mm"; // Millimetres
|
||||
const wxString WIZARD_PARAM_UNITS_MILS = "mils"; // Mils / thou
|
||||
const wxString WIZARD_PARAM_UNITS_FLOAT = "float"; // Floating point (dimensionless)
|
||||
const wxString WIZARD_PARAM_UNITS_INTEGER = "integer"; // Integer (dimensionless)
|
||||
const wxString WIZARD_PARAM_UNITS_BOOL = "bool"; // Boolean option
|
||||
const wxString WIZARD_PARAM_UNITS_RADIANS = "radians"; // Angle (radians)
|
||||
const wxString WIZARD_PARAM_UNITS_DEGREES = "degrees"; // Angle (degrees)
|
||||
const wxString WIZARD_PARAM_UNITS_PERCENT = "%"; // Percent (0% -> 100%)
|
||||
const wxString WIZARD_PARAM_UNITS_STRING = "string"; // String
|
||||
const wxString WIZARD_PARAM_UNITS_MM = wxT( "mm" ); // Millimetres
|
||||
const wxString WIZARD_PARAM_UNITS_MILS = wxT( "mils" ); // Mils / thou
|
||||
const wxString WIZARD_PARAM_UNITS_FLOAT = wxT( "float" ); // Floating point (dimensionless)
|
||||
const wxString WIZARD_PARAM_UNITS_INTEGER = wxT( "integer" ); // Integer (dimensionless)
|
||||
const wxString WIZARD_PARAM_UNITS_BOOL = wxT( "bool" ); // Boolean option
|
||||
const wxString WIZARD_PARAM_UNITS_RADIANS = wxT( "radians" ); // Angle (radians)
|
||||
const wxString WIZARD_PARAM_UNITS_DEGREES = wxT( "degrees" ); // Angle (degrees)
|
||||
const wxString WIZARD_PARAM_UNITS_PERCENT = wxT( "%" ); // Percent (0% -> 100%)
|
||||
const wxString WIZARD_PARAM_UNITS_STRING = wxT( "string" ); // String
|
||||
|
||||
/**
|
||||
* The parent class from where any footprint wizard class must derive.
|
||||
|
|
|
@ -421,9 +421,9 @@ void FOOTPRINT_WIZARD_FRAME::ReCreateParameterList()
|
|||
m_parameterGrid->SetCellRenderer( i, WIZ_COL_VALUE, new wxGridCellBoolRenderer );
|
||||
}
|
||||
// Parameters that can be selected from a list of multiple options
|
||||
else if( units.Contains( "," ) ) // Indicates list of available options
|
||||
else if( units.Contains( wxT( "," ) ) ) // Indicates list of available options
|
||||
{
|
||||
wxStringTokenizer tokenizer( units, "," );
|
||||
wxStringTokenizer tokenizer( units, wxT( "," ) );
|
||||
wxArrayString options;
|
||||
|
||||
while( tokenizer.HasMoreTokens() )
|
||||
|
|
|
@ -66,8 +66,8 @@ void FOOTPRINT_WIZARD_FRAME::Process_Special_Functions( wxCommandEvent& event )
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( wxString::Format(
|
||||
"FOOTPRINT_WIZARD_FRAME::Process_Special_Functions error: id = %d",
|
||||
wxFAIL_MSG( wxString::Format( wxT( "FOOTPRINT_WIZARD_FRAME::Process_Special_Functions "
|
||||
"error: id = %d" ),
|
||||
event.GetId() ) );
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -37,7 +37,7 @@ FP_TREE_MODEL_ADAPTER::Create( EDA_BASE_FRAME* aParent, LIB_TABLE* aLibs )
|
|||
|
||||
|
||||
FP_TREE_MODEL_ADAPTER::FP_TREE_MODEL_ADAPTER( EDA_BASE_FRAME* aParent, LIB_TABLE* aLibs ) :
|
||||
LIB_TREE_MODEL_ADAPTER( aParent, "pinned_footprint_libs" ),
|
||||
LIB_TREE_MODEL_ADAPTER( aParent, wxT( "pinned_footprint_libs" ) ),
|
||||
m_libs( (FP_LIB_TABLE*) aLibs )
|
||||
{}
|
||||
|
||||
|
|
|
@ -181,7 +181,7 @@ void FP_TREE_SYNCHRONIZING_ADAPTER::GetValue( wxVariant& aVariant, wxDataViewIte
|
|||
|
||||
// mark modified part with an asterisk
|
||||
if( m_frame->GetScreen()->IsContentModified() )
|
||||
aVariant = node->m_Name + " *";
|
||||
aVariant = node->m_Name + wxT( " *" );
|
||||
else
|
||||
aVariant = node->m_Name;
|
||||
}
|
||||
|
|
|
@ -25,24 +25,24 @@
|
|||
#include <wx/log.h>
|
||||
|
||||
|
||||
static const wxString DescriptionFormat =
|
||||
static const wxString DescriptionFormat = wxT(
|
||||
"<b>__NAME__</b>"
|
||||
"<br>__DESC__"
|
||||
"<hr><table border=0>"
|
||||
"__FIELDS__"
|
||||
"</table>";
|
||||
"</table>" );
|
||||
|
||||
static const wxString KeywordsFormat =
|
||||
static const wxString KeywordsFormat = wxT(
|
||||
"<tr>"
|
||||
" <td><b>" + _( "Keywords" ) + "</b></td>"
|
||||
" <td>__KEYWORDS__</td>"
|
||||
"</tr>";
|
||||
"</tr>" );
|
||||
|
||||
static const wxString DocFormat =
|
||||
static const wxString DocFormat = wxT(
|
||||
"<tr>"
|
||||
" <td><b>" + _( "Documentation" ) + "</b></td>"
|
||||
" <td><a href=\"__HREF__\">__TEXT__</a></td>"
|
||||
"</tr>";
|
||||
"</tr>" );
|
||||
|
||||
|
||||
class FOOTPRINT_INFO_GENERATOR
|
||||
|
@ -66,7 +66,7 @@ public:
|
|||
*/
|
||||
void GenerateHtml()
|
||||
{
|
||||
wxCHECK_RET( m_fp_lib_table, "Footprint library table pointer is not valid" );
|
||||
wxCHECK_RET( m_fp_lib_table, wxT( "Footprint library table pointer is not valid" ) );
|
||||
|
||||
if( !m_lib_id.IsValid() )
|
||||
return;
|
||||
|
|
|
@ -124,7 +124,7 @@ bool GRAPHICS_CLEANER::areEquivalent( PCB_SHAPE* aShape1, PCB_SHAPE* aShape2 )
|
|||
&& aShape1->GetBezierPoints() == aShape2->GetBezierPoints();
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "GRAPHICS_CLEANER::areEquivalent unimplemented for "
|
||||
wxFAIL_MSG( wxT( "GRAPHICS_CLEANER::areEquivalent unimplemented for " )
|
||||
+ aShape1->SHAPE_T_asString() );
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -205,9 +205,9 @@ void CLIPBOARD_IO::SaveSelection( const PCB_SELECTION& aSelected, bool isFootpri
|
|||
FP_TEXT* fp_text = static_cast<FP_TEXT*>( item );
|
||||
PCB_TEXT* pcb_text = new PCB_TEXT( m_board );
|
||||
|
||||
if( fp_text->GetText() == "${VALUE}" )
|
||||
if( fp_text->GetText() == wxT( "${VALUE}" ) )
|
||||
pcb_text->SetText( footprint->GetValue() );
|
||||
else if( fp_text->GetText() == "${REFERENCE}" )
|
||||
else if( fp_text->GetText() == wxT( "${REFERENCE}" ) )
|
||||
pcb_text->SetText( footprint->GetReference() );
|
||||
else
|
||||
pcb_text->CopyText( *fp_text );
|
||||
|
|
|
@ -252,7 +252,8 @@ FOOTPRINT* PCB_BASE_FRAME::SelectFootprintFromLibTree( LIB_ID aPreselect )
|
|||
historyInfos.push_back( fp_info );
|
||||
}
|
||||
|
||||
adapter->DoAddLibrary( "-- " + _( "Recently Used" ) + " --", wxEmptyString, historyInfos, true );
|
||||
adapter->DoAddLibrary( wxT( "-- " ) + _( "Recently Used" ) + wxT( " --" ), wxEmptyString,
|
||||
historyInfos, true );
|
||||
|
||||
if( aPreselect.IsValid() )
|
||||
adapter->SetPreselectNode( aPreselect, 0 );
|
||||
|
@ -461,7 +462,7 @@ FOOTPRINT* PCB_BASE_FRAME::GetFootprintFromBoardByReference()
|
|||
wxArrayString fplist;
|
||||
|
||||
// Build list of available fp references, to display them in dialog
|
||||
for( auto fp : GetBoard()->Footprints() )
|
||||
for( FOOTPRINT* fp : GetBoard()->Footprints() )
|
||||
fplist.Add( fp->GetReference() + wxT( " ( " ) + fp->GetValue() + wxT( " )" ) );
|
||||
|
||||
fplist.Sort();
|
||||
|
@ -477,10 +478,10 @@ FOOTPRINT* PCB_BASE_FRAME::GetFootprintFromBoardByReference()
|
|||
|
||||
if( !footprintName.IsEmpty() )
|
||||
{
|
||||
for( auto mod : GetBoard()->Footprints() )
|
||||
for( FOOTPRINT* fp : GetBoard()->Footprints() )
|
||||
{
|
||||
if( mod->GetReference().CmpNoCase( footprintName ) == 0 )
|
||||
return mod;
|
||||
if( fp->GetReference().CmpNoCase( footprintName ) == 0 )
|
||||
return fp;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -238,7 +238,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
|
|||
|
||||
// We can't use ACTIONS::showPreferences yet because wxWidgets moves this on
|
||||
// Mac, and it needs the wxID_PREFERENCES id to find it.
|
||||
prefsMenu->Add( _( "Preferences..." ) + "\tCtrl+,",
|
||||
prefsMenu->Add( _( "Preferences..." ) + wxT( "\tCtrl+," ),
|
||||
_( "Show preferences for all open tools" ),
|
||||
wxID_PREFERENCES,
|
||||
BITMAPS::preference );
|
||||
|
|
|
@ -140,7 +140,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
|||
submenuExport->Add( _( "Footprint Association (.cmp) File..." ),
|
||||
_( "Export footprint association file (*.cmp) for schematic back annotation" ),
|
||||
ID_PCB_GEN_CMP_FILE, BITMAPS::export_cmp );
|
||||
submenuExport->Add( _( "Hyperlynx..." ), "",
|
||||
submenuExport->Add( _( "Hyperlynx..." ), wxEmptyString,
|
||||
ID_GEN_EXPORT_FILE_HYPERLYNX, BITMAPS::export_step );
|
||||
|
||||
if( ADVANCED_CFG::GetCfg().m_ShowPcbnewExportNetlist && m_exportNetlistAction )
|
||||
|
@ -455,7 +455,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
|||
|
||||
// We can't use ACTIONS::showPreferences yet because wxWidgets moves this on
|
||||
// Mac, and it needs the wxID_PREFERENCES id to find it.
|
||||
prefsMenu->Add( _( "Preferences..." ) + "\tCtrl+,",
|
||||
prefsMenu->Add( _( "Preferences..." ) + wxT( "\tCtrl+," ),
|
||||
_( "Show preferences for all open tools" ),
|
||||
wxID_PREFERENCES,
|
||||
BITMAPS::preference );
|
||||
|
|
|
@ -137,7 +137,7 @@ public:
|
|||
{
|
||||
m_netname = aNewName;
|
||||
|
||||
if( aNewName.Contains( "/" ) )
|
||||
if( aNewName.Contains( wxT( "/" ) ) )
|
||||
m_shortNetname = aNewName.AfterLast( '/' );
|
||||
else
|
||||
m_shortNetname = aNewName;
|
||||
|
|
|
@ -50,7 +50,7 @@ NETINFO_ITEM::NETINFO_ITEM( BOARD* aParent, const wxString& aNetName, int aNetCo
|
|||
if( aParent )
|
||||
m_netClass = aParent->GetDesignSettings().GetNetClasses().GetDefault();
|
||||
else
|
||||
m_netClass = std::make_shared<NETCLASS>( "<invalid>" );
|
||||
m_netClass = std::make_shared<NETCLASS>( wxT( "<invalid>" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -73,7 +73,7 @@ void NETINFO_ITEM::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANE
|
|||
|
||||
aList.emplace_back( _( "Net Name" ), UnescapeString( GetNetname() ) );
|
||||
|
||||
aList.emplace_back( _( "Net Code" ), wxString::Format( "%d", GetNetCode() ) );
|
||||
aList.emplace_back( _( "Net Code" ), wxString::Format( wxT( "%d" ), GetNetCode() ) );
|
||||
|
||||
// Warning: for netcode == NETINFO_LIST::ORPHANED, the parent or the board can be NULL
|
||||
BOARD * board = m_parent ? m_parent->GetBoard() : nullptr;
|
||||
|
@ -92,7 +92,7 @@ void NETINFO_ITEM::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANE
|
|||
}
|
||||
}
|
||||
|
||||
aList.emplace_back( _( "Pads" ), wxString::Format( "%d", count ) );
|
||||
aList.emplace_back( _( "Pads" ), wxString::Format( wxT( "%d" ), count ) );
|
||||
|
||||
count = 0;
|
||||
|
||||
|
@ -107,7 +107,7 @@ void NETINFO_ITEM::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANE
|
|||
}
|
||||
}
|
||||
|
||||
aList.emplace_back( _( "Vias" ), wxString::Format( "%d", count ) );
|
||||
aList.emplace_back( _( "Vias" ), wxString::Format( wxT( "%d" ), count ) );
|
||||
|
||||
if( startTrack )
|
||||
{
|
||||
|
|
|
@ -100,8 +100,8 @@ void NETINFO_LIST::RemoveNet( NETINFO_ITEM* aNet )
|
|||
{
|
||||
if ( i->second == aNet )
|
||||
{
|
||||
wxASSERT_MSG( removed, "NETINFO_LIST::RemoveNet: target net found in m_netNames "
|
||||
"but not m_netCodes!" );
|
||||
wxASSERT_MSG( removed, wxT( "NETINFO_LIST::RemoveNet: target net found in m_netNames "
|
||||
"but not m_netCodes!" ) );
|
||||
m_netNames.erase(i);
|
||||
break;
|
||||
}
|
||||
|
@ -177,7 +177,7 @@ void NETINFO_LIST::Show() const
|
|||
|
||||
for( it = m_netNames.begin(), itEnd = m_netNames.end(); it != itEnd; ++it )
|
||||
{
|
||||
wxLogDebug( "[%d]: netcode:%d netname:<%s>\n",
|
||||
wxLogDebug( wxT( "[%d]: netcode:%d netname:<%s>\n" ),
|
||||
i++,
|
||||
it->second->GetNetCode(),
|
||||
TO_UTF8( it->second->GetNetname() ) );
|
||||
|
|
|
@ -471,7 +471,7 @@ void PAD::BuildEffectiveShapes( PCB_LAYER_ID aLayer ) const
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "PAD::buildEffectiveShapes: Unsupported pad shape: "
|
||||
wxFAIL_MSG( wxT( "PAD::buildEffectiveShapes: Unsupported pad shape: " )
|
||||
+ PAD_SHAPE_T_asString( effectiveShape ) );
|
||||
break;
|
||||
}
|
||||
|
@ -928,13 +928,13 @@ void PAD::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
|
|||
if( GetDrillShape() == PAD_DRILL_SHAPE_CIRCLE )
|
||||
{
|
||||
aList.emplace_back( _( "Hole" ),
|
||||
wxString::Format( "%s",
|
||||
wxString::Format( wxT( "%s" ),
|
||||
MessageTextFromValue( units, m_drill.x ) ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
aList.emplace_back( _( "Hole X / Y" ),
|
||||
wxString::Format( "%s / %s",
|
||||
wxString::Format( wxT( "%s / %s" ),
|
||||
MessageTextFromValue( units, m_drill.x ),
|
||||
MessageTextFromValue( units, m_drill.y ) ) );
|
||||
}
|
||||
|
@ -1261,8 +1261,8 @@ void PAD::ViewGetLayers( int aLayers[], int& aCount ) const
|
|||
{
|
||||
wxString msg;
|
||||
msg.Printf( wxT( "footprint %s, pad %s: could not find valid layer for pad" ),
|
||||
GetParent() ? GetParent()->GetReference() : "<null>",
|
||||
GetNumber().IsEmpty() ? "(unnumbered)" : GetNumber() );
|
||||
GetParent() ? GetParent()->GetReference() : wxT( "<null>" ),
|
||||
GetNumber().IsEmpty() ? wxT( "(unnumbered)" ) : GetNumber() );
|
||||
wxLogDebug( msg );
|
||||
}
|
||||
#endif
|
||||
|
@ -1495,7 +1495,7 @@ void PAD::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
|||
int aError, ERROR_LOC aErrorLoc,
|
||||
bool ignoreLineWidth ) const
|
||||
{
|
||||
wxASSERT_MSG( !ignoreLineWidth, "IgnoreLineWidth has no meaning for pads." );
|
||||
wxASSERT_MSG( !ignoreLineWidth, wxT( "IgnoreLineWidth has no meaning for pads." ) );
|
||||
|
||||
// minimal segment count to approximate a circle to create the polygonal pad shape
|
||||
// This minimal value is mainly for very small pads, like SM0402.
|
||||
|
@ -1588,7 +1588,7 @@ void PAD::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
|||
}
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "PAD::TransformShapeWithClearanceToPolygon no implementation for "
|
||||
wxFAIL_MSG( wxT( "PAD::TransformShapeWithClearanceToPolygon no implementation for " )
|
||||
+ PAD_SHAPE_T_asString( GetShape() ) );
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -82,7 +82,7 @@ void PCB_BASE_EDIT_FRAME::doCloseWindow()
|
|||
if( mgr->IsProjectOpen() && wxFileName::IsDirWritable( projectName.GetPath() )
|
||||
&& projectName.Exists() )
|
||||
{
|
||||
GFootprintList.WriteCacheToFile( Prj().GetProjectPath() + "fp-info-cache" );
|
||||
GFootprintList.WriteCacheToFile( Prj().GetProjectPath() + wxT( "fp-info-cache" ) );
|
||||
}
|
||||
|
||||
// Close the project if we are standalone, so it gets cleaned up properly
|
||||
|
|
|
@ -249,7 +249,8 @@ void PCB_BASE_FRAME::FocusOnItem( BOARD_ITEM* aItem, PCB_LAYER_ID aLayer )
|
|||
}
|
||||
catch( const boost::uuids::entropy_error& )
|
||||
{
|
||||
wxLogError( "A Boost UUID entropy exception was thrown in %s:%s.", __FILE__, __FUNCTION__ );
|
||||
wxLogError( wxT( "A Boost UUID entropy exception was thrown in %s:%s." ),
|
||||
__FILE__, __FUNCTION__ );
|
||||
}
|
||||
#else
|
||||
lastItem = GetBoard()->GetItem( lastBrightenedItemID );
|
||||
|
@ -731,7 +732,7 @@ void PCB_BASE_FRAME::DisplayGridMsg()
|
|||
VECTOR2D gridSize = GetCanvas()->GetGAL()->GetGridSize();
|
||||
wxString line;
|
||||
|
||||
line.Printf( "grid X %s Y %s",
|
||||
line.Printf( wxT( "grid X %s Y %s" ),
|
||||
MessageTextFromValue( m_userUnits, gridSize.x, false ),
|
||||
MessageTextFromValue( m_userUnits, gridSize.y, false ) );
|
||||
|
||||
|
|
|
@ -78,14 +78,14 @@ void PCB_DIMENSION_BASE::updateText()
|
|||
break;
|
||||
|
||||
case DIM_UNITS_FORMAT::BARE_SUFFIX: // normal
|
||||
text += " ";
|
||||
text += wxS( " " );
|
||||
text += GetAbbreviatedUnitsLabel( m_units );
|
||||
break;
|
||||
|
||||
case DIM_UNITS_FORMAT::PAREN_SUFFIX: // parenthetical
|
||||
text += " (";
|
||||
text += wxT( " (" );
|
||||
text += GetAbbreviatedUnitsLabel( m_units );
|
||||
text += ")";
|
||||
text += wxT( ")" );
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ wxString PCB_DIMENSION_BASE::GetValueText() const
|
|||
|
||||
int val = GetMeasuredValue();
|
||||
wxString text;
|
||||
wxString format = wxT( "%." ) + wxString::Format( "%i", m_precision ) + wxT( "f" );
|
||||
wxString format = wxT( "%." ) + wxString::Format( wxT( "%i" ), m_precision ) + wxT( "f" );
|
||||
|
||||
text.Printf( format, To_User_Unit( m_units, val ) );
|
||||
|
||||
|
@ -294,7 +294,7 @@ void PCB_DIMENSION_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame,
|
|||
{
|
||||
aList.emplace_back( _( "Value" ), GetValueText() );
|
||||
|
||||
msg = "%" + wxString::Format( "1.%df", GetPrecision() );
|
||||
msg = wxT( "%" ) + wxString::Format( wxT( "1.%df" ), GetPrecision() );
|
||||
aList.emplace_back( _( "Precision" ), wxString::Format( msg, 0.0 ) );
|
||||
}
|
||||
|
||||
|
@ -311,7 +311,7 @@ void PCB_DIMENSION_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame,
|
|||
if( Type() == PCB_DIM_CENTER_T || Type() == PCB_FP_DIM_CENTER_T )
|
||||
{
|
||||
VECTOR2I startCoord = originTransforms.ToDisplayAbs( GetStart() );
|
||||
wxString start = wxString::Format( "@(%s, %s)",
|
||||
wxString start = wxString::Format( wxT( "@(%s, %s)" ),
|
||||
MessageTextFromValue( units, startCoord.x ),
|
||||
MessageTextFromValue( units, startCoord.y ) );
|
||||
|
||||
|
@ -320,11 +320,11 @@ void PCB_DIMENSION_BASE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame,
|
|||
else
|
||||
{
|
||||
VECTOR2I startCoord = originTransforms.ToDisplayAbs( GetStart() );
|
||||
wxString start = wxString::Format( "@(%s, %s)",
|
||||
wxString start = wxString::Format( wxT( "@(%s, %s)" ),
|
||||
MessageTextFromValue( units, startCoord.x ),
|
||||
MessageTextFromValue( units, startCoord.y ) );
|
||||
VECTOR2I endCoord = originTransforms.ToDisplayAbs( GetEnd() );
|
||||
wxString end = wxString::Format( "@(%s, %s)",
|
||||
wxString end = wxString::Format( wxT( "@(%s, %s)" ),
|
||||
MessageTextFromValue( units, endCoord.x ),
|
||||
MessageTextFromValue( units, endCoord.y ) );
|
||||
|
||||
|
@ -492,7 +492,7 @@ void PCB_DIMENSION_BASE::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& a
|
|||
int aError, ERROR_LOC aErrorLoc,
|
||||
bool aIgnoreLineWidth ) const
|
||||
{
|
||||
wxASSERT_MSG( !aIgnoreLineWidth, "IgnoreLineWidth has no meaning for dimensions." );
|
||||
wxASSERT_MSG( !aIgnoreLineWidth, wxT( "IgnoreLineWidth has no meaning for dimensions." ) );
|
||||
|
||||
for( const std::shared_ptr<SHAPE>& shape : m_shapes )
|
||||
{
|
||||
|
@ -513,8 +513,8 @@ void PCB_DIMENSION_BASE::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& a
|
|||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG( "PCB_DIMENSION_BASE::TransformShapeWithClearanceToPolygon unexpected "
|
||||
"shape type." );
|
||||
wxFAIL_MSG( wxT( "PCB_DIMENSION_BASE::TransformShapeWithClearanceToPolygon unexpected "
|
||||
"shape type." ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1050,7 +1050,7 @@ void PCB_DIM_LEADER::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PA
|
|||
EDA_UNITS units = aFrame->GetUserUnits();
|
||||
|
||||
VECTOR2I startCoord = originTransforms.ToDisplayAbs( GetStart() );
|
||||
wxString start = wxString::Format( "@(%s, %s)",
|
||||
wxString start = wxString::Format( wxT( "@(%s, %s)" ),
|
||||
MessageTextFromValue( units, startCoord.x ),
|
||||
MessageTextFromValue( units, startCoord.y ) );
|
||||
|
||||
|
|
|
@ -265,7 +265,7 @@ void PCB_DRAW_PANEL_GAL::UpdateColors()
|
|||
cs = Pgm().GetSettingsManager().GetColorSettings();
|
||||
}
|
||||
|
||||
wxCHECK_RET( cs, "null COLOR_SETTINGS" );
|
||||
wxCHECK_RET( cs, wxT( "null COLOR_SETTINGS" ) );
|
||||
|
||||
auto rs = static_cast<KIGFX::PCB_RENDER_SETTINGS*>( m_view->GetPainter()->GetSettings() );
|
||||
rs->LoadColors( cs );
|
||||
|
@ -472,11 +472,11 @@ void PCB_DRAW_PANEL_GAL::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame,
|
|||
}
|
||||
}
|
||||
|
||||
aList.emplace_back( _( "Pads" ), wxString::Format( "%d", padCount ) );
|
||||
aList.emplace_back( _( "Vias" ), wxString::Format( "%d", viaCount ) );
|
||||
aList.emplace_back( _( "Track Segments" ), wxString::Format( "%d", trackSegmentCount ) );
|
||||
aList.emplace_back( _( "Nets" ), wxString::Format( "%d", (int) netCodes.size() ) );
|
||||
aList.emplace_back( _( "Unrouted" ), wxString::Format( "%d", unconnected ) );
|
||||
aList.emplace_back( _( "Pads" ), wxString::Format( wxT( "%d" ), padCount ) );
|
||||
aList.emplace_back( _( "Vias" ), wxString::Format( wxT( "%d" ), viaCount ) );
|
||||
aList.emplace_back( _( "Track Segments" ), wxString::Format( wxT( "%d" ), trackSegmentCount ) );
|
||||
aList.emplace_back( _( "Nets" ), wxString::Format( wxT( "%d" ), (int) netCodes.size() ) );
|
||||
aList.emplace_back( _( "Unrouted" ), wxString::Format( wxT( "%d" ), unconnected ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -347,19 +347,19 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
|||
wxString strK2S = Pgm().GetExecutablePath();
|
||||
|
||||
#ifdef __WXMAC__
|
||||
if( strK2S.Find( "pcbnew.app" ) != wxNOT_FOUND )
|
||||
if( strK2S.Find( wxT( "pcbnew.app" ) ) != wxNOT_FOUND )
|
||||
{
|
||||
// On macOS, we have standalone applications inside the main bundle, so we handle that here:
|
||||
strK2S += "../../";
|
||||
strK2S += wxT( "../../" );
|
||||
}
|
||||
|
||||
strK2S += "Contents/MacOS/";
|
||||
strK2S += wxT( "Contents/MacOS/" );
|
||||
#endif
|
||||
|
||||
wxFileName appK2S( strK2S, "kicad2step" );
|
||||
wxFileName appK2S( strK2S, wxT( "kicad2step" ) );
|
||||
|
||||
#ifdef _WIN32
|
||||
appK2S.SetExt( "exe" );
|
||||
appK2S.SetExt( wxT( "exe" ) );
|
||||
#endif
|
||||
|
||||
// Ensure the window is on top
|
||||
|
@ -967,7 +967,7 @@ void PCB_EDIT_FRAME::doCloseWindow()
|
|||
if( !fn.IsOk() || !fn.IsDirWritable() )
|
||||
fn.SetPath( wxFileName::GetTempDir() );
|
||||
|
||||
wxLogTrace( traceAutoSave, "Deleting auto save file <" + fn.GetFullPath() + ">" );
|
||||
wxLogTrace( traceAutoSave, wxT( "Deleting auto save file <" ) + fn.GetFullPath() + wxT( ">" ) );
|
||||
|
||||
// Remove the auto save file on a normal close of Pcbnew.
|
||||
if( fn.FileExists() && !wxRemoveFile( fn.GetFullPath() ) )
|
||||
|
@ -1341,7 +1341,7 @@ void PCB_EDIT_FRAME::OnModify( )
|
|||
|
||||
Update3DView( true, Settings().m_Display.m_Live3DRefresh );
|
||||
|
||||
if( !GetTitle().StartsWith( "*" ) )
|
||||
if( !GetTitle().StartsWith( wxT( "*" ) ) )
|
||||
UpdateTitle();
|
||||
|
||||
m_ZoneFillsDirty = true;
|
||||
|
@ -1489,9 +1489,11 @@ void PCB_EDIT_FRAME::ToPlotter( int aID )
|
|||
case ID_GEN_PLOT_PS:
|
||||
plotSettings.SetFormat( PLOT_FORMAT::POST );
|
||||
break;
|
||||
case ID_GEN_PLOT: /* keep the previous setup */ break;
|
||||
case ID_GEN_PLOT:
|
||||
/* keep the previous setup */
|
||||
break;
|
||||
default:
|
||||
wxFAIL_MSG( "ToPlotter(): unexpected plot type" ); break;
|
||||
wxFAIL_MSG( wxT( "ToPlotter(): unexpected plot type" ) ); break;
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -1579,7 +1581,7 @@ bool PCB_EDIT_FRAME::FetchNetlistFromSchematic( NETLIST& aNetlist,
|
|||
Raise();
|
||||
|
||||
// Do not translate extra_info strings. These are for developers
|
||||
wxString extra_info = e.Problem() + " : " + e.What() + " at " + e.Where();
|
||||
wxString extra_info = e.Problem() + wxT( " : " ) + e.What() + wxT( " at " ) + e.Where();
|
||||
|
||||
DisplayErrorMessage( this, _( "Received an error while reading netlist. Please "
|
||||
"report this issue to the KiCad team using the menu "
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2019-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 2019-2022 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -59,7 +59,8 @@ bool exprFromTo( LIBEVAL::CONTEXT* aCtx, void* self )
|
|||
|
||||
if( !ftCache )
|
||||
{
|
||||
wxLogWarning( "Attempting to call fromTo() with non-existent from-to cache, aborting...");
|
||||
wxLogWarning( wxT( "Attempting to call fromTo() with non-existent from-to cache, "
|
||||
"aborting..." ));
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -286,14 +287,14 @@ static void insideCourtyard( LIBEVAL::CONTEXT* aCtx, void* self )
|
|||
else
|
||||
itemBBox = item->GetBoundingBox();
|
||||
|
||||
if( arg->AsString() == "A" )
|
||||
if( arg->AsString() == wxT( "A" ) )
|
||||
{
|
||||
FOOTPRINT* fp = dynamic_cast<FOOTPRINT*>( context->GetItem( 0 ) );
|
||||
|
||||
if( isInsideCourtyard( item, itemBBox, itemShape, context, fp, In1_Cu ) )
|
||||
return 1.0;
|
||||
}
|
||||
else if( arg->AsString() == "B" )
|
||||
else if( arg->AsString() == wxT( "B" ) )
|
||||
{
|
||||
FOOTPRINT* fp = dynamic_cast<FOOTPRINT*>( context->GetItem( 1 ) );
|
||||
|
||||
|
@ -353,14 +354,14 @@ static void insideFrontCourtyard( LIBEVAL::CONTEXT* aCtx, void* self )
|
|||
else
|
||||
itemBBox = item->GetBoundingBox();
|
||||
|
||||
if( arg->AsString() == "A" )
|
||||
if( arg->AsString() == wxT( "A" ) )
|
||||
{
|
||||
FOOTPRINT* fp = dynamic_cast<FOOTPRINT*>( context->GetItem( 0 ) );
|
||||
|
||||
if( isInsideCourtyard( item, itemBBox, itemShape, context, fp, F_Cu ) )
|
||||
return 1.0;
|
||||
}
|
||||
else if( arg->AsString() == "B" )
|
||||
else if( arg->AsString() == wxT( "B" ) )
|
||||
{
|
||||
FOOTPRINT* fp = dynamic_cast<FOOTPRINT*>( context->GetItem( 1 ) );
|
||||
|
||||
|
@ -419,14 +420,14 @@ static void insideBackCourtyard( LIBEVAL::CONTEXT* aCtx, void* self )
|
|||
else
|
||||
itemBBox = item->GetBoundingBox();
|
||||
|
||||
if( arg->AsString() == "A" )
|
||||
if( arg->AsString() == wxT( "A" ) )
|
||||
{
|
||||
FOOTPRINT* fp = dynamic_cast<FOOTPRINT*>( context->GetItem( 0 ) );
|
||||
|
||||
if( isInsideCourtyard( item, itemBBox, itemShape, context, fp, B_Cu ) )
|
||||
return 1.0;
|
||||
}
|
||||
else if( arg->AsString() == "B" )
|
||||
else if( arg->AsString() == wxT( "B" ) )
|
||||
{
|
||||
FOOTPRINT* fp = dynamic_cast<FOOTPRINT*>( context->GetItem( 1 ) );
|
||||
|
||||
|
@ -638,12 +639,12 @@ static void insideArea( LIBEVAL::CONTEXT* aCtx, void* self )
|
|||
else
|
||||
itemBBox = item->GetBoundingBox();
|
||||
|
||||
if( arg->AsString() == "A" )
|
||||
if( arg->AsString() == wxT( "A" ) )
|
||||
{
|
||||
ZONE* zone = dynamic_cast<ZONE*>( context->GetItem( 0 ) );
|
||||
return isInsideArea( item, itemBBox, context, zone ) ? 1.0 : 0.0;
|
||||
}
|
||||
else if( arg->AsString() == "B" )
|
||||
else if( arg->AsString() == wxT( "B" ) )
|
||||
{
|
||||
ZONE* zone = dynamic_cast<ZONE*>( context->GetItem( 1 ) );
|
||||
return isInsideArea( item, itemBBox, context, zone ) ? 1.0 : 0.0;
|
||||
|
@ -909,19 +910,19 @@ PCB_EXPR_BUILTIN_FUNCTIONS::PCB_EXPR_BUILTIN_FUNCTIONS()
|
|||
void PCB_EXPR_BUILTIN_FUNCTIONS::RegisterAllFunctions()
|
||||
{
|
||||
m_funcs.clear();
|
||||
RegisterFunc( "existsOnLayer('x')", existsOnLayer );
|
||||
RegisterFunc( "isPlated()", isPlated );
|
||||
RegisterFunc( "insideCourtyard('x')", insideCourtyard );
|
||||
RegisterFunc( "insideFrontCourtyard('x')", insideFrontCourtyard );
|
||||
RegisterFunc( "insideBackCourtyard('x')", insideBackCourtyard );
|
||||
RegisterFunc( "insideArea('x')", insideArea );
|
||||
RegisterFunc( "isMicroVia()", isMicroVia );
|
||||
RegisterFunc( "isBlindBuriedVia()", isBlindBuriedVia );
|
||||
RegisterFunc( "memberOf('x')", memberOf );
|
||||
RegisterFunc( "fromTo('x','y')", exprFromTo );
|
||||
RegisterFunc( "isCoupledDiffPair()", isCoupledDiffPair );
|
||||
RegisterFunc( "inDiffPair('x')", inDiffPair );
|
||||
RegisterFunc( "getField('x')", getField );
|
||||
RegisterFunc( wxT( "existsOnLayer('x')" ), existsOnLayer );
|
||||
RegisterFunc( wxT( "isPlated()" ), isPlated );
|
||||
RegisterFunc( wxT( "insideCourtyard('x')" ), insideCourtyard );
|
||||
RegisterFunc( wxT( "insideFrontCourtyard('x')" ), insideFrontCourtyard );
|
||||
RegisterFunc( wxT( "insideBackCourtyard('x')" ), insideBackCourtyard );
|
||||
RegisterFunc( wxT( "insideArea('x')" ), insideArea );
|
||||
RegisterFunc( wxT( "isMicroVia()" ), isMicroVia );
|
||||
RegisterFunc( wxT( "isBlindBuriedVia()" ), isBlindBuriedVia );
|
||||
RegisterFunc( wxT( "memberOf('x')" ), memberOf );
|
||||
RegisterFunc( wxT( "fromTo('x','y')" ), exprFromTo );
|
||||
RegisterFunc( wxT( "isCoupledDiffPair()" ), isCoupledDiffPair );
|
||||
RegisterFunc( wxT( "inDiffPair('x')" ), inDiffPair );
|
||||
RegisterFunc( wxT( "getField('x')" ), getField );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1085,39 +1086,39 @@ std::unique_ptr<LIBEVAL::VAR_REF> PCB_EXPR_UCODE::CreateVarRef( const wxString&
|
|||
|
||||
// Check for a couple of very common cases and compile them straight to "object code".
|
||||
|
||||
if( aField.CmpNoCase( "NetClass" ) == 0 )
|
||||
if( aField.CmpNoCase( wxT( "NetClass" ) ) == 0 )
|
||||
{
|
||||
if( aVar == "A" )
|
||||
if( aVar == wxT( "A" ) )
|
||||
return std::make_unique<PCB_EXPR_NETCLASS_REF>( 0 );
|
||||
else if( aVar == "B" )
|
||||
else if( aVar == wxT( "B" ) )
|
||||
return std::make_unique<PCB_EXPR_NETCLASS_REF>( 1 );
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
else if( aField.CmpNoCase( "NetName" ) == 0 )
|
||||
else if( aField.CmpNoCase( wxT( "NetName" ) ) == 0 )
|
||||
{
|
||||
if( aVar == "A" )
|
||||
if( aVar == wxT( "A" ) )
|
||||
return std::make_unique<PCB_EXPR_NETNAME_REF>( 0 );
|
||||
else if( aVar == "B" )
|
||||
else if( aVar == wxT( "B" ) )
|
||||
return std::make_unique<PCB_EXPR_NETNAME_REF>( 1 );
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
else if( aField.CmpNoCase( "Type" ) == 0 )
|
||||
else if( aField.CmpNoCase( wxT( "Type" ) ) == 0 )
|
||||
{
|
||||
if( aVar == "A" )
|
||||
if( aVar == wxT( "A" ) )
|
||||
return std::make_unique<PCB_EXPR_TYPE_REF>( 0 );
|
||||
else if( aVar == "B" )
|
||||
else if( aVar == wxT( "B" ) )
|
||||
return std::make_unique<PCB_EXPR_TYPE_REF>( 1 );
|
||||
else
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
if( aVar == "A" || aVar == "AB" )
|
||||
if( aVar == wxT( "A" ) || aVar == wxT( "AB" ) )
|
||||
vref = std::make_unique<PCB_EXPR_VAR_REF>( 0 );
|
||||
else if( aVar == "B" )
|
||||
else if( aVar == wxT( "B" ) )
|
||||
vref = std::make_unique<PCB_EXPR_VAR_REF>( 1 );
|
||||
else if( aVar == "L" )
|
||||
else if( aVar == wxT( "L" ) )
|
||||
vref = std::make_unique<PCB_EXPR_VAR_REF>( 2 );
|
||||
else
|
||||
return nullptr;
|
||||
|
@ -1128,7 +1129,7 @@ std::unique_ptr<LIBEVAL::VAR_REF> PCB_EXPR_UCODE::CreateVarRef( const wxString&
|
|||
}
|
||||
|
||||
wxString field( aField );
|
||||
field.Replace( "_", " " );
|
||||
field.Replace( wxT( "_" ), wxT( " " ) );
|
||||
|
||||
for( const PROPERTY_MANAGER::CLASS_INFO& cls : propMgr.GetAllClasses() )
|
||||
{
|
||||
|
@ -1155,7 +1156,7 @@ std::unique_ptr<LIBEVAL::VAR_REF> PCB_EXPR_UCODE::CreateVarRef( const wxString&
|
|||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG( "PCB_EXPR_UCODE::createVarRef: Unknown property type." );
|
||||
wxFAIL_MSG( wxT( "PCB_EXPR_UCODE::createVarRef: Unknown property type." ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1186,7 +1187,7 @@ public:
|
|||
|
||||
virtual const std::vector<wxString>& GetSupportedUnits() const override
|
||||
{
|
||||
static const std::vector<wxString> pcbUnits = { "mil", "mm", "in" };
|
||||
static const std::vector<wxString> pcbUnits = { wxT( "mil" ), wxT( "mm" ), wxT( "in" ) };
|
||||
|
||||
return pcbUnits;
|
||||
}
|
||||
|
|
|
@ -333,7 +333,7 @@ BITMAPS PCB_GROUP::GetMenuImage() const
|
|||
void PCB_GROUP::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>& aList )
|
||||
{
|
||||
aList.emplace_back( _( "Group" ), m_name.empty() ? _( "<unnamed>" ) : m_name );
|
||||
aList.emplace_back( _( "Members" ), wxString::Format( "%zu", m_items.size() ) );
|
||||
aList.emplace_back( _( "Members" ), wxString::Format( wxT( "%zu" ), m_items.size() ) );
|
||||
|
||||
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME && IsLocked() )
|
||||
aList.emplace_back( _( "Status" ), _( "Locked" ) );
|
||||
|
|
|
@ -959,12 +959,12 @@ void PCB_PAINTER::draw( const PAD* aPad, int aLayer )
|
|||
// shorten the displayed netname (actual name not useful)
|
||||
// Can happen if the pad netname is edited inside the board editor, therefore
|
||||
// having a netname not coming from schematic
|
||||
if( netname.StartsWith( "unconnected-(" ) )
|
||||
if( netname.StartsWith( wxT( "unconnected-(" ) ) )
|
||||
{
|
||||
if( pinType == wxT( "no_connect" ) || pinType.EndsWith( wxT( "+no_connect" ) ) )
|
||||
netname = "x";
|
||||
netname = wxT( "x" );
|
||||
else if( pinType == wxT( "free" ) )
|
||||
netname = "*";
|
||||
netname = wxT( "*" );
|
||||
}
|
||||
|
||||
// approximate the size of net name text:
|
||||
|
|
|
@ -156,7 +156,7 @@ void PCB_TARGET::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_
|
|||
|
||||
aList.emplace_back( _( "Size" ), MessageTextFromValue( units, GetSize() ) );
|
||||
aList.emplace_back( _( "Width" ), MessageTextFromValue( units, GetWidth() ) );
|
||||
aList.emplace_back( _( "Shape" ), GetShape() == 0 ? "+" : "X" );
|
||||
aList.emplace_back( _( "Shape" ), GetShape() == 0 ? wxT( "+" ) : wxT( "X" ) );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -116,7 +116,7 @@ void PCB_TEXT::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_IT
|
|||
|
||||
aList.emplace_back( _( "Mirror" ), IsMirrored() ? _( "Yes" ) : _( "No" ) );
|
||||
|
||||
aList.emplace_back( _( "Angle" ), wxString::Format( "%g", GetTextAngle().AsDegrees() ) );
|
||||
aList.emplace_back( _( "Angle" ), wxString::Format( wxT( "%g" ), GetTextAngle().AsDegrees() ) );
|
||||
|
||||
aList.emplace_back( _( "Thickness" ), MessageTextFromValue( units, GetTextThickness() ) );
|
||||
aList.emplace_back( _( "Width" ), MessageTextFromValue( units, GetTextWidth() ) );
|
||||
|
|
|
@ -691,7 +691,7 @@ void PCB_TRACK::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_I
|
|||
BOARD* board = GetBoard();
|
||||
|
||||
aList.emplace_back( _( "Type" ),
|
||||
Type() == PCB_ARC_T ? ( "Track (arc)" ) : _( "Track" ) );
|
||||
Type() == PCB_ARC_T ? _( "Track (arc)" ) : _( "Track" ) );
|
||||
|
||||
|
||||
GetMsgPanelInfoBase_Common( aFrame, aList );
|
||||
|
@ -1044,7 +1044,7 @@ void PCB_TRACK::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuf
|
|||
int aError, ERROR_LOC aErrorLoc,
|
||||
bool ignoreLineWidth ) const
|
||||
{
|
||||
wxASSERT_MSG( !ignoreLineWidth, "IgnoreLineWidth has no meaning for tracks." );
|
||||
wxASSERT_MSG( !ignoreLineWidth, wxT( "IgnoreLineWidth has no meaning for tracks." ) );
|
||||
|
||||
|
||||
switch( Type() )
|
||||
|
|
|
@ -372,10 +372,10 @@ bool IFACE::OnKifaceStart( PGM_BASE* aProgram, int aCtlBits )
|
|||
// if we are here, a incorrect global footprint library table was found.
|
||||
// Incorrect global symbol library table is not a fatal error:
|
||||
// the user just has to edit the (partially) loaded table.
|
||||
wxString msg = _(
|
||||
"An error occurred attempting to load the global footprint library table.\n"
|
||||
"Please edit this global footprint library table in Preferences menu."
|
||||
);
|
||||
wxString msg = _( "An error occurred attempting to load the global footprint library "
|
||||
"table.\n"
|
||||
"Please edit this global footprint library table in Preferences "
|
||||
"menu." );
|
||||
|
||||
DisplayErrorMessage( nullptr, msg, ioe.What() );
|
||||
}
|
||||
|
@ -403,8 +403,8 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aSrcPr
|
|||
if( destPath.StartsWith( aProjectBasePath + pathSep ) )
|
||||
destPath.Replace( aProjectBasePath, aNewProjectBasePath, false );
|
||||
|
||||
wxString srcProjectFootprintLib = pathSep + aSrcProjectName + ".pretty" + pathSep;
|
||||
wxString newProjectFootprintLib = pathSep + aNewProjectName + ".pretty" + pathSep;
|
||||
wxString srcProjectFootprintLib = pathSep + aSrcProjectName + wxT( ".pretty" ) + pathSep;
|
||||
wxString newProjectFootprintLib = pathSep + aNewProjectName + wxT( ".pretty" ) + pathSep;
|
||||
|
||||
destPath.Replace( srcProjectFootprintLib, newProjectFootprintLib, true );
|
||||
|
||||
|
@ -433,7 +433,7 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aSrcPr
|
|||
{
|
||||
// TODO
|
||||
}
|
||||
else if( ext == "rpt" )
|
||||
else if( ext == wxT( "rpt" ) )
|
||||
{
|
||||
// DRC must be the "gold standard". Since we can't guarantee that there aren't
|
||||
// any non-deterministic cases in the save-as algorithm, we don't want to certify
|
||||
|
@ -441,7 +441,7 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aSrcPr
|
|||
// name.
|
||||
KiCopyFile( aSrcFilePath, destFile.GetFullPath(), aErrors );
|
||||
}
|
||||
else if( destFile.GetName() == "fp-lib-table" )
|
||||
else if( destFile.GetName() == wxT( "fp-lib-table" ) )
|
||||
{
|
||||
try
|
||||
{
|
||||
|
@ -453,7 +453,8 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aSrcPr
|
|||
LIB_TABLE_ROW& row = fpLibTable.At( i );
|
||||
wxString uri = row.GetFullURI();
|
||||
|
||||
uri.Replace( "/" + aSrcProjectName + ".pretty", "/" + aNewProjectName + ".pretty" );
|
||||
uri.Replace( wxT( "/" ) + aSrcProjectName + wxT( ".pretty" ),
|
||||
wxT( "/" ) + aNewProjectName + wxT( ".pretty" ) );
|
||||
|
||||
row.SetFullURI( uri );
|
||||
}
|
||||
|
@ -465,7 +466,7 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aSrcPr
|
|||
wxString msg;
|
||||
|
||||
if( !aErrors.empty() )
|
||||
aErrors += "\n";
|
||||
aErrors += wxT( "\n" );
|
||||
|
||||
msg.Printf( _( "Cannot copy file '%s'." ), destFile.GetFullPath() );
|
||||
aErrors += msg;
|
||||
|
@ -473,7 +474,7 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aSrcPr
|
|||
}
|
||||
else
|
||||
{
|
||||
wxFAIL_MSG( "Unexpected filetype for Pcbnew::SaveFileAs()" );
|
||||
wxFAIL_MSG( wxT( "Unexpected filetype for Pcbnew::SaveFileAs()" ) );
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -85,68 +85,68 @@ const wxString GetGerberFileFunctionAttribute( const BOARD* aBoard, int aLayer )
|
|||
switch( aLayer )
|
||||
{
|
||||
case F_Adhes:
|
||||
attrib = "Glue,Top";
|
||||
attrib = wxT( "Glue,Top" );
|
||||
break;
|
||||
|
||||
case B_Adhes:
|
||||
attrib = "Glue,Bot";
|
||||
attrib = wxT( "Glue,Bot" );
|
||||
break;
|
||||
|
||||
case F_SilkS:
|
||||
attrib = "Legend,Top";
|
||||
attrib = wxT( "Legend,Top" );
|
||||
break;
|
||||
|
||||
case B_SilkS:
|
||||
attrib = "Legend,Bot";
|
||||
attrib = wxT( "Legend,Bot" );
|
||||
break;
|
||||
|
||||
case F_Mask:
|
||||
attrib = "Soldermask,Top";
|
||||
attrib = wxT( "Soldermask,Top" );
|
||||
break;
|
||||
|
||||
case B_Mask:
|
||||
attrib = "Soldermask,Bot";
|
||||
attrib = wxT( "Soldermask,Bot" );
|
||||
break;
|
||||
|
||||
case F_Paste:
|
||||
attrib = "Paste,Top";
|
||||
attrib = wxT( "Paste,Top" );
|
||||
break;
|
||||
|
||||
case B_Paste:
|
||||
attrib = "Paste,Bot";
|
||||
attrib = wxT( "Paste,Bot" );
|
||||
break;
|
||||
|
||||
case Edge_Cuts:
|
||||
// Board outline.
|
||||
// Can be "Profile,NP" (Not Plated: usual) or "Profile,P"
|
||||
// This last is the exception (Plated)
|
||||
attrib = "Profile,NP";
|
||||
attrib = wxT( "Profile,NP" );
|
||||
break;
|
||||
|
||||
case Dwgs_User:
|
||||
attrib = "OtherDrawing,Comment";
|
||||
attrib = wxT( "OtherDrawing,Comment" );
|
||||
break;
|
||||
|
||||
case Cmts_User:
|
||||
attrib = "Other,Comment";
|
||||
attrib = wxT( "Other,Comment" );
|
||||
break;
|
||||
|
||||
case Eco1_User:
|
||||
attrib = "Other,ECO1";
|
||||
attrib = wxT( "Other,ECO1" );
|
||||
break;
|
||||
|
||||
case Eco2_User:
|
||||
attrib = "Other,ECO2";
|
||||
attrib = wxT( "Other,ECO2" );
|
||||
break;
|
||||
|
||||
case B_Fab:
|
||||
// This is actually a assembly layer
|
||||
attrib = "AssemblyDrawing,Bot";
|
||||
attrib = wxT( "AssemblyDrawing,Bot" );
|
||||
break;
|
||||
|
||||
case F_Fab:
|
||||
// This is actually a assembly layer
|
||||
attrib = "AssemblyDrawing,Top";
|
||||
attrib = wxT( "AssemblyDrawing,Top" );
|
||||
break;
|
||||
|
||||
case B_Cu:
|
||||
|
@ -154,7 +154,7 @@ const wxString GetGerberFileFunctionAttribute( const BOARD* aBoard, int aLayer )
|
|||
break;
|
||||
|
||||
case F_Cu:
|
||||
attrib = "Copper,L1,Top";
|
||||
attrib = wxT( "Copper,L1,Top" );
|
||||
break;
|
||||
|
||||
default:
|
||||
|
@ -179,13 +179,13 @@ const wxString GetGerberFileFunctionAttribute( const BOARD* aBoard, int aLayer )
|
|||
switch( type )
|
||||
{
|
||||
case LT_SIGNAL:
|
||||
attrib += ",Signal";
|
||||
attrib += wxT( ",Signal" );
|
||||
break;
|
||||
case LT_POWER:
|
||||
attrib += ",Plane";
|
||||
attrib += wxT( ",Plane" );
|
||||
break;
|
||||
case LT_MIXED:
|
||||
attrib += ",Mixed";
|
||||
attrib += wxT( ",Mixed" );
|
||||
break;
|
||||
default:
|
||||
break; // do nothing (but avoid a warning for unhandled LAYER_T values from GCC)
|
||||
|
@ -194,7 +194,7 @@ const wxString GetGerberFileFunctionAttribute( const BOARD* aBoard, int aLayer )
|
|||
#endif
|
||||
|
||||
wxString fileFct;
|
||||
fileFct.Printf( "%%TF.FileFunction,%s*%%", attrib );
|
||||
fileFct.Printf( wxT( "%%TF.FileFunction,%s*%%" ), attrib );
|
||||
|
||||
return fileFct;
|
||||
}
|
||||
|
@ -247,9 +247,9 @@ static const wxString GetGerberFilePolarityAttribute( int aLayer )
|
|||
wxString filePolarity;
|
||||
|
||||
if( polarity == 1 )
|
||||
filePolarity = "%TF.FilePolarity,Positive*%";
|
||||
filePolarity = wxT( "%TF.FilePolarity,Positive*%" );
|
||||
if( polarity == -1 )
|
||||
filePolarity = "%TF.FilePolarity,Negative*%";
|
||||
filePolarity = wxT( "%TF.FilePolarity,Negative*%" );
|
||||
|
||||
return filePolarity;
|
||||
}
|
||||
|
@ -265,8 +265,8 @@ static wxString& makeStringCompatX1( wxString& aText, bool aUseX1CompatibilityMo
|
|||
{
|
||||
if( aUseX1CompatibilityMode )
|
||||
{
|
||||
aText.Replace( "%", "" );
|
||||
aText.Prepend( "G04 #@! " );
|
||||
aText.Replace( wxT( "%" ), wxEmptyString );
|
||||
aText.Prepend( wxT( "G04 #@! " ) );
|
||||
}
|
||||
|
||||
return aText;
|
||||
|
@ -328,13 +328,13 @@ void AddGerberX2Header( PLOTTER* aPlotter, const BOARD* aBoard, bool aUseX1Compa
|
|||
// position of the auxiliary axis when using it.
|
||||
// If we ever add user-settable absolute Pcbnew coordinates, we'll need to change the way
|
||||
// the key is built to ensure file only using the *same* axis have the same key.
|
||||
wxString registration_id = "Original";
|
||||
wxString registration_id = wxT( "Original" );
|
||||
VECTOR2I auxOrigin = aBoard->GetDesignSettings().GetAuxOrigin();
|
||||
|
||||
if( aBoard->GetPlotOptions().GetUseAuxOrigin() && auxOrigin.x && auxOrigin.y )
|
||||
registration_id.Printf( "PX%xPY%x", auxOrigin.x, auxOrigin.y );
|
||||
registration_id.Printf( wxT( "PX%xPY%x" ), auxOrigin.x, auxOrigin.y );
|
||||
|
||||
text.Printf( "%%TF.SameCoordinates,%s*%%", registration_id.GetData() );
|
||||
text.Printf( wxT( "%%TF.SameCoordinates,%s*%%" ), registration_id.GetData() );
|
||||
aPlotter->AddLineToHeader( makeStringCompatX1( text, aUseX1CompatibilityMode ) );
|
||||
}
|
||||
|
||||
|
|
|
@ -1214,7 +1214,7 @@ PLOTTER* StartPlotBoard( BOARD *aBoard, const PCB_PLOT_PARAMS *aPlotOpts, int aL
|
|||
if( aPlotOpts->GetPlotFrameRef() )
|
||||
{
|
||||
PlotDrawingSheet( plotter, aBoard->GetProject(), aBoard->GetTitleBlock(),
|
||||
aBoard->GetPageSettings(), "1", 1, aSheetDesc,
|
||||
aBoard->GetPageSettings(), wxT( "1" ), 1, aSheetDesc,
|
||||
aBoard->GetFileName() );
|
||||
|
||||
if( aPlotOpts->GetMirror() )
|
||||
|
|
|
@ -750,7 +750,7 @@ void BRDITEMS_PLOTTER::PlotFootprintShape( const FP_SHAPE* aShape )
|
|||
break;
|
||||
|
||||
default:
|
||||
wxASSERT_MSG( false, "Unhandled FP_SHAPE shape" );
|
||||
wxASSERT_MSG( false, wxT( "Unhandled FP_SHAPE shape" ) );
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -27,7 +27,7 @@
|
|||
#include <wx/translation.h>
|
||||
|
||||
|
||||
#define FMT_UNIMPLEMENTED "Plugin \"%s\" does not implement the \"%s\" function."
|
||||
#define FMT_UNIMPLEMENTED wxT( "Plugin \"%s\" does not implement the \"%s\" function." )
|
||||
|
||||
/**
|
||||
* Throw an #IO_ERROR and complains of an API function not being implemented.
|
||||
|
@ -148,34 +148,30 @@ void PLUGIN::FootprintLibOptions( PROPERTIES* aListToAppendTo ) const
|
|||
{
|
||||
// disable all these in another couple of months, after everyone has seen them:
|
||||
#if 1
|
||||
(*aListToAppendTo)["debug_level"] = UTF8( _(
|
||||
"Enable <b>debug</b> logging for Footprint*() functions in this PLUGIN."
|
||||
));
|
||||
(*aListToAppendTo)["debug_level"] = UTF8( _( "Enable <b>debug</b> logging for Footprint*() "
|
||||
"functions in this PLUGIN." ) );
|
||||
|
||||
(*aListToAppendTo)["read_filter_regex"] = UTF8( _(
|
||||
"Regular expression <b>footprint name</b> filter."
|
||||
));
|
||||
(*aListToAppendTo)["read_filter_regex"] = UTF8( _( "Regular expression <b>footprint name</b> "
|
||||
"filter." ) );
|
||||
|
||||
(*aListToAppendTo)["enable_transaction_logging"] = UTF8( _(
|
||||
"Enable transaction logging. The mere presence of this option turns on the "
|
||||
"logging, no need to set a Value."
|
||||
));
|
||||
(*aListToAppendTo)["enable_transaction_logging"] = UTF8( _( "Enable transaction logging. The "
|
||||
"mere presence of this option "
|
||||
"turns on the logging, no need to "
|
||||
"set a Value." ) );
|
||||
|
||||
(*aListToAppendTo)["username"] = UTF8( _(
|
||||
"User name for <b>login</b> to some special library server."
|
||||
));
|
||||
(*aListToAppendTo)["username"] = UTF8( _( "User name for <b>login</b> to some special library "
|
||||
"server." ) );
|
||||
|
||||
(*aListToAppendTo)["password"] = UTF8( _(
|
||||
"Password for <b>login</b> to some special library server."
|
||||
));
|
||||
(*aListToAppendTo)["password"] = UTF8( _( "Password for <b>login</b> to some special library "
|
||||
"server." ) );
|
||||
#endif
|
||||
|
||||
#if 1
|
||||
// Suitable for a C++ to python PLUGIN::Footprint*() adapter, move it to the adapter
|
||||
// if and when implemented.
|
||||
(*aListToAppendTo)["python_footprint_plugin"] = UTF8( _(
|
||||
"Enter the python module which implements the PLUGIN::Footprint*() functions."
|
||||
));
|
||||
(*aListToAppendTo)["python_footprint_plugin"] = UTF8( _( "Enter the python module which "
|
||||
"implements the PLUGIN::Footprint*() "
|
||||
"functions." ) );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -3061,17 +3061,18 @@ void ALTIUM_PCB::ConvertTexts6ToFootprintItemOnLayer( FOOTPRINT* aFootprint, con
|
|||
// TODO: improve parsing of variables
|
||||
wxString trimmedText = aElem.text;
|
||||
trimmedText.Trim();
|
||||
if( !aElem.isDesignator && trimmedText.CmpNoCase( ".Designator" ) == 0 )
|
||||
|
||||
if( !aElem.isDesignator && trimmedText.CmpNoCase( wxT( ".Designator" ) ) == 0 )
|
||||
{
|
||||
fpText->SetText( "${REFERENCE}" );
|
||||
fpText->SetText( wxT( "${REFERENCE}" ) );
|
||||
}
|
||||
else if( !aElem.isComment && trimmedText.CmpNoCase( ".Comment" ) == 0 )
|
||||
else if( !aElem.isComment && trimmedText.CmpNoCase( wxT( ".Comment" ) ) == 0 )
|
||||
{
|
||||
fpText->SetText( "${VALUE}" );
|
||||
fpText->SetText( wxT( "${VALUE}" ) );
|
||||
}
|
||||
else if( trimmedText.CmpNoCase( ".Layer_Name" ) == 0 )
|
||||
else if( trimmedText.CmpNoCase( wxT( ".Layer_Name" ) ) == 0 )
|
||||
{
|
||||
fpText->SetText( "${LAYER}" );
|
||||
fpText->SetText( wxT( "${LAYER}" ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -2470,7 +2470,7 @@ void EAGLE_PLUGIN::loadClasses( wxXmlNode* aClasses )
|
|||
ECLASS eClass( classNode );
|
||||
NETCLASSPTR netclass;
|
||||
|
||||
if( eClass.name.CmpNoCase( "default" ) == 0 )
|
||||
if( eClass.name.CmpNoCase( wxT( "default" ) ) == 0 )
|
||||
{
|
||||
netclass = bds.GetNetClasses().GetDefault();
|
||||
}
|
||||
|
|
|
@ -1561,7 +1561,7 @@ void PCB_PARSER::parseBoardStackup()
|
|||
name = FromUTF8();
|
||||
|
||||
// Older versions didn't store opacity with custom colors
|
||||
if( name.StartsWith( "#" ) && m_requiredVersion < 20210824 )
|
||||
if( name.StartsWith( wxT( "#" ) ) && m_requiredVersion < 20210824 )
|
||||
{
|
||||
KIGFX::COLOR4D color( name );
|
||||
|
||||
|
@ -3845,8 +3845,8 @@ FP_TEXT* PCB_PARSER::parseFP_TEXT()
|
|||
Expecting( "text value" );
|
||||
|
||||
wxString value = FromUTF8();
|
||||
value.Replace( "%V", "${VALUE}" );
|
||||
value.Replace( "%R", "${REFERENCE}" );
|
||||
value.Replace( wxT( "%V" ), wxT( "${VALUE}" ) );
|
||||
value.Replace( wxT( "%R" ), wxT( "${REFERENCE}" ) );
|
||||
text->SetText( value );
|
||||
NeedLEFT();
|
||||
token = NextTok();
|
||||
|
|
|
@ -276,7 +276,7 @@ void FP_CACHE::Load()
|
|||
catch( const IO_ERROR& ioe )
|
||||
{
|
||||
if( !cacheError.IsEmpty() )
|
||||
cacheError += "\n\n";
|
||||
cacheError += wxT( "\n\n" );
|
||||
|
||||
cacheError += ioe.What();
|
||||
}
|
||||
|
@ -1058,7 +1058,7 @@ void PCB_PLUGIN::format( const FP_SHAPE* aFPShape, int aNestLevel ) const
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( "PCB_PLUGIN::format not implemented for " + aFPShape->SHAPE_T_asString() );
|
||||
wxFAIL_MSG( wxT( "PCB_PLUGIN::format not implemented for " ) + aFPShape->SHAPE_T_asString() );
|
||||
return;
|
||||
};
|
||||
|
||||
|
@ -1422,7 +1422,8 @@ void PCB_PLUGIN::format( const PAD* aPad, int aNestLevel ) const
|
|||
case PAD_ATTRIB::NPTH: type = "np_thru_hole"; break;
|
||||
|
||||
default:
|
||||
THROW_IO_ERROR( wxString::Format( "unknown pad attribute: %d", aPad->GetAttribute() ) );
|
||||
THROW_IO_ERROR( wxString::Format( wxT( "unknown pad attribute: %d" ),
|
||||
aPad->GetAttribute() ) );
|
||||
}
|
||||
|
||||
const char* property = nullptr;
|
||||
|
@ -1438,7 +1439,8 @@ void PCB_PLUGIN::format( const PAD* aPad, int aNestLevel ) const
|
|||
case PAD_PROP::CASTELLATED: property = "pad_prop_castellated"; break;
|
||||
|
||||
default:
|
||||
THROW_IO_ERROR( wxString::Format( "unknown pad property: %d", aPad->GetProperty() ) );
|
||||
THROW_IO_ERROR( wxString::Format( wxT( "unknown pad property: %d" ),
|
||||
aPad->GetProperty() ) );
|
||||
}
|
||||
|
||||
m_out->Print( aNestLevel, "(pad %s %s %s",
|
||||
|
|
|
@ -215,7 +215,7 @@ void PCB_ONE_LAYER_SELECTOR::buildList()
|
|||
m_leftGridLayers->SetCellValue( left_row, LAYERNAME_COLNUM, layername );
|
||||
|
||||
if( m_layerSelected == layerid )
|
||||
m_leftGridLayers->SetCellValue( left_row, SELECT_COLNUM, "1" );
|
||||
m_leftGridLayers->SetCellValue( left_row, SELECT_COLNUM, wxT( "1" ) );
|
||||
|
||||
m_layersIdLeftColumn.push_back( layerid );
|
||||
left_row++;
|
||||
|
@ -229,7 +229,7 @@ void PCB_ONE_LAYER_SELECTOR::buildList()
|
|||
m_rightGridLayers->SetCellValue( right_row, LAYERNAME_COLNUM, layername );
|
||||
|
||||
if( m_layerSelected == layerid )
|
||||
m_rightGridLayers->SetCellValue( right_row, SELECT_COLNUM, "1" );
|
||||
m_rightGridLayers->SetCellValue( right_row, SELECT_COLNUM, wxT( "1" ) );
|
||||
|
||||
m_layersIdRightColumn.push_back( layerid );
|
||||
right_row++;
|
||||
|
@ -397,7 +397,7 @@ void SELECT_COPPER_LAYERS_PAIR_DIALOG::buildList()
|
|||
|
||||
if( m_frontLayer == layerid )
|
||||
{
|
||||
m_leftGridLayers->SetCellValue( row, SELECT_COLNUM, "1" );
|
||||
m_leftGridLayers->SetCellValue( row, SELECT_COLNUM, wxT( "1" ) );
|
||||
m_leftGridLayers->SetGridCursor( row, COLOR_COLNUM );
|
||||
m_leftRowSelected = row;
|
||||
}
|
||||
|
@ -410,7 +410,7 @@ void SELECT_COPPER_LAYERS_PAIR_DIALOG::buildList()
|
|||
|
||||
if( m_backLayer == layerid )
|
||||
{
|
||||
m_rightGridLayers->SetCellValue( row, SELECT_COLNUM, "1" );
|
||||
m_rightGridLayers->SetCellValue( row, SELECT_COLNUM, wxT( "1" ) );
|
||||
m_rightRowSelected = row;
|
||||
}
|
||||
|
||||
|
@ -434,7 +434,7 @@ void SELECT_COPPER_LAYERS_PAIR_DIALOG::OnLeftGridCellClick( wxGridEvent& event )
|
|||
m_leftGridLayers->SetCellValue( m_leftRowSelected, SELECT_COLNUM, wxEmptyString );
|
||||
m_frontLayer = layer;
|
||||
m_leftRowSelected = row;
|
||||
m_leftGridLayers->SetCellValue( m_leftRowSelected, SELECT_COLNUM, "1" );
|
||||
m_leftGridLayers->SetCellValue( m_leftRowSelected, SELECT_COLNUM, wxT( "1" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -449,5 +449,5 @@ void SELECT_COPPER_LAYERS_PAIR_DIALOG::OnRightGridCellClick( wxGridEvent& event
|
|||
m_rightGridLayers->SetCellValue( m_rightRowSelected, SELECT_COLNUM, wxEmptyString );
|
||||
m_backLayer = layer;
|
||||
m_rightRowSelected = row;
|
||||
m_rightGridLayers->SetCellValue( m_rightRowSelected, SELECT_COLNUM, "1" );
|
||||
m_rightGridLayers->SetCellValue( m_rightRowSelected, SELECT_COLNUM, wxT( "1" ) );
|
||||
}
|
||||
|
|
|
@ -616,7 +616,9 @@ static wxString ComboBoxUnits( EDA_UNITS aUnits, double aValue, bool aIncludeLab
|
|||
|
||||
switch( aUnits )
|
||||
{
|
||||
default: wxASSERT_MSG( false, "Invalid unit" ); KI_FALLTHROUGH;
|
||||
default:
|
||||
wxASSERT_MSG( false, wxT( "Invalid unit" ) );
|
||||
KI_FALLTHROUGH;
|
||||
case EDA_UNITS::UNSCALED: format = wxT( "%.0f" ); break;
|
||||
case EDA_UNITS::MILLIMETRES: format = wxT( "%.3f" ); break;
|
||||
case EDA_UNITS::MILS: format = wxT( "%.2f" ); break;
|
||||
|
@ -710,9 +712,9 @@ void PCB_EDIT_FRAME::UpdateViaSizeSelectBox( wxChoice* aViaSizeSelectBox, bool a
|
|||
|
||||
if( hole > 0 )
|
||||
{
|
||||
priStr = ComboBoxUnits( primaryUnit, diam, false ) + " / "
|
||||
priStr = ComboBoxUnits( primaryUnit, diam, false ) + wxT( " / " )
|
||||
+ ComboBoxUnits( primaryUnit, hole, true );
|
||||
secStr = ComboBoxUnits( secondaryUnit, diam, false ) + " / "
|
||||
secStr = ComboBoxUnits( secondaryUnit, diam, false ) + wxT( " / " )
|
||||
+ ComboBoxUnits( secondaryUnit, hole, true );
|
||||
}
|
||||
else
|
||||
|
|
|
@ -289,7 +289,7 @@ void PCB_BASE_EDIT_FRAME::SaveCopyInUndoList( const PICKED_ITEMS_LIST& aItemsLis
|
|||
break;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( wxString::Format( "SaveCopyInUndoList() error (unknown code %X)",
|
||||
wxFAIL_MSG( wxString::Format( wxT( "SaveCopyInUndoList() error (unknown code %X)" ),
|
||||
command ) );
|
||||
break;
|
||||
}
|
||||
|
@ -408,7 +408,7 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList )
|
|||
if( !TestForExistingItem( GetBoard(), (BOARD_ITEM*) eda_item ) )
|
||||
{
|
||||
// Checking if it ever happens
|
||||
wxASSERT_MSG( false, "Item in the undo buffer does not exist" );
|
||||
wxASSERT_MSG( false, wxT( "Item in the undo buffer does not exist" ) );
|
||||
|
||||
// Remove this non existent item
|
||||
aList->RemovePicker( ii );
|
||||
|
@ -527,7 +527,7 @@ void PCB_BASE_EDIT_FRAME::PutDataInPreviousState( PICKED_ITEMS_LIST* aList )
|
|||
}
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( wxString::Format( "PutDataInPreviousState() error (unknown code %X)",
|
||||
wxFAIL_MSG( wxString::Format( wxT( "PutDataInPreviousState() error (unknown code %X)" ),
|
||||
aList->GetPickedItemStatus( ii ) ) );
|
||||
break;
|
||||
}
|
||||
|
|
|
@ -570,7 +570,7 @@ void ZONE::GetMsgPanelInfo( EDA_DRAW_FRAME* aFrame, std::vector<MSG_PANEL_ITEM>&
|
|||
}
|
||||
|
||||
// Display priority level
|
||||
aList.emplace_back( _( "Priority" ), wxString::Format( "%d", GetPriority() ) );
|
||||
aList.emplace_back( _( "Priority" ), wxString::Format( wxT( "%d" ), GetPriority() ) );
|
||||
}
|
||||
|
||||
if( aFrame->GetName() == PCB_EDIT_FRAME_NAME )
|
||||
|
@ -1366,7 +1366,7 @@ void ZONE::TransformShapeWithClearanceToPolygon( SHAPE_POLY_SET& aCornerBuffer,
|
|||
PCB_LAYER_ID aLayer, int aClearance, int aError,
|
||||
ERROR_LOC aErrorLoc, bool aIgnoreLineWidth ) const
|
||||
{
|
||||
wxASSERT_MSG( !aIgnoreLineWidth, "IgnoreLineWidth has no meaning for zones." );
|
||||
wxASSERT_MSG( !aIgnoreLineWidth, wxT( "IgnoreLineWidth has no meaning for zones." ) );
|
||||
|
||||
if( !m_FilledPolysList.count( aLayer ) )
|
||||
return;
|
||||
|
|
|
@ -69,7 +69,8 @@ ZONE_FILLER::~ZONE_FILLER()
|
|||
void ZONE_FILLER::SetProgressReporter( PROGRESS_REPORTER* aReporter )
|
||||
{
|
||||
m_progressReporter = aReporter;
|
||||
wxASSERT_MSG( m_commit, "ZONE_FILLER must have a valid commit to call SetProgressReporter" );
|
||||
wxASSERT_MSG( m_commit, wxT( "ZONE_FILLER must have a valid commit to call "
|
||||
"SetProgressReporter" ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1089,19 +1090,19 @@ bool ZONE_FILLER::computeRawFilledArea( const ZONE* aZone,
|
|||
SHAPE_POLY_SET clearanceHoles;
|
||||
|
||||
aRawPolys = aSmoothedOutline;
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In1_Cu, "smoothed-outline" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In1_Cu, wxT( "smoothed-outline" ) );
|
||||
|
||||
if( m_progressReporter && m_progressReporter->IsCancelled() )
|
||||
return false;
|
||||
|
||||
knockoutThermalReliefs( aZone, aLayer, aRawPolys, thermalConnectionPads, noConnectionPads );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In2_Cu, "minus-thermal-reliefs" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In2_Cu, wxT( "minus-thermal-reliefs" ) );
|
||||
|
||||
if( m_progressReporter && m_progressReporter->IsCancelled() )
|
||||
return false;
|
||||
|
||||
buildCopperItemClearances( aZone, aLayer, noConnectionPads, clearanceHoles );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( clearanceHoles, In3_Cu, "clearance-holes" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( clearanceHoles, In3_Cu, wxT( "clearance-holes" ) );
|
||||
|
||||
if( m_progressReporter && m_progressReporter->IsCancelled() )
|
||||
return false;
|
||||
|
@ -1116,16 +1117,16 @@ bool ZONE_FILLER::computeRawFilledArea( const ZONE* aZone,
|
|||
static const bool USE_BBOX_CACHES = true;
|
||||
SHAPE_POLY_SET testAreas = aRawPolys;
|
||||
testAreas.BooleanSubtract( clearanceHoles, SHAPE_POLY_SET::PM_FAST );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( testAreas, In4_Cu, "minus-clearance-holes" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( testAreas, In4_Cu, wxT( "minus-clearance-holes" ) );
|
||||
|
||||
// Prune features that don't meet minimum-width criteria
|
||||
if( half_min_width - epsilon > epsilon )
|
||||
{
|
||||
testAreas.Deflate( half_min_width - epsilon, numSegs, fastCornerStrategy );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( testAreas, In5_Cu, "spoke-test-deflated" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( testAreas, In5_Cu, wxT( "spoke-test-deflated" ) );
|
||||
|
||||
testAreas.Inflate( half_min_width - epsilon, numSegs, fastCornerStrategy );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( testAreas, In6_Cu, "spoke-test-reinflated" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( testAreas, In6_Cu, wxT( "spoke-test-reinflated" ) );
|
||||
}
|
||||
|
||||
if( m_progressReporter && m_progressReporter->IsCancelled() )
|
||||
|
@ -1174,19 +1175,19 @@ bool ZONE_FILLER::computeRawFilledArea( const ZONE* aZone,
|
|||
}
|
||||
}
|
||||
|
||||
DUMP_POLYS_TO_COPPER_LAYER( debugSpokes, In7_Cu, "spokes" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( debugSpokes, In7_Cu, wxT( "spokes" ) );
|
||||
|
||||
if( m_progressReporter && m_progressReporter->IsCancelled() )
|
||||
return false;
|
||||
|
||||
aRawPolys.BooleanSubtract( clearanceHoles, SHAPE_POLY_SET::PM_FAST );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In8_Cu, "after-spoke-trimming" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In8_Cu, wxT( "after-spoke-trimming" ) );
|
||||
|
||||
// Prune features that don't meet minimum-width criteria
|
||||
if( half_min_width - epsilon > epsilon )
|
||||
aRawPolys.Deflate( half_min_width - epsilon, numSegs, cornerStrategy );
|
||||
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In9_Cu, "deflated" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In9_Cu, wxT( "deflated" ) );
|
||||
|
||||
if( m_progressReporter && m_progressReporter->IsCancelled() )
|
||||
return false;
|
||||
|
@ -1212,18 +1213,18 @@ bool ZONE_FILLER::computeRawFilledArea( const ZONE* aZone,
|
|||
aRawPolys.Inflate( half_min_width - epsilon, numSegs, cornerStrategy );
|
||||
}
|
||||
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In15_Cu, "after-reinflating" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In15_Cu, wxT( "after-reinflating" ) );
|
||||
|
||||
// Ensure additive changes (thermal stubs and particularly inflating acute corners) do not
|
||||
// add copper outside the zone boundary or inside the clearance holes
|
||||
aRawPolys.BooleanIntersection( aMaxExtents, SHAPE_POLY_SET::PM_FAST );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In16_Cu, "after-trim-to-outline" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In16_Cu, wxT( "after-trim-to-outline" ) );
|
||||
aRawPolys.BooleanSubtract( clearanceHoles, SHAPE_POLY_SET::PM_FAST );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In17_Cu, "after-trim-to-clearance-holes" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In17_Cu, wxT( "after-trim-to-clearance-holes" ) );
|
||||
|
||||
// Lastly give any same-net but higher-priority zones control over their own area.
|
||||
subtractHigherPriorityZones( aZone, aLayer, aRawPolys );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In18_Cu, "minus-higher-priority-zones" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In18_Cu, wxT( "minus-higher-priority-zones" ) );
|
||||
|
||||
aRawPolys.Fracture( SHAPE_POLY_SET::PM_FAST );
|
||||
return true;
|
||||
|
@ -1548,7 +1549,7 @@ bool ZONE_FILLER::addHatchFillTypeOnZone( const ZONE* aZone, PCB_LAYER_ID aLayer
|
|||
if( !aZone->GetHatchOrientation().IsZero() )
|
||||
holes.Rotate( aZone->GetHatchOrientation() );
|
||||
|
||||
DUMP_POLYS_TO_COPPER_LAYER( holes, In10_Cu, "hatch-holes" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( holes, In10_Cu, wxT( "hatch-holes" ) );
|
||||
|
||||
int outline_margin = aZone->GetMinThickness() * 1.1;
|
||||
|
||||
|
@ -1561,12 +1562,12 @@ bool ZONE_FILLER::addHatchFillTypeOnZone( const ZONE* aZone, PCB_LAYER_ID aLayer
|
|||
SHAPE_POLY_SET deflatedFilledPolys = aRawPolys;
|
||||
deflatedFilledPolys.Deflate( outline_margin - aZone->GetMinThickness(), 16 );
|
||||
holes.BooleanIntersection( deflatedFilledPolys, SHAPE_POLY_SET::PM_FAST );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( holes, In11_Cu, "fill-clipped-hatch-holes" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( holes, In11_Cu, wxT( "fill-clipped-hatch-holes" ) );
|
||||
|
||||
SHAPE_POLY_SET deflatedOutline = *aZone->Outline();
|
||||
deflatedOutline.Deflate( outline_margin, 16 );
|
||||
holes.BooleanIntersection( deflatedOutline, SHAPE_POLY_SET::PM_FAST );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( holes, In12_Cu, "outline-clipped-hatch-holes" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( holes, In12_Cu, wxT( "outline-clipped-hatch-holes" ) );
|
||||
|
||||
if( aZone->GetNetCode() != 0 )
|
||||
{
|
||||
|
@ -1625,7 +1626,7 @@ bool ZONE_FILLER::addHatchFillTypeOnZone( const ZONE* aZone, PCB_LAYER_ID aLayer
|
|||
|
||||
holes.BooleanSubtract( aprons, SHAPE_POLY_SET::PM_FAST );
|
||||
}
|
||||
DUMP_POLYS_TO_COPPER_LAYER( holes, In13_Cu, "pad-via-clipped-hatch-holes" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( holes, In13_Cu, wxT( "pad-via-clipped-hatch-holes" ) );
|
||||
|
||||
// Now filter truncated holes to avoid small holes in pattern
|
||||
// It happens for holes near the zone outline
|
||||
|
@ -1642,7 +1643,7 @@ bool ZONE_FILLER::addHatchFillTypeOnZone( const ZONE* aZone, PCB_LAYER_ID aLayer
|
|||
// create grid. Use SHAPE_POLY_SET::PM_STRICTLY_SIMPLE to
|
||||
// generate strictly simple polygons needed by Gerber files and Fracture()
|
||||
aRawPolys.BooleanSubtract( aRawPolys, holes, SHAPE_POLY_SET::PM_STRICTLY_SIMPLE );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In14_Cu, "after-hatching" );
|
||||
DUMP_POLYS_TO_COPPER_LAYER( aRawPolys, In14_Cu, wxT( "after-hatching" ) );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue