Commit 657325be authored by charras's avatar charras

Changed some c_str and GetData functions to GetChars in .Printf functions

parent b1a8a074
...@@ -44,7 +44,7 @@ int S3D_MASTER:: ReadData() ...@@ -44,7 +44,7 @@ int S3D_MASTER:: ReadData()
if( FullFilename.IsEmpty() ) if( FullFilename.IsEmpty() )
{ {
wxLogDebug( _( "3D part library <%s> could not be found." ), wxLogDebug( _( "3D part library <%s> could not be found." ),
fn.GetFullPath().c_str() ); GetChars( fn.GetFullPath() ) );
return -1; return -1;
} }
} }
......
...@@ -259,7 +259,7 @@ void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event ) ...@@ -259,7 +259,7 @@ void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event )
} }
else else
{ {
msg.Printf( _( "Help file %s not found" ), wxGetApp().m_HelpFileName.GetData() ); msg.Printf( _( "Help file %s not found" ), GetChars( wxGetApp().m_HelpFileName ) );
DisplayError( this, msg ); DisplayError( this, msg );
} }
...@@ -268,7 +268,7 @@ void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event ) ...@@ -268,7 +268,7 @@ void WinEDA_BasicFrame::GetKicadHelp( wxCommandEvent& event )
if( !helpFile ) if( !helpFile )
{ {
msg.Printf( _( "Help file %s could not be found." ), msg.Printf( _( "Help file %s could not be found." ),
wxGetApp().m_HelpFileName.c_str() ); GetChars( wxGetApp().m_HelpFileName ) );
DisplayError( this, msg ); DisplayError( this, msg );
} }
else else
......
...@@ -469,7 +469,7 @@ wxString GenDate() ...@@ -469,7 +469,7 @@ wxString GenDate()
time( &buftime ); time( &buftime );
Date = gmtime( &buftime ); Date = gmtime( &buftime );
string_date.Printf( wxT( "%d %s %d" ), Date->tm_mday, string_date.Printf( wxT( "%d %s %d" ), Date->tm_mday,
mois[Date->tm_mon].GetData(), GetChars( mois[Date->tm_mon] ),
Date->tm_year + 1900 ); Date->tm_year + 1900 );
return string_date; return string_date;
} }
......
...@@ -907,7 +907,7 @@ void wxSVGFileDC::DoDrawBitmap( const class wxBitmap& bmp, ...@@ -907,7 +907,7 @@ void wxSVGFileDC::DoDrawBitmap( const class wxBitmap& bmp,
int h = myBitmap.GetHeight(); int h = myBitmap.GetHeight();
sTmp.Printf( wxT( " <image x=\"%d\" y=\"%d\" width=\"%dpx\" height=\"%dpx\" " ), x, y, w, h ); sTmp.Printf( wxT( " <image x=\"%d\" y=\"%d\" width=\"%dpx\" height=\"%dpx\" " ), x, y, w, h );
s = s + sTmp; s = s + sTmp;
sTmp.Printf( wxT( " xlink:href=\"%s\"> \n" ), sPNG.c_str() ); sTmp.Printf( wxT( " xlink:href=\"%s\"> \n" ), GetChars( sPNG ) );
s = s + sTmp + wxT( "<title>Image from wxSVG</title> </image>" ) + newline; s = s + sTmp + wxT( "<title>Image from wxSVG</title> </image>" ) + newline;
if( m_OK && bPNG_OK ) if( m_OK && bPNG_OK )
......
...@@ -47,7 +47,7 @@ void DIALOG_LOAD_ERROR::ListSet(const wxString &list) ...@@ -47,7 +47,7 @@ void DIALOG_LOAD_ERROR::ListSet(const wxString &list)
void DIALOG_LOAD_ERROR::MessageSet(const wxString &message) void DIALOG_LOAD_ERROR::MessageSet(const wxString &message)
{ {
wxString message_value; wxString message_value;
message_value.Printf(wxT("<b>%s</b><br>"), message.GetData() ); message_value.Printf(wxT("<b>%s</b><br>"), GetChars( message ) );
m_htmlWindow->AppendToPage( message_value ); m_htmlWindow->AppendToPage( message_value );
} }
...@@ -176,7 +176,7 @@ void WinEDAListBox::ClickOnList( wxCommandEvent& event ) ...@@ -176,7 +176,7 @@ void WinEDAListBox::ClickOnList( wxCommandEvent& event )
m_WinMsg->Clear(); m_WinMsg->Clear();
text = m_List->GetStringSelection(); text = m_List->GetStringSelection();
m_MoveFct( text ); m_MoveFct( text );
m_WinMsg->WriteText( text.GetData() ); m_WinMsg->WriteText( text );
} }
} }
......
...@@ -190,7 +190,7 @@ bool GetAssociatedDocument( wxFrame* aFrame, ...@@ -190,7 +190,7 @@ bool GetAssociatedDocument( wxFrame* aFrame,
if( !success ) if( !success )
{ {
msg.Printf( _( "Unknown MIME type for doc file <%s>" ), msg.Printf( _( "Unknown MIME type for doc file <%s>" ),
fullfilename.GetData() ); GetChars( fullfilename ) );
DisplayError( aFrame, msg ); DisplayError( aFrame, msg );
} }
......
...@@ -442,7 +442,7 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile, ...@@ -442,7 +442,7 @@ int ExecuteFile( wxWindow* frame, const wxString& ExecFile,
} }
wxString msg; wxString msg;
msg.Printf( _( "Command <%s> could not found" ), ExecFile.c_str() ); msg.Printf( _( "Command <%s> could not found" ), GetChars( ExecFile ) );
DisplayError( frame, msg, 20 ); DisplayError( frame, msg, 20 );
return -1; return -1;
} }
......
...@@ -209,12 +209,12 @@ void WinEDA_MsgPanel::showItem( wxDC& dc, const MsgItem& aItem ) ...@@ -209,12 +209,12 @@ void WinEDA_MsgPanel::showItem( wxDC& dc, const MsgItem& aItem )
if( !aItem.m_UpperText.IsEmpty() ) if( !aItem.m_UpperText.IsEmpty() )
{ {
dc.DrawText( aItem.m_UpperText.GetData(), aItem.m_X, aItem.m_UpperY ); dc.DrawText( aItem.m_UpperText, aItem.m_X, aItem.m_UpperY );
} }
if( !aItem.m_LowerText.IsEmpty() ) if( !aItem.m_LowerText.IsEmpty() )
{ {
dc.DrawText( aItem.m_LowerText.GetData(), aItem.m_X, aItem.m_LowerY ); dc.DrawText( aItem.m_LowerText, aItem.m_X, aItem.m_LowerY );
} }
} }
......
...@@ -92,18 +92,16 @@ void WinEDA_CvpcbFrame::AssocieModule( wxCommandEvent& event ) ...@@ -92,18 +92,16 @@ void WinEDA_CvpcbFrame::AssocieModule( wxCommandEvent& event )
{ {
msg.Printf( _( "Footprint alias library file <%s> could not be \ msg.Printf( _( "Footprint alias library file <%s> could not be \
found in the default search paths." ), found in the default search paths." ),
fn.GetFullName().c_str() ); GetChars( fn.GetFullName() ) );
wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR ); wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR );
continue; continue;
} }
wxLogDebug( wxT( "Opening footprint alias file: %s." ), tmp.c_str() );
file = wxFopen( tmp, wxT( "rt" ) ); file = wxFopen( tmp, wxT( "rt" ) );
if( file == NULL ) if( file == NULL )
{ {
msg.Printf( _( "Error opening alias library <%s>." ), tmp.c_str() ); msg.Printf( _( "Error opening alias library <%s>." ), GetChars( tmp ) );
wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR ); wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR );
continue; continue;
} }
...@@ -128,8 +126,6 @@ found in the default search paths." ), ...@@ -128,8 +126,6 @@ found in the default search paths." ),
alias = new FOOTPRINT_ALIAS(); alias = new FOOTPRINT_ALIAS();
alias->m_Name = value; alias->m_Name = value;
alias->m_FootprintName = footprint; alias->m_FootprintName = footprint;
wxLogDebug( wxT( "Adding alias %s for footprint %s" ),
value.c_str(), footprint.c_str() );
aliases.push_back( alias ); aliases.push_back( alias );
text++; text++;
} }
...@@ -168,8 +164,8 @@ found in the default search paths." ), ...@@ -168,8 +164,8 @@ found in the default search paths." ),
{ {
msg.Printf( _( "Component %s: footprint %s not found in \ msg.Printf( _( "Component %s: footprint %s not found in \
any of the project footprint libraries." ), any of the project footprint libraries." ),
component.m_Reference.c_str(), GetChars( component.m_Reference ),
alias.m_FootprintName.c_str() ); GetChars( alias.m_FootprintName ) );
wxMessageBox( msg, _( "CVPcb Error" ), wxOK | wxICON_ERROR, wxMessageBox( msg, _( "CVPcb Error" ), wxOK | wxICON_ERROR,
this ); this );
} }
......
...@@ -49,8 +49,8 @@ void WinEDA_CvpcbFrame::SetNewPkg( const wxString& package ) ...@@ -49,8 +49,8 @@ void WinEDA_CvpcbFrame::SetNewPkg( const wxString& package )
Component->m_Module = package; Component->m_Module = package;
Line.Printf( CMP_FORMAT, NumCmp + 1, Line.Printf( CMP_FORMAT, NumCmp + 1,
Component->m_Reference.GetData(), Component->m_Value.GetData(), GetChars( Component->m_Reference ), GetChars( Component->m_Value ),
Component->m_Module.GetData() ); GetChars( Component->m_Module ) );
m_modified = true; m_modified = true;
if( isUndefined ) if( isUndefined )
...@@ -84,7 +84,7 @@ bool WinEDA_CvpcbFrame::ReadNetList() ...@@ -84,7 +84,7 @@ bool WinEDA_CvpcbFrame::ReadNetList()
if( error_level < 0 ) if( error_level < 0 )
{ {
msg.Printf( _( "File <%s> does not appear to be a valid Kicad net list file." ), msg.Printf( _( "File <%s> does not appear to be a valid Kicad net list file." ),
m_NetlistFileName.GetFullPath().c_str() ); GetChars( m_NetlistFileName.GetFullPath() ) );
::wxMessageBox( msg, _( "File Error" ), wxOK | wxICON_ERROR, this ); ::wxMessageBox( msg, _( "File Error" ), wxOK | wxICON_ERROR, this );
return false; return false;
} }
...@@ -105,9 +105,9 @@ bool WinEDA_CvpcbFrame::ReadNetList() ...@@ -105,9 +105,9 @@ bool WinEDA_CvpcbFrame::ReadNetList()
BOOST_FOREACH( COMPONENT& component, m_components ) BOOST_FOREACH( COMPONENT& component, m_components )
{ {
msg.Printf( CMP_FORMAT, m_ListCmp->GetCount() + 1, msg.Printf( CMP_FORMAT, m_ListCmp->GetCount() + 1,
component.m_Reference.GetData(), GetChars( component.m_Reference ),
component.m_Value.GetData(), GetChars( component.m_Value ),
component.m_Module.GetData() ); GetChars( component.m_Module ) );
m_ListCmp->AppendLine( msg ); m_ListCmp->AppendLine( msg );
if( component.m_Module.IsEmpty() ) if( component.m_Module.IsEmpty() )
m_undefinedComponentCnt += 1; m_undefinedComponentCnt += 1;
......
...@@ -49,7 +49,7 @@ MODULE* WinEDA_DisplayFrame::Get_Module( const wxString& CmpName ) ...@@ -49,7 +49,7 @@ MODULE* WinEDA_DisplayFrame::Get_Module( const wxString& CmpName )
{ {
msg.Printf( _( "PCB foot print library file <%s> could not be \ msg.Printf( _( "PCB foot print library file <%s> could not be \
found in the default search paths." ), found in the default search paths." ),
fn.GetFullName().c_str() ); GetChars( fn.GetFullName() ) );
wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR, this ); wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR, this );
continue; continue;
} }
...@@ -59,7 +59,7 @@ found in the default search paths." ), ...@@ -59,7 +59,7 @@ found in the default search paths." ),
if( file == NULL ) if( file == NULL )
{ {
msg.Printf( _( "Could not open PCB foot print library file <%s>." ), msg.Printf( _( "Could not open PCB foot print library file <%s>." ),
tmp.c_str() ); GetChars( tmp ) );
wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR, this ); wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR, this );
continue; continue;
} }
...@@ -72,7 +72,7 @@ found in the default search paths." ), ...@@ -72,7 +72,7 @@ found in the default search paths." ),
if( strnicmp( Line, ENTETE_LIBRAIRIE, L_ENTETE_LIB ) != 0 ) if( strnicmp( Line, ENTETE_LIBRAIRIE, L_ENTETE_LIB ) != 0 )
{ {
msg.Printf( _( "<%s> is not a valid Kicad PCB foot print library." ), msg.Printf( _( "<%s> is not a valid Kicad PCB foot print library." ),
tmp.c_str() ); GetChars( tmp ) );
wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR, this ); wxMessageBox( msg, titleLibLoadError, wxOK | wxICON_ERROR, this );
fclose( file ); fclose( file );
return NULL; return NULL;
......
...@@ -85,7 +85,7 @@ bool LoadComponentFile( const wxString& fileName, COMPONENT_LIST& list ) ...@@ -85,7 +85,7 @@ bool LoadComponentFile( const wxString& fileName, COMPONENT_LIST& list )
if( source == NULL ) if( source == NULL )
{ {
msg.Printf( _( "Cannot open component library <%s>." ), msg.Printf( _( "Cannot open component library <%s>." ),
fn.GetFullPath().c_str() ); GetChars( fn.GetFullPath() ) );
wxMessageBox( msg, titleComponentLibErr, wxOK | wxICON_ERROR ); wxMessageBox( msg, titleComponentLibErr, wxOK | wxICON_ERROR );
return false; return false;
} }
...@@ -94,7 +94,7 @@ bool LoadComponentFile( const wxString& fileName, COMPONENT_LIST& list ) ...@@ -94,7 +94,7 @@ bool LoadComponentFile( const wxString& fileName, COMPONENT_LIST& list )
if( fgets( Line, 79, source ) == 0 ) if( fgets( Line, 79, source ) == 0 )
{ {
msg.Printf( _( " <%s> does not appear to be a valid Kicad component library." ), msg.Printf( _( " <%s> does not appear to be a valid Kicad component library." ),
fn.GetFullPath().c_str() ); GetChars( fn.GetFullPath() ) );
wxMessageBox( msg, titleComponentLibErr, wxOK | wxICON_ERROR ); wxMessageBox( msg, titleComponentLibErr, wxOK | wxICON_ERROR );
fclose( source ); fclose( source );
return false; return false;
......
...@@ -54,15 +54,11 @@ static void RemoveDuplicatePins( COMPONENT& component ) ...@@ -54,15 +54,11 @@ static void RemoveDuplicatePins( COMPONENT& component )
if( !same_pin_net( pin1, pin2 ) ) if( !same_pin_net( pin1, pin2 ) )
{ {
msg.Printf( _( "Component %s %s pin %s : Different Nets" ), msg.Printf( _( "Component %s %s pin %s : Different Nets" ),
component.m_Reference.GetData(), GetChars( component.m_Reference ),
component.m_Value.GetData(), GetChars( component.m_Value ),
pin1->m_Number.GetData() ); pin1->m_Number.GetData() );
DisplayError( NULL, msg, 60 ); DisplayError( NULL, msg, 60 );
} }
wxLogDebug( wxT( "Removing duplicate pin %s from component %s: %s" ),
pin1->m_Number.c_str(), component.m_Reference.c_str(),
component.m_Value.c_str() );
pin1 = pin2; pin1 = pin2;
i = component.m_Pins.erase( i ); i = component.m_Pins.erase( i );
delete pin2; delete pin2;
......
...@@ -170,7 +170,7 @@ bool LIB_FIELD::Load( char* line, wxString& errorMsg ) ...@@ -170,7 +170,7 @@ bool LIB_FIELD::Load( char* line, wxString& errorMsg )
if( cnt < 5 ) if( cnt < 5 )
{ {
errorMsg.Printf( _( "field %d does not have the correct number of \ errorMsg.Printf( wxT( "field %d does not have the correct number of \
parameters" ), parameters" ),
m_FieldId ); m_FieldId );
return false; return false;
...@@ -185,7 +185,7 @@ parameters" ), ...@@ -185,7 +185,7 @@ parameters" ),
m_Orient = TEXT_ORIENT_VERT; m_Orient = TEXT_ORIENT_VERT;
else else
{ {
errorMsg.Printf( _( "field %d text orientation parameter <%c> is \ errorMsg.Printf( wxT( "field %d text orientation parameter <%c> is \
not valid" ), not valid" ),
textOrient ); textOrient );
return false; return false;
...@@ -197,7 +197,7 @@ not valid" ), ...@@ -197,7 +197,7 @@ not valid" ),
m_Attributs |= TEXT_NO_VISIBLE; m_Attributs |= TEXT_NO_VISIBLE;
else else
{ {
errorMsg.Printf( _( "field %d text visible parameter <%c> is not \ errorMsg.Printf( wxT( "field %d text visible parameter <%c> is not \
valid" ), valid" ),
textVisible ); textVisible );
return false; return false;
...@@ -216,7 +216,7 @@ valid" ), ...@@ -216,7 +216,7 @@ valid" ),
m_HJustify = GR_TEXT_HJUSTIFY_RIGHT; m_HJustify = GR_TEXT_HJUSTIFY_RIGHT;
else else
{ {
errorMsg.Printf( _( "field %d text horizontal justification \ errorMsg.Printf( wxT( "field %d text horizontal justification \
parameter <%c> is not valid" ), parameter <%c> is not valid" ),
textHJustify ); textHJustify );
return false; return false;
...@@ -230,7 +230,7 @@ parameter <%c> is not valid" ), ...@@ -230,7 +230,7 @@ parameter <%c> is not valid" ),
m_VJustify = GR_TEXT_VJUSTIFY_TOP; m_VJustify = GR_TEXT_VJUSTIFY_TOP;
else else
{ {
errorMsg.Printf( _( "field %d text vertical justification \ errorMsg.Printf( wxT( "field %d text vertical justification \
parameter <%c> is not valid" ), parameter <%c> is not valid" ),
textVJustify[0] ); textVJustify[0] );
return false; return false;
......
...@@ -163,7 +163,7 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName, ...@@ -163,7 +163,7 @@ int WinEDA_SchematicFrame::LoadOneEEProject( const wxString& FileName,
wxString errMsg; wxString errMsg;
wxLogDebug( wxT( "Load schematic cache library file <%s>" ), wxLogDebug( wxT( "Load schematic cache library file <%s>" ),
fn.GetFullPath().c_str() ); GetChars( fn.GetFullPath() ) );
msg = wxT( "Load " ) + fn.GetFullPath(); msg = wxT( "Load " ) + fn.GetFullPath();
CMP_LIBRARY* LibCache = CMP_LIBRARY::LoadLibrary( fn, errMsg ); CMP_LIBRARY* LibCache = CMP_LIBRARY::LoadLibrary( fn, errMsg );
......
...@@ -201,7 +201,7 @@ static void LoadDCodeFile( WinEDA_GerberFrame* frame, const wxString& FullFileNa ...@@ -201,7 +201,7 @@ static void LoadDCodeFile( WinEDA_GerberFrame* frame, const wxString& FullFileNa
if( !fn.IsOk() ) if( !fn.IsOk() )
{ {
wildcard.Printf( _( "Gerber DCODE files (%s)|*.%s" ), wildcard.Printf( _( "Gerber DCODE files (%s)|*.%s" ),
g_PenFilenameExt.c_str(), g_PenFilenameExt.c_str()); GetChars( g_PenFilenameExt ), GetChars( g_PenFilenameExt ));
wildcard += AllFilesWildcard; wildcard += AllFilesWildcard;
fn = frame->GetScreen()->m_FileName; fn = frame->GetScreen()->m_FileName;
fn.SetExt( g_PenFilenameExt ); fn.SetExt( g_PenFilenameExt );
...@@ -236,7 +236,7 @@ bool WinEDA_GerberFrame::SaveGerberFile( const wxString& FullFileName, wxDC* DC ...@@ -236,7 +236,7 @@ bool WinEDA_GerberFrame::SaveGerberFile( const wxString& FullFileName, wxDC* DC
fn = GetScreen()->m_FileName; fn = GetScreen()->m_FileName;
wildcard.Printf( _( "Gerber DCODE files (%s)|*.%s" ), wildcard.Printf( _( "Gerber DCODE files (%s)|*.%s" ),
g_PenFilenameExt.c_str(), g_PenFilenameExt.c_str()); GetChars( g_PenFilenameExt ), GetChars( g_PenFilenameExt ));
wxFileDialog dlg( this, _( "Save Gerber File" ), fn.GetPath(), wxFileDialog dlg( this, _( "Save Gerber File" ), fn.GetPath(),
fn.GetFullName(), wildcard, fn.GetFullName(), wildcard,
......
...@@ -104,9 +104,6 @@ bool WinEDA_App::OnInit() ...@@ -104,9 +104,6 @@ bool WinEDA_App::OnInit()
fn = wxFileName( argv[i] ); fn = wxFileName( argv[i] );
fn.SetExt( g_PhotoFilenameExt ); fn.SetExt( g_PhotoFilenameExt );
wxLogDebug( wxT( "Opening file <%s> in GerbView." ),
fn.GetFullPath().c_str() );
if( fn.FileExists() ) if( fn.FileExists() )
{ {
( (PCB_SCREEN*) frame->GetScreen() )->m_Active_Layer = i - 1; ( (PCB_SCREEN*) frame->GetScreen() )->m_Active_Layer = i - 1;
......
...@@ -272,7 +272,7 @@ bool WinEDA_GerberFrame::Read_GERBER_File( wxDC* DC, ...@@ -272,7 +272,7 @@ bool WinEDA_GerberFrame::Read_GERBER_File( wxDC* DC,
fn = GERBER_FullFileName; fn = GERBER_FullFileName;
fn.SetExt( g_PenFilenameExt ); fn.SetExt( g_PenFilenameExt );
wildcard.Printf( _( "Gerber DCODE files (%s)|*.%s" ), wildcard.Printf( _( "Gerber DCODE files (%s)|*.%s" ),
g_PenFilenameExt.c_str(), g_PenFilenameExt.c_str()); GetChars( g_PenFilenameExt ), GetChars( g_PenFilenameExt ));
wildcard += AllFilesWildcard; wildcard += AllFilesWildcard;
wxFileDialog dlg( this, _( "Load GERBER DCODE File" ), wxFileDialog dlg( this, _( "Load GERBER DCODE File" ),
......
No preview for this file type
This diff is collapsed.
...@@ -278,8 +278,6 @@ void WinEDA_MainFrame::OnRunEeschema( wxCommandEvent& event ) ...@@ -278,8 +278,6 @@ void WinEDA_MainFrame::OnRunEeschema( wxCommandEvent& event )
{ {
wxFileName fn( m_ProjectFileName ); wxFileName fn( m_ProjectFileName );
fn.SetExt( SchematicFileExtension ); fn.SetExt( SchematicFileExtension );
wxLogDebug( wxT( "Loading EESchema with file <%s>." ),
fn.GetFullPath().c_str() );
ExecuteFile( this, EESCHEMA_EXE, QuoteFullPath( fn ) ); ExecuteFile( this, EESCHEMA_EXE, QuoteFullPath( fn ) );
} }
......
...@@ -105,15 +105,15 @@ void DIALOG_DESIGN_RULES::PrintCurrentSettings( ) ...@@ -105,15 +105,15 @@ void DIALOG_DESIGN_RULES::PrintCurrentSettings( )
// Display min values: // Display min values:
value = ReturnStringFromValue( g_UnitMetric, g_DesignSettings.m_TrackMinWidth, internal_units, true ); value = ReturnStringFromValue( g_UnitMetric, g_DesignSettings.m_TrackMinWidth, internal_units, true );
msg.Printf(_("Minimum value for tracks width: <b>%s</b><br>\n"), value.c_str( ) ); msg.Printf(_("Minimum value for tracks width: <b>%s</b><br>\n"), GetChars( value ) );
m_MessagesList->AppendToPage(msg); m_MessagesList->AppendToPage(msg);
value = ReturnStringFromValue( g_UnitMetric, g_DesignSettings.m_ViasMinSize, internal_units, true ); value = ReturnStringFromValue( g_UnitMetric, g_DesignSettings.m_ViasMinSize, internal_units, true );
msg.Printf(_("Minimum value for vias diameter: <b>%s</b><br>\n"), value.c_str( ) ); msg.Printf(_("Minimum value for vias diameter: <b>%s</b><br>\n"), GetChars( value ) );
m_MessagesList->AppendToPage(msg); m_MessagesList->AppendToPage(msg);
value = ReturnStringFromValue( g_UnitMetric, g_DesignSettings.m_MicroViasMinSize, internal_units, true ); value = ReturnStringFromValue( g_UnitMetric, g_DesignSettings.m_MicroViasMinSize, internal_units, true );
msg.Printf(_("Minimum value for microvias diameter: <b>%s</b><br>\n"), value.c_str( ) ); msg.Printf(_("Minimum value for microvias diameter: <b>%s</b><br>\n"), GetChars( value ) );
m_MessagesList->AppendToPage(msg); m_MessagesList->AppendToPage(msg);
} }
......
...@@ -178,7 +178,7 @@ void WinEDA_PcbFrame::Edit_Net_Width( wxDC* DC, int aNetcode ) ...@@ -178,7 +178,7 @@ void WinEDA_PcbFrame::Edit_Net_Width( wxDC* DC, int aNetcode )
wxString netClassName = netClass->GetName(); wxString netClassName = netClass->GetName();
msg.Printf( _( msg.Printf( _(
"Set tracks and vias sizes to the Netclass \"%s\"default value (entire NET \"%s\") ?" ), "Set tracks and vias sizes to the Netclass \"%s\"default value (entire NET \"%s\") ?" ),
netClassName.c_str(), netName.c_str() ); GetChars( netClassName ), GetChars( netName ) );
if( !IsOK( this, msg ) ) if( !IsOK( this, msg ) )
return; return;
......
...@@ -77,7 +77,7 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( wxDC* DC ) ...@@ -77,7 +77,7 @@ MODULE* WinEDA_ModuleEditFrame::Import_Module( wxDC* DC )
if( file == NULL ) if( file == NULL )
{ {
wxString msg; wxString msg;
msg.Printf( _( "File <%s> not found" ), dlg.GetPath().GetData() ); msg.Printf( _( "File <%s> not found" ), GetChars( dlg.GetPath() ) );
DisplayError( this, msg ); DisplayError( this, msg );
return NULL; return NULL;
} }
...@@ -187,7 +187,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib ) ...@@ -187,7 +187,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
/* Generation du fichier Empreinte */ /* Generation du fichier Empreinte */
if( ( file = wxFopen( fn.GetFullPath(), wxT( "wt" ) ) ) == NULL ) if( ( file = wxFopen( fn.GetFullPath(), wxT( "wt" ) ) ) == NULL )
{ {
msg.Printf( _( "Unable to create <%s>" ), fn.GetFullPath().c_str() ); msg.Printf( _( "Unable to create <%s>" ), GetChars( fn.GetFullPath() ) );
DisplayError( this, msg ); DisplayError( this, msg );
return; return;
} }
...@@ -207,7 +207,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib ) ...@@ -207,7 +207,7 @@ void WinEDA_ModuleEditFrame::Export_Module( MODULE* ptmod, bool createlib )
fputs( "$EndLIBRARY\n", file ); fputs( "$EndLIBRARY\n", file );
fclose( file ); fclose( file );
msg.Printf( _( "Module exported in file <%s>" ), fn.GetFullPath().c_str() ); msg.Printf( _( "Module exported in file <%s>" ), GetChars( fn.GetFullPath() ) );
DisplayInfoMessage( this, msg ); DisplayInfoMessage( this, msg );
} }
...@@ -231,7 +231,7 @@ void WinEDA_ModuleEditFrame::Delete_Module_In_Library( const ...@@ -231,7 +231,7 @@ void WinEDA_ModuleEditFrame::Delete_Module_In_Library( const
/* Confirmation */ /* Confirmation */
msg.Printf( _( "Ok to delete module %s in library %s" ), msg.Printf( _( "Ok to delete module %s in library %s" ),
CmpName.GetData(), aLibname.GetData() ); GetChars( CmpName ), GetChars( aLibname ) );
if( !IsOK( this, msg ) ) if( !IsOK( this, msg ) )
return; return;
...@@ -281,7 +281,7 @@ void WinEDA_ModuleEditFrame::Delete_Module_In_Library( const ...@@ -281,7 +281,7 @@ void WinEDA_ModuleEditFrame::Delete_Module_In_Library( const
if( NoFound ) if( NoFound )
{ {
fclose( lib_module ); fclose( lib_module );
msg.Printf( _( "Module [%s] not found" ), CmpName.GetData() ); msg.Printf( _( "Module [%s] not found" ), GetChars( CmpName ) );
DisplayError( this, msg ); DisplayError( this, msg );
return; return;
} }
...@@ -379,8 +379,8 @@ void WinEDA_ModuleEditFrame::Delete_Module_In_Library( const ...@@ -379,8 +379,8 @@ void WinEDA_ModuleEditFrame::Delete_Module_In_Library( const
return; return;
} }
msg.Printf( _( "Component %s deleted in library %s" ), CmpName.GetData(), msg.Printf( _( "Component %s deleted in library %s" ), GetChars( CmpName ),
oldFileName.GetFullPath().c_str() ); GetChars( oldFileName.GetFullPath() ) );
Affiche_Message( msg ); Affiche_Message( msg );
CreateDocLibrary( oldFileName.GetFullPath() ); CreateDocLibrary( oldFileName.GetFullPath() );
...@@ -430,7 +430,7 @@ void WinEDA_BasePcbFrame::Archive_Modules( const wxString& LibName, ...@@ -430,7 +430,7 @@ void WinEDA_BasePcbFrame::Archive_Modules( const wxString& LibName,
if( !NewModulesOnly && file_exists ) if( !NewModulesOnly && file_exists )
{ {
wxString msg; wxString msg;
msg.Printf( _( "File %s exists, OK to replace ?" ), fileName.c_str() ); msg.Printf( _( "File %s exists, OK to replace ?" ), GetChars( fileName ) );
if( !IsOK( this, msg ) ) if( !IsOK( this, msg ) )
return; return;
} }
...@@ -509,7 +509,7 @@ int WinEDA_BasePcbFrame::Save_Module_In_Library( const wxString& aLibName, ...@@ -509,7 +509,7 @@ int WinEDA_BasePcbFrame::Save_Module_In_Library( const wxString& aLibName,
if( !wxFileExists( aLibName ) ) if( !wxFileExists( aLibName ) )
{ {
msg.Printf( _( "Library %s not found" ), aLibName.GetData() ); msg.Printf( _( "Library %s not found" ), GetChars( aLibName ) );
DisplayError( this, msg ); DisplayError( this, msg );
return 0; return 0;
} }
...@@ -530,7 +530,7 @@ int WinEDA_BasePcbFrame::Save_Module_In_Library( const wxString& aLibName, ...@@ -530,7 +530,7 @@ int WinEDA_BasePcbFrame::Save_Module_In_Library( const wxString& aLibName,
if( ( lib_module = wxFopen( aLibName, wxT( "rt" ) ) ) == NULL ) if( ( lib_module = wxFopen( aLibName, wxT( "rt" ) ) ) == NULL )
{ {
msg.Printf( _( "Unable to open %s" ), aLibName.GetData() ); msg.Printf( _( "Unable to open %s" ), GetChars( aLibName ) );
DisplayError( this, msg ); DisplayError( this, msg );
return 0; return 0;
} }
...@@ -540,7 +540,7 @@ int WinEDA_BasePcbFrame::Save_Module_In_Library( const wxString& aLibName, ...@@ -540,7 +540,7 @@ int WinEDA_BasePcbFrame::Save_Module_In_Library( const wxString& aLibName,
if( strnicmp( Line, ENTETE_LIBRAIRIE, L_ENTETE_LIB ) != 0 ) if( strnicmp( Line, ENTETE_LIBRAIRIE, L_ENTETE_LIB ) != 0 )
{ {
fclose( lib_module ); fclose( lib_module );
msg.Printf( _( "File %s is not a eeschema library" ), aLibName.GetData() ); msg.Printf( _( "File %s is not a eeschema library" ), GetChars( aLibName ) );
DisplayError( this, msg ); DisplayError( this, msg );
return 0; return 0;
} }
......
...@@ -218,7 +218,7 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( const wxString& aLibraryFullF ...@@ -218,7 +218,7 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( const wxString& aLibraryFullF
if ( aDisplayMessageError ) if ( aDisplayMessageError )
{ {
msg.Printf( _( "PCB footprint library file <%s> not found in search paths." ), msg.Printf( _( "PCB footprint library file <%s> not found in search paths." ),
fn.GetFullName().c_str() ); GetChars( fn.GetFullName() ) );
wxMessageBox( msg, _( "Library Load Error" ), wxMessageBox( msg, _( "Library Load Error" ),
wxOK | wxICON_ERROR, this ); wxOK | wxICON_ERROR, this );
} }
...@@ -230,13 +230,13 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( const wxString& aLibraryFullF ...@@ -230,13 +230,13 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( const wxString& aLibraryFullF
if( file == NULL ) if( file == NULL )
{ {
msg.Printf( _( "Could not open PCB footprint library file <%s>." ), msg.Printf( _( "Could not open PCB footprint library file <%s>." ),
tmp.c_str() ); GetChars( tmp ) );
wxMessageBox( msg, _( "Library Load Error" ), wxMessageBox( msg, _( "Library Load Error" ),
wxOK | wxICON_ERROR, this ); wxOK | wxICON_ERROR, this );
continue; continue;
} }
msg.Printf( _( "Scan Lib: %s" ), tmp.c_str() ); msg.Printf( _( "Scan Lib: %s" ), GetChars( tmp ) );
Affiche_Message( msg ); Affiche_Message( msg );
/* lecture entete chaine definie par ENTETE_LIBRAIRIE */ /* lecture entete chaine definie par ENTETE_LIBRAIRIE */
...@@ -246,7 +246,7 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( const wxString& aLibraryFullF ...@@ -246,7 +246,7 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( const wxString& aLibraryFullF
if( strnicmp( Line, ENTETE_LIBRAIRIE, L_ENTETE_LIB ) != 0 ) if( strnicmp( Line, ENTETE_LIBRAIRIE, L_ENTETE_LIB ) != 0 )
{ {
msg.Printf( _( "<%s> is not a valid Kicad PCB footprint library file." ), msg.Printf( _( "<%s> is not a valid Kicad PCB footprint library file." ),
tmp.c_str() ); GetChars( tmp ) );
wxMessageBox( msg, _( "Library Load Error" ), wxMessageBox( msg, _( "Library Load Error" ),
wxOK | wxICON_ERROR, this ); wxOK | wxICON_ERROR, this );
fclose( file ); fclose( file );
...@@ -312,7 +312,7 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( const wxString& aLibraryFullF ...@@ -312,7 +312,7 @@ MODULE* WinEDA_BasePcbFrame::Get_Librairie_Module( const wxString& aLibraryFullF
if( aDisplayMessageError ) if( aDisplayMessageError )
{ {
msg.Printf( _( "Module <%s> not found" ), aModuleName.c_str() ); msg.Printf( _( "Module <%s> not found" ), GetChars( aModuleName ) );
DisplayError( NULL, msg ); DisplayError( NULL, msg );
} }
...@@ -370,7 +370,7 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List( ...@@ -370,7 +370,7 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
if( !tmp ) if( !tmp )
{ {
msg.Printf( _( "PCB footprint library file <%s> not found in search paths." ), msg.Printf( _( "PCB footprint library file <%s> not found in search paths." ),
fn.GetFullName().c_str() ); GetChars( fn.GetFullName() ) );
wxMessageBox( msg, _( "Library Load Error" ), wxMessageBox( msg, _( "Library Load Error" ),
wxOK | wxICON_ERROR, this ); wxOK | wxICON_ERROR, this );
continue; continue;
...@@ -406,7 +406,7 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List( ...@@ -406,7 +406,7 @@ wxString WinEDA_BasePcbFrame::Select_1_Module_From_List(
if( strnicmp( Line, ENTETE_LIBRAIRIE, L_ENTETE_LIB ) != 0 ) if( strnicmp( Line, ENTETE_LIBRAIRIE, L_ENTETE_LIB ) != 0 )
{ {
msg.Printf( _( "<%s> is not a valid Kicad PCB footprint library file." ), msg.Printf( _( "<%s> is not a valid Kicad PCB footprint library file." ),
tmp.c_str() ); GetChars( tmp ) );
wxMessageBox( msg, _( "Library Load Error" ), wxMessageBox( msg, _( "Library Load Error" ),
wxOK | wxICON_ERROR, this ); wxOK | wxICON_ERROR, this );
fclose( file ); fclose( file );
......
...@@ -89,7 +89,7 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event ) ...@@ -89,7 +89,7 @@ void WinEDA_PcbFrame::Process_Config( wxCommandEvent& event )
if( !wxFileExists( dlg.GetPath() ) ) if( !wxFileExists( dlg.GetPath() ) )
{ {
wxString msg; wxString msg;
msg.Printf( _( "File %s not found" ), dlg.GetPath().c_str() ); msg.Printf( _( "File %s not found" ), GetChars( dlg.GetPath() ) );
DisplayError( this, msg ); DisplayError( this, msg );
break; break;
} }
......
...@@ -95,7 +95,7 @@ bool WinEDA_App::OnInit() ...@@ -95,7 +95,7 @@ bool WinEDA_App::OnInit()
{ {
wxLogDebug( wxT( "PcbNew file <%s> has the wrong extension. \ wxLogDebug( wxT( "PcbNew file <%s> has the wrong extension. \
Changing extension to .brd." ), Changing extension to .brd." ),
fn.GetFullPath().c_str() ); GetChars( fn.GetFullPath() ) );
fn.SetExt( BoardFileExtension ); fn.SetExt( BoardFileExtension );
} }
......
...@@ -171,7 +171,7 @@ int DIALOG_EXCHANGE_MODULE::Maj_ListeCmp( const wxString& reference, ...@@ -171,7 +171,7 @@ int DIALOG_EXCHANGE_MODULE::Maj_ListeCmp( const wxString& reference,
{ {
if( ShowError ) if( ShowError )
{ {
msg.Printf( _( "file %s not found" ), fn.GetFullPath().c_str() ); msg.Printf( _( "file %s not found" ), GetChars( fn.GetFullPath() ) );
m_WinMessages->AppendText( msg ); m_WinMessages->AppendText( msg );
} }
return 1; return 1;
...@@ -186,7 +186,7 @@ int DIALOG_EXCHANGE_MODULE::Maj_ListeCmp( const wxString& reference, ...@@ -186,7 +186,7 @@ int DIALOG_EXCHANGE_MODULE::Maj_ListeCmp( const wxString& reference,
if( ShowError ) if( ShowError )
{ {
msg.Printf( _( "Unable to create file %s" ), msg.Printf( _( "Unable to create file %s" ),
tmpFileName.GetFullPath().c_str() ); GetChars( tmpFileName.GetFullPath() ) );
m_WinMessages->AppendText( msg ); m_WinMessages->AppendText( msg );
} }
return 1; return 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment