More wxSing
This commit is contained in:
parent
358a05a2c8
commit
d2c0f5fc2a
|
@ -234,16 +234,16 @@ wxString GetKeyName( const wxKeyEvent &aEvent )
|
||||||
wxString dump( const wxKeyEvent& aEvent )
|
wxString dump( const wxKeyEvent& aEvent )
|
||||||
{
|
{
|
||||||
wxString msg;
|
wxString msg;
|
||||||
wxString eventType = "unknown";
|
wxString eventType = wxS( "unknown" );
|
||||||
|
|
||||||
if( aEvent.GetEventType() == wxEVT_KEY_DOWN )
|
if( aEvent.GetEventType() == wxEVT_KEY_DOWN )
|
||||||
eventType = "KeyDown";
|
eventType = wxS( "KeyDown" );
|
||||||
else if( aEvent.GetEventType() == wxEVT_KEY_UP )
|
else if( aEvent.GetEventType() == wxEVT_KEY_UP )
|
||||||
eventType = "KeyUp";
|
eventType = wxS( "KeyUp" );
|
||||||
else if( aEvent.GetEventType() == wxEVT_CHAR )
|
else if( aEvent.GetEventType() == wxEVT_CHAR )
|
||||||
eventType = "Char";
|
eventType = wxS( "Char" );
|
||||||
else if( aEvent.GetEventType() == wxEVT_CHAR_HOOK )
|
else if( aEvent.GetEventType() == wxEVT_CHAR_HOOK )
|
||||||
eventType = "Hook";
|
eventType = wxS( "Hook" );
|
||||||
|
|
||||||
// event key_name KeyCode modifiers Unicode raw_code raw_flags pos
|
// event key_name KeyCode modifiers Unicode raw_code raw_flags pos
|
||||||
msg.Printf( "%7s %15s %5d %c%c%c%c"
|
msg.Printf( "%7s %15s %5d %c%c%c%c"
|
||||||
|
|
|
@ -108,7 +108,7 @@ int UTF8::uni_forward( const unsigned char* aSequence, unsigned* aResult )
|
||||||
default:
|
default:
|
||||||
case 0:
|
case 0:
|
||||||
if( aResult )
|
if( aResult )
|
||||||
wxFAIL_MSG( "uni_forward: invalid start byte" );
|
wxFAIL_MSG( wxS( "uni_forward: invalid start byte" ) );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
break;
|
break;
|
||||||
|
@ -117,7 +117,7 @@ int UTF8::uni_forward( const unsigned char* aSequence, unsigned* aResult )
|
||||||
if( ( s[1] & 0xc0 ) != 0x80 )
|
if( ( s[1] & 0xc0 ) != 0x80 )
|
||||||
{
|
{
|
||||||
if( aResult )
|
if( aResult )
|
||||||
wxFAIL_MSG( "uni_forward: invalid continuation byte" );
|
wxFAIL_MSG( wxS( "uni_forward: invalid continuation byte" ) );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -136,7 +136,7 @@ int UTF8::uni_forward( const unsigned char* aSequence, unsigned* aResult )
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
if( aResult )
|
if( aResult )
|
||||||
wxFAIL_MSG( "uni_forward: invalid continuation byte" );
|
wxFAIL_MSG( wxS( "uni_forward: invalid continuation byte" ) );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -156,7 +156,7 @@ int UTF8::uni_forward( const unsigned char* aSequence, unsigned* aResult )
|
||||||
(s[0] == 0xF4 && s[1] > 0x8F) )
|
(s[0] == 0xF4 && s[1] > 0x8F) )
|
||||||
{
|
{
|
||||||
if( aResult )
|
if( aResult )
|
||||||
wxFAIL_MSG( "uni_forward: invalid continuation byte" );
|
wxFAIL_MSG( wxS( "uni_forward: invalid continuation byte" ) );
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ FOOTPRINT_NAME_VALIDATOR::FOOTPRINT_NAME_VALIDATOR( wxString* aValue ) :
|
||||||
// This list of characters follows the string from footprint.cpp which, in turn mimics the
|
// This list of characters follows the string from footprint.cpp which, in turn mimics the
|
||||||
// strings from lib_id.cpp
|
// strings from lib_id.cpp
|
||||||
// TODO: Unify forbidden character lists
|
// TODO: Unify forbidden character lists
|
||||||
wxString illegalChars = "%$<>\t\n\r\"\\/:";
|
wxString illegalChars = wxS( "%$<>\t\n\r\"\\/:" );
|
||||||
SetCharExcludes( illegalChars );
|
SetCharExcludes( illegalChars );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -377,7 +377,7 @@ void KIUI::ValidatorTransferToWindowWithoutEvents( wxValidator& aValidator )
|
||||||
{
|
{
|
||||||
wxWindow* ctrl = aValidator.GetWindow();
|
wxWindow* ctrl = aValidator.GetWindow();
|
||||||
|
|
||||||
wxCHECK_RET( ctrl != nullptr, "Transferring validator data without a control" );
|
wxCHECK_RET( ctrl != nullptr, wxS( "Transferring validator data without a control" ) );
|
||||||
|
|
||||||
wxEventBlocker orient_update_blocker( ctrl, wxEVT_ANY );
|
wxEventBlocker orient_update_blocker( ctrl, wxEVT_ANY );
|
||||||
aValidator.TransferToWindow();
|
aValidator.TransferToWindow();
|
||||||
|
|
|
@ -1155,7 +1155,7 @@ void VIEW::Redraw()
|
||||||
|
|
||||||
#ifdef KICAD_GAL_PROFILE
|
#ifdef KICAD_GAL_PROFILE
|
||||||
totalRealTime.Stop();
|
totalRealTime.Stop();
|
||||||
wxLogTrace( traceGalProfile, "VIEW::Redraw(): %.1f ms", totalRealTime.msecs() );
|
wxLogTrace( traceGalProfile, wxS( "VIEW::Redraw(): %.1f ms" ), totalRealTime.msecs() );
|
||||||
#endif /* KICAD_GAL_PROFILE */
|
#endif /* KICAD_GAL_PROFILE */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1471,7 +1471,7 @@ void VIEW::UpdateItems()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
KI_TRACE( traceGalProfile, "View update: total items %u, geom %u anyUpdated %u\n", cntTotal,
|
KI_TRACE( traceGalProfile, wxS( "View update: total items %u, geom %u anyUpdated %u\n" ), cntTotal,
|
||||||
cntGeomUpdate, (unsigned) anyUpdated );
|
cntGeomUpdate, (unsigned) anyUpdated );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -343,7 +343,7 @@ void BITMAP_BUTTON::SetIsSeparator()
|
||||||
|
|
||||||
void BITMAP_BUTTON::Check( bool aCheck )
|
void BITMAP_BUTTON::Check( bool aCheck )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( hasFlag( wxCONTROL_CHECKABLE ), "Button is not a checkButton." );
|
wxASSERT_MSG( hasFlag( wxCONTROL_CHECKABLE ), wxS( "Button is not a checkButton." ) );
|
||||||
|
|
||||||
if( aCheck && !hasFlag( wxCONTROL_CHECKED ) )
|
if( aCheck && !hasFlag( wxCONTROL_CHECKED ) )
|
||||||
{
|
{
|
||||||
|
@ -361,7 +361,7 @@ void BITMAP_BUTTON::Check( bool aCheck )
|
||||||
|
|
||||||
bool BITMAP_BUTTON::IsChecked() const
|
bool BITMAP_BUTTON::IsChecked() const
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( hasFlag( wxCONTROL_CHECKABLE ), "Button is not a checkButton." );
|
wxASSERT_MSG( hasFlag( wxCONTROL_CHECKABLE ), wxS( "Button is not a checkButton." ) );
|
||||||
|
|
||||||
return hasFlag( wxCONTROL_CHECKED );
|
return hasFlag( wxCONTROL_CHECKED );
|
||||||
}
|
}
|
|
@ -120,7 +120,7 @@ COLOR_SWATCH::COLOR_SWATCH( wxWindow* aParent, const COLOR4D& aColor, int aID,
|
||||||
m_readOnly( false ),
|
m_readOnly( false ),
|
||||||
m_supportsOpacity( true )
|
m_supportsOpacity( true )
|
||||||
{
|
{
|
||||||
wxASSERT_MSG( aSwatchSize != SWATCH_EXPAND, "SWATCH_EXPAND not supported in COLOR_SWATCH" );
|
wxASSERT_MSG( aSwatchSize != SWATCH_EXPAND, wxS( "SWATCH_EXPAND not supported in COLOR_SWATCH" ) );
|
||||||
|
|
||||||
switch( aSwatchSize )
|
switch( aSwatchSize )
|
||||||
{
|
{
|
||||||
|
|
|
@ -123,7 +123,7 @@ void FOOTPRINT_CHOICE::OnDrawItem( wxDC& aDC, wxRect const& aRect, int aItem, in
|
||||||
|
|
||||||
wxCoord FOOTPRINT_CHOICE::OnMeasureItem( size_t aItem ) const
|
wxCoord FOOTPRINT_CHOICE::OnMeasureItem( size_t aItem ) const
|
||||||
{
|
{
|
||||||
if( SafeGetString( aItem ) == "" )
|
if( SafeGetString( aItem ) == wxS( "" ) )
|
||||||
return 11;
|
return 11;
|
||||||
else
|
else
|
||||||
return wxOwnerDrawnComboBox::OnMeasureItem( aItem );
|
return wxOwnerDrawnComboBox::OnMeasureItem( aItem );
|
||||||
|
@ -132,7 +132,7 @@ wxCoord FOOTPRINT_CHOICE::OnMeasureItem( size_t aItem ) const
|
||||||
|
|
||||||
wxCoord FOOTPRINT_CHOICE::OnMeasureItemWidth( size_t aItem ) const
|
wxCoord FOOTPRINT_CHOICE::OnMeasureItemWidth( size_t aItem ) const
|
||||||
{
|
{
|
||||||
if( SafeGetString( aItem ) == "" )
|
if( SafeGetString( aItem ) == wxS( "" ) )
|
||||||
return GetTextRect().GetWidth() - 2;
|
return GetTextRect().GetWidth() - 2;
|
||||||
else
|
else
|
||||||
return wxOwnerDrawnComboBox::OnMeasureItemWidth( aItem );
|
return wxOwnerDrawnComboBox::OnMeasureItemWidth( aItem );
|
||||||
|
@ -150,7 +150,7 @@ void FOOTPRINT_CHOICE::TryVetoMouse( wxMouseEvent& aEvent )
|
||||||
{
|
{
|
||||||
int item = GetVListBoxComboPopup()->VirtualHitTest( aEvent.GetPosition().y );
|
int item = GetVListBoxComboPopup()->VirtualHitTest( aEvent.GetPosition().y );
|
||||||
|
|
||||||
if( SafeGetString( item ) != "" )
|
if( SafeGetString( item ) != wxS( "" ) )
|
||||||
aEvent.Skip();
|
aEvent.Skip();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -139,14 +139,14 @@ bool FOOTPRINT_SELECT_WIDGET::UpdateList()
|
||||||
|
|
||||||
m_fp_sel_ctrl->Append( m_default_footprint.IsEmpty() ?
|
m_fp_sel_ctrl->Append( m_default_footprint.IsEmpty() ?
|
||||||
_( "No default footprint" ) :
|
_( "No default footprint" ) :
|
||||||
"[" + _( "Default" ) + "] " + m_default_footprint,
|
wxS( "[" ) + _( "Default" ) + wxS( "] " ) + m_default_footprint,
|
||||||
new wxStringClientData( m_default_footprint ) );
|
new wxStringClientData( m_default_footprint ) );
|
||||||
|
|
||||||
if( !m_zero_filter )
|
if( !m_zero_filter )
|
||||||
{
|
{
|
||||||
for( FOOTPRINT_INFO& fpinfo : m_fp_filter )
|
for( FOOTPRINT_INFO& fpinfo : m_fp_filter )
|
||||||
{
|
{
|
||||||
wxString display_name( fpinfo.GetLibNickname() + ":" + fpinfo.GetFootprintName() );
|
wxString display_name( fpinfo.GetLibNickname() + wxS( ":" ) + fpinfo.GetFootprintName() );
|
||||||
|
|
||||||
m_fp_sel_ctrl->Append( display_name, new wxStringClientData( display_name ) );
|
m_fp_sel_ctrl->Append( display_name, new wxStringClientData( display_name ) );
|
||||||
++n_items;
|
++n_items;
|
||||||
|
|
|
@ -139,11 +139,11 @@ void NUMBER_BADGE::computeSize()
|
||||||
|
|
||||||
// Determine the size using the string "m999{+}" where the 'm' on the front serves as a margin
|
// Determine the size using the string "m999{+}" where the 'm' on the front serves as a margin
|
||||||
// so the number isn't too close to the curved edge.
|
// so the number isn't too close to the curved edge.
|
||||||
test = "m";
|
test = wxS( "m" );
|
||||||
test.Pad( len, '9' );
|
test.Pad( len, '9' );
|
||||||
|
|
||||||
if( m_currentNumber > m_maxNumber )
|
if( m_currentNumber > m_maxNumber )
|
||||||
test += "+";
|
test += wxS( "+" );
|
||||||
|
|
||||||
dc.SetFont( wxFont( m_textSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, BADGE_FONTWEIGHT ) );
|
dc.SetFont( wxFont( m_textSize, wxFONTFAMILY_DEFAULT, wxFONTSTYLE_NORMAL, BADGE_FONTWEIGHT ) );
|
||||||
wxSize size = dc.GetTextExtent( test );
|
wxSize size = dc.GetTextExtent( test );
|
||||||
|
|
|
@ -255,7 +255,7 @@ void PROPERTIES_PANEL::update( const SELECTION& aSelection )
|
||||||
|
|
||||||
if( !converted )
|
if( !converted )
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( "Could not convert wxAny to wxVariant" );
|
wxFAIL_MSG( wxS( "Could not convert wxAny to wxVariant" ) );
|
||||||
available = false;
|
available = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -35,7 +35,7 @@
|
||||||
|
|
||||||
SPLIT_BUTTON::SPLIT_BUTTON( wxWindow* aParent, wxWindowID aId, const wxString& aLabel,
|
SPLIT_BUTTON::SPLIT_BUTTON( wxWindow* aParent, wxWindowID aId, const wxString& aLabel,
|
||||||
const wxPoint& aPos, const wxSize& aSize ) :
|
const wxPoint& aPos, const wxSize& aSize ) :
|
||||||
wxPanel( aParent, aId, aPos, aSize, wxBORDER_NONE | wxTAB_TRAVERSAL, "DropDownButton" ),
|
wxPanel( aParent, aId, aPos, aSize, wxBORDER_NONE | wxTAB_TRAVERSAL, wxS( "DropDownButton" ) ),
|
||||||
m_label( aLabel )
|
m_label( aLabel )
|
||||||
{
|
{
|
||||||
if( aSize == wxDefaultSize )
|
if( aSize == wxDefaultSize )
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
STD_BITMAP_BUTTON::STD_BITMAP_BUTTON( wxWindow* aParent, wxWindowID aId,
|
STD_BITMAP_BUTTON::STD_BITMAP_BUTTON( wxWindow* aParent, wxWindowID aId,
|
||||||
const wxBitmap& aDummyBitmap, const wxPoint& aPos,
|
const wxBitmap& aDummyBitmap, const wxPoint& aPos,
|
||||||
const wxSize& aSize, int aStyle ) :
|
const wxSize& aSize, int aStyle ) :
|
||||||
wxPanel( aParent, aId, aPos, aSize, aStyle, "StdBitmapButton" )
|
wxPanel( aParent, aId, aPos, aSize, aStyle, wxS( "StdBitmapButton" ) )
|
||||||
{
|
{
|
||||||
if( aSize == wxDefaultSize )
|
if( aSize == wxDefaultSize )
|
||||||
{
|
{
|
||||||
|
|
|
@ -91,7 +91,7 @@ wxFont KIUI::GetMonospacedUIFont()
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
// https://trac.wxwidgets.org/ticket/19210
|
// https://trac.wxwidgets.org/ticket/19210
|
||||||
if( font.GetFaceName().IsEmpty() )
|
if( font.GetFaceName().IsEmpty() )
|
||||||
font.SetFaceName( "Menlo" );
|
font.SetFaceName( wxS( "Menlo" ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return font;
|
return font;
|
||||||
|
@ -119,7 +119,7 @@ wxFont getGUIFont( wxWindow* aWindow, int aRelativeSize )
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
// https://trac.wxwidgets.org/ticket/19210
|
// https://trac.wxwidgets.org/ticket/19210
|
||||||
if( font.GetFaceName().IsEmpty() )
|
if( font.GetFaceName().IsEmpty() )
|
||||||
font.SetFaceName( "San Francisco" );
|
font.SetFaceName( wxS( "San Francisco" ) );
|
||||||
// OSX 10.1 .. 10.9: Lucida Grande
|
// OSX 10.1 .. 10.9: Lucida Grande
|
||||||
// OSX 10.10: Helvetica Neue
|
// OSX 10.10: Helvetica Neue
|
||||||
// OSX 10.11 .. : San Francisco
|
// OSX 10.11 .. : San Francisco
|
||||||
|
|
|
@ -301,7 +301,7 @@ void WIDGET_HOTKEY_LIST::updateFromClientData()
|
||||||
|
|
||||||
// mark unsaved changes
|
// mark unsaved changes
|
||||||
if( changed_hk.m_EditKeycode != changed_hk.m_Actions[ 0 ]->GetHotKey() )
|
if( changed_hk.m_EditKeycode != changed_hk.m_Actions[ 0 ]->GetHotKey() )
|
||||||
label += " *";
|
label += wxS( " *" );
|
||||||
|
|
||||||
description.Replace( wxS( "\n" ), wxS( " " ) );
|
description.Replace( wxS( "\n" ), wxS( " " ) );
|
||||||
description.Replace( wxS( "\r" ), wxS( " " ) );
|
description.Replace( wxS( "\r" ), wxS( " " ) );
|
||||||
|
@ -467,7 +467,7 @@ WIDGET_HOTKEY_LIST::WIDGET_HOTKEY_LIST( wxWindow* aParent, HOTKEY_STORE& aHotkey
|
||||||
wxString command_header = _( "Command" );
|
wxString command_header = _( "Command" );
|
||||||
|
|
||||||
if( !m_readOnly )
|
if( !m_readOnly )
|
||||||
command_header << " " << _( "(double-click to edit)" );
|
command_header << wxS( " " ) << _( "(double-click to edit)" );
|
||||||
|
|
||||||
AppendColumn( command_header, 450, wxALIGN_LEFT, wxCOL_RESIZABLE | wxCOL_SORTABLE );
|
AppendColumn( command_header, 450, wxALIGN_LEFT, wxCOL_RESIZABLE | wxCOL_SORTABLE );
|
||||||
AppendColumn( _( "Hotkey" ), 120, wxALIGN_LEFT, wxCOL_RESIZABLE | wxCOL_SORTABLE );
|
AppendColumn( _( "Hotkey" ), 120, wxALIGN_LEFT, wxCOL_RESIZABLE | wxCOL_SORTABLE );
|
||||||
|
@ -495,8 +495,8 @@ WIDGET_HOTKEY_LIST::WIDGET_HOTKEY_LIST( wxWindow* aParent, HOTKEY_STORE& aHotkey
|
||||||
|
|
||||||
std::vector<wxString> reserved_keys =
|
std::vector<wxString> reserved_keys =
|
||||||
{
|
{
|
||||||
"Ctrl+Tab",
|
wxS( "Ctrl+Tab" ),
|
||||||
"Ctrl+Shift+Tab"
|
wxS( "Ctrl+Shift+Tab" )
|
||||||
};
|
};
|
||||||
|
|
||||||
for( const wxString& key : reserved_keys )
|
for( const wxString& key : reserved_keys )
|
||||||
|
@ -506,7 +506,7 @@ WIDGET_HOTKEY_LIST::WIDGET_HOTKEY_LIST( wxWindow* aParent, HOTKEY_STORE& aHotkey
|
||||||
if( code )
|
if( code )
|
||||||
m_reservedHotkeys[code] = key;
|
m_reservedHotkeys[code] = key;
|
||||||
else
|
else
|
||||||
wxLogWarning( "Unknown reserved keycode %s\n", key );
|
wxLogWarning( wxS( "Unknown reserved keycode %s\n" ), key );
|
||||||
}
|
}
|
||||||
|
|
||||||
GetDataView()->SetIndent( 10 );
|
GetDataView()->SetIndent( 10 );
|
||||||
|
|
|
@ -524,7 +524,7 @@ int WX_GRID::GetVisibleWidth( int aCol, bool aHeader, bool aContents, bool aKeep
|
||||||
size = GetRowLabelSize();
|
size = GetRowLabelSize();
|
||||||
|
|
||||||
for( int row = 0; aContents && row < GetNumberRows(); row++ )
|
for( int row = 0; aContents && row < GetNumberRows(); row++ )
|
||||||
size = std::max( size, int( GetTextExtent( GetRowLabelValue( row ) + "M" ).x ) );
|
size = std::max( size, int( GetTextExtent( GetRowLabelValue( row ) + wxS( "M" ) ).x ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -537,14 +537,14 @@ int WX_GRID::GetVisibleWidth( int aCol, bool aHeader, bool aContents, bool aKeep
|
||||||
{
|
{
|
||||||
EnsureColLabelsVisible();
|
EnsureColLabelsVisible();
|
||||||
|
|
||||||
size = std::max( size, int( GetTextExtent( GetColLabelValue( aCol ) + "M" ).x ) );
|
size = std::max( size, int( GetTextExtent( GetColLabelValue( aCol ) + wxS( "M" ) ).x ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
for( int row = 0; aContents && row < GetNumberRows(); row++ )
|
for( int row = 0; aContents && row < GetNumberRows(); row++ )
|
||||||
{
|
{
|
||||||
// If we have text, get the size. Otherwise, use a placeholder for the checkbox
|
// If we have text, get the size. Otherwise, use a placeholder for the checkbox
|
||||||
if( GetTable()->CanGetValueAs( row, aCol, wxGRID_VALUE_STRING ) )
|
if( GetTable()->CanGetValueAs( row, aCol, wxGRID_VALUE_STRING ) )
|
||||||
size = std::max( size, GetTextExtent( GetCellValue( row, aCol ) + "M" ).x );
|
size = std::max( size, GetTextExtent( GetCellValue( row, aCol ) + wxS( "M" ) ).x );
|
||||||
else
|
else
|
||||||
size = std::max( size, GetTextExtent( "MM" ).x );
|
size = std::max( size, GetTextExtent( "MM" ).x );
|
||||||
}
|
}
|
||||||
|
|
|
@ -189,20 +189,20 @@ wxString WX_HTML_REPORT_PANEL::generateHtml( const REPORT_LINE& aLine )
|
||||||
switch( aLine.severity )
|
switch( aLine.severity )
|
||||||
{
|
{
|
||||||
case RPT_SEVERITY_ERROR:
|
case RPT_SEVERITY_ERROR:
|
||||||
retv = "<font color=#F04040 size=3>" + _( "Error:" ) + " </font>"
|
retv = wxS( "<font color=#F04040 size=3>" ) + _( "Error:" ) + wxS( " </font>" )
|
||||||
"<font size=3>" + aLine.message + "</font><br>";
|
wxS( "<font size=3>" ) + aLine.message + wxS( "</font><br>" );
|
||||||
break;
|
break;
|
||||||
case RPT_SEVERITY_WARNING:
|
case RPT_SEVERITY_WARNING:
|
||||||
retv = "<font size=3>" + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
|
retv = wxS( "<font size=3>" ) + _( "Warning:" ) + wxS( " " ) + aLine.message + wxS( "</font><br>" );
|
||||||
break;
|
break;
|
||||||
case RPT_SEVERITY_INFO:
|
case RPT_SEVERITY_INFO:
|
||||||
retv = "<font color=#909090 size=3>" + aLine.message + "</font><br>";
|
retv = wxS( "<font color=#909090 size=3>" ) + aLine.message + wxS( "</font><br>" );
|
||||||
break;
|
break;
|
||||||
case RPT_SEVERITY_ACTION:
|
case RPT_SEVERITY_ACTION:
|
||||||
retv = "<font color=#60D060 size=3>" + aLine.message + "</font><br>";
|
retv = wxS( "<font color=#60D060 size=3>" ) + aLine.message + wxS( "</font><br>" );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
retv = "<font size=3>" + aLine.message + "</font><br>";
|
retv = wxS( "<font size=3>" ) + aLine.message + wxS( "</font><br>" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -210,26 +210,26 @@ wxString WX_HTML_REPORT_PANEL::generateHtml( const REPORT_LINE& aLine )
|
||||||
switch( aLine.severity )
|
switch( aLine.severity )
|
||||||
{
|
{
|
||||||
case RPT_SEVERITY_ERROR:
|
case RPT_SEVERITY_ERROR:
|
||||||
retv = "<font color=#D00000 size=3>" + _( "Error:" ) + " </font>"
|
retv = wxS( "<font color=#D00000 size=3>" ) + _( "Error:" ) + wxS( " </font>" )
|
||||||
"<font size=3>" + aLine.message + "</font><br>";
|
wxS( "<font size=3>" ) + aLine.message + wxS( "</font><br>" );
|
||||||
break;
|
break;
|
||||||
case RPT_SEVERITY_WARNING:
|
case RPT_SEVERITY_WARNING:
|
||||||
retv = "<font size=3>" + _( "Warning:" ) + wxS( " " ) + aLine.message + "</font><br>";
|
retv = wxS( "<font size=3>" ) + _( "Warning:" ) + wxS( " " ) + aLine.message + wxS( "</font><br>" );
|
||||||
break;
|
break;
|
||||||
case RPT_SEVERITY_INFO:
|
case RPT_SEVERITY_INFO:
|
||||||
retv = "<font color=#808080 size=3>" + aLine.message + "</font><br>";
|
retv = wxS( "<font color=#808080 size=3>" ) + aLine.message + wxS( "</font><br>" );
|
||||||
break;
|
break;
|
||||||
case RPT_SEVERITY_ACTION:
|
case RPT_SEVERITY_ACTION:
|
||||||
retv = "<font color=#008000 size=3>" + aLine.message + "</font><br>";
|
retv = wxS( "<font color=#008000 size=3>" ) + aLine.message + wxS( "</font><br>" );
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
retv = "<font size=3>" + aLine.message + "</font><br>";
|
retv = wxS( "<font size=3>" ) + aLine.message + wxS( "</font><br>" );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// wxHtmlWindow fails to do correct baseline alignment between Japanese/Chinese cells and
|
// wxHtmlWindow fails to do correct baseline alignment between Japanese/Chinese cells and
|
||||||
// Roman cells. This keeps the line in a single cell.
|
// Roman cells. This keeps the line in a single cell.
|
||||||
retv.Replace( " ", " " );
|
retv.Replace( wxS( " " ), wxS( " " ) );
|
||||||
|
|
||||||
return retv;
|
return retv;
|
||||||
}
|
}
|
||||||
|
|
|
@ -88,23 +88,23 @@ wxString AddFileExtListToFilter( const std::vector<std::string>& aExts )
|
||||||
{
|
{
|
||||||
// The "all files" wildcard is different on different systems
|
// The "all files" wildcard is different on different systems
|
||||||
wxString filter;
|
wxString filter;
|
||||||
filter << " (" << wxFileSelectorDefaultWildcardStr << ")|"
|
filter << wxS( " (" ) << wxFileSelectorDefaultWildcardStr << wxS( ")|" )
|
||||||
<< wxFileSelectorDefaultWildcardStr;
|
<< wxFileSelectorDefaultWildcardStr;
|
||||||
return filter;
|
return filter;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString files_filter = " (";
|
wxString files_filter = wxS( " (" );
|
||||||
|
|
||||||
// Add extensions to the info message:
|
// Add extensions to the info message:
|
||||||
for( const std::string& ext : aExts )
|
for( const std::string& ext : aExts )
|
||||||
{
|
{
|
||||||
if( files_filter.length() > 2 )
|
if( files_filter.length() > 2 )
|
||||||
files_filter << "; ";
|
files_filter << wxS( "; " );
|
||||||
|
|
||||||
files_filter << "*." << ext;
|
files_filter << "*." << ext;
|
||||||
}
|
}
|
||||||
|
|
||||||
files_filter << ")|*.";
|
files_filter << wxS( ")|*." );
|
||||||
|
|
||||||
// Add extensions to the filter list, using a formatted string (GTK specific):
|
// Add extensions to the filter list, using a formatted string (GTK specific):
|
||||||
bool first = true;
|
bool first = true;
|
||||||
|
@ -112,7 +112,7 @@ wxString AddFileExtListToFilter( const std::vector<std::string>& aExts )
|
||||||
for( const std::string& ext : aExts )
|
for( const std::string& ext : aExts )
|
||||||
{
|
{
|
||||||
if( !first )
|
if( !first )
|
||||||
files_filter << ";*.";
|
files_filter << wxS( ";*." );
|
||||||
|
|
||||||
first = false;
|
first = false;
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ CVPCB_MAINFRAME::CVPCB_MAINFRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
m_tcFilterString = nullptr;
|
m_tcFilterString = nullptr;
|
||||||
m_FootprintsList = FOOTPRINT_LIST::GetInstance( Kiway() );
|
m_FootprintsList = FOOTPRINT_LIST::GetInstance( Kiway() );
|
||||||
m_initialized = false;
|
m_initialized = false;
|
||||||
m_aboutTitle = "CvPcb";
|
m_aboutTitle = wxS( "CvPcb" );
|
||||||
|
|
||||||
// Give an icon
|
// Give an icon
|
||||||
wxIcon icon;
|
wxIcon icon;
|
||||||
|
|
|
@ -127,13 +127,13 @@ DISPLAY_FOOTPRINTS_FRAME::DISPLAY_FOOTPRINTS_FRAME( KIWAY* aKiway, wxWindow* aPa
|
||||||
m_auimgr.SetManagedWindow( this );
|
m_auimgr.SetManagedWindow( this );
|
||||||
|
|
||||||
CreateInfoBar();
|
CreateInfoBar();
|
||||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" )
|
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( wxS( "MainToolbar" ) )
|
||||||
.Top().Layer( 6 ) );
|
.Top().Layer( 6 ) );
|
||||||
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" )
|
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( wxS( "OptToolbar" ) )
|
||||||
.Left().Layer( 3 ) );
|
.Left().Layer( 3 ) );
|
||||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" )
|
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( wxS( "DrawFrame" ) )
|
||||||
.Center() );
|
.Center() );
|
||||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" )
|
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( wxS( "MsgPanel" ) )
|
||||||
.Bottom().Layer( 6 ) );
|
.Bottom().Layer( 6 ) );
|
||||||
|
|
||||||
FinishAUIInitialization();
|
FinishAUIInitialization();
|
||||||
|
|
|
@ -158,7 +158,7 @@ void FOOTPRINTS_LISTBOX::SetFootprints( FOOTPRINT_LIST& aList, const wxString& a
|
||||||
|
|
||||||
for( const FOOTPRINT_INFO& i : filter )
|
for( const FOOTPRINT_INFO& i : filter )
|
||||||
{
|
{
|
||||||
msg.Printf( "%3d %s:%s",
|
msg.Printf( wxS( "%3d %s:%s" ),
|
||||||
int( newList.GetCount() + 1 ),
|
int( newList.GetCount() + 1 ),
|
||||||
i.GetLibNickname(),
|
i.GetLibNickname(),
|
||||||
i.GetFootprintName() );
|
i.GetFootprintName() );
|
||||||
|
@ -211,7 +211,7 @@ void FOOTPRINTS_LISTBOX::OnLeftDClick( wxListEvent& event )
|
||||||
|
|
||||||
void FOOTPRINTS_LISTBOX::OnChar( wxKeyEvent& event )
|
void FOOTPRINTS_LISTBOX::OnChar( wxKeyEvent& event )
|
||||||
{
|
{
|
||||||
wxLogTrace( kicadTraceKeyEvent, "FOOTPRINTS_LISTBOX::OnChar %s", dump( event ) );
|
wxLogTrace( kicadTraceKeyEvent, wxS( "FOOTPRINTS_LISTBOX::OnChar %s" ), dump( event ) );
|
||||||
|
|
||||||
int key = event.GetKeyCode();
|
int key = event.GetKeyCode();
|
||||||
|
|
||||||
|
|
|
@ -142,7 +142,7 @@ END_EVENT_TABLE()
|
||||||
|
|
||||||
void LIBRARY_LISTBOX::OnChar( wxKeyEvent& event )
|
void LIBRARY_LISTBOX::OnChar( wxKeyEvent& event )
|
||||||
{
|
{
|
||||||
wxLogTrace( kicadTraceKeyEvent, "LIBRARY_LISTBOX::OnChar %s", dump( event ) );
|
wxLogTrace( kicadTraceKeyEvent, wxS( "LIBRARY_LISTBOX::OnChar %s" ), dump( event ) );
|
||||||
|
|
||||||
int key = event.GetKeyCode();
|
int key = event.GetKeyCode();
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ void ITEMS_LISTBOX_BASE::UpdateLineWidth( unsigned aLine, wxClientDC& dc )
|
||||||
str = OnGetItemText( aLine, 0 );
|
str = OnGetItemText( aLine, 0 );
|
||||||
else
|
else
|
||||||
str = GetItemText( aLine, 0 );
|
str = GetItemText( aLine, 0 );
|
||||||
str += " ";
|
str += wxS( " " );
|
||||||
|
|
||||||
dc.GetTextExtent( str, &w, nullptr );
|
dc.GetTextExtent( str, &w, nullptr );
|
||||||
newWidth += w;
|
newWidth += w;
|
||||||
|
|
|
@ -71,7 +71,7 @@ void CVPCB_MAINFRAME::doReCreateMenuBar()
|
||||||
|
|
||||||
// We can't use ACTIONS::showPreferences yet because wxWidgets moves this on
|
// We can't use ACTIONS::showPreferences yet because wxWidgets moves this on
|
||||||
// Mac, and it needs the wxID_PREFERENCES id to find it.
|
// Mac, and it needs the wxID_PREFERENCES id to find it.
|
||||||
prefsMenu->Add( _( "Preferences..." ) + "\tCtrl+,",
|
prefsMenu->Add( _( "Preferences..." ) + wxS( "\tCtrl+," ),
|
||||||
_( "Show preferences for all open tools" ),
|
_( "Show preferences for all open tools" ),
|
||||||
wxID_PREFERENCES,
|
wxID_PREFERENCES,
|
||||||
BITMAPS::preference );
|
BITMAPS::preference );
|
||||||
|
|
|
@ -144,7 +144,7 @@ void SYMBOLS_LISTBOX::SetSelection( int index, bool State )
|
||||||
|
|
||||||
void SYMBOLS_LISTBOX::OnChar( wxKeyEvent& event )
|
void SYMBOLS_LISTBOX::OnChar( wxKeyEvent& event )
|
||||||
{
|
{
|
||||||
wxLogTrace( kicadTraceKeyEvent, "SYMBOLS_LISTBOX::OnChar %s", dump( event ) );
|
wxLogTrace( kicadTraceKeyEvent, wxS( "SYMBOLS_LISTBOX::OnChar %s" ), dump( event ) );
|
||||||
|
|
||||||
int key = event.GetKeyCode();
|
int key = event.GetKeyCode();
|
||||||
|
|
||||||
|
|
|
@ -248,7 +248,7 @@ protected:
|
||||||
case PIN_UP: return SIDE_BOTTOM;
|
case PIN_UP: return SIDE_BOTTOM;
|
||||||
case PIN_DOWN: return SIDE_TOP;
|
case PIN_DOWN: return SIDE_TOP;
|
||||||
default:
|
default:
|
||||||
wxFAIL_MSG( "Invalid pin orientation" );
|
wxFAIL_MSG( wxS( "Invalid pin orientation" ) );
|
||||||
return SIDE_LEFT;
|
return SIDE_LEFT;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -278,7 +278,7 @@ protected:
|
||||||
*/
|
*/
|
||||||
void getPossibleCollisions( std::vector<SCH_ITEM*>& aItems )
|
void getPossibleCollisions( std::vector<SCH_ITEM*>& aItems )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( m_screen, "getPossibleCollisions() with null m_screen" );
|
wxCHECK_RET( m_screen, wxS( "getPossibleCollisions() with null m_screen" ) );
|
||||||
|
|
||||||
BOX2I symbolBox = m_symbol->GetBodyAndPinsBoundingBox();
|
BOX2I symbolBox = m_symbol->GetBodyAndPinsBoundingBox();
|
||||||
std::vector<SIDE_AND_NPINS> sides = getPreferredSides();
|
std::vector<SIDE_AND_NPINS> sides = getPreferredSides();
|
||||||
|
@ -670,7 +670,7 @@ protected:
|
||||||
field_xcoord = aFieldBox.GetRight();
|
field_xcoord = aFieldBox.GetRight();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
wxFAIL_MSG( "Unexpected value for SCH_FIELD::GetHorizJustify()" );
|
wxFAIL_MSG( wxS( "Unexpected value for SCH_FIELD::GetHorizJustify()" ) );
|
||||||
field_xcoord = aFieldBox.Centre().x; // Most are centered
|
field_xcoord = aFieldBox.Centre().x; // Most are centered
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -739,7 +739,7 @@ const AUTOPLACER::SIDE AUTOPLACER::SIDE_RIGHT( 1, 0 );
|
||||||
void SCH_SYMBOL::AutoplaceFields( SCH_SCREEN* aScreen, bool aManual )
|
void SCH_SYMBOL::AutoplaceFields( SCH_SCREEN* aScreen, bool aManual )
|
||||||
{
|
{
|
||||||
if( aManual )
|
if( aManual )
|
||||||
wxASSERT_MSG( aScreen, "A SCH_SCREEN pointer must be given for manual autoplacement" );
|
wxASSERT_MSG( aScreen, wxS( "A SCH_SCREEN pointer must be given for manual autoplacement" ) );
|
||||||
|
|
||||||
AUTOPLACER autoplacer( this, aScreen );
|
AUTOPLACER autoplacer( this, aScreen );
|
||||||
autoplacer.DoAutoplace( aManual );
|
autoplacer.DoAutoplace( aManual );
|
||||||
|
|
|
@ -60,7 +60,7 @@ BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER( const wxString& aFile )
|
||||||
if( extension == wxS( "xsl" ) )
|
if( extension == wxS( "xsl" ) )
|
||||||
{
|
{
|
||||||
m_info = readHeader( wxS( "-->" ) );
|
m_info = readHeader( wxS( "-->" ) );
|
||||||
m_cmd = wxString::Format( "xsltproc -o \"%%O%s\" \"%s\" \"%%I\"",
|
m_cmd = wxString::Format( wxS( "xsltproc -o \"%%O%s\" \"%s\" \"%%I\"" ),
|
||||||
getOutputExtension( m_info ),
|
getOutputExtension( m_info ),
|
||||||
m_file.GetFullPath() );
|
m_file.GetFullPath() );
|
||||||
}
|
}
|
||||||
|
@ -110,7 +110,7 @@ BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER( const wxString& aFile )
|
||||||
else if( extension == wxS( "pyw" ) )
|
else if( extension == wxS( "pyw" ) )
|
||||||
{
|
{
|
||||||
m_info = readHeader( wxS( "\"\"\"" ) );
|
m_info = readHeader( wxS( "\"\"\"" ) );
|
||||||
m_cmd = wxString::Format( "pythonw \"%s/%s\" \"%%I\" \"%%O%s\"",
|
m_cmd = wxString::Format( wxS( "pythonw \"%s/%s\" \"%%I\" \"%%O%s\"" ),
|
||||||
m_file.GetPath(),
|
m_file.GetPath(),
|
||||||
m_file.GetFullName(),
|
m_file.GetFullName(),
|
||||||
getOutputExtension( m_info ) );
|
getOutputExtension( m_info ) );
|
||||||
|
@ -121,7 +121,7 @@ BOM_GENERATOR_HANDLER::BOM_GENERATOR_HANDLER( const wxString& aFile )
|
||||||
m_cmd = m_file.GetFullPath();
|
m_cmd = m_file.GetFullPath();
|
||||||
}
|
}
|
||||||
|
|
||||||
wxLogTrace( BOM_TRACE, "%s: extracted command line %s", m_name, m_cmd );
|
wxLogTrace( BOM_TRACE, wxS( "%s: extracted command line %s" ), m_name, m_cmd );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -145,7 +145,7 @@ wxString BOM_GENERATOR_HANDLER::readHeader( const wxString& aEndSection )
|
||||||
if( aEndSection.IsEmpty() )
|
if( aEndSection.IsEmpty() )
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
|
|
||||||
wxFFile fdata( m_file.GetFullPath(), "rb" ); // dtor will close the file
|
wxFFile fdata( m_file.GetFullPath(), wxS( "rb" ) ); // dtor will close the file
|
||||||
wxString data;
|
wxString data;
|
||||||
|
|
||||||
if( !fdata.ReadAll( &data ) )
|
if( !fdata.ReadAll( &data ) )
|
||||||
|
@ -177,7 +177,7 @@ wxString BOM_GENERATOR_HANDLER::getOutputExtension( const wxString& aHeader )
|
||||||
{
|
{
|
||||||
// search header for extension after %O (extension includes '.')
|
// search header for extension after %O (extension includes '.')
|
||||||
// looks for output argument of the form `"%O.extension"`
|
// looks for output argument of the form `"%O.extension"`
|
||||||
const wxString outputarg( "\"%O" );
|
const wxString outputarg( wxS( "\"%O" ) );
|
||||||
|
|
||||||
int strstart = aHeader.Find( outputarg );
|
int strstart = aHeader.Find( outputarg );
|
||||||
|
|
||||||
|
@ -185,7 +185,7 @@ wxString BOM_GENERATOR_HANDLER::getOutputExtension( const wxString& aHeader )
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
|
|
||||||
strstart += outputarg.Length();
|
strstart += outputarg.Length();
|
||||||
int strend = aHeader.find( "\"", strstart );
|
int strend = aHeader.find( wxS( "\"" ), strstart );
|
||||||
|
|
||||||
if( strend == wxNOT_FOUND )
|
if( strend == wxNOT_FOUND )
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
|
|
|
@ -236,7 +236,7 @@ wxString CONNECTION_SUBGRAPH::GetNetName() const
|
||||||
if( !m_driver->Connection( &m_sheet ) )
|
if( !m_driver->Connection( &m_sheet ) )
|
||||||
{
|
{
|
||||||
#ifdef CONNECTIVITY_DEBUG
|
#ifdef CONNECTIVITY_DEBUG
|
||||||
wxASSERT_MSG( false, "Tried to get the net name of an item with no connection" );
|
wxASSERT_MSG( false, wxS( "Tried to get the net name of an item with no connection" ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
@ -297,7 +297,7 @@ wxString CONNECTION_SUBGRAPH::driverName( SCH_ITEM* aItem ) const
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
wxFAIL_MSG( "Unhandled item type in GetNameForDriver" );
|
wxFAIL_MSG( wxS( "Unhandled item type in GetNameForDriver" ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -779,7 +779,7 @@ void CONNECTION_GRAPH::updateItemConnectivity( const SCH_SHEET_PATH& aSheet,
|
||||||
void CONNECTION_GRAPH::buildItemSubGraphs()
|
void CONNECTION_GRAPH::buildItemSubGraphs()
|
||||||
{
|
{
|
||||||
// Recache all bus aliases for later use
|
// Recache all bus aliases for later use
|
||||||
wxCHECK_RET( m_schematic, "Connection graph cannot be built without schematic pointer" );
|
wxCHECK_RET( m_schematic, wxS( "Connection graph cannot be built without schematic pointer" ) );
|
||||||
|
|
||||||
SCH_SHEET_LIST all_sheets = m_schematic->GetSheets();
|
SCH_SHEET_LIST all_sheets = m_schematic->GetSheets();
|
||||||
|
|
||||||
|
@ -991,7 +991,7 @@ void CONNECTION_GRAPH::collectAllDriverValues()
|
||||||
{
|
{
|
||||||
UNITS_PROVIDER unitsProvider( schIUScale, EDA_UNITS::MILLIMETRES );
|
UNITS_PROVIDER unitsProvider( schIUScale, EDA_UNITS::MILLIMETRES );
|
||||||
|
|
||||||
wxLogTrace( ConnTrace, "Unexpected strong driver %s",
|
wxLogTrace( ConnTrace, wxS( "Unexpected strong driver %s" ),
|
||||||
driver->GetItemDescription( &unitsProvider ) );
|
driver->GetItemDescription( &unitsProvider ) );
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -1136,7 +1136,7 @@ void CONNECTION_GRAPH::processSubGraphs()
|
||||||
while( m_net_name_to_subgraphs_map.count( new_name ) )
|
while( m_net_name_to_subgraphs_map.count( new_name ) )
|
||||||
new_name = create_new_name( connection );
|
new_name = create_new_name( connection );
|
||||||
|
|
||||||
wxLogTrace( ConnTrace, "%ld (%s) is weakly driven and not unique. Changing to %s.",
|
wxLogTrace( ConnTrace, wxS( "%ld (%s) is weakly driven and not unique. Changing to %s." ),
|
||||||
subgraph->m_code, name, new_name );
|
subgraph->m_code, name, new_name );
|
||||||
|
|
||||||
alg::delete_matching( *vec, subgraph );
|
alg::delete_matching( *vec, subgraph );
|
||||||
|
@ -1177,7 +1177,7 @@ void CONNECTION_GRAPH::processSubGraphs()
|
||||||
if( conflict )
|
if( conflict )
|
||||||
{
|
{
|
||||||
wxLogTrace( ConnTrace,
|
wxLogTrace( ConnTrace,
|
||||||
"%ld (%s) skipped for promotion due to potential conflict",
|
wxS( "%ld (%s) skipped for promotion due to potential conflict" ),
|
||||||
subgraph->m_code, name );
|
subgraph->m_code, name );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -1185,7 +1185,7 @@ void CONNECTION_GRAPH::processSubGraphs()
|
||||||
UNITS_PROVIDER unitsProvider( schIUScale, EDA_UNITS::MILLIMETRES );
|
UNITS_PROVIDER unitsProvider( schIUScale, EDA_UNITS::MILLIMETRES );
|
||||||
|
|
||||||
wxLogTrace( ConnTrace,
|
wxLogTrace( ConnTrace,
|
||||||
"%ld (%s) weakly driven by unique sheet pin %s, promoting",
|
wxS( "%ld (%s) weakly driven by unique sheet pin %s, promoting" ),
|
||||||
subgraph->m_code, name,
|
subgraph->m_code, name,
|
||||||
subgraph->m_driver->GetItemDescription( &unitsProvider ) );
|
subgraph->m_driver->GetItemDescription( &unitsProvider ) );
|
||||||
|
|
||||||
|
@ -1277,7 +1277,7 @@ void CONNECTION_GRAPH::processSubGraphs()
|
||||||
|
|
||||||
connections_to_check.push_back( c );
|
connections_to_check.push_back( c );
|
||||||
wxLogTrace( ConnTrace,
|
wxLogTrace( ConnTrace,
|
||||||
"%lu (%s): Adding secondary driver %s", aSubgraph->m_code,
|
wxS( "%lu (%s): Adding secondary driver %s" ), aSubgraph->m_code,
|
||||||
aSubgraph->m_driver_connection->Name( true ),
|
aSubgraph->m_driver_connection->Name( true ),
|
||||||
c->Name( true ) );
|
c->Name( true ) );
|
||||||
}
|
}
|
||||||
|
@ -1356,7 +1356,7 @@ void CONNECTION_GRAPH::processSubGraphs()
|
||||||
{
|
{
|
||||||
if( connection->IsBus() && candidate->m_driver_connection->IsNet() )
|
if( connection->IsBus() && candidate->m_driver_connection->IsNet() )
|
||||||
{
|
{
|
||||||
wxLogTrace( ConnTrace, "%lu (%s) has bus child %lu (%s)", subgraph->m_code,
|
wxLogTrace( ConnTrace, wxS( "%lu (%s) has bus child %lu (%s)" ), subgraph->m_code,
|
||||||
connection->Name(), candidate->m_code, member->Name() );
|
connection->Name(), candidate->m_code, member->Name() );
|
||||||
|
|
||||||
subgraph->m_bus_neighbors[member].insert( candidate );
|
subgraph->m_bus_neighbors[member].insert( candidate );
|
||||||
|
@ -1364,7 +1364,7 @@ void CONNECTION_GRAPH::processSubGraphs()
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxLogTrace( ConnTrace, "%lu (%s) absorbs neighbor %lu (%s)",
|
wxLogTrace( ConnTrace, wxS( "%lu (%s) absorbs neighbor %lu (%s)" ),
|
||||||
subgraph->m_code, connection->Name(),
|
subgraph->m_code, connection->Name(),
|
||||||
candidate->m_code, candidate->m_driver_connection->Name() );
|
candidate->m_code, candidate->m_driver_connection->Name() );
|
||||||
|
|
||||||
|
@ -1392,7 +1392,7 @@ void CONNECTION_GRAPH::processSubGraphs()
|
||||||
else
|
else
|
||||||
assignNewNetCode( *subgraph->m_driver_connection );
|
assignNewNetCode( *subgraph->m_driver_connection );
|
||||||
|
|
||||||
wxLogTrace( ConnTrace, "Re-resolving drivers for %lu (%s)", subgraph->m_code,
|
wxLogTrace( ConnTrace, wxS( "Re-resolving drivers for %lu (%s)" ), subgraph->m_code,
|
||||||
subgraph->m_driver_connection->Name() );
|
subgraph->m_driver_connection->Name() );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1488,7 +1488,7 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||||
if( !subgraph->m_dirty )
|
if( !subgraph->m_dirty )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
wxLogTrace( ConnTrace, "Processing %lu (%s) for propagation", subgraph->m_code,
|
wxLogTrace( ConnTrace, wxS( "Processing %lu (%s) for propagation" ), subgraph->m_code,
|
||||||
subgraph->m_driver_connection->Name() );
|
subgraph->m_driver_connection->Name() );
|
||||||
|
|
||||||
// For subgraphs that are driven by a global (power port or label) and have more
|
// For subgraphs that are driven by a global (power port or label) and have more
|
||||||
|
@ -1522,7 +1522,7 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||||
|
|
||||||
if( conn->Name() == secondary_name )
|
if( conn->Name() == secondary_name )
|
||||||
{
|
{
|
||||||
wxLogTrace( ConnTrace, "Global %lu (%s) promoted to %s", candidate->m_code,
|
wxLogTrace( ConnTrace, wxS( "Global %lu (%s) promoted to %s" ), candidate->m_code,
|
||||||
conn->Name(), subgraph->m_driver_connection->Name() );
|
conn->Name(), subgraph->m_driver_connection->Name() );
|
||||||
|
|
||||||
conn->Clone( *subgraph->m_driver_connection );
|
conn->Clone( *subgraph->m_driver_connection );
|
||||||
|
@ -1560,14 +1560,14 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||||
for( CONNECTION_SUBGRAPH* subgraph : m_driver_subgraphs )
|
for( CONNECTION_SUBGRAPH* subgraph : m_driver_subgraphs )
|
||||||
{
|
{
|
||||||
// All SGs should have been processed by propagateToNeighbors above
|
// All SGs should have been processed by propagateToNeighbors above
|
||||||
wxASSERT_MSG( !subgraph->m_dirty, "Subgraph not processed by propagateToNeighbors!" );
|
wxASSERT_MSG( !subgraph->m_dirty, wxS( "Subgraph not processed by propagateToNeighbors!" ) );
|
||||||
|
|
||||||
if( subgraph->m_bus_parents.size() < 2 )
|
if( subgraph->m_bus_parents.size() < 2 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
SCH_CONNECTION* conn = subgraph->m_driver_connection;
|
SCH_CONNECTION* conn = subgraph->m_driver_connection;
|
||||||
|
|
||||||
wxLogTrace( ConnTrace, "%lu (%s) has multiple bus parents",
|
wxLogTrace( ConnTrace, wxS( "%lu (%s) has multiple bus parents" ),
|
||||||
subgraph->m_code, conn->Name() );
|
subgraph->m_code, conn->Name() );
|
||||||
|
|
||||||
wxASSERT( conn->IsNet() );
|
wxASSERT( conn->IsNet() );
|
||||||
|
@ -1585,7 +1585,7 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||||
|
|
||||||
if( !match )
|
if( !match )
|
||||||
{
|
{
|
||||||
wxLogTrace( ConnTrace, "Warning: could not match %s inside %lu (%s)",
|
wxLogTrace( ConnTrace, wxS( "Warning: could not match %s inside %lu (%s)" ),
|
||||||
conn->Name(), parent->m_code, parent->m_driver_connection->Name() );
|
conn->Name(), parent->m_code, parent->m_driver_connection->Name() );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1594,7 +1594,7 @@ void CONNECTION_GRAPH::buildConnectionGraph( std::function<void( SCH_ITEM* )>* a
|
||||||
{
|
{
|
||||||
wxString old_name = match->Name();
|
wxString old_name = match->Name();
|
||||||
|
|
||||||
wxLogTrace( ConnTrace, "Updating %lu (%s) member %s to %s", parent->m_code,
|
wxLogTrace( ConnTrace, wxS( "Updating %lu (%s) member %s to %s" ), parent->m_code,
|
||||||
parent->m_driver_connection->Name(), old_name, conn->Name() );
|
parent->m_driver_connection->Name(), old_name, conn->Name() );
|
||||||
|
|
||||||
match->Clone( *conn );
|
match->Clone( *conn );
|
||||||
|
@ -1841,7 +1841,7 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph, boo
|
||||||
{
|
{
|
||||||
if( candidate->GetNameForDriver( label ) == aParent->GetNameForDriver( pin ) )
|
if( candidate->GetNameForDriver( label ) == aParent->GetNameForDriver( pin ) )
|
||||||
{
|
{
|
||||||
wxLogTrace( ConnTrace, "%lu: found child %lu (%s)", aParent->m_code,
|
wxLogTrace( ConnTrace, wxS( "%lu: found child %lu (%s)" ), aParent->m_code,
|
||||||
candidate->m_code, candidate->m_driver_connection->Name() );
|
candidate->m_code, candidate->m_driver_connection->Name() );
|
||||||
|
|
||||||
candidate->m_hier_parent = aParent;
|
candidate->m_hier_parent = aParent;
|
||||||
|
@ -1888,7 +1888,7 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph, boo
|
||||||
|
|
||||||
if( aParent->GetNameForDriver( label ) == candidate->GetNameForDriver( pin ) )
|
if( aParent->GetNameForDriver( label ) == candidate->GetNameForDriver( pin ) )
|
||||||
{
|
{
|
||||||
wxLogTrace( ConnTrace, "%lu: found additional parent %lu (%s)",
|
wxLogTrace( ConnTrace, wxS( "%lu: found additional parent %lu (%s)" ),
|
||||||
aParent->m_code, candidate->m_code,
|
aParent->m_code, candidate->m_code,
|
||||||
candidate->m_driver_connection->Name() );
|
candidate->m_driver_connection->Name() );
|
||||||
|
|
||||||
|
@ -1943,7 +1943,7 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph, boo
|
||||||
// This is bad, probably an ERC error
|
// This is bad, probably an ERC error
|
||||||
if( !member )
|
if( !member )
|
||||||
{
|
{
|
||||||
wxLogTrace( ConnTrace, "Could not match bus member %s in %s",
|
wxLogTrace( ConnTrace, wxS( "Could not match bus member %s in %s" ),
|
||||||
kv.first->Name(), parent->Name() );
|
kv.first->Name(), parent->Name() );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
@ -1962,7 +1962,7 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph, boo
|
||||||
// Safety check against infinite recursion
|
// Safety check against infinite recursion
|
||||||
wxASSERT( neighbor_conn->IsNet() );
|
wxASSERT( neighbor_conn->IsNet() );
|
||||||
|
|
||||||
wxLogTrace( ConnTrace, "%lu (%s) connected to bus member %s (local %s)",
|
wxLogTrace( ConnTrace, wxS( "%lu (%s) connected to bus member %s (local %s)" ),
|
||||||
neighbor->m_code, neighbor_name, member->Name(), member->LocalName() );
|
neighbor->m_code, neighbor_name, member->Name(), member->LocalName() );
|
||||||
|
|
||||||
// Take whichever name is higher priority
|
// Take whichever name is higher priority
|
||||||
|
@ -1995,13 +1995,13 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph, boo
|
||||||
// on which subgraph comes up first)
|
// on which subgraph comes up first)
|
||||||
if( !aSubgraph->m_hier_ports.empty() && !aSubgraph->m_hier_pins.empty() )
|
if( !aSubgraph->m_hier_ports.empty() && !aSubgraph->m_hier_pins.empty() )
|
||||||
{
|
{
|
||||||
wxLogTrace( ConnTrace, "%lu (%s) has both hier ports and pins; deferring processing",
|
wxLogTrace( ConnTrace, wxS( "%lu (%s) has both hier ports and pins; deferring processing" ),
|
||||||
aSubgraph->m_code, conn->Name() );
|
aSubgraph->m_code, conn->Name() );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if( aSubgraph->m_hier_ports.empty() && aSubgraph->m_hier_pins.empty() )
|
else if( aSubgraph->m_hier_ports.empty() && aSubgraph->m_hier_pins.empty() )
|
||||||
{
|
{
|
||||||
wxLogTrace( ConnTrace, "%lu (%s) has no hier pins or ports; marking clean",
|
wxLogTrace( ConnTrace, wxS( "%lu (%s) has no hier pins or ports; marking clean" ),
|
||||||
aSubgraph->m_code, conn->Name() );
|
aSubgraph->m_code, conn->Name() );
|
||||||
aSubgraph->m_dirty = false;
|
aSubgraph->m_dirty = false;
|
||||||
return;
|
return;
|
||||||
|
@ -2009,7 +2009,7 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph, boo
|
||||||
|
|
||||||
visited.insert( aSubgraph );
|
visited.insert( aSubgraph );
|
||||||
|
|
||||||
wxLogTrace( ConnTrace, "Propagating %lu (%s) to subsheets",
|
wxLogTrace( ConnTrace, wxS( "Propagating %lu (%s) to subsheets" ),
|
||||||
aSubgraph->m_code, aSubgraph->m_driver_connection->Name() );
|
aSubgraph->m_code, aSubgraph->m_driver_connection->Name() );
|
||||||
|
|
||||||
visit( aSubgraph );
|
visit( aSubgraph );
|
||||||
|
@ -2072,7 +2072,7 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph, boo
|
||||||
|
|
||||||
if( bestDriver != aSubgraph )
|
if( bestDriver != aSubgraph )
|
||||||
{
|
{
|
||||||
wxLogTrace( ConnTrace, "%lu (%s) overridden by new driver %lu (%s)",
|
wxLogTrace( ConnTrace, wxS( "%lu (%s) overridden by new driver %lu (%s)" ),
|
||||||
aSubgraph->m_code, aSubgraph->m_driver_connection->Name(), bestDriver->m_code,
|
aSubgraph->m_code, aSubgraph->m_driver_connection->Name(), bestDriver->m_code,
|
||||||
bestDriver->m_driver_connection->Name() );
|
bestDriver->m_driver_connection->Name() );
|
||||||
}
|
}
|
||||||
|
@ -2106,12 +2106,12 @@ void CONNECTION_GRAPH::propagateToNeighbors( CONNECTION_SUBGRAPH* aSubgraph, boo
|
||||||
|
|
||||||
if( !member )
|
if( !member )
|
||||||
{
|
{
|
||||||
wxLogTrace( ConnTrace, "WARNING: failed to match stale member %s in %s.",
|
wxLogTrace( ConnTrace, wxS( "WARNING: failed to match stale member %s in %s." ),
|
||||||
stale_member->Name(), subgraph->m_driver_connection->Name() );
|
stale_member->Name(), subgraph->m_driver_connection->Name() );
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxLogTrace( ConnTrace, "Updating %lu (%s) member %s to %s", subgraph->m_code,
|
wxLogTrace( ConnTrace, wxS( "Updating %lu (%s) member %s to %s" ), subgraph->m_code,
|
||||||
subgraph->m_driver_connection->Name(), member->LocalName(),
|
subgraph->m_driver_connection->Name(), member->LocalName(),
|
||||||
stale_member->Name() );
|
stale_member->Name() );
|
||||||
|
|
||||||
|
@ -2228,7 +2228,7 @@ void CONNECTION_GRAPH::recacheSubgraphName( CONNECTION_SUBGRAPH* aSubgraph,
|
||||||
alg::delete_matching( vec, aSubgraph );
|
alg::delete_matching( vec, aSubgraph );
|
||||||
}
|
}
|
||||||
|
|
||||||
wxLogTrace( ConnTrace, "recacheSubgraphName: %s => %s", aOldName,
|
wxLogTrace( ConnTrace, wxS( "recacheSubgraphName: %s => %s" ), aOldName,
|
||||||
aSubgraph->m_driver_connection->Name() );
|
aSubgraph->m_driver_connection->Name() );
|
||||||
|
|
||||||
m_net_name_to_subgraphs_map[aSubgraph->m_driver_connection->Name()].push_back( aSubgraph );
|
m_net_name_to_subgraphs_map[aSubgraph->m_driver_connection->Name()].push_back( aSubgraph );
|
||||||
|
@ -2279,7 +2279,7 @@ std::vector<const CONNECTION_SUBGRAPH*> CONNECTION_GRAPH::GetBusesNeedingMigrati
|
||||||
if( !different )
|
if( !different )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
wxLogTrace( ConnTrace, "SG %ld (%s) has multiple bus labels", subgraph->m_code,
|
wxLogTrace( ConnTrace, wxS( "SG %ld (%s) has multiple bus labels" ), subgraph->m_code,
|
||||||
connection->Name() );
|
connection->Name() );
|
||||||
|
|
||||||
ret.push_back( subgraph );
|
ret.push_back( subgraph );
|
||||||
|
@ -2365,7 +2365,7 @@ int CONNECTION_GRAPH::RunERC()
|
||||||
{
|
{
|
||||||
int error_count = 0;
|
int error_count = 0;
|
||||||
|
|
||||||
wxCHECK_MSG( m_schematic, true, "Null m_schematic in CONNECTION_GRAPH::RunERC" );
|
wxCHECK_MSG( m_schematic, true, wxS( "Null m_schematic in CONNECTION_GRAPH::RunERC" ) );
|
||||||
|
|
||||||
ERC_SETTINGS& settings = m_schematic->ErcSettings();
|
ERC_SETTINGS& settings = m_schematic->ErcSettings();
|
||||||
|
|
||||||
|
@ -3152,7 +3152,7 @@ bool CONNECTION_GRAPH::ercCheckLabels( const CONNECTION_SUBGRAPH* aSubgraph )
|
||||||
|
|
||||||
wxString netName = GetResolvedSubgraphName( aSubgraph );
|
wxString netName = GetResolvedSubgraphName( aSubgraph );
|
||||||
|
|
||||||
wxCHECK_MSG( m_schematic, true, "Null m_schematic in CONNECTION_GRAPH::ercCheckLabels" );
|
wxCHECK_MSG( m_schematic, true, wxS( "Null m_schematic in CONNECTION_GRAPH::ercCheckLabels" ) );
|
||||||
|
|
||||||
// Labels that have multiple pins connected are not dangling (may be used for naming segments)
|
// Labels that have multiple pins connected are not dangling (may be used for naming segments)
|
||||||
// so leave them without errors here
|
// so leave them without errors here
|
||||||
|
|
|
@ -478,11 +478,11 @@ bool findSymbolsAndPins(
|
||||||
wxString fullRef = schRef.GetRef() + refNum;
|
wxString fullRef = schRef.GetRef() + refNum;
|
||||||
|
|
||||||
// Skip power symbols
|
// Skip power symbols
|
||||||
if( fullRef.StartsWith( "#" ) )
|
if( fullRef.StartsWith( wxS( "#" ) ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Unannotated symbols are not supported
|
// Unannotated symbols are not supported
|
||||||
if( refNum.compare( "?" ) == 0 )
|
if( refNum.compare( wxS( "?" ) ) == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Look for whole footprint
|
// Look for whole footprint
|
||||||
|
@ -570,11 +570,11 @@ bool sheetContainsOnlyWantedItems(
|
||||||
wxString fullRef = schRef.GetRef() + refNum;
|
wxString fullRef = schRef.GetRef() + refNum;
|
||||||
|
|
||||||
// Skip power symbols
|
// Skip power symbols
|
||||||
if( fullRef.StartsWith( "#" ) )
|
if( fullRef.StartsWith( wxS( "#" ) ) )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Unannotated symbols are not supported
|
// Unannotated symbols are not supported
|
||||||
if( refNum.compare( "?" ) == 0 )
|
if( refNum.compare( wxS( "?" ) ) == 0 )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if( aSyncSymMap.find( fullRef ) == aSyncSymMap.end() )
|
if( aSyncSymMap.find( fullRef ) == aSyncSymMap.end() )
|
||||||
|
@ -599,7 +599,7 @@ std::optional<std::tuple<SCH_SHEET_PATH, SCH_ITEM*, std::vector<SCH_ITEM*>>>
|
||||||
findItemsFromSyncSelection( const SCHEMATIC& aSchematic, const std::string aSyncStr,
|
findItemsFromSyncSelection( const SCHEMATIC& aSchematic, const std::string aSyncStr,
|
||||||
bool aFocusOnFirst )
|
bool aFocusOnFirst )
|
||||||
{
|
{
|
||||||
wxArrayString syncArray = wxStringTokenize( aSyncStr, "," );
|
wxArrayString syncArray = wxStringTokenize( aSyncStr, wxS( "," ) );
|
||||||
|
|
||||||
std::unordered_map<wxString, std::vector<SCH_REFERENCE>> syncSymMap;
|
std::unordered_map<wxString, std::vector<SCH_REFERENCE>> syncSymMap;
|
||||||
std::unordered_map<wxString, std::unordered_map<wxString, SCH_PIN*>> syncPinMap;
|
std::unordered_map<wxString, std::unordered_map<wxString, SCH_PIN*>> syncPinMap;
|
||||||
|
|
|
@ -212,7 +212,7 @@ void DIALOG_BOM::installGeneratorsList()
|
||||||
|
|
||||||
if( !m_generators[ii]->FindFilePath().Exists( wxFILE_EXISTS_REGULAR ) )
|
if( !m_generators[ii]->FindFilePath().Exists( wxFILE_EXISTS_REGULAR ) )
|
||||||
{
|
{
|
||||||
wxLogTrace( BOM_TRACE, "BOM plugin %s not found",
|
wxLogTrace( BOM_TRACE, wxS( "BOM plugin %s not found" ),
|
||||||
m_generators[ii]->FindFilePath().GetFullName() );
|
m_generators[ii]->FindFilePath().GetFullName() );
|
||||||
name.Append( wxT( " " ) + _( "(file missing)" ) );
|
name.Append( wxT( " " ) + _( "(file missing)" ) );
|
||||||
|
|
||||||
|
|
|
@ -564,7 +564,7 @@ bool DIALOG_CHANGE_SYMBOLS::processSymbol( SCH_SYMBOL* aSymbol, const SCH_SHEET_
|
||||||
|
|
||||||
if( !libSymbol )
|
if( !libSymbol )
|
||||||
{
|
{
|
||||||
msg << ": " << _( "*** symbol not found ***" );
|
msg << wxS( ": " ) << _( "*** symbol not found ***" );
|
||||||
m_messagePanel->Report( msg, RPT_SEVERITY_ERROR );
|
m_messagePanel->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -573,7 +573,7 @@ bool DIALOG_CHANGE_SYMBOLS::processSymbol( SCH_SYMBOL* aSymbol, const SCH_SHEET_
|
||||||
|
|
||||||
if( flattenedSymbol->GetUnitCount() < aSymbol->GetUnit() )
|
if( flattenedSymbol->GetUnitCount() < aSymbol->GetUnit() )
|
||||||
{
|
{
|
||||||
msg << ": " << _( "*** new symbol has too few units ***" );
|
msg << wxS( ": " ) << _( "*** new symbol has too few units ***" );
|
||||||
m_messagePanel->Report( msg, RPT_SEVERITY_ERROR );
|
m_messagePanel->Report( msg, RPT_SEVERITY_ERROR );
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -925,7 +925,7 @@ void DIALOG_ERC::deleteAllMarkers( bool aIncludeExclusions )
|
||||||
|
|
||||||
void DIALOG_ERC::OnSaveReport( wxCommandEvent& aEvent )
|
void DIALOG_ERC::OnSaveReport( wxCommandEvent& aEvent )
|
||||||
{
|
{
|
||||||
wxFileName fn( "ERC." + ReportFileExtension );
|
wxFileName fn( wxS( "ERC." ) + ReportFileExtension );
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Save Report to File" ), Prj().GetProjectPath(), fn.GetFullName(),
|
wxFileDialog dlg( this, _( "Save Report to File" ), Prj().GetProjectPath(), fn.GetFullName(),
|
||||||
ReportFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
ReportFileWildcard(), wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||||
|
|
|
@ -312,7 +312,7 @@ void DIALOG_EXPORT_NETLIST::OnRunExternSpiceCommand( wxCommandEvent& event )
|
||||||
|
|
||||||
// Build the command line
|
// Build the command line
|
||||||
wxString commandLine = simulatorCommand;
|
wxString commandLine = simulatorCommand;
|
||||||
commandLine.Replace( "%I", fn.GetFullPath(), true );
|
commandLine.Replace( wxS( "%I" ), fn.GetFullPath(), true );
|
||||||
|
|
||||||
if( m_Parent->ReadyToNetlist( _( "Simulator requires a fully annotated schematic." ) ) )
|
if( m_Parent->ReadyToNetlist( _( "Simulator requires a fully annotated schematic." ) ) )
|
||||||
{
|
{
|
||||||
|
|
|
@ -503,7 +503,7 @@ DIALOG_SCH_FIELD_PROPERTIES::DIALOG_SCH_FIELD_PROPERTIES( SCH_BASE_FRAME* aParen
|
||||||
|
|
||||||
m_isPower = false;
|
m_isPower = false;
|
||||||
|
|
||||||
m_textLabel->SetLabel( aField->GetName() + ":" );
|
m_textLabel->SetLabel( aField->GetName() + wxS( ":" ) );
|
||||||
|
|
||||||
m_position = m_field->GetPosition();
|
m_position = m_field->GetPosition();
|
||||||
|
|
||||||
|
@ -560,7 +560,7 @@ void DIALOG_SCH_FIELD_PROPERTIES::onScintillaCharAdded( wxStyledTextEvent &aEven
|
||||||
{
|
{
|
||||||
wxString text = m_StyledTextCtrl->GetText();
|
wxString text = m_StyledTextCtrl->GetText();
|
||||||
int currpos = m_StyledTextCtrl->GetCurrentPos();
|
int currpos = m_StyledTextCtrl->GetCurrentPos();
|
||||||
text.Replace( "\n", "" );
|
text.Replace( wxS( "\n" ), wxS( "" ) );
|
||||||
m_StyledTextCtrl->SetText( text );
|
m_StyledTextCtrl->SetText( text );
|
||||||
m_StyledTextCtrl->GotoPos( currpos-1 );
|
m_StyledTextCtrl->GotoPos( currpos-1 );
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -438,7 +438,7 @@ bool DIALOG_LABEL_PROPERTIES::TransferDataFromWindow()
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
// On macOS CTRL+Enter produces '\r' instead of '\n' regardless of EOL setting
|
// On macOS CTRL+Enter produces '\r' instead of '\n' regardless of EOL setting
|
||||||
text.Replace( "\r", "\n" );
|
text.Replace( wxS( "\r" ), wxS( "\n" ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
if( text.IsEmpty() && !m_currentLabel->IsNew() )
|
if( text.IsEmpty() && !m_currentLabel->IsNew() )
|
||||||
|
|
|
@ -665,11 +665,11 @@ private:
|
||||||
|
|
||||||
static bool BoolFromString( wxString aValue )
|
static bool BoolFromString( wxString aValue )
|
||||||
{
|
{
|
||||||
if( aValue == "1" )
|
if( aValue == wxS( "1" ) )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if( aValue == "0" )
|
else if( aValue == wxS( "0" ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -250,11 +250,11 @@ bool DIALOG_LIB_TEXTBOX_PROPERTIES::TransferDataFromWindow()
|
||||||
|
|
||||||
#ifdef __WXMAC__
|
#ifdef __WXMAC__
|
||||||
// On macOS CTRL+Enter produces '\r' instead of '\n' regardless of EOL setting
|
// On macOS CTRL+Enter produces '\r' instead of '\n' regardless of EOL setting
|
||||||
text.Replace( "\r", "\n" );
|
text.Replace( wxS( "\r" ), wxS( "\n" ) );
|
||||||
#elif defined( __WINDOWS__ )
|
#elif defined( __WINDOWS__ )
|
||||||
// On Windows, a new line is coded as \r\n. We use only \n in kicad files and in
|
// On Windows, a new line is coded as \r\n. We use only \n in kicad files and in
|
||||||
// drawing routines so strip the \r char.
|
// drawing routines so strip the \r char.
|
||||||
text.Replace( "\r", "" );
|
text.Replace( wxS( "\r" ), wxS( "" ) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
m_currentText->SetText( text );
|
m_currentText->SetText( text );
|
||||||
|
|
|
@ -1056,7 +1056,7 @@ void DIALOG_SIM_MODEL<T_symbol, T_field>::onBrowseButtonClick( wxCommandEvent& a
|
||||||
wxString path = dlg.GetPath();
|
wxString path = dlg.GetPath();
|
||||||
wxFileName fn( path );
|
wxFileName fn( path );
|
||||||
|
|
||||||
if( fn.MakeRelativeTo( Prj().GetProjectPath() ) && !fn.GetFullPath().StartsWith( ".." ) )
|
if( fn.MakeRelativeTo( Prj().GetProjectPath() ) && !fn.GetFullPath().StartsWith( wxS( ".." ) ) )
|
||||||
path = fn.GetFullPath();
|
path = fn.GetFullPath();
|
||||||
|
|
||||||
loadLibrary( path, true );
|
loadLibrary( path, true );
|
||||||
|
|
|
@ -1112,8 +1112,8 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnRemoveField( wxCommandEvent& event )
|
||||||
|
|
||||||
// Should never occur: "Remove Field..." button should be disabled if invalid selection
|
// Should never occur: "Remove Field..." button should be disabled if invalid selection
|
||||||
// via OnFieldsCtrlSelectionChanged()
|
// via OnFieldsCtrlSelectionChanged()
|
||||||
wxCHECK_RET( row != -1, "Some user defined field must be selected first" );
|
wxCHECK_RET( row != -1, wxS( "Some user defined field must be selected first" ) );
|
||||||
wxCHECK_RET( row >= MANDATORY_FIELDS, "Mandatory fields cannot be removed" );
|
wxCHECK_RET( row >= MANDATORY_FIELDS, wxS( "Mandatory fields cannot be removed" ) );
|
||||||
|
|
||||||
wxString fieldName = m_fieldsCtrl->GetTextValue( row, 0 );
|
wxString fieldName = m_fieldsCtrl->GetTextValue( row, 0 );
|
||||||
|
|
||||||
|
@ -1415,9 +1415,9 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnExport( wxCommandEvent& aEvent )
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
wxString escapedValue = m_grid->GetColLabelValue( col );
|
wxString escapedValue = m_grid->GetColLabelValue( col );
|
||||||
escapedValue.Replace( "\"", "\"\"" );
|
escapedValue.Replace( wxS( "\"" ), wxS( "\"\"" ) );
|
||||||
|
|
||||||
wxString format = col == last_col ? "\"%s\"\r\n" : "\"%s\",";
|
wxString format = col == last_col ? wxS( "\"%s\"\r\n" ) : wxS( "\"%s\"," );
|
||||||
|
|
||||||
out.Write( wxString::Format( format, escapedValue ) );
|
out.Write( wxString::Format( format, escapedValue ) );
|
||||||
}
|
}
|
||||||
|
@ -1436,9 +1436,9 @@ void DIALOG_SYMBOL_FIELDS_TABLE::OnExport( wxCommandEvent& aEvent )
|
||||||
|
|
||||||
// Get the unanottated version of the field, e.g. no "> " or "v " by
|
// Get the unanottated version of the field, e.g. no "> " or "v " by
|
||||||
wxString escapedValue = m_dataModel->GetRawValue( row, col );
|
wxString escapedValue = m_dataModel->GetRawValue( row, col );
|
||||||
escapedValue.Replace( "\"", "\"\"" );
|
escapedValue.Replace( wxS( "\"" ), wxS( "\"\"" ) );
|
||||||
|
|
||||||
wxString format = col == last_col ? "\"%s\"\r\n" : "\"%s\",";
|
wxString format = col == last_col ? wxS( "\"%s\"\r\n" ) : wxS( "\"%s\"," );
|
||||||
|
|
||||||
out.Write( wxString::Format( format, escapedValue ) );
|
out.Write( wxString::Format( format, escapedValue ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -515,7 +515,7 @@ bool DIALOG_SYMBOL_PROPERTIES::TransferDataToWindow()
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef KICAD_SPICE
|
#ifdef KICAD_SPICE
|
||||||
m_cbExcludeFromSim->SetValue( m_symbol->GetFieldText( SIM_ENABLE_FIELD ) == "0" );
|
m_cbExcludeFromSim->SetValue( m_symbol->GetFieldText( SIM_ENABLE_FIELD ) == wxS( "0" ) );
|
||||||
#endif
|
#endif
|
||||||
m_cbExcludeFromBom->SetValue( !m_symbol->GetIncludeInBom() );
|
m_cbExcludeFromBom->SetValue( !m_symbol->GetIncludeInBom() );
|
||||||
m_cbExcludeFromBoard->SetValue( !m_symbol->GetIncludeOnBoard() );
|
m_cbExcludeFromBoard->SetValue( !m_symbol->GetIncludeOnBoard() );
|
||||||
|
@ -1184,7 +1184,7 @@ void DIALOG_SYMBOL_PROPERTIES::OnUpdateUI( wxUpdateUIEvent& event )
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_cbExcludeFromSim->SetValue( simEnable == "0" );
|
m_cbExcludeFromSim->SetValue( simEnable == wxS( "0" ) );
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -182,7 +182,7 @@ void DIALOG_SYMBOL_REMAP::createProjectSymbolLibTable( REPORTER& aReporter )
|
||||||
|
|
||||||
// Spaces in the file name will break the symbol name because they are not
|
// Spaces in the file name will break the symbol name because they are not
|
||||||
// quoted in the symbol library file format.
|
// quoted in the symbol library file format.
|
||||||
libName.Replace( " ", "-" );
|
libName.Replace( wxS( " " ), wxS( "-" ) );
|
||||||
|
|
||||||
// Don't create duplicate table entries.
|
// Don't create duplicate table entries.
|
||||||
while( alg::contains( libNames, libName ) )
|
while( alg::contains( libNames, libName ) )
|
||||||
|
@ -445,7 +445,7 @@ bool DIALOG_SYMBOL_REMAP::backupProject( REPORTER& aReporter )
|
||||||
|
|
||||||
// Back up the cache library.
|
// Back up the cache library.
|
||||||
srcFileName.SetPath( Prj().GetProjectPath() );
|
srcFileName.SetPath( Prj().GetProjectPath() );
|
||||||
srcFileName.SetName( Prj().GetProjectName() + "-cache" );
|
srcFileName.SetName( Prj().GetProjectName() + wxS( "-cache" ) );
|
||||||
srcFileName.SetExt( LegacySymbolLibFileExtension );
|
srcFileName.SetExt( LegacySymbolLibFileExtension );
|
||||||
|
|
||||||
destFileName = srcFileName;
|
destFileName = srcFileName;
|
||||||
|
@ -465,7 +465,7 @@ bool DIALOG_SYMBOL_REMAP::backupProject( REPORTER& aReporter )
|
||||||
}
|
}
|
||||||
|
|
||||||
// Back up the rescue symbol library if it exists.
|
// Back up the rescue symbol library if it exists.
|
||||||
srcFileName.SetName( Prj().GetProjectName() + "-rescue" );
|
srcFileName.SetName( Prj().GetProjectName() + wxS( "-rescue" ) );
|
||||||
destFileName.SetName( srcFileName.GetName() + timeStamp );
|
destFileName.SetName( srcFileName.GetName() + timeStamp );
|
||||||
|
|
||||||
tmp.Printf( _( "Backing up file '%s' to '%s'." ),
|
tmp.Printf( _( "Backing up file '%s' to '%s'." ),
|
||||||
|
|
|
@ -120,7 +120,7 @@ void PANEL_SETUP_PINMAP::reBuildMatrixPanel()
|
||||||
const int twiddle = 1;
|
const int twiddle = 1;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxSize charSize = KIUI::GetTextSize( "X", m_matrixPanel );
|
wxSize charSize = KIUI::GetTextSize( wxS( "X" ), m_matrixPanel );
|
||||||
wxPoint pos( 0, charSize.y * 2 );
|
wxPoint pos( 0, charSize.y * 2 );
|
||||||
wxStaticText* text;
|
wxStaticText* text;
|
||||||
|
|
||||||
|
|
|
@ -158,7 +158,7 @@ protected:
|
||||||
// paste the SYMBOL_LIB_TABLE_ROWs of s-expression (sym_lib_table), starting
|
// paste the SYMBOL_LIB_TABLE_ROWs of s-expression (sym_lib_table), starting
|
||||||
// at column 0 regardless of current cursor column.
|
// at column 0 regardless of current cursor column.
|
||||||
|
|
||||||
STRING_LINE_READER slr( TO_UTF8( cb_text ), "Clipboard" );
|
STRING_LINE_READER slr( TO_UTF8( cb_text ), wxS( "Clipboard" ) );
|
||||||
LIB_TABLE_LEXER lexer( &slr );
|
LIB_TABLE_LEXER lexer( &slr );
|
||||||
SYMBOL_LIB_TABLE tmp_tbl;
|
SYMBOL_LIB_TABLE tmp_tbl;
|
||||||
bool parsed = true;
|
bool parsed = true;
|
||||||
|
|
|
@ -155,8 +155,8 @@ bool PANEL_TEMPLATE_FIELDNAMES::TransferDataToGrid()
|
||||||
{
|
{
|
||||||
m_grid->SetCellValue( row, 0, m_fields[row].m_Name );
|
m_grid->SetCellValue( row, 0, m_fields[row].m_Name );
|
||||||
// columns 1 and 2 show a boolean value (in a check box):
|
// columns 1 and 2 show a boolean value (in a check box):
|
||||||
m_grid->SetCellValue( row, 1, m_fields[row].m_Visible ? "1" : "0" );
|
m_grid->SetCellValue( row, 1, m_fields[row].m_Visible ? wxS( "1" ) : wxS( "0" ) );
|
||||||
m_grid->SetCellValue( row, 2, m_fields[row].m_URL ? "1" : "0" );
|
m_grid->SetCellValue( row, 2, m_fields[row].m_URL ? wxS( "1" ) : wxS( "0" ) );
|
||||||
|
|
||||||
// Set cell properties
|
// Set cell properties
|
||||||
m_grid->SetCellAlignment( row, 0, wxALIGN_LEFT, wxALIGN_CENTRE );
|
m_grid->SetCellAlignment( row, 0, wxALIGN_LEFT, wxALIGN_CENTRE );
|
||||||
|
@ -185,8 +185,8 @@ bool PANEL_TEMPLATE_FIELDNAMES::TransferDataFromGrid()
|
||||||
for( int row = 0; row < m_grid->GetNumberRows(); ++row )
|
for( int row = 0; row < m_grid->GetNumberRows(); ++row )
|
||||||
{
|
{
|
||||||
m_fields[row].m_Name = m_grid->GetCellValue( row, 0 );
|
m_fields[row].m_Name = m_grid->GetCellValue( row, 0 );
|
||||||
m_fields[row].m_Visible = m_grid->GetCellValue( row, 1 ) == "1";
|
m_fields[row].m_Visible = m_grid->GetCellValue( row, 1 ) == wxS( "1" );
|
||||||
m_fields[row].m_URL = m_grid->GetCellValue( row, 2 ) == "1";
|
m_fields[row].m_URL = m_grid->GetCellValue( row, 2 ) == wxS( "1" );
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -419,7 +419,7 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aProje
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
if( !aErrors.empty() )
|
if( !aErrors.empty() )
|
||||||
aErrors += "\n";
|
aErrors += wxS( "\n" );
|
||||||
|
|
||||||
msg.Printf( _( "Cannot copy file '%s' as it will be overwritten by the new root "
|
msg.Printf( _( "Cannot copy file '%s' as it will be overwritten by the new root "
|
||||||
"sheet file." ), destFile.GetFullPath() );
|
"sheet file." ), destFile.GetFullPath() );
|
||||||
|
@ -446,11 +446,11 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aProje
|
||||||
else if( ext == LegacySymbolLibFileExtension || ext == LegacySymbolDocumentFileExtension ||
|
else if( ext == LegacySymbolLibFileExtension || ext == LegacySymbolDocumentFileExtension ||
|
||||||
ext == KiCadSymbolLibFileExtension )
|
ext == KiCadSymbolLibFileExtension )
|
||||||
{
|
{
|
||||||
if( destFile.GetName() == aProjectName + "-cache" )
|
if( destFile.GetName() == aProjectName + wxS( "-cache" ) )
|
||||||
destFile.SetName( aNewProjectName + "-cache" );
|
destFile.SetName( aNewProjectName + wxS( "-cache" ) );
|
||||||
|
|
||||||
if( destFile.GetName() == aProjectName + "-rescue" )
|
if( destFile.GetName() == aProjectName + wxS( "-rescue" ) )
|
||||||
destFile.SetName( aNewProjectName + "-rescue" );
|
destFile.SetName( aNewProjectName + wxS( "-rescue" ) );
|
||||||
|
|
||||||
KiCopyFile( aSrcFilePath, destFile.GetFullPath(), aErrors );
|
KiCopyFile( aSrcFilePath, destFile.GetFullPath(), aErrors );
|
||||||
}
|
}
|
||||||
|
@ -481,10 +481,10 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aProje
|
||||||
else if( symNode )
|
else if( symNode )
|
||||||
path = symNode->m_value;
|
path = symNode->m_value;
|
||||||
|
|
||||||
if( path == aProjectName + ".sch" )
|
if( path == aProjectName + wxS( ".sch" ) )
|
||||||
path = aNewProjectName + ".sch";
|
path = aNewProjectName + wxS( ".sch" );
|
||||||
else if( path == aProjectBasePath + "/" + aProjectName + ".sch" )
|
else if( path == aProjectBasePath + "/" + aProjectName + wxS( ".sch" ) )
|
||||||
path = aNewProjectBasePath + "/" + aNewProjectName + ".sch";
|
path = aNewProjectBasePath + "/" + aNewProjectName + wxS( ".sch" );
|
||||||
else if( path.StartsWith( aProjectBasePath ) )
|
else if( path.StartsWith( aProjectBasePath ) )
|
||||||
path.Replace( aProjectBasePath, aNewProjectBasePath, false );
|
path.Replace( aProjectBasePath, aNewProjectBasePath, false );
|
||||||
|
|
||||||
|
@ -512,13 +512,13 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aProje
|
||||||
wxString msg;
|
wxString msg;
|
||||||
|
|
||||||
if( !aErrors.empty() )
|
if( !aErrors.empty() )
|
||||||
aErrors += "\n";
|
aErrors += wxS( "\n" );
|
||||||
|
|
||||||
msg.Printf( _( "Cannot copy file '%s'." ), destFile.GetFullPath() );
|
msg.Printf( _( "Cannot copy file '%s'." ), destFile.GetFullPath() );
|
||||||
aErrors += msg;
|
aErrors += msg;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if( destFile.GetName() == "sym-lib-table" )
|
else if( destFile.GetName() == wxS( "sym-lib-table" ) )
|
||||||
{
|
{
|
||||||
SYMBOL_LIB_TABLE symbolLibTable;
|
SYMBOL_LIB_TABLE symbolLibTable;
|
||||||
symbolLibTable.Load( aSrcFilePath );
|
symbolLibTable.Load( aSrcFilePath );
|
||||||
|
@ -528,10 +528,12 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aProje
|
||||||
LIB_TABLE_ROW& row = symbolLibTable.At( i );
|
LIB_TABLE_ROW& row = symbolLibTable.At( i );
|
||||||
wxString uri = row.GetFullURI();
|
wxString uri = row.GetFullURI();
|
||||||
|
|
||||||
uri.Replace( "/" + aProjectName + "-cache.lib", "/" + aNewProjectName + "-cache.lib" );
|
uri.Replace( wxS( "/" ) + aProjectName + wxS( "-cache.lib" ),
|
||||||
uri.Replace( "/" + aProjectName + "-rescue.lib", "/" + aNewProjectName +
|
wxS( "/" ) + aNewProjectName + wxS( "-cache.lib" ) );
|
||||||
"-rescue.lib" );
|
uri.Replace( wxS( "/" ) + aProjectName + wxS( "-rescue.lib" ),
|
||||||
uri.Replace( "/" + aProjectName + ".lib", "/" + aNewProjectName + ".lib" );
|
wxS( "/" ) + aNewProjectName + wxS( "-rescue.lib" ) );
|
||||||
|
uri.Replace( wxS( "/" ) + aProjectName + wxS( ".lib" ),
|
||||||
|
wxS( "/" ) + aNewProjectName + wxS( ".lib" ) );
|
||||||
|
|
||||||
row.SetFullURI( uri );
|
row.SetFullURI( uri );
|
||||||
}
|
}
|
||||||
|
@ -553,7 +555,7 @@ void IFACE::SaveFileAs( const wxString& aProjectBasePath, const wxString& aProje
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( "Unexpected filetype for Eeschema::SaveFileAs()" );
|
wxFAIL_MSG( wxS( "Unexpected filetype for Eeschema::SaveFileAs()" ) );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -989,7 +989,7 @@ void BOM_CFG_PARSER::parseGenerator()
|
||||||
|
|
||||||
wxString option = FromUTF8();
|
wxString option = FromUTF8();
|
||||||
|
|
||||||
if( option.StartsWith( "nickname=", &str ) )
|
if( option.StartsWith( wxS( "nickname=" ), &str ) )
|
||||||
settings.name = str;
|
settings.name = str;
|
||||||
|
|
||||||
NeedRIGHT();
|
NeedRIGHT();
|
||||||
|
|
|
@ -181,11 +181,11 @@ void ERC_TESTER::TestTextVars( DS_PROXY_VIEW_ITEM* aDrawingSheet )
|
||||||
if( aDrawingSheet )
|
if( aDrawingSheet )
|
||||||
{
|
{
|
||||||
wsItems.SetMilsToIUfactor( schIUScale.IU_PER_MILS );
|
wsItems.SetMilsToIUfactor( schIUScale.IU_PER_MILS );
|
||||||
wsItems.SetPageNumber( "1" );
|
wsItems.SetPageNumber( wxS( "1" ) );
|
||||||
wsItems.SetSheetCount( 1 );
|
wsItems.SetSheetCount( 1 );
|
||||||
wsItems.SetFileName( "dummyFilename" );
|
wsItems.SetFileName( wxS( "dummyFilename" ) );
|
||||||
wsItems.SetSheetName( "dummySheet" );
|
wsItems.SetSheetName( wxS( "dummySheet" ) );
|
||||||
wsItems.SetSheetLayer( "dummyLayer" );
|
wsItems.SetSheetLayer( wxS( "dummyLayer" ) );
|
||||||
wsItems.SetProject( &m_schematic->Prj() );
|
wsItems.SetProject( &m_schematic->Prj() );
|
||||||
wsItems.BuildDrawItemsList( aDrawingSheet->GetPageInfo(), aDrawingSheet->GetTitleBlock());
|
wsItems.BuildDrawItemsList( aDrawingSheet->GetPageInfo(), aDrawingSheet->GetTitleBlock());
|
||||||
}
|
}
|
||||||
|
|
|
@ -269,7 +269,7 @@ std::shared_ptr<ERC_ITEM> ERC_ITEM::Create( int aErrorCode )
|
||||||
case ERCE_MISSING_BIDI_PIN: return std::make_shared<ERC_ITEM>( missingBidiPin );
|
case ERCE_MISSING_BIDI_PIN: return std::make_shared<ERC_ITEM>( missingBidiPin );
|
||||||
case ERCE_UNSPECIFIED:
|
case ERCE_UNSPECIFIED:
|
||||||
default:
|
default:
|
||||||
wxFAIL_MSG( "Unknown ERC error code" );
|
wxFAIL_MSG( wxS( "Unknown ERC error code" ) );
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -253,7 +253,7 @@ SEVERITY ERC_SETTINGS::GetSeverity( int aErrorCode ) const
|
||||||
}
|
}
|
||||||
|
|
||||||
wxCHECK_MSG( m_ERCSeverities.count( aErrorCode ), RPT_SEVERITY_IGNORE,
|
wxCHECK_MSG( m_ERCSeverities.count( aErrorCode ), RPT_SEVERITY_IGNORE,
|
||||||
"Missing severity from map in ERC_SETTINGS!" );
|
wxS( "Missing severity from map in ERC_SETTINGS!" ) );
|
||||||
|
|
||||||
return m_ERCSeverities.at( aErrorCode );
|
return m_ERCSeverities.at( aErrorCode );
|
||||||
}
|
}
|
||||||
|
|
|
@ -565,7 +565,7 @@ wxString FIELDS_GRID_TABLE<T>::GetValue( int aRow, int aCol )
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( "Unhandled field owner type." );
|
wxFAIL_MSG( wxS( "Unhandled field owner type." ) );
|
||||||
return field.GetName( false );
|
return field.GetName( false );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -913,11 +913,11 @@ wxString FIELDS_GRID_TABLE<T>::StringFromBool( bool aValue ) const
|
||||||
template <class T>
|
template <class T>
|
||||||
bool FIELDS_GRID_TABLE<T>::BoolFromString( wxString aValue ) const
|
bool FIELDS_GRID_TABLE<T>::BoolFromString( wxString aValue ) const
|
||||||
{
|
{
|
||||||
if( aValue == "1" )
|
if( aValue == wxS( "1" ) )
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
else if( aValue == "0" )
|
else if( aValue == wxS( "0" ) )
|
||||||
{
|
{
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -613,10 +613,10 @@ void SCH_EDIT_FRAME::OnImportProject( wxCommandEvent& aEvent )
|
||||||
|
|
||||||
SCH_PLUGIN::SCH_PLUGIN_RELEASER plugin( SCH_IO_MGR::FindPlugin( loader.second ) );
|
SCH_PLUGIN::SCH_PLUGIN_RELEASER plugin( SCH_IO_MGR::FindPlugin( loader.second ) );
|
||||||
wxCHECK( plugin, /*void*/ );
|
wxCHECK( plugin, /*void*/ );
|
||||||
allWildcards += "*." + formatWildcardExt( plugin->GetFileExtension() ) + ";";
|
allWildcards += wxS( "*." ) + formatWildcardExt( plugin->GetFileExtension() ) + wxS( ";" );
|
||||||
}
|
}
|
||||||
|
|
||||||
fileFilters = _( "All supported formats|" ) + allWildcards + "|" + fileFilters;
|
fileFilters = _( "All supported formats|" ) + allWildcards + wxS( "|" ) + fileFilters;
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Import Schematic" ), path, wxEmptyString, fileFilters,
|
wxFileDialog dlg( this, _( "Import Schematic" ), path, wxEmptyString, fileFilters,
|
||||||
wxFD_OPEN | wxFD_FILE_MUST_EXIST ); // TODO
|
wxFD_OPEN | wxFD_FILE_MUST_EXIST ); // TODO
|
||||||
|
|
|
@ -25,24 +25,24 @@
|
||||||
#include <symbol_lib_table.h>
|
#include <symbol_lib_table.h>
|
||||||
#include <wx/log.h>
|
#include <wx/log.h>
|
||||||
|
|
||||||
static const wxString DescriptionFormat =
|
static const wxString DescriptionFormat = wxS(
|
||||||
"<b>__NAME__</b>"
|
"<b>__NAME__</b>"
|
||||||
"__ALIASOF__"
|
"__ALIASOF__"
|
||||||
"__DESC__"
|
"__DESC__"
|
||||||
"__KEY__"
|
"__KEY__"
|
||||||
"<hr><table border=0>"
|
"<hr><table border=0>"
|
||||||
"__FIELDS__"
|
"__FIELDS__"
|
||||||
"</table>";
|
"</table>" );
|
||||||
|
|
||||||
static const wxString AliasOfFormat = "<br><i>" + _( "Derived from" ) + " %s (%s)</i>";
|
static const wxString AliasOfFormat = wxS( "<br><i>" ) + _( "Derived from" ) + wxS( " %s (%s)</i>" );
|
||||||
static const wxString DescFormat = "<br>%s";
|
static const wxString DescFormat = wxS( "<br>%s" );
|
||||||
static const wxString KeywordsFormat = "<br>" + _( "Keywords" ) + ": %s";
|
static const wxString KeywordsFormat = wxS( "<br>" ) + _( "Keywords" ) + wxS( ": %s" );
|
||||||
static const wxString FieldFormat =
|
static const wxString FieldFormat = wxS(
|
||||||
"<tr>"
|
"<tr>"
|
||||||
" <td><b>__NAME__</b></td>"
|
" <td><b>__NAME__</b></td>"
|
||||||
" <td>__VALUE__</td>"
|
" <td>__VALUE__</td>"
|
||||||
"</tr>";
|
"</tr>" );
|
||||||
static const wxString DatasheetLinkFormat = "<a href=\"__HREF__\">__TEXT__</a>";
|
static const wxString DatasheetLinkFormat = wxS( "<a href=\"__HREF__\">__TEXT__</a>" );
|
||||||
|
|
||||||
|
|
||||||
class FOOTPRINT_INFO_GENERATOR
|
class FOOTPRINT_INFO_GENERATOR
|
||||||
|
@ -106,7 +106,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
void SetHtmlName()
|
void SetHtmlName()
|
||||||
{
|
{
|
||||||
m_html.Replace( "__NAME__", EscapeHTML( UnescapeString( m_symbol->GetName() ) ) );
|
m_html.Replace( wxS( "__NAME__" ), EscapeHTML( UnescapeString( m_symbol->GetName() ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -119,7 +119,7 @@ protected:
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxString root_name = _( "Unknown" );
|
wxString root_name = _( "Unknown" );
|
||||||
wxString root_desc = "";
|
wxString root_desc = wxS( "" );
|
||||||
|
|
||||||
std::shared_ptr< LIB_SYMBOL > parent = m_symbol->GetParent().lock();
|
std::shared_ptr< LIB_SYMBOL > parent = m_symbol->GetParent().lock();
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ protected:
|
||||||
root_desc = parent->GetDescription();
|
root_desc = parent->GetDescription();
|
||||||
}
|
}
|
||||||
|
|
||||||
m_html.Replace( "__ALIASOF__", wxString::Format( AliasOfFormat,
|
m_html.Replace( wxS( "__ALIASOF__" ), wxString::Format( AliasOfFormat,
|
||||||
EscapeHTML( UnescapeString( root_name ) ),
|
EscapeHTML( UnescapeString( root_name ) ),
|
||||||
EscapeHTML( root_desc ) ) );
|
EscapeHTML( root_desc ) ) );
|
||||||
}
|
}
|
||||||
|
@ -140,7 +140,7 @@ protected:
|
||||||
{
|
{
|
||||||
wxString raw_desc = m_symbol->GetDescription();
|
wxString raw_desc = m_symbol->GetDescription();
|
||||||
|
|
||||||
m_html.Replace( "__DESC__", wxString::Format( DescFormat, EscapeHTML( raw_desc ) ) );
|
m_html.Replace( wxS( "__DESC__" ), wxString::Format( DescFormat, EscapeHTML( raw_desc ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -149,9 +149,9 @@ protected:
|
||||||
wxString keywords = m_symbol->GetKeyWords();
|
wxString keywords = m_symbol->GetKeyWords();
|
||||||
|
|
||||||
if( keywords.empty() )
|
if( keywords.empty() )
|
||||||
m_html.Replace( "__KEY__", wxEmptyString );
|
m_html.Replace( wxS( "__KEY__" ), wxEmptyString );
|
||||||
else
|
else
|
||||||
m_html.Replace( "__KEY__", wxString::Format( KeywordsFormat, EscapeHTML( keywords ) ) );
|
m_html.Replace( wxS( "__KEY__" ), wxString::Format( KeywordsFormat, EscapeHTML( keywords ) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -161,7 +161,7 @@ protected:
|
||||||
wxString text = aField.GetFullText( m_unit > 0 ? m_unit : 1 );
|
wxString text = aField.GetFullText( m_unit > 0 ? m_unit : 1 );
|
||||||
wxString fieldhtml = FieldFormat;
|
wxString fieldhtml = FieldFormat;
|
||||||
|
|
||||||
fieldhtml.Replace( "__NAME__", EscapeHTML( name ) );
|
fieldhtml.Replace( wxS( "__NAME__" ), EscapeHTML( name ) );
|
||||||
|
|
||||||
switch( aField.GetId() )
|
switch( aField.GetId() )
|
||||||
{
|
{
|
||||||
|
@ -170,19 +170,19 @@ protected:
|
||||||
|
|
||||||
if( text.IsEmpty() || text == wxT( "~" ) )
|
if( text.IsEmpty() || text == wxT( "~" ) )
|
||||||
{
|
{
|
||||||
fieldhtml.Replace( "__VALUE__", text );
|
fieldhtml.Replace( wxS( "__VALUE__" ), text );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
wxString datasheetlink = DatasheetLinkFormat;
|
wxString datasheetlink = DatasheetLinkFormat;
|
||||||
datasheetlink.Replace( "__HREF__", EscapeHTML( text ) );
|
datasheetlink.Replace( wxS( "__HREF__" ), EscapeHTML( text ) );
|
||||||
|
|
||||||
if( text.Length() > 75 )
|
if( text.Length() > 75 )
|
||||||
text = text.Left( 72 ) + wxT( "..." );
|
text = text.Left( 72 ) + wxT( "..." );
|
||||||
|
|
||||||
datasheetlink.Replace( "__TEXT__", EscapeHTML( text ) );
|
datasheetlink.Replace( wxS( "__TEXT__" ), EscapeHTML( text ) );
|
||||||
|
|
||||||
fieldhtml.Replace( "__VALUE__", datasheetlink );
|
fieldhtml.Replace( wxS( "__VALUE__" ), datasheetlink );
|
||||||
}
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
|
@ -192,7 +192,7 @@ protected:
|
||||||
return wxEmptyString;
|
return wxEmptyString;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
fieldhtml.Replace( "__VALUE__", EscapeHTML( text ) );
|
fieldhtml.Replace( wxS( "__VALUE__" ), EscapeHTML( text ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
return fieldhtml;
|
return fieldhtml;
|
||||||
|
@ -230,7 +230,7 @@ protected:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
m_html.Replace( "__FIELDS__", fieldtable );
|
m_html.Replace( wxS( "__FIELDS__" ), fieldtable );
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -496,7 +496,7 @@ void LIB_FIELD::SetName( const wxString& aName )
|
||||||
// Mandatory field names are fixed.
|
// Mandatory field names are fixed.
|
||||||
if( IsMandatory() )
|
if( IsMandatory() )
|
||||||
{
|
{
|
||||||
wxFAIL_MSG( "trying to set a MANDATORY_FIELD's name\n" );
|
wxFAIL_MSG( wxS( "trying to set a MANDATORY_FIELD's name\n" ) );
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1204,7 +1204,7 @@ wxString LIB_SYMBOL::GetPrefix()
|
||||||
{
|
{
|
||||||
wxString refDesignator = GetFieldById( REFERENCE_FIELD )->GetText();
|
wxString refDesignator = GetFieldById( REFERENCE_FIELD )->GetText();
|
||||||
|
|
||||||
refDesignator.Replace( "~", " " );
|
refDesignator.Replace( wxS( "~" ), wxS( " " ) );
|
||||||
|
|
||||||
wxString prefix = refDesignator;
|
wxString prefix = refDesignator;
|
||||||
|
|
||||||
|
|
|
@ -48,7 +48,7 @@ bool SCH_EDIT_FRAME::CreateArchiveLibraryCacheFile( bool aUseCurrentSheetFilenam
|
||||||
else
|
else
|
||||||
fn = Schematic().RootScreen()->GetFileName();
|
fn = Schematic().RootScreen()->GetFileName();
|
||||||
|
|
||||||
fn.SetName( fn.GetName() + "-cache" );
|
fn.SetName( fn.GetName() + wxS( "-cache" ) );
|
||||||
fn.SetExt( LegacySymbolLibFileExtension );
|
fn.SetExt( LegacySymbolLibFileExtension );
|
||||||
|
|
||||||
bool success = CreateArchiveLibrary( fn.GetFullPath() );
|
bool success = CreateArchiveLibrary( fn.GetFullPath() );
|
||||||
|
@ -131,7 +131,7 @@ bool SCH_EDIT_FRAME::CreateArchiveLibrary( const wxString& aFileName )
|
||||||
if( errorMsg.empty() )
|
if( errorMsg.empty() )
|
||||||
errorMsg += tmp;
|
errorMsg += tmp;
|
||||||
else
|
else
|
||||||
errorMsg += "\n" + tmp;
|
errorMsg += wxS( "\n" ) + tmp;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -148,20 +148,20 @@ int PIN_NUMBERS::Compare( const wxString& lhs, const wxString& rhs )
|
||||||
if( symbol2.empty() )
|
if( symbol2.empty() )
|
||||||
return 2;
|
return 2;
|
||||||
|
|
||||||
bool sym1_isnumeric = symbol1.find_first_of( "0123456789" ) != wxString::npos;
|
bool sym1_isnumeric = symbol1.find_first_of( wxS( "0123456789" ) ) != wxString::npos;
|
||||||
bool sym2_isnumeric = symbol2.find_first_of( "0123456789" ) != wxString::npos;
|
bool sym2_isnumeric = symbol2.find_first_of( wxS( "0123456789" ) ) != wxString::npos;
|
||||||
|
|
||||||
if( sym1_isnumeric )
|
if( sym1_isnumeric )
|
||||||
{
|
{
|
||||||
if( sym2_isnumeric )
|
if( sym2_isnumeric )
|
||||||
{
|
{
|
||||||
// numeric comparison
|
// numeric comparison
|
||||||
wxString::size_type v1 = symbol1.find_first_of( "vV" );
|
wxString::size_type v1 = symbol1.find_first_of( wxS( "vV" ) );
|
||||||
|
|
||||||
if( v1 != wxString::npos )
|
if( v1 != wxString::npos )
|
||||||
symbol1[v1] = '.';
|
symbol1[v1] = '.';
|
||||||
|
|
||||||
wxString::size_type v2 = symbol2.find_first_of( "vV" );
|
wxString::size_type v2 = symbol2.find_first_of( wxS( "vV" ) );
|
||||||
|
|
||||||
if( v2 != wxString::npos )
|
if( v2 != wxString::npos )
|
||||||
symbol2[v2] = '.';
|
symbol2[v2] = '.';
|
||||||
|
|
|
@ -325,7 +325,7 @@ bool RESCUE_CACHE_CANDIDATE::PerformAction( RESCUER* aRescuer )
|
||||||
{
|
{
|
||||||
LIB_SYMBOL* tmp = ( m_cache_candidate ) ? m_cache_candidate : m_lib_candidate;
|
LIB_SYMBOL* tmp = ( m_cache_candidate ) ? m_cache_candidate : m_lib_candidate;
|
||||||
|
|
||||||
wxCHECK_MSG( tmp, false, "Both cache and library symbols undefined." );
|
wxCHECK_MSG( tmp, false, wxS( "Both cache and library symbols undefined." ) );
|
||||||
|
|
||||||
std::unique_ptr<LIB_SYMBOL> new_symbol = tmp->Flatten();
|
std::unique_ptr<LIB_SYMBOL> new_symbol = tmp->Flatten();
|
||||||
new_symbol->SetName( m_new_name );
|
new_symbol->SetName( m_new_name );
|
||||||
|
@ -455,7 +455,7 @@ void RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::FindRescues(
|
||||||
// library.
|
// library.
|
||||||
wxString libNickname = GetRescueLibraryFileName( aRescuer.Schematic() ).GetName();
|
wxString libNickname = GetRescueLibraryFileName( aRescuer.Schematic() ).GetName();
|
||||||
|
|
||||||
LIB_ID new_id( libNickname, new_name + "-" + symbol_id.GetLibNickname().wx_str() );
|
LIB_ID new_id( libNickname, new_name + wxS( "-" ) + symbol_id.GetLibNickname().wx_str() );
|
||||||
|
|
||||||
RESCUE_SYMBOL_LIB_TABLE_CANDIDATE candidate( symbol_id, new_id, cache_match, lib_match,
|
RESCUE_SYMBOL_LIB_TABLE_CANDIDATE candidate( symbol_id, new_id, cache_match, lib_match,
|
||||||
eachSymbol->GetUnit(),
|
eachSymbol->GetUnit(),
|
||||||
|
@ -504,7 +504,7 @@ bool RESCUE_SYMBOL_LIB_TABLE_CANDIDATE::PerformAction( RESCUER* aRescuer )
|
||||||
{
|
{
|
||||||
LIB_SYMBOL* tmp = ( m_cache_candidate ) ? m_cache_candidate : m_lib_candidate;
|
LIB_SYMBOL* tmp = ( m_cache_candidate ) ? m_cache_candidate : m_lib_candidate;
|
||||||
|
|
||||||
wxCHECK_MSG( tmp, false, "Both cache and library symbols undefined." );
|
wxCHECK_MSG( tmp, false, wxS( "Both cache and library symbols undefined." ) );
|
||||||
|
|
||||||
std::unique_ptr<LIB_SYMBOL> new_symbol = tmp->Flatten();
|
std::unique_ptr<LIB_SYMBOL> new_symbol = tmp->Flatten();
|
||||||
new_symbol->SetLibId( m_new_id );
|
new_symbol->SetLibId( m_new_id );
|
||||||
|
@ -781,7 +781,7 @@ bool LEGACY_RESCUER::WriteRescueLibrary( wxWindow *aParent )
|
||||||
|
|
||||||
void LEGACY_RESCUER::AddSymbol( LIB_SYMBOL* aNewSymbol )
|
void LEGACY_RESCUER::AddSymbol( LIB_SYMBOL* aNewSymbol )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( aNewSymbol, "Invalid LIB_SYMBOL pointer." );
|
wxCHECK_RET( aNewSymbol, wxS( "Invalid LIB_SYMBOL pointer." ) );
|
||||||
|
|
||||||
aNewSymbol->SetLib( m_rescue_lib.get() );
|
aNewSymbol->SetLib( m_rescue_lib.get() );
|
||||||
m_rescue_lib->AddSymbol( aNewSymbol );
|
m_rescue_lib->AddSymbol( aNewSymbol );
|
||||||
|
@ -870,7 +870,7 @@ bool SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary( wxWindow *aParent )
|
||||||
// it to the table.
|
// it to the table.
|
||||||
if( !row || ( SCH_IO_MGR::EnumFromStr( row->GetType() ) == SCH_IO_MGR::SCH_LEGACY ) )
|
if( !row || ( SCH_IO_MGR::EnumFromStr( row->GetType() ) == SCH_IO_MGR::SCH_LEGACY ) )
|
||||||
{
|
{
|
||||||
wxString uri = "${KIPRJMOD}/" + fn.GetFullName();
|
wxString uri = wxS( "${KIPRJMOD}/" ) + fn.GetFullName();
|
||||||
wxString libNickname = fn.GetName();
|
wxString libNickname = fn.GetName();
|
||||||
|
|
||||||
row = new SYMBOL_LIB_TABLE_ROW( libNickname, uri, wxT( "KiCad" ) );
|
row = new SYMBOL_LIB_TABLE_ROW( libNickname, uri, wxT( "KiCad" ) );
|
||||||
|
@ -905,7 +905,7 @@ bool SYMBOL_LIB_TABLE_RESCUER::WriteRescueLibrary( wxWindow *aParent )
|
||||||
|
|
||||||
void SYMBOL_LIB_TABLE_RESCUER::AddSymbol( LIB_SYMBOL* aNewSymbol )
|
void SYMBOL_LIB_TABLE_RESCUER::AddSymbol( LIB_SYMBOL* aNewSymbol )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( aNewSymbol, "Invalid LIB_SYMBOL pointer." );
|
wxCHECK_RET( aNewSymbol, wxS( "Invalid LIB_SYMBOL pointer." ) );
|
||||||
|
|
||||||
m_rescueLibSymbols.emplace_back( std::make_unique<LIB_SYMBOL>( *aNewSymbol ) );
|
m_rescueLibSymbols.emplace_back( std::make_unique<LIB_SYMBOL>( *aNewSymbol ) );
|
||||||
}
|
}
|
||||||
|
|
|
@ -53,7 +53,7 @@
|
||||||
LIB_SYMBOL* SchGetLibSymbol( const LIB_ID& aLibId, SYMBOL_LIB_TABLE* aLibTable,
|
LIB_SYMBOL* SchGetLibSymbol( const LIB_ID& aLibId, SYMBOL_LIB_TABLE* aLibTable,
|
||||||
SYMBOL_LIB* aCacheLib, wxWindow* aParent, bool aShowErrorMsg )
|
SYMBOL_LIB* aCacheLib, wxWindow* aParent, bool aShowErrorMsg )
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( aLibTable, nullptr, "Invalid symbol library table." );
|
wxCHECK_MSG( aLibTable, nullptr, wxS( "Invalid symbol library table." ) );
|
||||||
|
|
||||||
LIB_SYMBOL* symbol = nullptr;
|
LIB_SYMBOL* symbol = nullptr;
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ LIB_SYMBOL* SchGetLibSymbol( const LIB_ID& aLibId, SYMBOL_LIB_TABLE* aLibTable,
|
||||||
|
|
||||||
if( !symbol && aCacheLib )
|
if( !symbol && aCacheLib )
|
||||||
{
|
{
|
||||||
wxCHECK_MSG( aCacheLib->IsCache(), nullptr, "Invalid cache library." );
|
wxCHECK_MSG( aCacheLib->IsCache(), nullptr, wxS( "Invalid cache library." ) );
|
||||||
|
|
||||||
wxString cacheName = aLibId.GetLibNickname().wx_str();
|
wxString cacheName = aLibId.GetLibNickname().wx_str();
|
||||||
cacheName += "_" + aLibId.GetLibItemName();
|
cacheName += "_" + aLibId.GetLibItemName();
|
||||||
|
@ -187,12 +187,12 @@ void SCH_BASE_FRAME::UpdateStatusBar()
|
||||||
VECTOR2D cursorPos = GetCanvas()->GetViewControls()->GetCursorPosition();
|
VECTOR2D cursorPos = GetCanvas()->GetViewControls()->GetCursorPosition();
|
||||||
VECTOR2D d = cursorPos - screen->m_LocalOrigin;
|
VECTOR2D d = cursorPos - screen->m_LocalOrigin;
|
||||||
|
|
||||||
line.Printf( "X %s Y %s",
|
line.Printf( wxS( "X %s Y %s" ),
|
||||||
MessageTextFromValue( cursorPos.x, false ),
|
MessageTextFromValue( cursorPos.x, false ),
|
||||||
MessageTextFromValue( cursorPos.y, false ) );
|
MessageTextFromValue( cursorPos.y, false ) );
|
||||||
SetStatusText( line, 2 );
|
SetStatusText( line, 2 );
|
||||||
|
|
||||||
line.Printf( "dx %s dy %s dist %s",
|
line.Printf( wxS( "dx %s dy %s dist %s" ),
|
||||||
MessageTextFromValue( d.x, false ),
|
MessageTextFromValue( d.x, false ),
|
||||||
MessageTextFromValue( d.y, false ),
|
MessageTextFromValue( d.y, false ),
|
||||||
MessageTextFromValue( hypot( d.x, d.y ), false ) );
|
MessageTextFromValue( hypot( d.x, d.y ), false ) );
|
||||||
|
|
|
@ -87,7 +87,7 @@ SCH_BUS_WIRE_ENTRY::SCH_BUS_WIRE_ENTRY( const VECTOR2I& pos, int aQuadrant ) :
|
||||||
case 2: m_size.x *= 1; m_size.y *= 1; break;
|
case 2: m_size.x *= 1; m_size.y *= 1; break;
|
||||||
case 3: m_size.x *= -1; m_size.y *= 1; break;
|
case 3: m_size.x *= -1; m_size.y *= 1; break;
|
||||||
case 4: m_size.x *= -1; m_size.y *= -1; break;
|
case 4: m_size.x *= -1; m_size.y *= -1; break;
|
||||||
default: wxFAIL_MSG( "SCH_BUS_WIRE_ENTRY ctor: unexpected quadrant" );
|
default: wxFAIL_MSG( wxS( "SCH_BUS_WIRE_ENTRY ctor: unexpected quadrant" ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
m_layer = LAYER_WIRE;
|
m_layer = LAYER_WIRE;
|
||||||
|
|
|
@ -441,7 +441,7 @@ void SCH_CONNECTION::AppendInfoToMsgPanel( std::vector<MSG_PANEL_ITEM>& aList )
|
||||||
{
|
{
|
||||||
UNITS_PROVIDER unitsProvider( schIUScale, EDA_UNITS::MILLIMETRES );
|
UNITS_PROVIDER unitsProvider( schIUScale, EDA_UNITS::MILLIMETRES );
|
||||||
|
|
||||||
msg.Printf( "%s at %p", driver->GetItemDescription( &unitsProvider ), driver );
|
msg.Printf( wxS( "%s at %p" ), driver->GetItemDescription( &unitsProvider ), driver );
|
||||||
aList.emplace_back( wxT( "Connection Source" ), msg );
|
aList.emplace_back( wxT( "Connection Source" ), msg );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -169,10 +169,10 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
CreateInfoBar();
|
CreateInfoBar();
|
||||||
|
|
||||||
// Rows; layers 4 - 6
|
// Rows; layers 4 - 6
|
||||||
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( "MainToolbar" )
|
m_auimgr.AddPane( m_mainToolBar, EDA_PANE().HToolbar().Name( wxS( "MainToolbar" ) )
|
||||||
.Top().Layer( 6 ) );
|
.Top().Layer( 6 ) );
|
||||||
|
|
||||||
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( "MsgPanel" )
|
m_auimgr.AddPane( m_messagePanel, EDA_PANE().Messages().Name( wxS( "MsgPanel" ) )
|
||||||
.Bottom().Layer( 6 ) );
|
.Bottom().Layer( 6 ) );
|
||||||
|
|
||||||
// Columns; layers 1 - 3
|
// Columns; layers 1 - 3
|
||||||
|
@ -186,14 +186,14 @@ SCH_EDIT_FRAME::SCH_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
|
||||||
.BestSize( 200, 200 )
|
.BestSize( 200, 200 )
|
||||||
.FloatingSize( 200, 200 )
|
.FloatingSize( 200, 200 )
|
||||||
.Show( false ) );
|
.Show( false ) );
|
||||||
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( "OptToolbar" )
|
m_auimgr.AddPane( m_optionsToolBar, EDA_PANE().VToolbar().Name( wxS( "OptToolbar" ) )
|
||||||
.Left().Layer( 2 ) );
|
.Left().Layer( 2 ) );
|
||||||
|
|
||||||
m_auimgr.AddPane( m_drawToolBar, EDA_PANE().VToolbar().Name( "ToolsToolbar" )
|
m_auimgr.AddPane( m_drawToolBar, EDA_PANE().VToolbar().Name( wxS( "ToolsToolbar" ) )
|
||||||
.Right().Layer( 2 ) );
|
.Right().Layer( 2 ) );
|
||||||
|
|
||||||
// Center
|
// Center
|
||||||
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( "DrawFrame" )
|
m_auimgr.AddPane( GetCanvas(), EDA_PANE().Canvas().Name( wxS( "DrawFrame" ) )
|
||||||
.Center() );
|
.Center() );
|
||||||
|
|
||||||
FinishAUIInitialization();
|
FinishAUIInitialization();
|
||||||
|
@ -943,7 +943,7 @@ void SCH_EDIT_FRAME::OnModify()
|
||||||
GetCanvas()->Refresh();
|
GetCanvas()->Refresh();
|
||||||
UpdateHierarchyNavigator();
|
UpdateHierarchyNavigator();
|
||||||
|
|
||||||
if( !GetTitle().StartsWith( "*" ) )
|
if( !GetTitle().StartsWith( wxS( "*" ) ) )
|
||||||
updateTitle();
|
updateTitle();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1120,7 +1120,7 @@ void SCH_EDIT_FRAME::NewProject()
|
||||||
}
|
}
|
||||||
|
|
||||||
// OpenProjectFiles() requires absolute
|
// OpenProjectFiles() requires absolute
|
||||||
wxASSERT_MSG( create_me.IsAbsolute(), "wxFileDialog returned non-absolute path" );
|
wxASSERT_MSG( create_me.IsAbsolute(), wxS( "wxFileDialog returned non-absolute path" ) );
|
||||||
|
|
||||||
OpenProjectFiles( std::vector<wxString>( 1, create_me.GetFullPath() ), KICTL_CREATE );
|
OpenProjectFiles( std::vector<wxString>( 1, create_me.GetFullPath() ), KICTL_CREATE );
|
||||||
m_mruPath = create_me.GetPath();
|
m_mruPath = create_me.GetPath();
|
||||||
|
@ -1132,8 +1132,8 @@ void SCH_EDIT_FRAME::LoadProject()
|
||||||
{
|
{
|
||||||
wxString pro_dir = m_mruPath;
|
wxString pro_dir = m_mruPath;
|
||||||
wxString wildcards = AllSchematicFilesWildcard()
|
wxString wildcards = AllSchematicFilesWildcard()
|
||||||
+ "|" + KiCadSchematicFileWildcard()
|
+ wxS( "|" ) + KiCadSchematicFileWildcard()
|
||||||
+ "|" + LegacySchematicFileWildcard();
|
+ wxS( "|" ) + LegacySchematicFileWildcard();
|
||||||
|
|
||||||
wxFileDialog dlg( this, _( "Open Schematic" ), pro_dir, wxEmptyString,
|
wxFileDialog dlg( this, _( "Open Schematic" ), pro_dir, wxEmptyString,
|
||||||
wildcards, wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
wildcards, wxFD_OPEN | wxFD_FILE_MUST_EXIST );
|
||||||
|
|
|
@ -160,8 +160,8 @@ void SCH_JUNCTION::Show( int nestLevel, std::ostream& os ) const
|
||||||
// XML output:
|
// XML output:
|
||||||
wxString s = GetClass();
|
wxString s = GetClass();
|
||||||
|
|
||||||
NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str() << m_pos << ", " << m_diameter
|
NestedSpace( nestLevel, os ) << '<' << s.Lower().mb_str() << m_pos << wxS( ", " ) << m_diameter
|
||||||
<< "/>\n";
|
<< wxS( "/>\n" );
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ bool IncrementLabelMember( wxString& name, int aIncrement )
|
||||||
{
|
{
|
||||||
name.Remove( ii + 1 );
|
name.Remove( ii + 1 );
|
||||||
//write out a format string with correct number of leading zeroes
|
//write out a format string with correct number of leading zeroes
|
||||||
outputFormat.Printf( "%%0%dld", dCount );
|
outputFormat.Printf( wxS( "%%0%dld" ), dCount );
|
||||||
//write out the number using the format string
|
//write out the number using the format string
|
||||||
outputNumber.Printf( outputFormat, number );
|
outputNumber.Printf( outputFormat, number );
|
||||||
name << outputNumber << suffix;
|
name << outputNumber << suffix;
|
||||||
|
|
|
@ -105,7 +105,7 @@ void SCHEMATIC::SetProject( PROJECT* aPrj )
|
||||||
|
|
||||||
void SCHEMATIC::SetRoot( SCH_SHEET* aRootSheet )
|
void SCHEMATIC::SetRoot( SCH_SHEET* aRootSheet )
|
||||||
{
|
{
|
||||||
wxCHECK_RET( aRootSheet, "Call to SetRoot with null SCH_SHEET!" );
|
wxCHECK_RET( aRootSheet, wxS( "Call to SetRoot with null SCH_SHEET!" ) );
|
||||||
|
|
||||||
m_rootSheet = aRootSheet;
|
m_rootSheet = aRootSheet;
|
||||||
|
|
||||||
|
@ -273,7 +273,7 @@ bool SCHEMATIC::ResolveCrossReference( wxString* token, int aDepth ) const
|
||||||
if( refSymbol->ResolveTextVar( &remainder, aDepth + 1 ) )
|
if( refSymbol->ResolveTextVar( &remainder, aDepth + 1 ) )
|
||||||
*token = remainder;
|
*token = remainder;
|
||||||
else
|
else
|
||||||
*token = refSymbol->GetRef( &sheetPath, true ) + ":" + remainder;
|
*token = refSymbol->GetRef( &sheetPath, true ) + wxS( ":" ) + remainder;
|
||||||
|
|
||||||
return true; // Cross-reference is resolved whether or not the actual textvar was
|
return true; // Cross-reference is resolved whether or not the actual textvar was
|
||||||
}
|
}
|
||||||
|
@ -368,13 +368,13 @@ wxString SCHEMATIC::ConvertRefsToKIIDs( const wxString& aSource ) const
|
||||||
|
|
||||||
if( ref == refSymbol->GetRef( &references[ jj ].GetSheetPath(), true ) )
|
if( ref == refSymbol->GetRef( &references[ jj ].GetSheetPath(), true ) )
|
||||||
{
|
{
|
||||||
token = refSymbol->m_Uuid.AsString() + ":" + remainder;
|
token = refSymbol->m_Uuid.AsString() + wxS( ":" ) + remainder;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
newbuf.append( "${" + token + "}" );
|
newbuf.append( wxS( "${" ) + token + wxS( "}" ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -421,11 +421,11 @@ wxString SCHEMATIC::ConvertKIIDsToRefs( const wxString& aSource ) const
|
||||||
if( refItem && refItem->Type() == SCH_SYMBOL_T )
|
if( refItem && refItem->Type() == SCH_SYMBOL_T )
|
||||||
{
|
{
|
||||||
SCH_SYMBOL* refSymbol = static_cast<SCH_SYMBOL*>( refItem );
|
SCH_SYMBOL* refSymbol = static_cast<SCH_SYMBOL*>( refItem );
|
||||||
token = refSymbol->GetRef( &refSheetPath, true ) + ":" + remainder;
|
token = refSymbol->GetRef( &refSheetPath, true ) + wxS( ":" ) + remainder;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
newbuf.append( "${" + token + "}" );
|
newbuf.append( wxS( "${" ) + token + wxS( "}" ) );
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue