From 52ca7ed27c8637336b60414373ccf4971d1eef7e Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sun, 4 Apr 2021 10:41:48 +0100 Subject: [PATCH] Naming conventions. --- pcbnew/CMakeLists.txt | 4 +- ...dialog_footprint_properties_fp_editor.cpp} | 52 +++++++++--------- ...> dialog_footprint_properties_fp_editor.h} | 14 ++--- ...g_footprint_properties_fp_editor_base.cpp} | 54 +++++++++---------- ...g_footprint_properties_fp_editor_base.fbp} | 6 +-- ...log_footprint_properties_fp_editor_base.h} | 8 +-- pcbnew/footprint_editor_utils.cpp | 4 +- 7 files changed, 71 insertions(+), 71 deletions(-) rename pcbnew/dialogs/{dialog_edit_footprint_for_fp_editor.cpp => dialog_footprint_properties_fp_editor.cpp} (92%) rename pcbnew/dialogs/{dialog_edit_footprint_for_fp_editor.h => dialog_footprint_properties_fp_editor.h} (87%) rename pcbnew/dialogs/{dialog_edit_footprint_for_fp_editor_base.cpp => dialog_footprint_properties_fp_editor_base.cpp} (90%) rename pcbnew/dialogs/{dialog_edit_footprint_for_fp_editor_base.fbp => dialog_footprint_properties_fp_editor_base.fbp} (99%) rename pcbnew/dialogs/{dialog_edit_footprint_for_fp_editor_base.h => dialog_footprint_properties_fp_editor_base.h} (90%) diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt index 1044a8a1a3..695d2a2d38 100644 --- a/pcbnew/CMakeLists.txt +++ b/pcbnew/CMakeLists.txt @@ -68,8 +68,8 @@ set( PCBNEW_DIALOGS dialogs/dialog_footprint_checker_base.cpp dialogs/dialog_footprint_properties.cpp dialogs/dialog_footprint_properties_base.cpp - dialogs/dialog_edit_footprint_for_fp_editor.cpp - dialogs/dialog_edit_footprint_for_fp_editor_base.cpp + dialogs/dialog_footprint_properties_fp_editor.cpp + dialogs/dialog_footprint_properties_fp_editor_base.cpp dialogs/dialog_enum_pads.cpp dialogs/dialog_enum_pads_base.cpp dialogs/dialog_exchange_footprints.cpp diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp similarity index 92% rename from pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp rename to pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp index bfc30c5838..223c80027b 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.cpp @@ -37,7 +37,7 @@ #include #include #include -#include +#include #include "filename_resolver.h" #include #include "3d_cache/dialogs/panel_prev_3d.h" @@ -49,12 +49,12 @@ #include -int DIALOG_FOOTPRINT_FP_EDITOR::m_page = 0; // remember the last open page during session +int DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::m_page = 0; // remember the last open page during session -DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR( FOOTPRINT_EDIT_FRAME* aParent, - FOOTPRINT* aFootprint ) : - DIALOG_FOOTPRINT_FP_EDITOR_BASE( aParent ), +DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR( FOOTPRINT_EDIT_FRAME* aParent, + FOOTPRINT* aFootprint ) : + DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE( aParent ), m_netClearance( aParent, m_NetClearanceLabel, m_NetClearanceCtrl, m_NetClearanceUnits ), m_solderMask( aParent, m_SolderMaskMarginLabel, m_SolderMaskMarginCtrl, m_SolderMaskMarginUnits ), m_solderPaste( aParent, m_SolderPasteMarginLabel, m_SolderPasteMarginCtrl, m_SolderPasteMarginUnits ), @@ -159,13 +159,13 @@ DIALOG_FOOTPRINT_FP_EDITOR::DIALOG_FOOTPRINT_FP_EDITOR( FOOTPRINT_EDIT_FRAME* aP m_button3DShapeRemove->SetBitmap( KiBitmap( BITMAPS::small_trash ) ); // wxFormBuilder doesn't include this event... - m_itemsGrid->Connect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR::OnGridCellChanging ), NULL, this ); + m_itemsGrid->Connect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnGridCellChanging ), NULL, this ); finishDialogSettings(); } -DIALOG_FOOTPRINT_FP_EDITOR::~DIALOG_FOOTPRINT_FP_EDITOR() +DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::~DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR() { m_frame->GetSettings()->m_FootprintTextShownColumns = m_itemsGrid->GetShownColumns().ToStdString(); @@ -173,7 +173,7 @@ DIALOG_FOOTPRINT_FP_EDITOR::~DIALOG_FOOTPRINT_FP_EDITOR() // Prevents crash bug in wxGrid's d'tor m_itemsGrid->DestroyTable( m_texts ); - m_itemsGrid->Disconnect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR::OnGridCellChanging ), NULL, this ); + m_itemsGrid->Disconnect( wxEVT_GRID_CELL_CHANGING, wxGridEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnGridCellChanging ), NULL, this ); // Delete the GRID_TRICKS. m_itemsGrid->PopEventHandler( true ); @@ -191,7 +191,7 @@ DIALOG_FOOTPRINT_FP_EDITOR::~DIALOG_FOOTPRINT_FP_EDITOR() } -bool DIALOG_FOOTPRINT_FP_EDITOR::TransferDataToWindow() +bool DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataToWindow() { LIB_ID fpID = m_footprint->GetFPID(); wxString footprintName = fpID.GetLibItemName(); @@ -348,7 +348,7 @@ bool DIALOG_FOOTPRINT_FP_EDITOR::TransferDataToWindow() } -void DIALOG_FOOTPRINT_FP_EDITOR::select3DModel( int aModelIdx ) +void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::select3DModel( int aModelIdx ) { m_inSelect = true; @@ -367,14 +367,14 @@ void DIALOG_FOOTPRINT_FP_EDITOR::select3DModel( int aModelIdx ) } -void DIALOG_FOOTPRINT_FP_EDITOR::On3DModelSelected( wxGridEvent& aEvent ) +void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::On3DModelSelected( wxGridEvent& aEvent ) { if( !m_inSelect ) select3DModel( aEvent.GetRow() ); } -void DIALOG_FOOTPRINT_FP_EDITOR::On3DModelCellChanged( wxGridEvent& aEvent ) +void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::On3DModelCellChanged( wxGridEvent& aEvent ) { if( aEvent.GetCol() == 0 ) { @@ -419,7 +419,7 @@ void DIALOG_FOOTPRINT_FP_EDITOR::On3DModelCellChanged( wxGridEvent& aEvent ) } -void DIALOG_FOOTPRINT_FP_EDITOR::OnRemove3DModel( wxCommandEvent& ) +void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnRemove3DModel( wxCommandEvent& ) { if( !m_modelsGrid->CommitPendingChanges() ) return; @@ -437,7 +437,7 @@ void DIALOG_FOOTPRINT_FP_EDITOR::OnRemove3DModel( wxCommandEvent& ) } -void DIALOG_FOOTPRINT_FP_EDITOR::OnAdd3DModel( wxCommandEvent& ) +void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAdd3DModel( wxCommandEvent& ) { if( !m_modelsGrid->CommitPendingChanges() ) return; @@ -504,7 +504,7 @@ void DIALOG_FOOTPRINT_FP_EDITOR::OnAdd3DModel( wxCommandEvent& ) } -void DIALOG_FOOTPRINT_FP_EDITOR::OnAdd3DRow( wxCommandEvent& ) +void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAdd3DRow( wxCommandEvent& ) { if( !m_modelsGrid->CommitPendingChanges() ) return; @@ -529,7 +529,7 @@ void DIALOG_FOOTPRINT_FP_EDITOR::OnAdd3DRow( wxCommandEvent& ) } -bool DIALOG_FOOTPRINT_FP_EDITOR::checkFootprintName( const wxString& aFootprintName ) +bool DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::checkFootprintName( const wxString& aFootprintName ) { if( aFootprintName.IsEmpty() ) { @@ -547,7 +547,7 @@ bool DIALOG_FOOTPRINT_FP_EDITOR::checkFootprintName( const wxString& aFootprintN } -bool DIALOG_FOOTPRINT_FP_EDITOR::Validate() +bool DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::Validate() { if( !m_itemsGrid->CommitPendingChanges() ) return false; @@ -595,7 +595,7 @@ bool DIALOG_FOOTPRINT_FP_EDITOR::Validate() } -bool DIALOG_FOOTPRINT_FP_EDITOR::TransferDataFromWindow() +bool DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::TransferDataFromWindow() { if( !Validate() ) return false; @@ -729,13 +729,13 @@ static bool footprintIsFromBoard( FOOTPRINT* aFootprint ) } -void DIALOG_FOOTPRINT_FP_EDITOR::OnGridCellChanging( wxGridEvent& event ) +void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnGridCellChanging( wxGridEvent& event ) { // Currently: nothing to do } -void DIALOG_FOOTPRINT_FP_EDITOR::OnFootprintNameText( wxCommandEvent& event ) +void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnFootprintNameText( wxCommandEvent& event ) { if( !footprintIsFromBoard( m_footprint ) ) { @@ -744,7 +744,7 @@ void DIALOG_FOOTPRINT_FP_EDITOR::OnFootprintNameText( wxCommandEvent& event ) } -void DIALOG_FOOTPRINT_FP_EDITOR::OnAddField( wxCommandEvent& event ) +void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnAddField( wxCommandEvent& event ) { if( !m_itemsGrid->CommitPendingChanges() ) return; @@ -777,7 +777,7 @@ void DIALOG_FOOTPRINT_FP_EDITOR::OnAddField( wxCommandEvent& event ) } -void DIALOG_FOOTPRINT_FP_EDITOR::OnDeleteField( wxCommandEvent& event ) +void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnDeleteField( wxCommandEvent& event ) { if( !m_itemsGrid->CommitPendingChanges() ) return; @@ -806,14 +806,14 @@ void DIALOG_FOOTPRINT_FP_EDITOR::OnDeleteField( wxCommandEvent& event ) } -void DIALOG_FOOTPRINT_FP_EDITOR::Cfg3DPath( wxCommandEvent& event ) +void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::Cfg3DPath( wxCommandEvent& event ) { if( S3D::Configure3DPaths( this, Prj().Get3DCacheManager()->GetResolver() ) ) m_PreviewPane->UpdateDummyFootprint(); } -void DIALOG_FOOTPRINT_FP_EDITOR::adjustGridColumns( int aWidth ) +void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::adjustGridColumns( int aWidth ) { // Account for scroll bars int itemsWidth = aWidth - ( m_itemsGrid->GetSize().x - m_itemsGrid->GetClientSize().x ); @@ -832,7 +832,7 @@ void DIALOG_FOOTPRINT_FP_EDITOR::adjustGridColumns( int aWidth ) } -void DIALOG_FOOTPRINT_FP_EDITOR::OnUpdateUI( wxUpdateUIEvent& event ) +void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnUpdateUI( wxUpdateUIEvent& event ) { if( !m_itemsGrid->IsCellEditControlShown() && !m_modelsGrid->IsCellEditControlShown() ) adjustGridColumns( m_itemsGrid->GetRect().GetWidth() ); @@ -893,7 +893,7 @@ void DIALOG_FOOTPRINT_FP_EDITOR::OnUpdateUI( wxUpdateUIEvent& event ) } -void DIALOG_FOOTPRINT_FP_EDITOR::OnGridSize( wxSizeEvent& event ) +void DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR::OnGridSize( wxSizeEvent& event ) { adjustGridColumns( event.GetSize().GetX() ); diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.h b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.h similarity index 87% rename from pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.h rename to pcbnew/dialogs/dialog_footprint_properties_fp_editor.h index 0f77345a2c..09750b14be 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor.h +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor.h @@ -22,21 +22,21 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA */ -#ifndef DIALOG_EDIT_FOOTPRINT_FOR_FP_EDITOR_H -#define DIALOG_EDIT_FOOTPRINT_FOR_FP_EDITOR_H +#ifndef DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_H +#define DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_H #include #include #include #include -#include +#include class PANEL_PREV_3D; class FOOTPRINT_EDIT_FRAME; -class DIALOG_FOOTPRINT_FP_EDITOR : public DIALOG_FOOTPRINT_FP_EDITOR_BASE +class DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR : public DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE { private: FOOTPRINT_EDIT_FRAME* m_frame; @@ -65,8 +65,8 @@ private: public: // Constructor and destructor - DIALOG_FOOTPRINT_FP_EDITOR( FOOTPRINT_EDIT_FRAME* aParent, FOOTPRINT* aFootprint ); - ~DIALOG_FOOTPRINT_FP_EDITOR() override; + DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR( FOOTPRINT_EDIT_FRAME* aParent, FOOTPRINT* aFootprint ); + ~DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR() override; bool Validate() override; @@ -96,4 +96,4 @@ private: }; -#endif // DIALOG_EDIT_FOOTPRINT_FOR_FP_EDITOR_H +#endif // DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_H diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.cpp b/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.cpp similarity index 90% rename from pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.cpp rename to pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.cpp index e28fda98d7..b8713ec318 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.cpp +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.cpp @@ -8,11 +8,11 @@ #include "widgets/text_ctrl_eval.h" #include "widgets/wx_grid.h" -#include "dialog_edit_footprint_for_fp_editor_base.h" +#include "dialog_footprint_properties_fp_editor_base.h" /////////////////////////////////////////////////////////////////////////// -DIALOG_FOOTPRINT_FP_EDITOR_BASE::DIALOG_FOOTPRINT_FP_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) +DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style ) { this->SetSizeHints( wxDefaultSize, wxDefaultSize ); @@ -432,34 +432,34 @@ DIALOG_FOOTPRINT_FP_EDITOR_BASE::DIALOG_FOOTPRINT_FP_EDITOR_BASE( wxWindow* pare m_GeneralBoxSizer->Fit( this ); // Connect Events - this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnInitDlg ) ); - this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnUpdateUI ) ); - m_itemsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnGridSize ), NULL, this ); - m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAddField ), NULL, this ); - m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnDeleteField ), NULL, this ); - m_FootprintNameCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnFootprintNameText ), NULL, this ); - m_modelsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DModelCellChanged ), NULL, this ); - m_modelsGrid->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DModelSelected ), NULL, this ); - m_button3DShapeAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAdd3DRow ), NULL, this ); - m_button3DShapeBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAdd3DModel ), NULL, this ); - m_button3DShapeRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnRemove3DModel ), NULL, this ); - m_buttonConfig3DPaths->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Cfg3DPath ), NULL, this ); + this->Connect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnInitDlg ) ); + this->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnUpdateUI ) ); + m_itemsGrid->Connect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnGridSize ), NULL, this ); + m_bpAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnAddField ), NULL, this ); + m_bpDelete->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnDeleteField ), NULL, this ); + m_FootprintNameCtrl->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnFootprintNameText ), NULL, this ); + m_modelsGrid->Connect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::On3DModelCellChanged ), NULL, this ); + m_modelsGrid->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::On3DModelSelected ), NULL, this ); + m_button3DShapeAdd->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnAdd3DRow ), NULL, this ); + m_button3DShapeBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnAdd3DModel ), NULL, this ); + m_button3DShapeRemove->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnRemove3DModel ), NULL, this ); + m_buttonConfig3DPaths->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::Cfg3DPath ), NULL, this ); } -DIALOG_FOOTPRINT_FP_EDITOR_BASE::~DIALOG_FOOTPRINT_FP_EDITOR_BASE() +DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::~DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE() { // Disconnect Events - this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnInitDlg ) ); - this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnUpdateUI ) ); - m_itemsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnGridSize ), NULL, this ); - m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAddField ), NULL, this ); - m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnDeleteField ), NULL, this ); - m_FootprintNameCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnFootprintNameText ), NULL, this ); - m_modelsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DModelCellChanged ), NULL, this ); - m_modelsGrid->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::On3DModelSelected ), NULL, this ); - m_button3DShapeAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAdd3DRow ), NULL, this ); - m_button3DShapeBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnAdd3DModel ), NULL, this ); - m_button3DShapeRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::OnRemove3DModel ), NULL, this ); - m_buttonConfig3DPaths->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_FP_EDITOR_BASE::Cfg3DPath ), NULL, this ); + this->Disconnect( wxEVT_INIT_DIALOG, wxInitDialogEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnInitDlg ) ); + this->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnUpdateUI ) ); + m_itemsGrid->Disconnect( wxEVT_SIZE, wxSizeEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnGridSize ), NULL, this ); + m_bpAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnAddField ), NULL, this ); + m_bpDelete->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnDeleteField ), NULL, this ); + m_FootprintNameCtrl->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnFootprintNameText ), NULL, this ); + m_modelsGrid->Disconnect( wxEVT_GRID_CELL_CHANGED, wxGridEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::On3DModelCellChanged ), NULL, this ); + m_modelsGrid->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::On3DModelSelected ), NULL, this ); + m_button3DShapeAdd->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnAdd3DRow ), NULL, this ); + m_button3DShapeBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnAdd3DModel ), NULL, this ); + m_button3DShapeRemove->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::OnRemove3DModel ), NULL, this ); + m_buttonConfig3DPaths->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE::Cfg3DPath ), NULL, this ); } diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.fbp b/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.fbp similarity index 99% rename from pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.fbp rename to pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.fbp index 9d3cb4ecd5..00893b0694 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.fbp +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.fbp @@ -11,12 +11,12 @@ res UTF-8 connect - dialog_edit_footprint_for_fp_editor_base + dialog_footprint_properties_fp_editor_base 1000 none 1 - dialog_edit_footprint_for_fp_editor_base + dialog_footprint_properties_fp_editor_base . @@ -43,7 +43,7 @@ wxID_ANY - DIALOG_FOOTPRINT_FP_EDITOR_BASE + DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE -1,-1 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER diff --git a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.h b/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.h similarity index 90% rename from pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.h rename to pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.h index 0ecdaa0d1c..b38cdbe47d 100644 --- a/pcbnew/dialogs/dialog_edit_footprint_for_fp_editor_base.h +++ b/pcbnew/dialogs/dialog_footprint_properties_fp_editor_base.h @@ -42,9 +42,9 @@ class WX_GRID; #define ID_NOTEBOOK 1000 /////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_FOOTPRINT_FP_EDITOR_BASE +/// Class DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_FOOTPRINT_FP_EDITOR_BASE : public DIALOG_SHIM +class DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE : public DIALOG_SHIM { private: wxBoxSizer* m_GeneralBoxSizer; @@ -121,8 +121,8 @@ class DIALOG_FOOTPRINT_FP_EDITOR_BASE : public DIALOG_SHIM public: - DIALOG_FOOTPRINT_FP_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_FOOTPRINT_FP_EDITOR_BASE(); + DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint Properties"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR_BASE(); }; diff --git a/pcbnew/footprint_editor_utils.cpp b/pcbnew/footprint_editor_utils.cpp index ef29477523..2e51ac2003 100644 --- a/pcbnew/footprint_editor_utils.cpp +++ b/pcbnew/footprint_editor_utils.cpp @@ -22,7 +22,7 @@ */ #include -#include +#include #include #include #include @@ -139,7 +139,7 @@ void FOOTPRINT_EDIT_FRAME::editFootprintProperties( FOOTPRINT* aFootprint ) { LIB_ID oldFPID = aFootprint->GetFPID(); - DIALOG_FOOTPRINT_FP_EDITOR dialog( this, aFootprint ); + DIALOG_FOOTPRINT_PROPERTIES_FP_EDITOR dialog( this, aFootprint ); dialog.ShowModal(); // Update library tree