Eeschema: minor fixes: fix incorrect label in DIALOG_LIB_EDIT_PIN, electrical pin list.
Gives also to functions GetText() and GetBitmap() a more significant name. Fixes #5007 https://gitlab.com/kicad/code/kicad/issues/5007
This commit is contained in:
parent
f00c59c446
commit
98b1f55e29
|
@ -370,12 +370,12 @@ TOOL_ACTION ACTIONS::refreshPreview( "common.Control.refreshPreview",
|
|||
|
||||
TOOL_ACTION ACTIONS::pinLibrary( "common.Control.pinLibrary",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Pin" ), "Keep the library at the top of the list",
|
||||
_( "Pin Library" ), "Keep the library at the top of the list",
|
||||
flag_xpm );
|
||||
|
||||
TOOL_ACTION ACTIONS::unpinLibrary( "common.Control.unpinLibrary",
|
||||
AS_GLOBAL, 0, "",
|
||||
_( "Unpin" ), "No longer keep the library at the top of the list",
|
||||
_( "Unpin Library" ), "No longer keep the library at the top of the list",
|
||||
flag_remove_xpm );
|
||||
|
||||
TOOL_ACTION ACTIONS::panUp( "common.Control.panUp",
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 2010 Jean-Pierre Charras, jp.charras at wanadoo.fr
|
||||
* Copyright (C) 2016 - 2019 KiCad Developers, see CHANGELOG.TXT for contributors.
|
||||
* Copyright (C) 2016 - 2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* This program source code file is part of KiCad, a free EDA CAD application.
|
||||
*
|
||||
* Copyright (C) 1992-2019 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
* Copyright (C) 1992-2020 KiCad Developers, see AUTHORS.txt for contributors.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
|
@ -396,18 +396,18 @@ DIALOG_LIB_EDIT_PIN_TABLE::DIALOG_LIB_EDIT_PIN_TABLE( LIB_EDIT_FRAME* parent, LI
|
|||
if( g_typeNames.empty())
|
||||
{
|
||||
for( unsigned i = 0; i < ELECTRICAL_PINTYPES_TOTAL; ++i )
|
||||
g_typeIcons.push_back( GetBitmap( static_cast<ELECTRICAL_PINTYPE>( i ) ) );
|
||||
g_typeIcons.push_back( ElectricalPinTypeGetBitmap( static_cast<ELECTRICAL_PINTYPE>( i ) ) );
|
||||
|
||||
for( unsigned i = 0; i < ELECTRICAL_PINTYPES_TOTAL; ++i )
|
||||
g_typeNames.push_back( GetText( static_cast<ELECTRICAL_PINTYPE>( i ) ) );
|
||||
g_typeNames.push_back( ElectricalPinTypeGetText( static_cast<ELECTRICAL_PINTYPE>( i ) ) );
|
||||
|
||||
g_typeNames.push_back( INDETERMINATE_STATE );
|
||||
|
||||
for( unsigned i = 0; i < GRAPHIC_PINSHAPES_TOTAL; ++i )
|
||||
g_shapeIcons.push_back( GetBitmap( static_cast<GRAPHIC_PINSHAPE>( i ) ) );
|
||||
g_shapeIcons.push_back( PinShapeGetBitmap( static_cast<GRAPHIC_PINSHAPE>( i ) ) );
|
||||
|
||||
for( unsigned i = 0; i < GRAPHIC_PINSHAPES_TOTAL; ++i )
|
||||
g_shapeNames.push_back( GetText( static_cast<GRAPHIC_PINSHAPE>( i ) ) );
|
||||
g_shapeNames.push_back( PinShapeGetText( static_cast<GRAPHIC_PINSHAPE>( i ) ) );
|
||||
|
||||
g_shapeNames.push_back( INDETERMINATE_STATE );
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1445,9 +1445,9 @@ void LIB_PIN::getMsgPanelInfoBase( EDA_DRAW_FRAME* aFrame, MSG_PANEL_ITEMS& aLis
|
|||
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Name" ), m_name, DARKCYAN ) );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Number" ), text, DARKCYAN ) );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Type" ), GetText( m_type ), RED ) );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Type" ), ElectricalPinTypeGetText( m_type ), RED ) );
|
||||
|
||||
text = GetText( m_shape );
|
||||
text = PinShapeGetText( m_shape );
|
||||
aList.push_back( MSG_PANEL_ITEM( _( "Style" ), text, BLUE ) );
|
||||
|
||||
text = IsVisible() ? _( "Yes" ) : _( "No" );
|
||||
|
@ -1676,7 +1676,7 @@ const BITMAP_DEF* LIB_PIN::GetOrientationSymbols()
|
|||
|
||||
BITMAP_DEF LIB_PIN::GetMenuImage() const
|
||||
{
|
||||
return GetBitmap( m_type );
|
||||
return ElectricalPinTypeGetBitmap( m_type );
|
||||
}
|
||||
|
||||
|
||||
|
@ -1685,7 +1685,7 @@ wxString LIB_PIN::GetSelectMenuText( EDA_UNITS aUnits ) const
|
|||
return wxString::Format( _( "Pin %s, %s, %s" ),
|
||||
m_number,
|
||||
GetElectricalTypeName(),
|
||||
GetText( m_shape ));
|
||||
PinShapeGetText( m_shape ));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -259,7 +259,7 @@ public:
|
|||
*/
|
||||
wxString const GetElectricalTypeName() const
|
||||
{
|
||||
return GetText( m_type );
|
||||
return ElectricalPinTypeGetText( m_type );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -55,7 +55,7 @@ const std::map<GRAPHIC_PINSHAPE, struct pinShapeStruct> pinShapes = {
|
|||
// clang-format on
|
||||
|
||||
|
||||
wxString GetText( GRAPHIC_PINSHAPE aShape )
|
||||
wxString PinShapeGetText( GRAPHIC_PINSHAPE aShape )
|
||||
{
|
||||
auto findIt = pinShapes.find( aShape );
|
||||
|
||||
|
@ -65,7 +65,7 @@ wxString GetText( GRAPHIC_PINSHAPE aShape )
|
|||
}
|
||||
|
||||
|
||||
BITMAP_DEF GetBitmap( GRAPHIC_PINSHAPE aShape )
|
||||
BITMAP_DEF PinShapeGetBitmap( GRAPHIC_PINSHAPE aShape )
|
||||
{
|
||||
auto findIt = pinShapes.find( aShape );
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ enum class GRAPHIC_PINSHAPE
|
|||
|
||||
|
||||
// UI
|
||||
wxString GetText( GRAPHIC_PINSHAPE shape );
|
||||
BITMAP_DEF GetBitmap( GRAPHIC_PINSHAPE shape );
|
||||
wxString PinShapeGetText( GRAPHIC_PINSHAPE shape );
|
||||
BITMAP_DEF PinShapeGetBitmap( GRAPHIC_PINSHAPE shape );
|
||||
|
||||
#endif
|
||||
|
|
|
@ -47,7 +47,7 @@ const std::map<ELECTRICAL_PINTYPE, struct pinTypeStruct> pinTypes = {
|
|||
{ ELECTRICAL_PINTYPE::PT_BIDI, { _( "Bidirectional" ), pintype_bidi_xpm } },
|
||||
{ ELECTRICAL_PINTYPE::PT_TRISTATE, { _( "Tri-state" ), pintype_3states_xpm } },
|
||||
{ ELECTRICAL_PINTYPE::PT_PASSIVE, { _( "Passive" ), pintype_passive_xpm } },
|
||||
{ ELECTRICAL_PINTYPE::PT_UNSPECIFIED, { _( "Clock low" ), pintype_notspecif_xpm } },
|
||||
{ ELECTRICAL_PINTYPE::PT_UNSPECIFIED, { _( "Unspecified" ), pintype_notspecif_xpm } },
|
||||
{ ELECTRICAL_PINTYPE::PT_POWER_IN, { _( "Power input" ), pintype_powerinput_xpm } },
|
||||
{ ELECTRICAL_PINTYPE::PT_POWER_OUT, { _( "Power output" ), pintype_poweroutput_xpm } },
|
||||
{ ELECTRICAL_PINTYPE::PT_OPENCOLLECTOR,{ _( "Open collector" ), pintype_opencoll_xpm } },
|
||||
|
@ -56,7 +56,7 @@ const std::map<ELECTRICAL_PINTYPE, struct pinTypeStruct> pinTypes = {
|
|||
};
|
||||
// clang-format on
|
||||
|
||||
wxString GetText( ELECTRICAL_PINTYPE aType )
|
||||
wxString ElectricalPinTypeGetText( ELECTRICAL_PINTYPE aType )
|
||||
{
|
||||
auto findIt = pinTypes.find( aType );
|
||||
|
||||
|
@ -66,7 +66,7 @@ wxString GetText( ELECTRICAL_PINTYPE aType )
|
|||
}
|
||||
|
||||
|
||||
BITMAP_DEF GetBitmap( ELECTRICAL_PINTYPE aType )
|
||||
BITMAP_DEF ElectricalPinTypeGetBitmap( ELECTRICAL_PINTYPE aType )
|
||||
{
|
||||
auto findIt = pinTypes.find( aType );
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ enum class ELECTRICAL_PINTYPE
|
|||
#define ELECTRICAL_PINTYPES_TOTAL ( static_cast<int>( ELECTRICAL_PINTYPE::PT_LAST_OPTION ) + 1 )
|
||||
|
||||
// UI
|
||||
wxString GetText( ELECTRICAL_PINTYPE );
|
||||
BITMAP_DEF GetBitmap( ELECTRICAL_PINTYPE );
|
||||
wxString ElectricalPinTypeGetText( ELECTRICAL_PINTYPE );
|
||||
BITMAP_DEF ElectricalPinTypeGetBitmap( ELECTRICAL_PINTYPE );
|
||||
|
||||
#endif
|
||||
|
|
|
@ -46,8 +46,8 @@ PinShapeComboBox::PinShapeComboBox( wxWindow* parent,
|
|||
{
|
||||
GRAPHIC_PINSHAPE shape = static_cast<GRAPHIC_PINSHAPE>( ii );
|
||||
|
||||
wxString text = GetText( shape );
|
||||
BITMAP_DEF bitmap = GetBitmap( shape );
|
||||
wxString text = PinShapeGetText( shape );
|
||||
BITMAP_DEF bitmap = PinShapeGetBitmap( shape );
|
||||
|
||||
if( bitmap == NULL )
|
||||
Append( text );
|
||||
|
|
|
@ -46,8 +46,8 @@ PinTypeComboBox::PinTypeComboBox( wxWindow* parent,
|
|||
{
|
||||
ELECTRICAL_PINTYPE type = static_cast<ELECTRICAL_PINTYPE>( ii );
|
||||
|
||||
wxString text = GetText( type );
|
||||
BITMAP_DEF bitmap = GetBitmap( type );
|
||||
wxString text = ElectricalPinTypeGetText( type );
|
||||
BITMAP_DEF bitmap = ElectricalPinTypeGetBitmap( type );
|
||||
|
||||
if( bitmap == NULL )
|
||||
Append( text );
|
||||
|
|
Loading…
Reference in New Issue