More wide-string declarations.

This commit is contained in:
Jeff Young 2022-02-05 13:25:43 +00:00
parent b2e3f03222
commit 34a9a165c9
46 changed files with 248 additions and 221 deletions

View File

@ -112,7 +112,7 @@ DIALOG_IMPORT_GFX::DIALOG_IMPORT_GFX( PCB_BASE_FRAME* aParent, bool aImportAsFoo
m_rbAbsolutePlacement->SetValue( not m_placementInteractive ); m_rbAbsolutePlacement->SetValue( not m_placementInteractive );
m_groupItems->SetValue( m_shouldGroupItems ); m_groupItems->SetValue( m_shouldGroupItems );
m_textCtrlImportScale->SetValue( wxString::Format( "%f", m_scaleImport ) ); m_textCtrlImportScale->SetValue( wxString::Format( wxT( "%f" ), m_scaleImport ) );
// Configure the layers list selector // Configure the layers list selector
m_SelLayerBox->SetLayersHotkeys( false ); // Do not display hotkeys m_SelLayerBox->SetLayersHotkeys( false ); // Do not display hotkeys
@ -201,8 +201,8 @@ void DIALOG_IMPORT_GFX::showPcbImportOffsets()
if( m_originUnits ) // Units are inches if( m_originUnits ) // Units are inches
offset = m_origin / 25.4; offset = m_origin / 25.4;
m_DxfPcbXCoord->SetValue( wxString::Format( "%f", offset.x ) ); m_DxfPcbXCoord->SetValue( wxString::Format( wxT( "%f" ), offset.x ) );
m_DxfPcbYCoord->SetValue( wxString::Format( "%f", offset.y ) ); m_DxfPcbYCoord->SetValue( wxString::Format( wxT( "%f" ), offset.y ) );
} }
@ -219,7 +219,7 @@ void DIALOG_IMPORT_GFX::showPCBdefaultLineWidth()
case 2: value = m_lineWidth / 25.4; break; // display units = inch case 2: value = m_lineWidth / 25.4; break; // display units = inch
} }
m_textCtrlLineWidth->SetValue( wxString::Format( "%f", value ) ); m_textCtrlLineWidth->SetValue( wxString::Format( wxT( "%f" ), value ) );
} }
@ -244,8 +244,8 @@ void DIALOG_IMPORT_GFX::onBrowseFiles( wxCommandEvent& event )
auto plugin = m_gfxImportMgr->GetPlugin( pluginType ); auto plugin = m_gfxImportMgr->GetPlugin( pluginType );
const auto extensions = plugin->GetFileExtensions(); const auto extensions = plugin->GetFileExtensions();
wildcardsDesc += "|" + plugin->GetName() + AddFileExtListToFilter( extensions ); wildcardsDesc += wxT( "|" ) + plugin->GetName() + AddFileExtListToFilter( extensions );
allWildcards += plugin->GetWildcards() + ";"; allWildcards += plugin->GetWildcards() + wxT( ";" );
} }
wildcardsDesc = _( "All supported formats|" ) + allWildcards + wildcardsDesc; wildcardsDesc = _( "All supported formats|" ) + allWildcards + wildcardsDesc;
@ -336,7 +336,7 @@ bool DIALOG_IMPORT_GFX::TransferDataFromWindow()
{ {
HTML_MESSAGE_BOX dlg( this, _( "Warning" ) ); HTML_MESSAGE_BOX dlg( this, _( "Warning" ) );
dlg.MessageSet( _( "Items in the imported file could not be handled properly." ) ); dlg.MessageSet( _( "Items in the imported file could not be handled properly." ) );
warnings.Replace( "\n", "<br/>" ); warnings.Replace( wxT( "\n" ), wxT( "<br/>" ) );
dlg.AddHTML_Text( warnings ); dlg.AddHTML_Text( warnings );
dlg.ShowModal(); dlg.ShowModal();
} }

View File

@ -175,7 +175,7 @@ bool DXF_IMPORT_PLUGIN::ImportDxfFile( const wxString& aFile )
DL_Dxf dxf_reader; DL_Dxf dxf_reader;
// wxFopen takes care of unicode filenames across platforms // wxFopen takes care of unicode filenames across platforms
FILE* fp = wxFopen( aFile, "rt" ); FILE* fp = wxFopen( aFile, wxT( "rt" ) );
if( fp == nullptr ) if( fp == nullptr )
return false; return false;

View File

@ -216,7 +216,7 @@ struct DXF_ARBITRARY_AXIS
*/ */
#if 0 //defined(DEBUG) #if 0 //defined(DEBUG)
// For dxf import debug: // For dxf import debug:
#define ON_UNSUPPORTED( error_msg ) wxLogMessage( error_msg ) #define ON_UNSUPPORTED( error_msg ) wxLogMessage( wxT( error_msg ) )
#else #else
#define ON_UNSUPPORTED( error_msg ) #define ON_UNSUPPORTED( error_msg )
#endif #endif

View File

@ -76,9 +76,9 @@ public:
if( first ) if( first )
first = false; first = false;
else else
ret += ";"; ret += wxT( ";" );
ret += "*." + formatWildcardExt( extension ); ret += wxT( "*." ) + formatWildcardExt( extension );
} }
return ret; return ret;

View File

@ -42,7 +42,7 @@ bool GRAPHICS_IMPORTER::Load( const wxString &aFileName )
if( !m_plugin ) if( !m_plugin )
{ {
wxASSERT_MSG( false, "Plugin must be set before load." ); wxASSERT_MSG( false, wxT( "Plugin must be set before load." ) );
return false; return false;
} }
@ -55,7 +55,7 @@ bool GRAPHICS_IMPORTER::Import( double aScale )
{ {
if( !m_plugin ) if( !m_plugin )
{ {
wxASSERT_MSG( false, "Plugin must be set before import." ); wxASSERT_MSG( false, wxT( "Plugin must be set before import." ) );
return false; return false;
} }

View File

@ -56,7 +56,7 @@ bool SVG_IMPORT_PLUGIN::Load( const wxString& aFileName )
wxCHECK( m_importer, false ); wxCHECK( m_importer, false );
// wxFopen takes care of unicode filenames across platforms // wxFopen takes care of unicode filenames across platforms
FILE* fp = wxFopen( aFileName, "rt" ); FILE* fp = wxFopen( aFileName, wxT( "rt" ) );
if( fp == nullptr ) if( fp == nullptr )
return false; return false;
@ -103,7 +103,7 @@ double SVG_IMPORT_PLUGIN::GetImageHeight() const
{ {
if( !m_parsedImage ) if( !m_parsedImage )
{ {
wxASSERT_MSG(false, "Image must have been loaded before checking height"); wxASSERT_MSG( false, wxT( "Image must have been loaded before checking height" ) );
return 0.0; return 0.0;
} }
@ -115,7 +115,7 @@ double SVG_IMPORT_PLUGIN::GetImageWidth() const
{ {
if( !m_parsedImage ) if( !m_parsedImage )
{ {
wxASSERT_MSG(false, "Image must have been loaded before checking width"); wxASSERT_MSG( false, wxT( "Image must have been loaded before checking width" ) );
return 0.0; return 0.0;
} }

View File

@ -54,20 +54,20 @@ FOOTPRINT* MICROWAVE_TOOL::createFootprint( MICROWAVE_FOOTPRINT_SHAPE aFootprint
{ {
case MICROWAVE_FOOTPRINT_SHAPE::GAP: case MICROWAVE_FOOTPRINT_SHAPE::GAP:
msg = _( "Gap Size:" ); msg = _( "Gap Size:" );
cmp_name = "muwave_gap"; cmp_name = wxT( "muwave_gap" );
text_size = gap_size; text_size = gap_size;
break; break;
case MICROWAVE_FOOTPRINT_SHAPE::STUB: case MICROWAVE_FOOTPRINT_SHAPE::STUB:
msg = _( "Stub Size:" ); msg = _( "Stub Size:" );
cmp_name = "muwave_stub"; cmp_name = wxT( "muwave_stub" );
text_size = gap_size; text_size = gap_size;
pad_count = 2; pad_count = 2;
break; break;
case MICROWAVE_FOOTPRINT_SHAPE::STUB_ARC: case MICROWAVE_FOOTPRINT_SHAPE::STUB_ARC:
msg = _( "Arc Stub Radius Value:" ); msg = _( "Arc Stub Radius Value:" );
cmp_name = "muwave_arcstub"; cmp_name = wxT( "muwave_arcstub" );
pad_count = 1; pad_count = 1;
break; break;

View File

@ -403,7 +403,7 @@ FOOTPRINT* MICROWAVE_TOOL::createMicrowaveInductor( MICROWAVE_INDUCTOR_PATTERN&
} }
// Generate footprint. the value is also used as footprint name. // Generate footprint. the value is also used as footprint name.
msg = "L"; msg = wxT( "L" );
WX_TEXT_ENTRY_DIALOG cmpdlg( &editFrame, _( "Component Value:" ), wxEmptyString, msg ); WX_TEXT_ENTRY_DIALOG cmpdlg( &editFrame, _( "Component Value:" ), wxEmptyString, msg );
cmpdlg.SetTextValidator( FOOTPRINT_NAME_VALIDATOR( &msg ) ); cmpdlg.SetTextValidator( FOOTPRINT_NAME_VALIDATOR( &msg ) );
@ -435,7 +435,7 @@ FOOTPRINT* MICROWAVE_TOOL::createMicrowaveInductor( MICROWAVE_INDUCTOR_PATTERN&
footprint->Add( pad ); footprint->Add( pad );
pad->SetNumber( "1" ); pad->SetNumber( wxT( "1" ) );
pad->SetPosition( aInductorPattern.m_End ); pad->SetPosition( aInductorPattern.m_End );
pad->SetPos0( pad->GetPosition() - footprint->GetPosition() ); pad->SetPos0( pad->GetPosition() - footprint->GetPosition() );
@ -451,7 +451,7 @@ FOOTPRINT* MICROWAVE_TOOL::createMicrowaveInductor( MICROWAVE_INDUCTOR_PATTERN&
footprint->Add( newpad ); footprint->Add( newpad );
pad = newpad; pad = newpad;
pad->SetNumber( "2" ); pad->SetNumber( wxT( "2" ) );
pad->SetPosition( aInductorPattern.m_Start ); pad->SetPosition( aInductorPattern.m_Start );
pad->SetPos0( pad->GetPosition() - footprint->GetPosition() ); pad->SetPos0( pad->GetPosition() - footprint->GetPosition() );

View File

@ -260,7 +260,7 @@ void GPCB_FPL_CACHE::Load()
catch( const IO_ERROR& ioe ) catch( const IO_ERROR& ioe )
{ {
if( !cacheErrorMsg.IsEmpty() ) if( !cacheErrorMsg.IsEmpty() )
cacheErrorMsg += "\n\n"; cacheErrorMsg += wxT( "\n\n" );
cacheErrorMsg += ioe.What(); cacheErrorMsg += ioe.What();
} }
@ -326,7 +326,7 @@ FOOTPRINT* GPCB_FPL_CACHE::parseFOOTPRINT( LINE_READER* aLineReader )
if( aLineReader->ReadLine() == nullptr ) if( aLineReader->ReadLine() == nullptr )
{ {
msg = aLineReader->GetSource() + ": empty file"; msg = aLineReader->GetSource() + wxT( ": empty file" );
THROW_IO_ERROR( msg ); THROW_IO_ERROR( msg );
} }

View File

@ -464,7 +464,7 @@ int BOARD_EDITOR_CONTROL::ExportNetlist( const TOOL_EVENT& aEvent )
// Use a different file extension for the board netlist so the schematic netlist file // Use a different file extension for the board netlist so the schematic netlist file
// is accidentally overwritten. // is accidentally overwritten.
fn.SetExt( "pcb_net" ); fn.SetExt( wxT( "pcb_net" ) );
wxFileDialog dlg( m_frame, _( "Export Board Netlist" ), fn.GetPath(), fn.GetFullName(), wxFileDialog dlg( m_frame, _( "Export Board Netlist" ), fn.GetPath(), fn.GetFullName(),
_( "KiCad board netlist files" ) + AddFileExtListToFilter( { "pcb_net" } ), _( "KiCad board netlist files" ) + AddFileExtListToFilter( { "pcb_net" } ),
@ -533,7 +533,7 @@ int BOARD_EDITOR_CONTROL::GenerateFabFiles( const TOOL_EVENT& aEvent )
else if( aEvent.IsAction( &PCB_ACTIONS::generateBOM ) ) else if( aEvent.IsAction( &PCB_ACTIONS::generateBOM ) )
m_frame->RecreateBOMFileFromBoard( dummy ); m_frame->RecreateBOMFileFromBoard( dummy );
else else
wxFAIL_MSG( "GenerateFabFiles(): unexpected request" ); wxFAIL_MSG( wxT( "GenerateFabFiles(): unexpected request" ) );
return 0; return 0;
} }
@ -674,10 +674,10 @@ int BOARD_EDITOR_CONTROL::UpdateSchematicFromPCB( const TOOL_EVENT& aEvent )
{ {
if( Kiface().IsSingle() ) if( Kiface().IsSingle() )
{ {
DisplayErrorMessage( DisplayErrorMessage( m_frame, _( "Cannot update schematic because Pcbnew is opened in "
m_frame, _( "Cannot update schematic because Pcbnew is opened in stand-alone " "stand-alone mode. In order to create or update PCBs "
"mode. In order to create or update PCBs from schematics, you " "from schematics, you must launch the KiCad project "
"must launch the KiCad project manager and create a project." ) ); "manager and create a project." ) );
return 0; return 0;
} }
@ -746,7 +746,7 @@ int BOARD_EDITOR_CONTROL::TrackWidthInc( const TOOL_EVENT& aEvent )
} }
} }
commit.Push( "Increase Track Width" ); commit.Push( wxT( "Increase Track Width" ) );
return 0; return 0;
} }
@ -826,7 +826,7 @@ int BOARD_EDITOR_CONTROL::TrackWidthDec( const TOOL_EVENT& aEvent )
} }
} }
commit.Push( "Decrease Track Width" ); commit.Push( wxT( "Decrease Track Width" ) );
return 0; return 0;
} }
@ -904,7 +904,7 @@ int BOARD_EDITOR_CONTROL::ViaSizeInc( const TOOL_EVENT& aEvent )
} }
} }
commit.Push( "Increase Via Size" ); commit.Push( wxT( "Increase Via Size" ) );
} }
else else
{ {
@ -1338,7 +1338,7 @@ int BOARD_EDITOR_CONTROL::PlaceTarget( const TOOL_EVENT& aEvent )
BOARD_COMMIT commit( m_frame ); BOARD_COMMIT commit( m_frame );
commit.Add( target ); commit.Add( target );
commit.Push( "Place a layer alignment target" ); commit.Push( wxT( "Place a layer alignment target" ) );
preview.Remove( target ); preview.Remove( target );
@ -1471,7 +1471,7 @@ int BOARD_EDITOR_CONTROL::ZoneMerge( const TOOL_EVENT& aEvent )
if( mergeZones( m_frame, commit, toMerge, merged ) ) if( mergeZones( m_frame, commit, toMerge, merged ) )
{ {
commit.Push( "Merge zones" ); commit.Push( wxT( "Merge zones" ) );
for( EDA_ITEM* item : merged ) for( EDA_ITEM* item : merged )
m_toolMgr->RunAction( PCB_ACTIONS::selectItem, true, item ); m_toolMgr->RunAction( PCB_ACTIONS::selectItem, true, item );

View File

@ -162,23 +162,23 @@ void BOARD_INSPECTION_TOOL::reportCompileError( REPORTER* r )
{ {
r->Report( "" ); r->Report( "" );
r->Report( _( "Report incomplete: could not compile custom design rules. " ) r->Report( _( "Report incomplete: could not compile custom design rules. " )
+ "<a href='boardsetup'>" + _( "Show design rules." ) + "</a>" ); + wxT( "<a href='boardsetup'>" ) + _( "Show design rules." ) + wxT( "</a>" ) );
} }
void BOARD_INSPECTION_TOOL::reportHeader( const wxString& aTitle, BOARD_ITEM* a, REPORTER* r ) void BOARD_INSPECTION_TOOL::reportHeader( const wxString& aTitle, BOARD_ITEM* a, REPORTER* r )
{ {
r->Report( "<h7>" + EscapeHTML( aTitle ) + "</h7>" ); r->Report( wxT( "<h7>" ) + EscapeHTML( aTitle ) + wxT( "</h7>" ) );
r->Report( "<ul><li>" + EscapeHTML( getItemDescription( a ) ) + "</li></ul>" ); r->Report( wxT( "<ul><li>" ) + EscapeHTML( getItemDescription( a ) ) + wxT( "</li></ul>" ) );
} }
void BOARD_INSPECTION_TOOL::reportHeader( const wxString& aTitle, BOARD_ITEM* a, BOARD_ITEM* b, void BOARD_INSPECTION_TOOL::reportHeader( const wxString& aTitle, BOARD_ITEM* a, BOARD_ITEM* b,
REPORTER* r ) REPORTER* r )
{ {
r->Report( "<h7>" + EscapeHTML( aTitle ) + "</h7>" ); r->Report( wxT( "<h7>" ) + EscapeHTML( aTitle ) + wxT( "</h7>" ) );
r->Report( "<ul><li>" + EscapeHTML( getItemDescription( a ) ) + "</li>" r->Report( wxT( "<ul><li>" ) + EscapeHTML( getItemDescription( a ) ) + wxT( "</li>" )
+ "<li>" + EscapeHTML( getItemDescription( b ) ) + "</li></ul>" ); + wxT( "<li>" ) + EscapeHTML( getItemDescription( b ) ) + wxT( "</li></ul>" ) );
} }
@ -187,10 +187,10 @@ void BOARD_INSPECTION_TOOL::reportHeader( const wxString& aTitle, BOARD_ITEM* a,
{ {
wxString layerStr = _( "Layer" ) + wxS( " " ) + m_frame->GetBoard()->GetLayerName( aLayer ); wxString layerStr = _( "Layer" ) + wxS( " " ) + m_frame->GetBoard()->GetLayerName( aLayer );
r->Report( "<h7>" + EscapeHTML( aTitle ) + "</h7>" ); r->Report( wxT( "<h7>" ) + EscapeHTML( aTitle ) + wxT( "</h7>" ) );
r->Report( "<ul><li>" + EscapeHTML( layerStr ) + "</li>" r->Report( wxT( "<ul><li>" ) + EscapeHTML( layerStr ) + wxT( "</li>" )
+ "<li>" + EscapeHTML( getItemDescription( a ) ) + "</li>" + wxT( "<li>" ) + EscapeHTML( getItemDescription( a ) ) + wxT( "</li>" )
+ "<li>" + EscapeHTML( getItemDescription( b ) ) + "</li></ul>" ); + wxT( "<li>" ) + EscapeHTML( getItemDescription( b ) ) + wxT( "</li></ul>" ) );
} }
@ -841,7 +841,7 @@ int BOARD_INSPECTION_TOOL::InspectConstraints( const TOOL_EVENT& aEvent )
{ {
r->Report( "" ); r->Report( "" );
r->Report( _( "Report may be incomplete: some footprint courtyards are malformed." ) r->Report( _( "Report may be incomplete: some footprint courtyards are malformed." )
+ " <a href='drc'>" + _( "Run DRC for a full analysis." ) + "</a>" ); + wxT( " <a href='drc'>" ) + _( "Run DRC for a full analysis." ) + wxT( "</a>" ) );
} }
r->Report( "" ); r->Report( "" );
@ -863,7 +863,7 @@ int BOARD_INSPECTION_TOOL::InspectConstraints( const TOOL_EVENT& aEvent )
{ {
r->Report( "" ); r->Report( "" );
r->Report( _( "Report may be incomplete: some footprint courtyards are malformed." ) r->Report( _( "Report may be incomplete: some footprint courtyards are malformed." )
+ " <a href='drc'>" + _( "Run DRC for a full analysis." ) + "</a>" ); + wxT( " <a href='drc'>" ) + _( "Run DRC for a full analysis." ) + wxT( "</a>" ) );
} }
drcEngine.ProcessAssertions( item, []( const DRC_CONSTRAINT* c ){}, r ); drcEngine.ProcessAssertions( item, []( const DRC_CONSTRAINT* c ){}, r );

View File

@ -187,7 +187,7 @@ int CONVERT_TOOL::CreatePolys( const TOOL_EVENT& aEvent )
else if( FP_ZONE* zone = dynamic_cast<FP_ZONE*>( selection.Front() ) ) else if( FP_ZONE* zone = dynamic_cast<FP_ZONE*>( selection.Front() ) )
parentFootprint = static_cast<FOOTPRINT*>( zone->GetParent() ); parentFootprint = static_cast<FOOTPRINT*>( zone->GetParent() );
else else
wxFAIL_MSG( "Unimplemented footprint parent in CONVERT_TOOL::CreatePolys" ); wxFAIL_MSG( wxT( "Unimplemented footprint parent in CONVERT_TOOL::CreatePolys" ) );
BOARD_COMMIT commit( m_frame ); BOARD_COMMIT commit( m_frame );
@ -608,13 +608,13 @@ int CONVERT_TOOL::CreateLines( const TOOL_EVENT& aEvent )
} }
else else
{ {
wxFAIL_MSG( "Unhandled graphic shape type in PolyToLines - getPolySet" ); wxFAIL_MSG( wxT( "Unhandled graphic shape type in PolyToLines - getPolySet" ) );
} }
break; break;
} }
default: default:
wxFAIL_MSG( "Unhandled type in PolyToLines - getPolySet" ); wxFAIL_MSG( wxT( "Unhandled type in PolyToLines - getPolySet" ) );
break; break;
} }

View File

@ -224,7 +224,7 @@ std::vector<BOARD_ITEM*> DRAWING_TOOL::DrawSpecificationStackup( const wxPoint&
headStyle->SetTextThickness( Millimeter2iu( 0.3 ) ); headStyle->SetTextThickness( Millimeter2iu( 0.3 ) );
headStyle->SetItalic( false ); headStyle->SetItalic( false );
headStyle->SetTextPos( wxPoint( 0, 0 ) ); headStyle->SetTextPos( wxPoint( 0, 0 ) );
headStyle->SetText( "Layer" ); headStyle->SetText( _( "Layer" ) );
headStyle->SetHorizJustify( GR_TEXT_H_ALIGN_LEFT ); headStyle->SetHorizJustify( GR_TEXT_H_ALIGN_LEFT );
headStyle->SetVertJustify( GR_TEXT_V_ALIGN_TOP ); headStyle->SetVertJustify( GR_TEXT_V_ALIGN_TOP );
@ -236,7 +236,7 @@ std::vector<BOARD_ITEM*> DRAWING_TOOL::DrawSpecificationStackup( const wxPoint&
dataStyle->SetTextThickness( Millimeter2iu( 0.1 ) ); dataStyle->SetTextThickness( Millimeter2iu( 0.1 ) );
dataStyle->SetItalic( false ); dataStyle->SetItalic( false );
dataStyle->SetTextPos( wxPoint( 0, 0 ) ); dataStyle->SetTextPos( wxPoint( 0, 0 ) );
dataStyle->SetText( "Layer" ); dataStyle->SetText( _( "Layer" ) );
dataStyle->SetHorizJustify( GR_TEXT_H_ALIGN_LEFT ); dataStyle->SetHorizJustify( GR_TEXT_H_ALIGN_LEFT );
dataStyle->SetVertJustify( GR_TEXT_V_ALIGN_TOP ); dataStyle->SetVertJustify( GR_TEXT_V_ALIGN_TOP );
@ -275,7 +275,7 @@ std::vector<BOARD_ITEM*> DRAWING_TOOL::DrawSpecificationStackup( const wxPoint&
case EDA_UNITS::MILLIMETRES: t->SetText( _( "Thickness (mm)" ) ); break; case EDA_UNITS::MILLIMETRES: t->SetText( _( "Thickness (mm)" ) ); break;
case EDA_UNITS::INCHES: t->SetText( _( "Thickness (inches)" ) ); break; case EDA_UNITS::INCHES: t->SetText( _( "Thickness (inches)" ) ); break;
case EDA_UNITS::MILS: t->SetText( _( "Thickness (mils)" ) ); break; case EDA_UNITS::MILS: t->SetText( _( "Thickness (mils)" ) ); break;
default: wxFAIL_MSG( "Unhandled unit type" ); default: wxFAIL_MSG( wxT( "Unhandled unit type" ) );
} }
colThickness.push_back( t ); colThickness.push_back( t );
@ -421,7 +421,7 @@ std::vector<BOARD_ITEM*> DRAWING_TOOL::DrawBoardCharacteristics( const wxPoint&
std::vector<PCB_TEXT*> colbreak; std::vector<PCB_TEXT*> colbreak;
std::vector<PCB_TEXT*> colLabel2; std::vector<PCB_TEXT*> colLabel2;
std::vector<PCB_TEXT*> colData2; std::vector<PCB_TEXT*> colData2;
wxString text = wxString( "" ); wxString text;
t = static_cast<PCB_TEXT*>( dataStyle->Duplicate() ); t = static_cast<PCB_TEXT*>( dataStyle->Duplicate() );
t->SetText( _( "Copper Layer Count: " ) ); t->SetText( _( "Copper Layer Count: " ) );
@ -437,7 +437,7 @@ std::vector<BOARD_ITEM*> DRAWING_TOOL::DrawBoardCharacteristics( const wxPoint&
colLabel1.push_back( t ); colLabel1.push_back( t );
t = static_cast<PCB_TEXT*>( dataStyle->Duplicate() ); t = static_cast<PCB_TEXT*>( dataStyle->Duplicate() );
t->SetText( wxString::Format( "%s x %s", t->SetText( wxString::Format( wxT( "%s x %s" ),
MessageTextFromValue( m_frame->GetUserUnits(), size.GetWidth(), true ), MessageTextFromValue( m_frame->GetUserUnits(), size.GetWidth(), true ),
MessageTextFromValue( m_frame->GetUserUnits(), size.GetHeight(), true ) ) ); MessageTextFromValue( m_frame->GetUserUnits(), size.GetHeight(), true ) ) );
colData1.push_back( t ); colData1.push_back( t );
@ -447,7 +447,7 @@ std::vector<BOARD_ITEM*> DRAWING_TOOL::DrawBoardCharacteristics( const wxPoint&
colLabel1.push_back( t ); colLabel1.push_back( t );
t = static_cast<PCB_TEXT*>( dataStyle->Duplicate() ); t = static_cast<PCB_TEXT*>( dataStyle->Duplicate() );
t->SetText( wxString::Format( "%s / %s", t->SetText( wxString::Format( wxT( "%s / %s" ),
MessageTextFromValue( m_frame->GetUserUnits(), settings.m_TrackMinWidth, true ), MessageTextFromValue( m_frame->GetUserUnits(), settings.m_TrackMinWidth, true ),
MessageTextFromValue( m_frame->GetUserUnits(), settings.m_MinClearance, true ) ) ); MessageTextFromValue( m_frame->GetUserUnits(), settings.m_MinClearance, true ) ) );
colData1.push_back( t ); colData1.push_back( t );
@ -541,7 +541,7 @@ std::vector<BOARD_ITEM*> DRAWING_TOOL::DrawBoardCharacteristics( const wxPoint&
for( auto item : objects ) for( auto item : objects )
commit.Add( item ); commit.Add( item );
commit.Push( "Board Characteristics" ); commit.Push( wxT( "Board Characteristics" ) );
} }
tableSize->x = tableSize2.x; tableSize->x = tableSize2.x;
@ -677,7 +677,7 @@ int DRAWING_TOOL::InteractivePlaceWithPreview( const TOOL_EVENT& aEvent,
commit.Add( item ); commit.Add( item );
} }
commit.Push( "Placing items" ); commit.Push( wxT( "Placing items" ) );
m_frame->PopTool( tool ); m_frame->PopTool( tool );
break; break;

View File

@ -949,7 +949,7 @@ int DRAWING_TOOL::DrawDimension( const TOOL_EVENT& aEvent )
} }
else else
{ {
wxFAIL_MSG( "Unhandled action in DRAWING_TOOL::DrawDimension" ); wxFAIL_MSG( wxT( "Unhandled action in DRAWING_TOOL::DrawDimension" ) );
} }
t = dimension->Type(); t = dimension->Type();

View File

@ -2182,7 +2182,7 @@ int EDIT_TOOL::Duplicate( const TOOL_EVENT& aEvent )
break; break;
default: default:
wxASSERT_MSG( false, wxString::Format( "Unhandled item type %d", wxASSERT_MSG( false, wxString::Format( wxT( "Unhandled item type %d" ),
orig_item->Type() ) ); orig_item->Type() ) );
break; break;
} }

View File

@ -93,7 +93,7 @@ int GLOBAL_EDIT_TOOL::ExchangeFootprints( const TOOL_EVENT& aEvent )
} }
else else
{ {
wxFAIL_MSG( "ExchangeFootprints: unexpected action" ); wxFAIL_MSG( wxT( "ExchangeFootprints: unexpected action" ) );
} }
// invoke the exchange dialog process // invoke the exchange dialog process
@ -168,7 +168,7 @@ int GLOBAL_EDIT_TOOL::SwapLayers( const TOOL_EVENT& aEvent )
if( hasChanges ) if( hasChanges )
{ {
frame()->OnModify(); frame()->OnModify();
m_commit->Push( "Layers moved" ); m_commit->Push( wxT( "Layers moved" ) );
frame()->GetCanvas()->Refresh(); frame()->GetCanvas()->Refresh();
} }

View File

@ -399,7 +399,7 @@ int GROUP_TOOL::RemoveFromGroup( const TOOL_EVENT& aEvent )
pair.first->RemoveItem( item ); pair.first->RemoveItem( item );
} }
commit.Push( "Remove Group Items" ); commit.Push( wxT( "Remove Group Items" ) );
m_toolMgr->PostEvent( EVENTS::SelectedItemsModified ); m_toolMgr->PostEvent( EVENTS::SelectedItemsModified );
m_frame->OnModify(); m_frame->OnModify();

View File

@ -198,7 +198,8 @@ TOOL_ACTION PCB_ACTIONS::placeImportedGraphics( "pcbnew.InteractiveDrawing.place
TOOL_ACTION PCB_ACTIONS::setAnchor( "pcbnew.InteractiveDrawing.setAnchor", TOOL_ACTION PCB_ACTIONS::setAnchor( "pcbnew.InteractiveDrawing.setAnchor",
AS_GLOBAL, AS_GLOBAL,
MD_SHIFT + MD_CTRL + 'N', LEGACY_HK_NAME( "Place the Footprint Anchor" ), MD_SHIFT + MD_CTRL + 'N', LEGACY_HK_NAME( "Place the Footprint Anchor" ),
_( "Place the Footprint Anchor" ), _( "Set the coordinate origin point (anchor) of the footprint" ), _( "Place the Footprint Anchor" ),
_( "Set the coordinate origin point (anchor) of the footprint" ),
BITMAPS::anchor, AF_ACTIVATE ); BITMAPS::anchor, AF_ACTIVATE );
TOOL_ACTION PCB_ACTIONS::incWidth( "pcbnew.InteractiveDrawing.incWidth", TOOL_ACTION PCB_ACTIONS::incWidth( "pcbnew.InteractiveDrawing.incWidth",
@ -279,7 +280,8 @@ TOOL_ACTION PCB_ACTIONS::copyWithReference( "pcbnew.InteractiveMove.copyWithRefe
TOOL_ACTION PCB_ACTIONS::duplicateIncrement( "pcbnew.InteractiveEdit.duplicateIncrementPads", TOOL_ACTION PCB_ACTIONS::duplicateIncrement( "pcbnew.InteractiveEdit.duplicateIncrementPads",
AS_GLOBAL, AS_GLOBAL,
MD_SHIFT + MD_CTRL + 'D', LEGACY_HK_NAME( "Duplicate Item and Increment" ), MD_SHIFT + MD_CTRL + 'D', LEGACY_HK_NAME( "Duplicate Item and Increment" ),
_( "Duplicate and Increment" ), _( "Duplicates the selected item(s), incrementing pad numbers" ), _( "Duplicate and Increment" ),
_( "Duplicates the selected item(s), incrementing pad numbers" ),
BITMAPS::duplicate ); BITMAPS::duplicate );
TOOL_ACTION PCB_ACTIONS::moveExact( "pcbnew.InteractiveEdit.moveExact", TOOL_ACTION PCB_ACTIONS::moveExact( "pcbnew.InteractiveEdit.moveExact",
@ -343,12 +345,12 @@ TOOL_ACTION PCB_ACTIONS::properties( "pcbnew.InteractiveEdit.properties",
// //
TOOL_ACTION PCB_ACTIONS::showFootprintTree( "pcbnew.ModuleEditor.showFootprintTree", TOOL_ACTION PCB_ACTIONS::showFootprintTree( "pcbnew.ModuleEditor.showFootprintTree",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Show Footprint Tree" ), "", _( "Show Footprint Tree" ), _( "Show Footprint Tree" ),
BITMAPS::search_tree ); BITMAPS::search_tree );
TOOL_ACTION PCB_ACTIONS::hideFootprintTree( "pcbnew.ModuleEditor.hideFootprintTree", TOOL_ACTION PCB_ACTIONS::hideFootprintTree( "pcbnew.ModuleEditor.hideFootprintTree",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Hide Footprint Tree" ), "", _( "Hide Footprint Tree" ), _( "Hide Footprint Tree" ),
BITMAPS::search_tree ); BITMAPS::search_tree );
TOOL_ACTION PCB_ACTIONS::newFootprint( "pcbnew.ModuleEditor.newFootprint", TOOL_ACTION PCB_ACTIONS::newFootprint( "pcbnew.ModuleEditor.newFootprint",
@ -369,22 +371,22 @@ TOOL_ACTION PCB_ACTIONS::editFootprint( "pcbnew.ModuleEditor.editFootprint",
TOOL_ACTION PCB_ACTIONS::deleteFootprint( "pcbnew.ModuleEditor.deleteFootprint", TOOL_ACTION PCB_ACTIONS::deleteFootprint( "pcbnew.ModuleEditor.deleteFootprint",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Delete Footprint from Library" ), "", _( "Delete Footprint from Library" ), _( "Delete Footprint from Library" ),
BITMAPS::trash ); BITMAPS::trash );
TOOL_ACTION PCB_ACTIONS::cutFootprint( "pcbnew.ModuleEditor.cutFootprint", TOOL_ACTION PCB_ACTIONS::cutFootprint( "pcbnew.ModuleEditor.cutFootprint",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Cut Footprint" ), "", _( "Cut Footprint" ), _( "Cut Footprint" ),
BITMAPS::cut ); BITMAPS::cut );
TOOL_ACTION PCB_ACTIONS::copyFootprint( "pcbnew.ModuleEditor.copyFootprint", TOOL_ACTION PCB_ACTIONS::copyFootprint( "pcbnew.ModuleEditor.copyFootprint",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Copy Footprint" ), "", _( "Copy Footprint" ), _( "Copy Footprint" ),
BITMAPS::copy ); BITMAPS::copy );
TOOL_ACTION PCB_ACTIONS::pasteFootprint( "pcbnew.ModuleEditor.pasteFootprint", TOOL_ACTION PCB_ACTIONS::pasteFootprint( "pcbnew.ModuleEditor.pasteFootprint",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Paste Footprint" ), "", _( "Paste Footprint" ), _( "Paste Footprint" ),
BITMAPS::paste ); BITMAPS::paste );
TOOL_ACTION PCB_ACTIONS::importFootprint( "pcbnew.ModuleEditor.importFootprint", TOOL_ACTION PCB_ACTIONS::importFootprint( "pcbnew.ModuleEditor.importFootprint",
@ -481,22 +483,26 @@ TOOL_ACTION PCB_ACTIONS::microwaveCreateGap( "pcbnew.MicrowaveTool.createGap",
TOOL_ACTION PCB_ACTIONS::microwaveCreateStub( "pcbnew.MicrowaveTool.createStub", TOOL_ACTION PCB_ACTIONS::microwaveCreateStub( "pcbnew.MicrowaveTool.createStub",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Add Microwave Stub" ), _( "Create stub of specified length for microwave applications" ), _( "Add Microwave Stub" ),
_( "Create stub of specified length for microwave applications" ),
BITMAPS::mw_add_stub, AF_ACTIVATE, (void*) MICROWAVE_FOOTPRINT_SHAPE::STUB ); BITMAPS::mw_add_stub, AF_ACTIVATE, (void*) MICROWAVE_FOOTPRINT_SHAPE::STUB );
TOOL_ACTION PCB_ACTIONS::microwaveCreateStubArc( "pcbnew.MicrowaveTool.createStubArc", TOOL_ACTION PCB_ACTIONS::microwaveCreateStubArc( "pcbnew.MicrowaveTool.createStubArc",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Add Microwave Arc Stub" ), _( "Create stub (arc) of specified size for microwave applications" ), _( "Add Microwave Arc Stub" ),
_( "Create stub (arc) of specified size for microwave applications" ),
BITMAPS::mw_add_stub_arc, AF_ACTIVATE, (void*) MICROWAVE_FOOTPRINT_SHAPE::STUB_ARC ); BITMAPS::mw_add_stub_arc, AF_ACTIVATE, (void*) MICROWAVE_FOOTPRINT_SHAPE::STUB_ARC );
TOOL_ACTION PCB_ACTIONS::microwaveCreateFunctionShape( "pcbnew.MicrowaveTool.createFunctionShape", TOOL_ACTION PCB_ACTIONS::microwaveCreateFunctionShape( "pcbnew.MicrowaveTool.createFunctionShape",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Add Microwave Polygonal Shape" ), _( "Create a microwave polygonal shape from a list of vertices" ), _( "Add Microwave Polygonal Shape" ),
_( "Create a microwave polygonal shape from a list of vertices" ),
BITMAPS::mw_add_shape, AF_ACTIVATE, (void*) MICROWAVE_FOOTPRINT_SHAPE::FUNCTION_SHAPE ); BITMAPS::mw_add_shape, AF_ACTIVATE, (void*) MICROWAVE_FOOTPRINT_SHAPE::FUNCTION_SHAPE );
TOOL_ACTION PCB_ACTIONS::microwaveCreateLine( "pcbnew.MicrowaveTool.createLine", TOOL_ACTION PCB_ACTIONS::microwaveCreateLine( "pcbnew.MicrowaveTool.createLine",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Add Microwave Line" ), _( "Create line of specified length for microwave applications" ), _( "Add Microwave Line" ),
_( "Create line of specified length for microwave applications" ),
BITMAPS::mw_add_line, AF_ACTIVATE ); BITMAPS::mw_add_line, AF_ACTIVATE );
@ -546,7 +552,8 @@ TOOL_ACTION PCB_ACTIONS::recombinePad( "pcbnew.PadTool.recombinePad",
TOOL_ACTION PCB_ACTIONS::defaultPadProperties( "pcbnew.PadTool.defaultPadProperties", TOOL_ACTION PCB_ACTIONS::defaultPadProperties( "pcbnew.PadTool.defaultPadProperties",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Default Pad Properties..." ), _( "Edit the pad properties used when creating new pads" ), _( "Default Pad Properties..." ),
_( "Edit the pad properties used when creating new pads" ),
BITMAPS::options_pad ); BITMAPS::options_pad );
@ -630,7 +637,8 @@ TOOL_ACTION PCB_ACTIONS::trackWidthInc( "pcbnew.EditorControl.trackWidthInc",
TOOL_ACTION PCB_ACTIONS::trackWidthDec( "pcbnew.EditorControl.trackWidthDec", TOOL_ACTION PCB_ACTIONS::trackWidthDec( "pcbnew.EditorControl.trackWidthDec",
AS_GLOBAL, AS_GLOBAL,
MD_SHIFT + 'W', LEGACY_HK_NAME( "Switch Track Width To Previous" ), MD_SHIFT + 'W', LEGACY_HK_NAME( "Switch Track Width To Previous" ),
_( "Switch Track Width to Previous" ), _( "Change track width to previous pre-defined size" ) ); _( "Switch Track Width to Previous" ),
_( "Change track width to previous pre-defined size" ) );
TOOL_ACTION PCB_ACTIONS::viaSizeInc( "pcbnew.EditorControl.viaSizeInc", TOOL_ACTION PCB_ACTIONS::viaSizeInc( "pcbnew.EditorControl.viaSizeInc",
AS_GLOBAL, AS_GLOBAL,
@ -870,12 +878,12 @@ TOOL_ACTION PCB_ACTIONS::zoneDisplayOutline( "pcbnew.Control.zoneDisplayDisable"
TOOL_ACTION PCB_ACTIONS::zoneDisplayFractured( "pcbnew.Control.zoneDisplayOutlines", TOOL_ACTION PCB_ACTIONS::zoneDisplayFractured( "pcbnew.Control.zoneDisplayOutlines",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Draw Zone Fill Fracture Borders" ), "", _( "Draw Zone Fill Fracture Borders" ), _( "Draw Zone Fill Fracture Borders" ),
BITMAPS::show_zone_outline_only ); BITMAPS::show_zone_outline_only );
TOOL_ACTION PCB_ACTIONS::zoneDisplayTriangulated( "pcbnew.Control.zoneDisplayTesselation", TOOL_ACTION PCB_ACTIONS::zoneDisplayTriangulated( "pcbnew.Control.zoneDisplayTesselation",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Draw Zone Fill Triangulation" ), "", _( "Draw Zone Fill Triangulation" ), _( "Draw Zone Fill Triangulation" ),
BITMAPS::show_zone_triangulation ); BITMAPS::show_zone_triangulation );
TOOL_ACTION PCB_ACTIONS::zoneDisplayToggle( "pcbnew.Control.zoneDisplayToggle", TOOL_ACTION PCB_ACTIONS::zoneDisplayToggle( "pcbnew.Control.zoneDisplayToggle",
@ -890,181 +898,181 @@ TOOL_ACTION PCB_ACTIONS::zoneDisplayToggle( "pcbnew.Control.zoneDisplayToggle",
TOOL_ACTION PCB_ACTIONS::layerTop( "pcbnew.Control.layerTop", TOOL_ACTION PCB_ACTIONS::layerTop( "pcbnew.Control.layerTop",
AS_GLOBAL, AS_GLOBAL,
WXK_PAGEUP, LEGACY_HK_NAME( "Switch to Component (F.Cu) layer" ), WXK_PAGEUP, LEGACY_HK_NAME( "Switch to Component (F.Cu) layer" ),
_( "Switch to Component (F.Cu) layer" ), "", _( "Switch to Component (F.Cu) layer" ), _( "Switch to Component (F.Cu) layer" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) F_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) F_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner1( "pcbnew.Control.layerInner1", TOOL_ACTION PCB_ACTIONS::layerInner1( "pcbnew.Control.layerInner1",
AS_GLOBAL, AS_GLOBAL,
0, LEGACY_HK_NAME( "Switch to Inner layer 1" ), 0, LEGACY_HK_NAME( "Switch to Inner layer 1" ),
_( "Switch to Inner layer 1" ), "", _( "Switch to Inner layer 1" ), _( "Switch to Inner layer 1" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In1_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In1_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner2( "pcbnew.Control.layerInner2", TOOL_ACTION PCB_ACTIONS::layerInner2( "pcbnew.Control.layerInner2",
AS_GLOBAL, AS_GLOBAL,
0, LEGACY_HK_NAME( "Switch to Inner layer 2" ), 0, LEGACY_HK_NAME( "Switch to Inner layer 2" ),
_( "Switch to Inner layer 2" ), "", _( "Switch to Inner layer 2" ), _( "Switch to Inner layer 2" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In2_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In2_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner3( "pcbnew.Control.layerInner3", TOOL_ACTION PCB_ACTIONS::layerInner3( "pcbnew.Control.layerInner3",
AS_GLOBAL, AS_GLOBAL,
0, LEGACY_HK_NAME( "Switch to Inner layer 3" ), 0, LEGACY_HK_NAME( "Switch to Inner layer 3" ),
_( "Switch to Inner layer 3" ), "", _( "Switch to Inner layer 3" ), _( "Switch to Inner layer 3" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In3_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In3_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner4( "pcbnew.Control.layerInner4", TOOL_ACTION PCB_ACTIONS::layerInner4( "pcbnew.Control.layerInner4",
AS_GLOBAL, AS_GLOBAL,
0, LEGACY_HK_NAME( "Switch to Inner layer 4" ), 0, LEGACY_HK_NAME( "Switch to Inner layer 4" ),
_( "Switch to Inner layer 4" ), "", _( "Switch to Inner layer 4" ), _( "Switch to Inner layer 4" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In4_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In4_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner5( "pcbnew.Control.layerInner5", TOOL_ACTION PCB_ACTIONS::layerInner5( "pcbnew.Control.layerInner5",
AS_GLOBAL, AS_GLOBAL,
0, LEGACY_HK_NAME( "Switch to Inner layer 5" ), 0, LEGACY_HK_NAME( "Switch to Inner layer 5" ),
_( "Switch to Inner layer 5" ), "", _( "Switch to Inner layer 5" ), _( "Switch to Inner layer 5" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In5_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In5_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner6( "pcbnew.Control.layerInner6", TOOL_ACTION PCB_ACTIONS::layerInner6( "pcbnew.Control.layerInner6",
AS_GLOBAL, AS_GLOBAL,
0, LEGACY_HK_NAME( "Switch to Inner layer 6" ), 0, LEGACY_HK_NAME( "Switch to Inner layer 6" ),
_( "Switch to Inner layer 6" ), "", _( "Switch to Inner layer 6" ), _( "Switch to Inner layer 6" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In6_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In6_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner7( "pcbnew.Control.layerInner7", TOOL_ACTION PCB_ACTIONS::layerInner7( "pcbnew.Control.layerInner7",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 7" ), "", _( "Switch to Inner layer 7" ), _( "Switch to Inner layer 7" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In7_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In7_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner8( "pcbnew.Control.layerInner8", TOOL_ACTION PCB_ACTIONS::layerInner8( "pcbnew.Control.layerInner8",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 8" ), "", _( "Switch to Inner layer 8" ), _( "Switch to Inner layer 8" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In8_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In8_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner9( "pcbnew.Control.layerInner9", TOOL_ACTION PCB_ACTIONS::layerInner9( "pcbnew.Control.layerInner9",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 9" ), "", _( "Switch to Inner layer 9" ), _( "Switch to Inner layer 9" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In9_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In9_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner10( "pcbnew.Control.layerInner10", TOOL_ACTION PCB_ACTIONS::layerInner10( "pcbnew.Control.layerInner10",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 10" ), "", _( "Switch to Inner layer 10" ), _( "Switch to Inner layer 10" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In10_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In10_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner11( "pcbnew.Control.layerInner11", TOOL_ACTION PCB_ACTIONS::layerInner11( "pcbnew.Control.layerInner11",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 11" ), "", _( "Switch to Inner layer 11" ), _( "Switch to Inner layer 11" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In11_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In11_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner12( "pcbnew.Control.layerInner12", TOOL_ACTION PCB_ACTIONS::layerInner12( "pcbnew.Control.layerInner12",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 12" ), "", _( "Switch to Inner layer 12" ), _( "Switch to Inner layer 12" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In12_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In12_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner13( "pcbnew.Control.layerInner13", TOOL_ACTION PCB_ACTIONS::layerInner13( "pcbnew.Control.layerInner13",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 13" ), "", _( "Switch to Inner layer 13" ), _( "Switch to Inner layer 13" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In13_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In13_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner14( "pcbnew.Control.layerInner14", TOOL_ACTION PCB_ACTIONS::layerInner14( "pcbnew.Control.layerInner14",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 14" ), "", _( "Switch to Inner layer 14" ), _( "Switch to Inner layer 14" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In14_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In14_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner15( "pcbnew.Control.layerInner15", TOOL_ACTION PCB_ACTIONS::layerInner15( "pcbnew.Control.layerInner15",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 15" ), "", _( "Switch to Inner layer 15" ), _( "Switch to Inner layer 15" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In15_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In15_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner16( "pcbnew.Control.layerInner16", TOOL_ACTION PCB_ACTIONS::layerInner16( "pcbnew.Control.layerInner16",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 16" ), "", _( "Switch to Inner layer 16" ), _( "Switch to Inner layer 16" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In16_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In16_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner17( "pcbnew.Control.layerInner17", TOOL_ACTION PCB_ACTIONS::layerInner17( "pcbnew.Control.layerInner17",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 17" ), "", _( "Switch to Inner layer 17" ), _( "Switch to Inner layer 17" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In17_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In17_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner18( "pcbnew.Control.layerInner18", TOOL_ACTION PCB_ACTIONS::layerInner18( "pcbnew.Control.layerInner18",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 18" ), "", _( "Switch to Inner layer 18" ), _( "Switch to Inner layer 18" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In18_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In18_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner19( "pcbnew.Control.layerInner19", TOOL_ACTION PCB_ACTIONS::layerInner19( "pcbnew.Control.layerInner19",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 19" ), "", _( "Switch to Inner layer 19" ), _( "Switch to Inner layer 19" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In19_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In19_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner20( "pcbnew.Control.layerInner20", TOOL_ACTION PCB_ACTIONS::layerInner20( "pcbnew.Control.layerInner20",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 20" ), "", _( "Switch to Inner layer 20" ), _( "Switch to Inner layer 20" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In20_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In20_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner21( "pcbnew.Control.layerInner21", TOOL_ACTION PCB_ACTIONS::layerInner21( "pcbnew.Control.layerInner21",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 21" ), "", _( "Switch to Inner layer 21" ), _( "Switch to Inner layer 21" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In21_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In21_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner22( "pcbnew.Control.layerInner22", TOOL_ACTION PCB_ACTIONS::layerInner22( "pcbnew.Control.layerInner22",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 22" ), "", _( "Switch to Inner layer 22" ), _( "Switch to Inner layer 22" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In22_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In22_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner23( "pcbnew.Control.layerInner23", TOOL_ACTION PCB_ACTIONS::layerInner23( "pcbnew.Control.layerInner23",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 23" ), "", _( "Switch to Inner layer 23" ), _( "Switch to Inner layer 23" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In23_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In23_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner24( "pcbnew.Control.layerInner24", TOOL_ACTION PCB_ACTIONS::layerInner24( "pcbnew.Control.layerInner24",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 24" ), "", _( "Switch to Inner layer 24" ), _( "Switch to Inner layer 24" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In24_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In24_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner25( "pcbnew.Control.layerInner25", TOOL_ACTION PCB_ACTIONS::layerInner25( "pcbnew.Control.layerInner25",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 25" ), "", _( "Switch to Inner layer 25" ), _( "Switch to Inner layer 25" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In25_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In25_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner26( "pcbnew.Control.layerInner26", TOOL_ACTION PCB_ACTIONS::layerInner26( "pcbnew.Control.layerInner26",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 26" ), "", _( "Switch to Inner layer 26" ), _( "Switch to Inner layer 26" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In26_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In26_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner27( "pcbnew.Control.layerInner27", TOOL_ACTION PCB_ACTIONS::layerInner27( "pcbnew.Control.layerInner27",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 27" ), "", _( "Switch to Inner layer 27" ), _( "Switch to Inner layer 27" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In27_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In27_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner28( "pcbnew.Control.layerInner28", TOOL_ACTION PCB_ACTIONS::layerInner28( "pcbnew.Control.layerInner28",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 28" ), "", _( "Switch to Inner layer 28" ), _( "Switch to Inner layer 28" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In28_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In28_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner29( "pcbnew.Control.layerInner29", TOOL_ACTION PCB_ACTIONS::layerInner29( "pcbnew.Control.layerInner29",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 29" ), "", _( "Switch to Inner layer 29" ), _( "Switch to Inner layer 29" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In29_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In29_Cu );
TOOL_ACTION PCB_ACTIONS::layerInner30( "pcbnew.Control.layerInner30", TOOL_ACTION PCB_ACTIONS::layerInner30( "pcbnew.Control.layerInner30",
AS_GLOBAL, 0, "", AS_GLOBAL, 0, "",
_( "Switch to Inner layer 30" ), "", _( "Switch to Inner layer 30" ), _( "Switch to Inner layer 30" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In30_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) In30_Cu );
TOOL_ACTION PCB_ACTIONS::layerBottom( "pcbnew.Control.layerBottom", TOOL_ACTION PCB_ACTIONS::layerBottom( "pcbnew.Control.layerBottom",
AS_GLOBAL, AS_GLOBAL,
WXK_PAGEDOWN, LEGACY_HK_NAME( "Switch to Copper (B.Cu) layer" ), WXK_PAGEDOWN, LEGACY_HK_NAME( "Switch to Copper (B.Cu) layer" ),
_( "Switch to Copper (B.Cu) layer" ), "", _( "Switch to Copper (B.Cu) layer" ), _( "Switch to Copper (B.Cu) layer" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) B_Cu ); BITMAPS::INVALID_BITMAP, AF_NOTIFY, (void*) B_Cu );
TOOL_ACTION PCB_ACTIONS::layerNext( "pcbnew.Control.layerNext", TOOL_ACTION PCB_ACTIONS::layerNext( "pcbnew.Control.layerNext",
AS_GLOBAL, AS_GLOBAL,
'+', LEGACY_HK_NAME( "Switch to Next Layer" ), '+', LEGACY_HK_NAME( "Switch to Next Layer" ),
_( "Switch to Next Layer" ), "", _( "Switch to Next Layer" ), _( "Switch to Next Layer" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY ); BITMAPS::INVALID_BITMAP, AF_NOTIFY );
TOOL_ACTION PCB_ACTIONS::layerPrev( "pcbnew.Control.layerPrev", TOOL_ACTION PCB_ACTIONS::layerPrev( "pcbnew.Control.layerPrev",
AS_GLOBAL, AS_GLOBAL,
'-', LEGACY_HK_NAME( "Switch to Previous Layer" ), '-', LEGACY_HK_NAME( "Switch to Previous Layer" ),
_( "Switch to Previous Layer" ), "", _( "Switch to Previous Layer" ), _( "Switch to Previous Layer" ),
BITMAPS::INVALID_BITMAP, AF_NOTIFY ); BITMAPS::INVALID_BITMAP, AF_NOTIFY );
TOOL_ACTION PCB_ACTIONS::layerToggle( "pcbnew.Control.layerToggle", TOOL_ACTION PCB_ACTIONS::layerToggle( "pcbnew.Control.layerToggle",

View File

@ -218,7 +218,7 @@ void PCB_CONTROL::unfilledZoneCheck()
wxString msg; wxString msg;
msg.Printf( _( "Not all zones are filled. Use Edit > Fill All Zones (%s) " msg.Printf( _( "Not all zones are filled. Use Edit > Fill All Zones (%s) "
"if you wish to see all fills." ), "if you wish to see all fills." ),
KeyNameFromKeyCode( PCB_ACTIONS::zoneFillAll.GetHotKey() ) ); KeyNameFromKeyCode( PCB_ACTIONS::zoneFillAll.GetHotKey() ) );
infobar->ShowMessageFor( msg, 5000, wxICON_WARNING ); infobar->ShowMessageFor( msg, 5000, wxICON_WARNING );

View File

@ -131,7 +131,7 @@ bool PCB_POINT_EDITOR::Init()
// Find the selection tool, so they can cooperate // Find the selection tool, so they can cooperate
m_selectionTool = m_toolMgr->GetTool<PCB_SELECTION_TOOL>(); m_selectionTool = m_toolMgr->GetTool<PCB_SELECTION_TOOL>();
wxASSERT_MSG( m_selectionTool, "pcbnew.InteractiveSelection tool is not available" ); wxASSERT_MSG( m_selectionTool, wxT( "pcbnew.InteractiveSelection tool is not available" ) );
auto& menu = m_selectionTool->GetToolMenu().GetMenu(); auto& menu = m_selectionTool->GetToolMenu().GetMenu();
menu.AddItem( PCB_ACTIONS::pointEditorAddCorner, PCB_POINT_EDITOR::addCornerCondition ); menu.AddItem( PCB_ACTIONS::pointEditorAddCorner, PCB_POINT_EDITOR::addCornerCondition );

View File

@ -468,7 +468,7 @@ int PCB_SELECTION_TOOL::Main( const TOOL_EVENT& aEvent )
void PCB_SELECTION_TOOL::EnterGroup() void PCB_SELECTION_TOOL::EnterGroup()
{ {
wxCHECK_RET( m_selection.GetSize() == 1 && m_selection[0]->Type() == PCB_GROUP_T, wxCHECK_RET( m_selection.GetSize() == 1 && m_selection[0]->Type() == PCB_GROUP_T,
"EnterGroup called when selection is not a single group" ); wxT( "EnterGroup called when selection is not a single group" ) );
PCB_GROUP* aGroup = static_cast<PCB_GROUP*>( m_selection[0] ); PCB_GROUP* aGroup = static_cast<PCB_GROUP*>( m_selection[0] );
if( m_enteredGroup != nullptr ) if( m_enteredGroup != nullptr )
@ -2162,7 +2162,7 @@ bool PCB_SELECTION_TOOL::doSelectionMenu( GENERAL_COLLECTOR* aCollector )
BOARD_ITEM* item = ( *aCollector )[i]; BOARD_ITEM* item = ( *aCollector )[i];
text = item->GetSelectMenuText( m_frame->GetUserUnits() ); text = item->GetSelectMenuText( m_frame->GetUserUnits() );
wxString menuText = wxString::Format( "&%d. %s\t%d", i + 1, text, i + 1 ); wxString menuText = wxString::Format( wxT( "&%d. %s\t%d" ), i + 1, text, i + 1 );
menu.Add( menuText, i + 1, item->GetMenuImage() ); menu.Add( menuText, i + 1, item->GetMenuImage() );
} }
@ -2856,7 +2856,7 @@ void PCB_SELECTION_TOOL::GuessSelectionCandidates( GENERAL_COLLECTOR& aCollector
} }
catch( const ClipperLib::clipperException& e ) catch( const ClipperLib::clipperException& e )
{ {
wxLogError( "A clipper exception %s was detected.", e.what() ); wxLogError( wxT( "A clipper exception %s was detected." ), e.what() );
} }
} }

View File

@ -36,7 +36,7 @@ bool TOOL_EVT_UTILS::IsRotateToolEvt( const TOOL_EVENT& aEvt )
EDA_ANGLE TOOL_EVT_UTILS::GetEventRotationAngle( const PCB_BASE_EDIT_FRAME& aFrame, EDA_ANGLE TOOL_EVT_UTILS::GetEventRotationAngle( const PCB_BASE_EDIT_FRAME& aFrame,
const TOOL_EVENT& aEvent ) const TOOL_EVENT& aEvent )
{ {
wxASSERT_MSG( IsRotateToolEvt( aEvent ), "Expected rotation event" ); wxASSERT_MSG( IsRotateToolEvt( aEvent ), wxT( "Expected rotation event" ) );
EDA_ANGLE rotAngle = aFrame.GetRotationAngle(); EDA_ANGLE rotAngle = aFrame.GetRotationAngle();
const int angleMultiplier = aEvent.Parameter<intptr_t>(); const int angleMultiplier = aEvent.Parameter<intptr_t>();

View File

@ -361,7 +361,8 @@ static bool getOutlineModel( VRML_LAYER& model, const std::list< IDF_OUTLINE* >*
if( nvcont < 0 ) if( nvcont < 0 )
{ {
wxLogTrace( traceIdfPlugin, "%s:%s:%s\n * [INFO] cannot create an outline", wxLogTrace( traceIdfPlugin, wxT( "%s:%s:%s\n"
"* [INFO] cannot create an outline" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -369,7 +370,8 @@ static bool getOutlineModel( VRML_LAYER& model, const std::list< IDF_OUTLINE* >*
if( (*scont)->size() < 1 ) if( (*scont)->size() < 1 )
{ {
wxLogTrace( traceIdfPlugin, "%s:%s:%s\n * [INFO] invalid contour: no vertices", wxLogTrace( traceIdfPlugin, wxT( "%s:%s:%s\n "
"* [INFO] invalid contour: no vertices" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -386,7 +388,8 @@ static bool getOutlineModel( VRML_LAYER& model, const std::list< IDF_OUTLINE* >*
if( !addSegment( model, &lseg, nvcont, iseg ) ) if( !addSegment( model, &lseg, nvcont, iseg ) )
{ {
wxLogTrace( traceIdfPlugin, "%s:%s:%s\n * [BUG] cannot add segment", wxLogTrace( traceIdfPlugin, wxT( "%s:%s:%s\n"
"* [BUG] cannot add segment" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return false; return false;
@ -414,8 +417,10 @@ static bool addSegment( VRML_LAYER& model, IDF_SEGMENT* seg, int icont, int iseg
{ {
if( iseg != 0 ) if( iseg != 0 )
{ {
wxLogTrace( traceIdfPlugin, "%s:%s:%s\n * [INFO] adding a circle to an " wxLogTrace( traceIdfPlugin,
"existing vertex list", __FILE__, __FUNCTION__, __LINE__ ); wxT( "%s:%s:%s\n"
"* [INFO] adding a circle to an existing vertex list" ),
__FILE__, __FUNCTION__, __LINE__ );
return false; return false;
} }
@ -453,7 +458,8 @@ static SCENEGRAPH* vrmlToSG( VRML_LAYER& vpcb, int idxColor, SGNODE* aParent, do
if( !vpcb.Get3DTriangles( vertices, idxPlane, idxSide, top, bottom ) ) if( !vpcb.Get3DTriangles( vertices, idxPlane, idxSide, top, bottom ) )
{ {
wxLogTrace( traceIdfPlugin, "%s:%s:%s\n * [INFO] no vertex data", wxLogTrace( traceIdfPlugin, wxT( "%s:%s:%s\n"
"* [INFO] no vertex data" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return nullptr; return nullptr;
@ -461,8 +467,10 @@ static SCENEGRAPH* vrmlToSG( VRML_LAYER& vpcb, int idxColor, SGNODE* aParent, do
if( ( idxPlane.size() % 3 ) || ( idxSide.size() % 3 ) ) if( ( idxPlane.size() % 3 ) || ( idxSide.size() % 3 ) )
{ {
wxLogTrace( traceIdfPlugin, "%s:%s:%s\n * [BUG] index lists are not a multiple of 3 " wxLogTrace( traceIdfPlugin,
"(not a triangle list)", __FILE__, __FUNCTION__, __LINE__ ); wxT( "%s:%s:%s\n"
"* [BUG] index lists are not a multiple of 3 (not a triangle list)" ),
__FILE__, __FUNCTION__, __LINE__ );
return nullptr; return nullptr;
} }
@ -571,7 +579,8 @@ static SCENEGRAPH* addOutline( IDF3_COMP_OUTLINE* outline, int idxColor, SGNODE*
if( !getOutlineModel( vpcb, outline->GetOutlines() ) ) if( !getOutlineModel( vpcb, outline->GetOutlines() ) )
{ {
wxLogTrace( traceIdfPlugin, "%s:%s:%s\n * [INFO] no valid outline data", wxLogTrace( traceIdfPlugin, wxT( "%s:%s:%s\n"
"* [INFO] no valid outline data" ),
__FILE__, __FUNCTION__, __LINE__ ); __FILE__, __FUNCTION__, __LINE__ );
return nullptr; return nullptr;
@ -605,9 +614,13 @@ static SCENEGRAPH* loadIDFOutline( const wxString& aFileName )
if( nullptr == outline ) if( nullptr == outline )
{ {
wxLogTrace( traceIdfPlugin, "%s:%s:%s\n * [INFO] Failed to read IDF data:\n%s\n" wxLogTrace( traceIdfPlugin, wxT( "%s:%s:%s\n"
" * [INFO] no outline for file '%s'", __FILE__, __FUNCTION__, __LINE__, "* [INFO] Failed to read IDF data:\n"
brd.GetError(), aFileName ); "%s\n"
"* [INFO] no outline for file '%s'" ),
__FILE__, __FUNCTION__, __LINE__,
brd.GetError(),
aFileName );
return nullptr; return nullptr;
} }
@ -626,9 +639,11 @@ static SCENEGRAPH* loadIDFBoard( const wxString& aFileName )
// note: if the IDF model is defective no outline substitutes shall be made // note: if the IDF model is defective no outline substitutes shall be made
if( !brd.ReadFile( aFileName, true ) ) if( !brd.ReadFile( aFileName, true ) )
{ {
wxLogTrace( traceIdfPlugin, "%s:%s:%s\n" wxLogTrace( traceIdfPlugin, wxT( "%s:%s:%s\n"
"* [INFO] Error '%s' occurred reading IDF file: %s", "* [INFO] Error '%s' occurred reading IDF file: %s" ),
__FILE__, __FUNCTION__, __LINE__, brd.GetError(), aFileName ); __FILE__, __FUNCTION__, __LINE__,
brd.GetError(),
aFileName );
return nullptr; return nullptr;
} }

View File

@ -84,8 +84,8 @@
// log mask for wxLogTrace // log mask for wxLogTrace
#define MASK_OCE "PLUGIN_OCE" #define MASK_OCE wxT( "PLUGIN_OCE" )
#define MASK_OCE_EXTRA "PLUGIN_OCE_EXTRA" #define MASK_OCE_EXTRA wxT( "PLUGIN_OCE_EXTRA" )
// precision for mesh creation; 0.07 should be good enough for ECAD viewing // precision for mesh creation; 0.07 should be good enough for ECAD viewing
#define USER_PREC (0.14) #define USER_PREC (0.14)
@ -283,9 +283,11 @@ FormatType fileType( const char* aFileName )
if( !ifile.IsOk() ) if( !ifile.IsOk() )
return FMT_NONE; return FMT_NONE;
if( fname.GetExt().MakeUpper().EndsWith( "STPZ" ) || if( fname.GetExt().MakeUpper().EndsWith( wxT( "STPZ" ) )
fname.GetExt().MakeUpper().EndsWith( "GZ" ) ) || fname.GetExt().MakeUpper().EndsWith( wxT( "GZ" ) ) )
{
return FMT_STPZ; return FMT_STPZ;
}
char iline[82]; char iline[82];
memset( iline, 0, 82 ); memset( iline, 0, 82 );
@ -326,7 +328,7 @@ void getTag( const TDF_Label& aLabel, std::string& aTag )
if( aLabel.IsNull() ) if( aLabel.IsNull() )
{ {
wxLogTrace( MASK_OCE, "Null label passed to getTag" ); wxLogTrace( MASK_OCE, wxT( "Null label passed to getTag" ) );
return; return;
} }
@ -550,7 +552,7 @@ bool readIGES( Handle( TDocStd_Document ) & m_doc, const char* fname )
bool readSTEP( Handle(TDocStd_Document)& m_doc, const char* fname ) bool readSTEP( Handle(TDocStd_Document)& m_doc, const char* fname )
{ {
wxLogTrace( MASK_OCE, "Reading step file %s", fname ); wxLogTrace( MASK_OCE, wxT( "Reading step file %s" ), fname );
STEPCAFControl_Reader reader; STEPCAFControl_Reader reader;
IFSelect_ReturnStatus stat = reader.ReadFile( fname ); IFSelect_ReturnStatus stat = reader.ReadFile( fname );
@ -593,7 +595,7 @@ bool readSTEPZ( Handle(TDocStd_Document)& m_doc, const char* aFileName )
wxFileName outFile( fname ); wxFileName outFile( fname );
outFile.SetPath( wxStandardPaths::Get().GetTempDir() ); outFile.SetPath( wxStandardPaths::Get().GetTempDir() );
outFile.SetExt( "STEP" ); outFile.SetExt( wxT( "STEP" ) );
wxFileOffset size = ifile.GetLength(); wxFileOffset size = ifile.GetLength();
wxBusyCursor busycursor; wxBusyCursor busycursor;
@ -757,7 +759,7 @@ bool processShell( const TopoDS_Shape& shape, DATA& data, SGNODE* parent,
TopoDS_Iterator it; TopoDS_Iterator it;
bool ret = false; bool ret = false;
wxLogTrace( MASK_OCE, "Processing shell" ); wxLogTrace( MASK_OCE, wxT( "Processing shell" ) );
for( it.Initialize( shape, false, false ); it.More(); it.Next() ) for( it.Initialize( shape, false, false ); it.More(); it.Next() )
{ {
const TopoDS_Face& face = TopoDS::Face( it.Value() ); const TopoDS_Face& face = TopoDS::Face( it.Value() );
@ -779,7 +781,7 @@ bool processSolid( const TopoDS_Shape& shape, DATA& data, SGNODE* parent,
Quantity_Color col; Quantity_Color col;
Quantity_Color* lcolor = nullptr; Quantity_Color* lcolor = nullptr;
wxLogTrace( MASK_OCE, "Processing solid" ); wxLogTrace( MASK_OCE, wxT( "Processing solid" ) );
// Search the whole model first to make sure something exists (may or may not have color) // Search the whole model first to make sure something exists (may or may not have color)
if( !data.m_assy->Search( shape, label ) ) if( !data.m_assy->Search( shape, label ) )
@ -871,7 +873,7 @@ bool processSolid( const TopoDS_Shape& shape, DATA& data, SGNODE* parent,
} }
else else
{ {
wxLogTrace( MASK_OCE, "Unsupported subshape in solid" ); wxLogTrace( MASK_OCE, wxT( "Unsupported subshape in solid" ) );
} }
} }
@ -895,7 +897,7 @@ bool processLabel( const TDF_Label& aLabel, DATA& aData, SGNODE* aParent,
getTag( aLabel, labelTag ); getTag( aLabel, labelTag );
} }
wxLogTrace( MASK_OCE, "Processing label %s", labelTag ); wxLogTrace( MASK_OCE, wxT( "Processing label %s" ), labelTag );
TopoDS_Shape originalShape; TopoDS_Shape originalShape;
TDF_Label shapeLabel = aLabel; TDF_Label shapeLabel = aLabel;
@ -909,7 +911,8 @@ bool processLabel( const TDF_Label& aLabel, DATA& aData, SGNODE* aParent,
if( aData.m_assy->IsReference( aLabel ) ) if( aData.m_assy->IsReference( aLabel ) )
{ {
wxLogTrace( MASK_OCE, "Label %s is ref, trying to pull up referred label", labelTag ); wxLogTrace( MASK_OCE, wxT( "Label %s is ref, trying to pull up referred label" ),
labelTag );
if( !aData.m_assy->GetReferredShape( aLabel, shapeLabel ) ) if( !aData.m_assy->GetReferredShape( aLabel, shapeLabel ) )
{ {
@ -917,7 +920,7 @@ bool processLabel( const TDF_Label& aLabel, DATA& aData, SGNODE* aParent,
} }
labelTag = static_cast<int>( shapeLabel.Tag() ); labelTag = static_cast<int>( shapeLabel.Tag() );
// wxLogTrace( MASK_OCE, "Label %s referred", labelTag ); // wxLogTrace( MASK_OCE, wxT( "Label %s referred" ), labelTag );
if( !aData.m_assy->GetShape( shapeLabel, shape ) ) if( !aData.m_assy->GetShape( shapeLabel, shape ) )
{ {
@ -933,19 +936,19 @@ bool processLabel( const TDF_Label& aLabel, DATA& aData, SGNODE* aParent,
if( !loc.IsIdentity() ) if( !loc.IsIdentity() )
{ {
wxLogTrace( MASK_OCE, "Label %d has location", static_cast<int>( aLabel.Tag() ) ); wxLogTrace( MASK_OCE, wxT( "Label %d has location" ), static_cast<int>( aLabel.Tag() ) );
gp_Trsf T = loc.Transformation(); gp_Trsf T = loc.Transformation();
gp_XYZ coord = T.TranslationPart(); gp_XYZ coord = T.TranslationPart();
childNode.SetTranslation( SGPOINT( coord.X(), coord.Y(), coord.Z() ) ); childNode.SetTranslation( SGPOINT( coord.X(), coord.Y(), coord.Z() ) );
wxLogTrace( MASK_OCE, "Translation %f, %f, %f", coord.X(), coord.Y(), coord.Z() ); wxLogTrace( MASK_OCE, wxT( "Translation %f, %f, %f" ), coord.X(), coord.Y(), coord.Z() );
gp_XYZ axis; gp_XYZ axis;
Standard_Real angle; Standard_Real angle;
if( T.GetRotation( axis, angle ) ) if( T.GetRotation( axis, angle ) )
{ {
childNode.SetRotation( SGVECTOR( axis.X(), axis.Y(), axis.Z() ), angle ); childNode.SetRotation( SGVECTOR( axis.X(), axis.Y(), axis.Z() ), angle );
wxLogTrace( MASK_OCE, "Rotation %f, %f, %f, angle %f", axis.X(), axis.Y(), axis.Z(), wxLogTrace( MASK_OCE, wxT( "Rotation %f, %f, %f, angle %f" ),
angle ); axis.X(), axis.Y(), axis.Z(), angle );
} }
} }
@ -1005,8 +1008,9 @@ bool processLabel( const TDF_Label& aLabel, DATA& aData, SGNODE* aParent,
if( shapeLabel.HasChild() ) if( shapeLabel.HasChild() )
{ {
wxLogTrace( MASK_OCE, "Label %s has children", labelTag ); wxLogTrace( MASK_OCE, wxT( "Label %s has children" ), labelTag );
TDF_ChildIterator it; TDF_ChildIterator it;
for( it.Initialize( shapeLabel ); it.More(); it.Next() ) for( it.Initialize( shapeLabel ); it.More(); it.Next() )
{ {
if( processLabel( it.Value(), aData, pptr, aItems ) ) if( processLabel( it.Value(), aData, pptr, aItems ) )

View File

@ -50,7 +50,7 @@ WRL1COORDS::WRL1COORDS( NAMEREGISTER* aDictionary, WRL1NODE* aParent ) :
WRL1COORDS::~WRL1COORDS() WRL1COORDS::~WRL1COORDS()
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Destroying Coordinate3 node." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying Coordinate3 node." ) );
} }

View File

@ -206,7 +206,7 @@ SGNODE* WRL1FACESET::TranslateToSG( SGNODE* aParent, WRL1STATUS* sp )
// decompose into Rotate,Scale,Transform via an analytic expression. // decompose into Rotate,Scale,Transform via an analytic expression.
if( !m_Parent ) if( !m_Parent )
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] bad model: no parent node." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] bad model: no parent node." ) );
return nullptr; return nullptr;
} }
@ -214,7 +214,7 @@ SGNODE* WRL1FACESET::TranslateToSG( SGNODE* aParent, WRL1STATUS* sp )
{ {
if( nullptr == sp ) if( nullptr == sp )
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] bad model: no base data given." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] bad model: no base data given." ) );
return nullptr; return nullptr;
} }
@ -224,13 +224,13 @@ SGNODE* WRL1FACESET::TranslateToSG( SGNODE* aParent, WRL1STATUS* sp )
if( nullptr == m_current.coord ) if( nullptr == m_current.coord )
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] bad model: no vertex set." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] bad model: no vertex set." ) );
return nullptr; return nullptr;
} }
if( nullptr == m_current.mat ) if( nullptr == m_current.mat )
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] bad model: no material set." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] bad model: no material set." ) );
return nullptr; return nullptr;
} }

View File

@ -140,7 +140,7 @@ SGNODE* WRL1GROUP::TranslateToSG( SGNODE* aParent, WRL1STATUS* sp )
{ {
/// @todo Determine if this is a bug or can actually happen parsing a VRML file. /// @todo Determine if this is a bug or can actually happen parsing a VRML file.
/// If it's a bug, this should be an assertion not a trace. /// If it's a bug, this should be an assertion not a trace.
wxLogTrace( traceVrmlPlugin, " * [INFO] bad model: no base data given." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] bad model: no base data given." ) );
return nullptr; return nullptr;
} }

View File

@ -53,7 +53,7 @@ WRL1MATBINDING::WRL1MATBINDING( NAMEREGISTER* aDictionary, WRL1NODE* aParent ) :
WRL1MATBINDING::~WRL1MATBINDING() WRL1MATBINDING::~WRL1MATBINDING()
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Destroying MaterialBinding node\n" ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying MaterialBinding node\n" ) );
} }

View File

@ -55,7 +55,7 @@ WRL1MATERIAL::WRL1MATERIAL( NAMEREGISTER* aDictionary, WRL1NODE* aParent ) :
WRL1MATERIAL::~WRL1MATERIAL() WRL1MATERIAL::~WRL1MATERIAL()
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Destroying Material node." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying Material node." ) );
// destroy any orphaned color nodes // destroy any orphaned color nodes
for( int i = 0; i < 2; ++i ) for( int i = 0; i < 2; ++i )

View File

@ -56,7 +56,7 @@ WRL1SHAPEHINTS::WRL1SHAPEHINTS( NAMEREGISTER* aDictionary, WRL1NODE* aParent ) :
WRL1SHAPEHINTS::~WRL1SHAPEHINTS() WRL1SHAPEHINTS::~WRL1SHAPEHINTS()
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Destroying ShapeHints node." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying ShapeHints node." ) );
} }

View File

@ -56,7 +56,7 @@ WRL2BOX::WRL2BOX( WRL2NODE* aParent ) : WRL2NODE()
WRL2BOX::~WRL2BOX() WRL2BOX::~WRL2BOX()
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Destroying Box node." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying Box node." ) );
} }

View File

@ -49,7 +49,7 @@ WRL2COLOR::WRL2COLOR( WRL2NODE* aParent ) : WRL2NODE()
WRL2COLOR::~WRL2COLOR() WRL2COLOR::~WRL2COLOR()
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Destroying Color node" ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying Color node" ) );
} }

View File

@ -49,7 +49,7 @@ WRL2COORDS::WRL2COORDS( WRL2NODE* aParent ) : WRL2NODE()
WRL2COORDS::~WRL2COORDS() WRL2COORDS::~WRL2COORDS()
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Destroying Coordinate node." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying Coordinate node." ) );
} }

View File

@ -53,7 +53,7 @@ WRL2INLINE::WRL2INLINE( WRL2NODE* aParent ) : WRL2NODE()
WRL2INLINE::~WRL2INLINE() WRL2INLINE::~WRL2INLINE()
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Destroying Inline node." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying Inline node." ) );
} }

View File

@ -52,7 +52,7 @@ WRL2MATERIAL::WRL2MATERIAL( WRL2NODE* aParent ) : WRL2NODE()
WRL2MATERIAL::~WRL2MATERIAL() WRL2MATERIAL::~WRL2MATERIAL()
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Destroying Material node." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying Material node." ) );
} }

View File

@ -49,7 +49,7 @@ WRL2NORMS::WRL2NORMS( WRL2NODE* aParent ) : WRL2NODE()
WRL2NORMS::~WRL2NORMS() WRL2NORMS::~WRL2NORMS()
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Destroying Normal node." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying Normal node." ) );
} }

View File

@ -248,7 +248,7 @@ SGNODE* WRL2SWITCH::TranslateToSG( SGNODE* aParent )
if( choices.empty() ) if( choices.empty() )
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Switch translation: no choices." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Switch translation: no choices." ) );
return nullptr; return nullptr;
} }

View File

@ -174,13 +174,13 @@ SCENEGRAPH* LoadVRML( const wxString& aFileName, bool useInline )
wxString filename = aFileName; wxString filename = aFileName;
wxFileName tmpfilename; wxFileName tmpfilename;
if( aFileName.Upper().EndsWith( "WRZ" ) ) if( aFileName.Upper().EndsWith( wxT( "WRZ" ) ) )
{ {
wxFFileInputStream ifile( aFileName ); wxFFileInputStream ifile( aFileName );
tmpfilename = wxFileName( aFileName ); tmpfilename = wxFileName( aFileName );
tmpfilename.SetPath( wxStandardPaths::Get().GetTempDir() ); tmpfilename.SetPath( wxStandardPaths::Get().GetTempDir() );
tmpfilename.SetExt( "WRL" ); tmpfilename.SetExt( wxT( "WRL" ) );
wxFileOffset size = ifile.GetLength(); wxFileOffset size = ifile.GetLength();
@ -239,17 +239,17 @@ SCENEGRAPH* LoadVRML( const wxString& aFileName, bool useInline )
if( proc.GetVRMLType() == WRLVERSION::VRML_V1 ) if( proc.GetVRMLType() == WRLVERSION::VRML_V1 )
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Processing VRML 1.0 file" ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Processing VRML 1.0 file" ) );
WRL1BASE* bp = new WRL1BASE; WRL1BASE* bp = new WRL1BASE;
if( !bp->Read( proc ) ) if( !bp->Read( proc ) )
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] load failed" ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] load failed" ) );
} }
else else
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] load completed" ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] load completed" ) );
scene = (SCENEGRAPH*)bp->TranslateToSG( nullptr, nullptr ); scene = (SCENEGRAPH*)bp->TranslateToSG( nullptr, nullptr );
} }
@ -258,7 +258,7 @@ SCENEGRAPH* LoadVRML( const wxString& aFileName, bool useInline )
} }
else else
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Processing VRML 2.0 file" ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Processing VRML 2.0 file" ) );
WRL2BASE* bp = new WRL2BASE; WRL2BASE* bp = new WRL2BASE;
@ -267,11 +267,11 @@ SCENEGRAPH* LoadVRML( const wxString& aFileName, bool useInline )
if( !bp->Read( proc ) ) if( !bp->Read( proc ) )
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] load failed" ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] load failed" ) );
} }
else else
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] load completed" ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] load completed" ) );
// for now we recalculate all normals per-vertex per-face // for now we recalculate all normals per-vertex per-face
scene = (SCENEGRAPH*)bp->TranslateToSG( nullptr ); scene = (SCENEGRAPH*)bp->TranslateToSG( nullptr );
@ -331,7 +331,7 @@ SCENEGRAPH* Load( char const* aFileName )
SCENEGRAPH* scene = nullptr; SCENEGRAPH* scene = nullptr;
wxString ext = wxFileName( fname ).GetExt(); wxString ext = wxFileName( fname ).GetExt();
if( ext == "x3d" || ext == "X3D" ) if( ext == wxT( "x3d" ) || ext == wxT( "X3D" ) )
scene = LoadX3D( fname ); scene = LoadX3D( fname );
else else
scene = LoadVRML( fname, true ); scene = LoadVRML( fname, true );

View File

@ -68,12 +68,12 @@ SCENEGRAPH* X3DPARSER::Load( const wxString& aFileName )
wxXmlNode* node = *node_it; wxXmlNode* node = *node_it;
wxString name = node->GetName(); wxString name = node->GetName();
if( name == "Transform" || name == "Group" ) if( name == wxT( "Transform" ) || name == wxT( "Group" ) )
{ {
// Read a Transform / Group // Read a Transform / Group
ok |= X3D::ReadTransform( node, topNode, dictionary ); ok |= X3D::ReadTransform( node, topNode, dictionary );
} }
else if( name == "Switch" ) else if( name == wxT( "Switch" ) )
{ {
ok |= X3D::ReadSwitch( node, topNode, dictionary ); ok |= X3D::ReadSwitch( node, topNode, dictionary );
} }
@ -96,7 +96,7 @@ bool X3DPARSER::getGroupingNodes( wxXmlNode* aNode, std::vector<wxXmlNode*>& aRe
for( wxXmlNode* child = aNode->GetChildren(); child != nullptr; child = child->GetNext() ) for( wxXmlNode* child = aNode->GetChildren(); child != nullptr; child = child->GetNext() )
{ {
if( child->GetName() == "Scene" ) if( child->GetName() == wxT( "Scene" ) )
{ {
scene = child; scene = child;
break; break;
@ -110,7 +110,7 @@ bool X3DPARSER::getGroupingNodes( wxXmlNode* aNode, std::vector<wxXmlNode*>& aRe
{ {
const wxString& name = child->GetName(); const wxString& name = child->GetName();
if( name == "Transform" || name == "Switch" || name == "Group" ) if( name == wxT( "Transform" ) || name == wxT( "Switch" ) || name == wxT( "Group" ) )
aResult.push_back( child ); aResult.push_back( child );
} }

View File

@ -59,7 +59,7 @@ X3DAPP::X3DAPP( X3DNODE* aParent ) : X3DNODE()
X3DAPP::~X3DAPP() X3DAPP::~X3DAPP()
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Destroying Appearance" ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying Appearance" ) );
if( !m_MatName.empty() && m_Dict ) if( !m_MatName.empty() && m_Dict )
m_Dict->DelName( m_MatName, this ); m_Dict->DelName( m_MatName, this );
@ -103,12 +103,12 @@ void X3DAPP::readFields( wxXmlNode* aNode )
{ {
const wxString& pname = prop->GetName(); const wxString& pname = prop->GetName();
if( pname == "DEF" ) if( pname == wxT( "DEF" ) )
{ {
m_MatName = prop->GetValue(); m_MatName = prop->GetValue();
m_Dict->AddName( m_MatName, this ); m_Dict->AddName( m_MatName, this );
} }
else if( pname == "USE" ) else if( pname == wxT( "USE" ) )
{ {
X3DNODE* np = m_Dict->FindName( prop->GetValue() ); X3DNODE* np = m_Dict->FindName( prop->GetValue() );
@ -123,27 +123,27 @@ void X3DAPP::readFields( wxXmlNode* aNode )
transparency = ap->transparency; transparency = ap->transparency;
} }
} }
else if( pname == "diffuseColor" ) else if( pname == wxT( "diffuseColor" ) )
{ {
X3D::ParseSFVec3( prop->GetValue(), diffuseColor ); X3D::ParseSFVec3( prop->GetValue(), diffuseColor );
} }
else if( pname == "emissiveColor" ) else if( pname == wxT( "emissiveColor" ) )
{ {
X3D::ParseSFVec3( prop->GetValue(), emissiveColor ); X3D::ParseSFVec3( prop->GetValue(), emissiveColor );
} }
else if( pname == "specularColor" ) else if( pname == wxT( "specularColor" ) )
{ {
X3D::ParseSFVec3( prop->GetValue(), specularColor ); X3D::ParseSFVec3( prop->GetValue(), specularColor );
} }
else if( pname == "ambientIntensity" ) else if( pname == wxT( "ambientIntensity" ) )
{ {
X3D::ParseSFFloat( prop->GetValue(), ambientIntensity ); X3D::ParseSFFloat( prop->GetValue(), ambientIntensity );
} }
else if( pname == "shininess" ) else if( pname == wxT( "shininess" ) )
{ {
X3D::ParseSFFloat( prop->GetValue(), shininess ); X3D::ParseSFFloat( prop->GetValue(), shininess );
} }
else if( pname == "transparency" ) else if( pname == wxT( "transparency" ) )
{ {
X3D::ParseSFFloat( prop->GetValue(), transparency ); X3D::ParseSFFloat( prop->GetValue(), transparency );
} }
@ -163,7 +163,7 @@ bool X3DAPP::Read( wxXmlNode* aNode, X3DNODE* aTopNode, X3D_DICT& aDict )
{ {
const wxString& pname = prop->GetName(); const wxString& pname = prop->GetName();
if( pname == "DEF" ) if( pname == wxT( "DEF" ) )
{ {
m_Name = prop->GetValue(); m_Name = prop->GetValue();
m_Dict->AddName( m_Name, this ); m_Dict->AddName( m_Name, this );
@ -174,7 +174,7 @@ bool X3DAPP::Read( wxXmlNode* aNode, X3DNODE* aTopNode, X3D_DICT& aDict )
for( wxXmlNode* child = aNode->GetChildren(); child != nullptr; child = child->GetNext() ) for( wxXmlNode* child = aNode->GetChildren(); child != nullptr; child = child->GetNext() )
{ {
if( child->GetName() == "Material" ) if( child->GetName() == wxT( "Material" ) )
pmat = child; pmat = child;
} }

View File

@ -56,7 +56,7 @@ X3DCOORDS::X3DCOORDS( X3DNODE* aParent ) : X3DNODE()
X3DCOORDS::~X3DCOORDS() X3DCOORDS::~X3DCOORDS()
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Destroying Coordinate" ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying Coordinate" ) );
} }
@ -72,12 +72,12 @@ bool X3DCOORDS::Read( wxXmlNode* aNode, X3DNODE* aTopNode, X3D_DICT& aDict )
{ {
const wxString& pname = prop->GetName(); const wxString& pname = prop->GetName();
if( pname == "DEF" ) if( pname == wxT( "DEF" ) )
{ {
m_Name = prop->GetValue(); m_Name = prop->GetValue();
m_Dict->AddName( m_Name, this ); m_Dict->AddName( m_Name, this );
} }
else if( pname == "point" ) else if( pname == wxT( "point" ) )
{ {
// Save points to vector as doubles // Save points to vector as doubles
wxStringTokenizer plist( prop->GetValue() ); wxStringTokenizer plist( prop->GetValue() );

View File

@ -65,7 +65,7 @@ X3DIFACESET::X3DIFACESET( X3DNODE* aParent ) : X3DNODE()
X3DIFACESET::~X3DIFACESET() X3DIFACESET::~X3DIFACESET()
{ {
wxLogTrace( traceVrmlPlugin, " * [INFO] Destroying IndexedFaceSet." ); wxLogTrace( traceVrmlPlugin, wxT( " * [INFO] Destroying IndexedFaceSet." ) );
} }
@ -92,16 +92,16 @@ void X3DIFACESET::readFields( wxXmlNode* aNode )
{ {
const wxString& pname = prop->GetName(); const wxString& pname = prop->GetName();
if( pname == "DEF" ) if( pname == wxT( "DEF" ) )
{ {
m_Name = prop->GetValue(); m_Name = prop->GetValue();
m_Dict->AddName( m_Name, this ); m_Dict->AddName( m_Name, this );
} }
else if( pname == "ccw" ) else if( pname == wxT( "ccw" ) )
{ {
X3D::ParseSFBool( prop->GetValue(), ccw ); X3D::ParseSFBool( prop->GetValue(), ccw );
} }
else if( pname == "creaseAngle" ) else if( pname == wxT( "creaseAngle" ) )
{ {
X3D::ParseSFFloat( prop->GetValue(), creaseAngle ); X3D::ParseSFFloat( prop->GetValue(), creaseAngle );
@ -112,7 +112,7 @@ void X3DIFACESET::readFields( wxXmlNode* aNode )
creaseLimit = cosf( creaseAngle ); creaseLimit = cosf( creaseAngle );
} }
else if( pname == "coordIndex" ) else if( pname == wxT( "coordIndex" ) )
{ {
wxStringTokenizer indices( prop->GetValue() ); wxStringTokenizer indices( prop->GetValue() );
@ -138,7 +138,7 @@ bool X3DIFACESET::Read( wxXmlNode* aNode, X3DNODE* aTopNode, X3D_DICT& aDict )
for( wxXmlNode* child = aNode->GetChildren(); child != nullptr; child = child->GetNext() ) for( wxXmlNode* child = aNode->GetChildren(); child != nullptr; child = child->GetNext() )
{ {
if( child->GetName() == "Coordinate" ) if( child->GetName() == wxT( "Coordinate" ) )
ok = X3D::ReadCoordinates( child, this, aDict ); ok = X3D::ReadCoordinates( child, this, aDict );
} }

View File

@ -43,7 +43,7 @@ bool X3D::ReadTransform( wxXmlNode* aNode, X3DNODE* aParent, X3D_DICT& aDict )
{ {
const wxString& pname = prop->GetName(); const wxString& pname = prop->GetName();
if( pname == "USE" ) if( pname == wxT( "USE" ) )
{ {
X3DNODE* np = aDict.FindName( prop->GetValue() ); X3DNODE* np = aDict.FindName( prop->GetValue() );
@ -88,7 +88,7 @@ bool X3D::ReadShape( wxXmlNode* aNode, X3DNODE* aParent, X3D_DICT& aDict )
{ {
const wxString& pname = prop->GetName(); const wxString& pname = prop->GetName();
if( pname == "USE" ) if( pname == wxT( "USE" ) )
{ {
X3DNODE* np = aDict.FindName( prop->GetValue() ); X3DNODE* np = aDict.FindName( prop->GetValue() );
@ -126,7 +126,7 @@ bool X3D::ReadAppearance( wxXmlNode* aNode, X3DNODE* aParent, X3D_DICT& aDict )
{ {
const wxString& pname = prop->GetName(); const wxString& pname = prop->GetName();
if( pname == "USE" ) if( pname == wxT( "USE" ) )
{ {
X3DNODE* np = aDict.FindName( prop->GetValue() ); X3DNODE* np = aDict.FindName( prop->GetValue() );
@ -164,7 +164,7 @@ bool X3D::ReadIndexedFaceSet( wxXmlNode* aNode, X3DNODE* aParent, X3D_DICT& aDic
{ {
const wxString& pname = prop->GetName(); const wxString& pname = prop->GetName();
if( pname == "USE" ) if( pname == wxT( "USE" ) )
{ {
X3DNODE* np = aDict.FindName( prop->GetValue() ); X3DNODE* np = aDict.FindName( prop->GetValue() );
@ -202,7 +202,7 @@ bool X3D::ReadCoordinates( wxXmlNode* aNode, X3DNODE* aParent, X3D_DICT& aDict )
{ {
const wxString& pname = prop->GetName(); const wxString& pname = prop->GetName();
if( pname == "USE" ) if( pname == wxT( "USE" ) )
{ {
X3DNODE* np = aDict.FindName( prop->GetValue() ); X3DNODE* np = aDict.FindName( prop->GetValue() );
@ -233,13 +233,13 @@ bool X3D::ParseSFBool( const wxString& aSource, bool& aResult )
wxStringTokenizer tokens( aSource ); wxStringTokenizer tokens( aSource );
wxString val = tokens.GetNextToken(); wxString val = tokens.GetNextToken();
if( val == "TRUE" || val == "1" ) if( val == wxT( "TRUE" ) || val == wxT( "1" ) )
{ {
aResult = true; aResult = true;
return true; return true;
} }
if( val == "FALSE" || val == "0" ) if( val == wxT( "FALSE" ) || val == wxT( "0" ) )
{ {
aResult = false; aResult = false;
return true; return true;

View File

@ -83,7 +83,7 @@ bool X3DSHAPE::Read( wxXmlNode* aNode, X3DNODE* aTopNode, X3D_DICT& aDict )
{ {
const wxString& pname = prop->GetName(); const wxString& pname = prop->GetName();
if( pname == "DEF" ) if( pname == wxT( "DEF" ) )
{ {
m_Name = prop->GetValue(); m_Name = prop->GetValue();
m_Dict->AddName( m_Name, this ); m_Dict->AddName( m_Name, this );
@ -94,9 +94,9 @@ bool X3DSHAPE::Read( wxXmlNode* aNode, X3DNODE* aTopNode, X3D_DICT& aDict )
{ {
wxString name = child->GetName(); wxString name = child->GetName();
if( name == "Appearance" && nullptr == appearance ) if( name == wxT( "Appearance" ) && nullptr == appearance )
X3D::ReadAppearance( child, this, aDict ); X3D::ReadAppearance( child, this, aDict );
else if( name == "IndexedFaceSet" && nullptr == geometry ) else if( name == wxT( "IndexedFaceSet" ) && nullptr == geometry )
X3D::ReadIndexedFaceSet( child, this, aDict ); X3D::ReadIndexedFaceSet( child, this, aDict );
} }

View File

@ -110,30 +110,30 @@ void X3DTRANSFORM::readFields( wxXmlNode* aNode )
{ {
const wxString& pname = prop->GetName(); const wxString& pname = prop->GetName();
if( pname == "DEF" ) if( pname == wxT( "DEF" ) )
{ {
m_Name = prop->GetValue(); m_Name = prop->GetValue();
m_Dict->AddName( m_Name, this ); m_Dict->AddName( m_Name, this );
} }
else if( pname == "center" ) else if( pname == wxT( "center" ) )
{ {
X3D::ParseSFVec3( prop->GetValue(), center ); X3D::ParseSFVec3( prop->GetValue(), center );
center *= 2.54; center *= 2.54;
} }
else if( pname == "scale" ) else if( pname == wxT( "scale" ) )
{ {
X3D::ParseSFVec3( prop->GetValue(), scale ); X3D::ParseSFVec3( prop->GetValue(), scale );
} }
else if( pname == "translation" ) else if( pname == wxT( "translation" ) )
{ {
X3D::ParseSFVec3( prop->GetValue(), translation ); X3D::ParseSFVec3( prop->GetValue(), translation );
translation *= 2.54; translation *= 2.54;
} }
else if( pname == "rotation" ) else if( pname == wxT( "rotation" ) )
{ {
X3D::ParseSFRotation( prop->GetValue(), rotation ); X3D::ParseSFRotation( prop->GetValue(), rotation );
} }
else if( pname == "scaleOrientation" ) else if( pname == wxT( "scaleOrientation" ) )
{ {
X3D::ParseSFRotation( prop->GetValue(), scaleOrientation ); X3D::ParseSFRotation( prop->GetValue(), scaleOrientation );
} }
@ -154,11 +154,11 @@ bool X3DTRANSFORM::Read( wxXmlNode* aNode, X3DNODE* aTopNode, X3D_DICT& aDict )
{ {
wxString name = child->GetName(); wxString name = child->GetName();
if( name == "Transform" || name == "Group" ) if( name == wxT( "Transform" ) || name == wxT( "Group" ) )
ok |= X3D::ReadTransform( child, this, aDict ); ok |= X3D::ReadTransform( child, this, aDict );
else if( name == "Switch" ) else if( name == wxT( "Switch" ) )
ok |= X3D::ReadSwitch( child, this, aDict ); ok |= X3D::ReadSwitch( child, this, aDict );
else if( name == "Shape" ) else if( name == wxT( "Shape" ) )
ok |= X3D::ReadShape( child, this, aDict ); ok |= X3D::ReadShape( child, this, aDict );
} }

View File

@ -38,7 +38,7 @@
// Mask for plugin loader tracing. // Mask for plugin loader tracing.
extern const wxChar* const tracePluginLoader; extern const wxChar* const tracePluginLoader;
#define MASK_PLUGINLDR "PLUGIN_LOADER" #define MASK_PLUGINLDR wxT( "PLUGIN_LOADER" )
// helper function to link functions in the plugin // helper function to link functions in the plugin