From a568e70b99cf98dce906b3d69f3ba63c65c1442a Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 9 Jun 2019 23:21:53 +0100 Subject: [PATCH] Follow naming conventions. --- common/eda_draw_frame.cpp | 8 ++++---- common/hotkey_store.cpp | 2 +- cvpcb/display_footprints_frame.cpp | 2 +- eeschema/connection_graph.h | 4 ++-- eeschema/edit_component_in_schematic.cpp | 2 +- eeschema/eeschema_config.cpp | 2 +- eeschema/tools/ee_inspection_tool.cpp | 2 +- eeschema/tools/lib_drawing_tools.cpp | 18 +++++++++--------- eeschema/tools/lib_edit_tool.cpp | 4 ++-- eeschema/tools/lib_move_tool.cpp | 2 +- eeschema/tools/lib_pin_tool.cpp | 6 +++--- gerbview/locate.cpp | 2 +- include/eda_base_frame.h | 6 +++--- pagelayout_editor/pl_editor_frame.cpp | 2 +- pcbnew/footprint_wizard_frame.cpp | 2 +- pcbnew/pcb_base_frame.cpp | 6 +++--- 16 files changed, 35 insertions(+), 35 deletions(-) diff --git a/common/eda_draw_frame.cpp b/common/eda_draw_frame.cpp index 66bbebccf4..db16c4b7a2 100644 --- a/common/eda_draw_frame.cpp +++ b/common/eda_draw_frame.cpp @@ -107,7 +107,7 @@ EDA_DRAW_FRAME::EDA_DRAW_FRAME( KIWAY* aKiway, wxWindow* aParent, FRAME_T aFrame m_MsgFrameHeight = EDA_MSG_PANEL::GetRequiredHeight(); m_movingCursorWithKeyboard = false; m_zoomLevelCoeff = 1.0; - m_UserUnits = MILLIMETRES; + m_userUnits = MILLIMETRES; m_PolarCoords = false; m_auimgr.SetFlags(wxAUI_MGR_DEFAULT); @@ -339,7 +339,7 @@ void EDA_DRAW_FRAME::DisplayUnitsMsg() { wxString msg; - switch( m_UserUnits ) + switch( m_userUnits ) { case INCHES: msg = _( "Inches" ); break; case MILLIMETRES: msg = _( "mm" ); break; @@ -453,7 +453,7 @@ void EDA_DRAW_FRAME::SaveSettings( wxConfigBase* aCfg ) wxString baseCfgName = ConfigBaseName(); - aCfg->Write( baseCfgName + UserUnitsEntryKeyword, (int) m_UserUnits ); + aCfg->Write( baseCfgName + UserUnitsEntryKeyword, (int) m_userUnits ); aCfg->Write( baseCfgName + ShowGridEntryKeyword, IsGridVisible() ); aCfg->Write( baseCfgName + LastGridSizeIdKeyword, ( long ) m_LastGridSizeId ); aCfg->Write( baseCfgName + FirstRunShownKeyword, m_firstRunDialogSetting ); @@ -497,7 +497,7 @@ void EDA_DRAW_FRAME::SetMsgPanel( EDA_ITEM* aItem ) wxCHECK_RET( aItem, wxT( "Invalid EDA_ITEM pointer. Bad programmer." ) ); MSG_PANEL_ITEMS items; - aItem->GetMsgPanelInfo( m_UserUnits, items ); + aItem->GetMsgPanelInfo( m_userUnits, items ); SetMsgPanel( items ); } diff --git a/common/hotkey_store.cpp b/common/hotkey_store.cpp index 2e5bf2071d..6b88f65804 100644 --- a/common/hotkey_store.cpp +++ b/common/hotkey_store.cpp @@ -39,7 +39,7 @@ wxString HOTKEY_STORE::GetSectionName( TOOL_ACTION* aAction ) { wxT( "common" ), _( "Common" ) }, { wxT( "kicad" ), _( "Kicad Manager" ) }, { wxT( "eeschema" ), _( "Eeschema" ) }, - { wxT( "pcbnew" ), _( "PcbNew" ) }, + { wxT( "pcbnew" ), _( "Pcbnew" ) }, { wxT( "plEditor" ), _( "Page Layout Editor" ) } }; diff --git a/cvpcb/display_footprints_frame.cpp b/cvpcb/display_footprints_frame.cpp index d74edae477..42583e1163 100644 --- a/cvpcb/display_footprints_frame.cpp +++ b/cvpcb/display_footprints_frame.cpp @@ -439,7 +439,7 @@ void DISPLAY_FOOTPRINTS_FRAME::UpdateMsgPanel() MSG_PANEL_ITEMS items; if( footprint ) - footprint->GetMsgPanelInfo( m_UserUnits, items ); + footprint->GetMsgPanelInfo( m_userUnits, items ); SetMsgPanel( items ); } diff --git a/eeschema/connection_graph.h b/eeschema/connection_graph.h index 7e00ef56ad..3e616b1ad6 100644 --- a/eeschema/connection_graph.h +++ b/eeschema/connection_graph.h @@ -158,7 +158,7 @@ public: SCH_SHEET_PATH m_sheet; - // Needed for m_UserUnits for now; maybe refactor later + // Needed for m_userUnits for now; maybe refactor later SCH_EDIT_FRAME* m_frame; /// Cache for driver connection @@ -283,7 +283,7 @@ private: std::mutex m_item_mutex; - // Needed for m_UserUnits for now; maybe refactor later + // Needed for m_userUnits for now; maybe refactor later SCH_EDIT_FRAME* m_frame; /** diff --git a/eeschema/edit_component_in_schematic.cpp b/eeschema/edit_component_in_schematic.cpp index 189d67a190..3d1f8285dc 100644 --- a/eeschema/edit_component_in_schematic.cpp +++ b/eeschema/edit_component_in_schematic.cpp @@ -77,7 +77,7 @@ void SCH_EDIT_FRAME::EditComponentFieldText( SCH_FIELD* aField ) OnModify(); MSG_PANEL_ITEMS items; - component->GetMsgPanelInfo( m_UserUnits, items ); + component->GetMsgPanelInfo( m_userUnits, items ); SetMsgPanel( items ); } diff --git a/eeschema/eeschema_config.cpp b/eeschema/eeschema_config.cpp index f5837be9e8..955cb47a88 100644 --- a/eeschema/eeschema_config.cpp +++ b/eeschema/eeschema_config.cpp @@ -353,7 +353,7 @@ PARAM_CFG_ARRAY& SCH_EDIT_FRAME::GetConfigurationSettings() m_configSettings.push_back( new PARAM_CFG_BOOL( true, ShowPageLimitsEntry, &m_showPageLimits, true ) ); m_configSettings.push_back( new PARAM_CFG_INT( true, UnitsEntry, - (int*)&m_UserUnits, MILLIMETRES ) ); + (int*)&m_userUnits, MILLIMETRES ) ); m_configSettings.push_back( new PARAM_CFG_BOOL( true, PrintMonochromeEntry, &m_printMonochrome, true ) ); diff --git a/eeschema/tools/ee_inspection_tool.cpp b/eeschema/tools/ee_inspection_tool.cpp index bf93dc1d6a..495d4fe0cb 100644 --- a/eeschema/tools/ee_inspection_tool.cpp +++ b/eeschema/tools/ee_inspection_tool.cpp @@ -45,7 +45,7 @@ #include #include -TOOL_ACTION EE_ACTIONS::runERC( "eeschame.InspectionTool.runERC", +TOOL_ACTION EE_ACTIONS::runERC( "eeschema.InspectionTool.runERC", AS_GLOBAL, 0, "", _( "Electrical Rules &Checker" ), _( "Perform electrical rules check" ), erc_xpm ); diff --git a/eeschema/tools/lib_drawing_tools.cpp b/eeschema/tools/lib_drawing_tools.cpp index a83d720ea7..5111b06eb8 100644 --- a/eeschema/tools/lib_drawing_tools.cpp +++ b/eeschema/tools/lib_drawing_tools.cpp @@ -46,43 +46,43 @@ #include // Drawing tool actions -TOOL_ACTION EE_ACTIONS::placeSymbolPin( "libedit.InteractiveDrawing.placeSymbolPin", +TOOL_ACTION EE_ACTIONS::placeSymbolPin( "eeschema.SymbolDrawing.placeSymbolPin", AS_GLOBAL, 'P', LEGACY_HK_NAME( "Create Pin" ), _( "Add Pin" ), _( "Add a pin" ), pin_xpm, AF_ACTIVATE ); -TOOL_ACTION EE_ACTIONS::placeSymbolText( "libedit.InteractiveDrawing.placeSymbolText", +TOOL_ACTION EE_ACTIONS::placeSymbolText( "eeschema.SymbolDrawing.placeSymbolText", AS_GLOBAL, 0, "", _( "Add Text" ), _( "Add a text item" ), text_xpm, AF_ACTIVATE ); -TOOL_ACTION EE_ACTIONS::drawSymbolRectangle( "libedit.InteractiveDrawing.drawSymbolRectangle", +TOOL_ACTION EE_ACTIONS::drawSymbolRectangle( "eeschema.SymbolDrawing.drawSymbolRectangle", AS_GLOBAL, 0, "", _( "Add Rectangle" ), _( "Add a rectangle" ), add_rectangle_xpm, AF_ACTIVATE ); -TOOL_ACTION EE_ACTIONS::drawSymbolCircle( "libedit.InteractiveDrawing.drawSymbolCircle", +TOOL_ACTION EE_ACTIONS::drawSymbolCircle( "eeschema.SymbolDrawing.drawSymbolCircle", AS_GLOBAL, 0, "", _( "Add Circle" ), _( "Add a circle" ), add_circle_xpm, AF_ACTIVATE ); -TOOL_ACTION EE_ACTIONS::drawSymbolArc( "libedit.InteractiveDrawing.drawSymbolArc", +TOOL_ACTION EE_ACTIONS::drawSymbolArc( "eeschema.SymbolDrawing.drawSymbolArc", AS_GLOBAL, 0, "", _( "Add Arc" ), _( "Add an arc" ), add_arc_xpm, AF_ACTIVATE ); -TOOL_ACTION EE_ACTIONS::drawSymbolLines( "libedit.InteractiveDrawing.drawSymbolLines", +TOOL_ACTION EE_ACTIONS::drawSymbolLines( "eeschema.SymbolDrawing.drawSymbolLines", AS_GLOBAL, 0, "", _( "Add Lines" ), _( "Add connected graphic lines" ), add_graphical_segments_xpm, AF_ACTIVATE ); -TOOL_ACTION EE_ACTIONS::placeSymbolAnchor( "libedit.InteractiveDrawing.placeSymbolAnchor", +TOOL_ACTION EE_ACTIONS::placeSymbolAnchor( "eeschema.SymbolDrawing.placeSymbolAnchor", AS_GLOBAL, 0, "", _( "Move Symbol Anchor" ), _( "Specify a new location for the symbol anchor" ), anchor_xpm, AF_ACTIVATE ); -TOOL_ACTION EE_ACTIONS::finishDrawing( "libedit.InteractiveDrawing.finishDrawing", +TOOL_ACTION EE_ACTIONS::finishDrawing( "eeschema.SymbolDrawing.finishDrawing", AS_GLOBAL, 0, "", _( "Finish Drawing" ), _( "Finish drawing shape" ), checked_ok_xpm, AF_NONE ); @@ -92,7 +92,7 @@ static void* g_lastPinWeakPtr; LIB_DRAWING_TOOLS::LIB_DRAWING_TOOLS() : - EE_TOOL_BASE( "libedit.InteractiveDrawing" ) + EE_TOOL_BASE( "eeschema.SymbolDrawing" ) { } diff --git a/eeschema/tools/lib_edit_tool.cpp b/eeschema/tools/lib_edit_tool.cpp index 6f55437bfc..c7a85bd981 100644 --- a/eeschema/tools/lib_edit_tool.cpp +++ b/eeschema/tools/lib_edit_tool.cpp @@ -44,7 +44,7 @@ LIB_EDIT_TOOL::LIB_EDIT_TOOL() : - EE_TOOL_BASE( "libedit.InteractiveEdit" ) + EE_TOOL_BASE( "eeschema.SymbolEditTool" ) { } @@ -61,7 +61,7 @@ bool LIB_EDIT_TOOL::Init() LIB_DRAWING_TOOLS* drawingTools = m_toolMgr->GetTool(); LIB_MOVE_TOOL* moveTool = m_toolMgr->GetTool(); - wxASSERT_MSG( drawingTools, "libedit.InteractiveDrawing tool is not available" ); + wxASSERT_MSG( drawingTools, "eeschema.SymbolDrawing tool is not available" ); // // Add edit actions to the move tool menu diff --git a/eeschema/tools/lib_move_tool.cpp b/eeschema/tools/lib_move_tool.cpp index c03148f6c5..e6585d389e 100644 --- a/eeschema/tools/lib_move_tool.cpp +++ b/eeschema/tools/lib_move_tool.cpp @@ -34,7 +34,7 @@ LIB_MOVE_TOOL::LIB_MOVE_TOOL() : - EE_TOOL_BASE( "libedit.InteractiveMove" ), + EE_TOOL_BASE( "eeschema.SymbolMoveTool" ), m_moveInProgress( false ), m_moveOffset( 0, 0 ) { diff --git a/eeschema/tools/lib_pin_tool.cpp b/eeschema/tools/lib_pin_tool.cpp index 3ea55030d6..a33aeaf560 100644 --- a/eeschema/tools/lib_pin_tool.cpp +++ b/eeschema/tools/lib_pin_tool.cpp @@ -33,17 +33,17 @@ #include "lib_pin_tool.h" -TOOL_ACTION EE_ACTIONS::pushPinLength( "libedit.PinEditing.pushPinLength", +TOOL_ACTION EE_ACTIONS::pushPinLength( "eeschema.PinEditing.pushPinLength", AS_GLOBAL, 0, "", _( "Push Pin Length" ), _( "Copy pin length to other pins in symbol" ), pin_size_to_xpm ); -TOOL_ACTION EE_ACTIONS::pushPinNameSize( "libedit.PinEditing.pushPinNameSize", +TOOL_ACTION EE_ACTIONS::pushPinNameSize( "eeschema.PinEditing.pushPinNameSize", AS_GLOBAL, 0, "", _( "Push Pin Name Size" ), _( "Copy pin name size to other pins in symbol" ), pin_size_to_xpm ); -TOOL_ACTION EE_ACTIONS::pushPinNumSize( "libedit.PinEditing.pushPinNumSize", +TOOL_ACTION EE_ACTIONS::pushPinNumSize( "eeschema.PinEditing.pushPinNumSize", AS_GLOBAL, 0, "", _( "Push Pin Number Size" ), _( "Copy pin number size to other pins in symbol" ), pin_size_to_xpm ); diff --git a/gerbview/locate.cpp b/gerbview/locate.cpp index b2186ab756..3f4d1dbb94 100644 --- a/gerbview/locate.cpp +++ b/gerbview/locate.cpp @@ -99,7 +99,7 @@ GERBER_DRAW_ITEM* GERBVIEW_FRAME::Locate( const wxPoint& aPosition, int aTypeloc if( gerb_item ) { MSG_PANEL_ITEMS items; - gerb_item->GetMsgPanelInfo( m_UserUnits, items ); + gerb_item->GetMsgPanelInfo( m_userUnits, items ); SetMsgPanel( items ); } diff --git a/include/eda_base_frame.h b/include/eda_base_frame.h index 942abd7753..1f9af1a0f9 100644 --- a/include/eda_base_frame.h +++ b/include/eda_base_frame.h @@ -134,7 +134,7 @@ protected: wxString m_mruPath; // Most recently used path. - EDA_UNITS_T m_UserUnits; + EDA_UNITS_T m_userUnits; ///> Default style flags used for wxAUI toolbars static constexpr int KICAD_AUI_TB_STYLE = wxAUI_TB_DEFAULT_STYLE | wxAUI_TB_PLAIN_BACKGROUND; @@ -194,8 +194,8 @@ public: /** * Return the user units currently in use. */ - EDA_UNITS_T GetUserUnits() const { return m_UserUnits; } - void SetUserUnits( EDA_UNITS_T aUnits ) { m_UserUnits = aUnits; } + EDA_UNITS_T GetUserUnits() const { return m_userUnits; } + void SetUserUnits( EDA_UNITS_T aUnits ) { m_userUnits = aUnits; } void ChangeUserUnits( EDA_UNITS_T aUnits ) { diff --git a/pagelayout_editor/pl_editor_frame.cpp b/pagelayout_editor/pl_editor_frame.cpp index 13230ef6f5..3625cd21aa 100644 --- a/pagelayout_editor/pl_editor_frame.cpp +++ b/pagelayout_editor/pl_editor_frame.cpp @@ -75,7 +75,7 @@ PL_EDITOR_FRAME::PL_EDITOR_FRAME( KIWAY* aKiway, wxWindow* aParent ) : wxDefaultPosition, wxDefaultSize, KICAD_DEFAULT_DRAWFRAME_STYLE, PL_EDITOR_FRAME_NAME ) { - m_UserUnits = MILLIMETRES; + m_userUnits = MILLIMETRES; m_zoomLevelCoeff = 290.0; // Adjusted to roughly displays zoom level = 1 // when the screen shows a 1:1 image // obviously depends on the monitor, diff --git a/pcbnew/footprint_wizard_frame.cpp b/pcbnew/footprint_wizard_frame.cpp index 8c521b327a..3fe5409cb7 100644 --- a/pcbnew/footprint_wizard_frame.cpp +++ b/pcbnew/footprint_wizard_frame.cpp @@ -320,7 +320,7 @@ void FOOTPRINT_WIZARD_FRAME::UpdateMsgPanel() { MSG_PANEL_ITEMS items; - footprint->GetMsgPanelInfo( m_UserUnits, items ); + footprint->GetMsgPanelInfo( m_userUnits, items ); SetMsgPanel( items ); } else diff --git a/pcbnew/pcb_base_frame.cpp b/pcbnew/pcb_base_frame.cpp index 9a54fb3323..4a23e136a1 100644 --- a/pcbnew/pcb_base_frame.cpp +++ b/pcbnew/pcb_base_frame.cpp @@ -741,9 +741,9 @@ void PCB_BASE_FRAME::SaveSettings( wxConfigBase* aCfg ) wxString baseCfgName = GetName(); - aCfg->Write( baseCfgName + UserGridSizeXEntry, To_User_Unit( m_UserUnits, m_UserGridSize.x ) ); - aCfg->Write( baseCfgName + UserGridSizeYEntry, To_User_Unit( m_UserUnits, m_UserGridSize.y ) ); - aCfg->Write( baseCfgName + UserGridUnitsEntry, ( long )m_UserUnits ); + aCfg->Write( baseCfgName + UserGridSizeXEntry, To_User_Unit( m_userUnits, m_UserGridSize.x ) ); + aCfg->Write( baseCfgName + UserGridSizeYEntry, To_User_Unit( m_userUnits, m_UserGridSize.y ) ); + aCfg->Write( baseCfgName + UserGridUnitsEntry, ( long )m_userUnits ); aCfg->Write( baseCfgName + DisplayPadFillEntry, m_DisplayOptions.m_DisplayPadFill ); aCfg->Write( baseCfgName + DisplayViaFillEntry, m_DisplayOptions.m_DisplayViaFill ); aCfg->Write( baseCfgName + DisplayPadNumberEntry, m_DisplayOptions.m_DisplayPadNum );