From deed1d67b37d67295e62374b99e51bcd6c68a173 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Sat, 7 Jul 2018 17:46:23 +0100 Subject: [PATCH] Make SMD terminology consistent. Fixes: lp:1656688 * https://bugs.launchpad.net/kicad/+bug/1656688 (cherry picked from commit 2946163) --- ...ialog_gen_footprint_position_file_base.cpp | 19 +++----- ...ialog_gen_footprint_position_file_base.fbp | 48 +++++++++---------- .../dialog_gen_footprint_position_file_base.h | 3 +- pcbnew/exporters/gen_footprints_placefile.cpp | 6 +-- 4 files changed, 35 insertions(+), 41 deletions(-) diff --git a/pcbnew/dialogs/dialog_gen_footprint_position_file_base.cpp b/pcbnew/dialogs/dialog_gen_footprint_position_file_base.cpp index dcfacb2b73..1a38e98103 100644 --- a/pcbnew/dialogs/dialog_gen_footprint_position_file_base.cpp +++ b/pcbnew/dialogs/dialog_gen_footprint_position_file_base.cpp @@ -55,7 +55,7 @@ DIALOG_GEN_FOOTPRINT_POSITION_BASE::DIALOG_GEN_FOOTPRINT_POSITION_BASE( wxWindow bSizer71->Add( m_rbFormat, 1, wxALL, 5 ); - wxString m_radioBoxUnitsChoices[] = { _("Inches"), _("mm") }; + wxString m_radioBoxUnitsChoices[] = { _("Inches"), _("Millimeters") }; int m_radioBoxUnitsNChoices = sizeof( m_radioBoxUnitsChoices ) / sizeof( wxString ); m_radioBoxUnits = new wxRadioBox( this, wxID_ANY, _("Units"), wxDefaultPosition, wxDefaultSize, m_radioBoxUnitsNChoices, m_radioBoxUnitsChoices, 1, wxRA_SPECIFY_COLS ); m_radioBoxUnits->SetSelection( 0 ); @@ -63,35 +63,30 @@ DIALOG_GEN_FOOTPRINT_POSITION_BASE::DIALOG_GEN_FOOTPRINT_POSITION_BASE( wxWindow bSizer71->Add( m_radioBoxUnits, 1, wxALL, 5 ); - wxString m_radioBoxFilesCountChoices[] = { _("One file per side"), _("Single file for board") }; + wxString m_radioBoxFilesCountChoices[] = { _("Separate files for front and back"), _("Single file for board") }; int m_radioBoxFilesCountNChoices = sizeof( m_radioBoxFilesCountChoices ) / sizeof( wxString ); m_radioBoxFilesCount = new wxRadioBox( this, wxID_ANY, _("Files"), wxDefaultPosition, wxDefaultSize, m_radioBoxFilesCountNChoices, m_radioBoxFilesCountChoices, 1, wxRA_SPECIFY_COLS ); - m_radioBoxFilesCount->SetSelection( 1 ); + m_radioBoxFilesCount->SetSelection( 0 ); m_radioBoxFilesCount->SetToolTip( _("Creates 2 files: one for each board side or\nCreates only one file containing all footprints to place\n") ); bSizer71->Add( m_radioBoxFilesCount, 2, wxALL, 5 ); - wxString m_radioBoxForceSmdChoices[] = { _("Footprints with INSERT attribute set"), _("All SMD footprints") }; - int m_radioBoxForceSmdNChoices = sizeof( m_radioBoxForceSmdChoices ) / sizeof( wxString ); - m_radioBoxForceSmd = new wxRadioBox( this, wxID_ANY, _("Include"), wxDefaultPosition, wxDefaultSize, m_radioBoxForceSmdNChoices, m_radioBoxForceSmdChoices, 1, wxRA_SPECIFY_COLS ); - m_radioBoxForceSmd->SetSelection( 0 ); - m_radioBoxForceSmd->SetToolTip( _("Only footprints with option INSERT are listed in placement file.\nThis option can force this option for all footprints having only SMD pads.\nWarning: this options will modify the board.") ); - - bSizer71->Add( m_radioBoxForceSmd, 3, wxALL, 5 ); - m_MainSizer->Add( bSizer71, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); wxBoxSizer* bSizer7; bSizer7 = new wxBoxSizer( wxVERTICAL ); + m_forceSMDOpt = new wxCheckBox( this, wxID_ANY, _("Include footprints with SMD pads even if not marked Surface Mount"), wxDefaultPosition, wxDefaultSize, 0 ); + bSizer7->Add( m_forceSMDOpt, 0, wxALL, 5 ); + m_messagesPanel = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL ); m_messagesPanel->SetMinSize( wxSize( 300,150 ) ); bSizer7->Add( m_messagesPanel, 1, wxEXPAND | wxALL, 5 ); - m_MainSizer->Add( bSizer7, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + m_MainSizer->Add( bSizer7, 1, wxEXPAND|wxRIGHT|wxLEFT, 5 ); m_sdbSizer1 = new wxStdDialogButtonSizer(); m_sdbSizer1OK = new wxButton( this, wxID_OK ); diff --git a/pcbnew/dialogs/dialog_gen_footprint_position_file_base.fbp b/pcbnew/dialogs/dialog_gen_footprint_position_file_base.fbp index 39db999ce8..68b4b0664d 100644 --- a/pcbnew/dialogs/dialog_gen_footprint_position_file_base.fbp +++ b/pcbnew/dialogs/dialog_gen_footprint_position_file_base.fbp @@ -499,7 +499,7 @@ 1 0 - "Inches" "mm" + "Inches" "Millimeters" 1 1 @@ -589,7 +589,7 @@ 1 0 - "One file per side" "Single file for board" + "Separate files for front and back" "Single file for board" 1 1 @@ -621,7 +621,7 @@ 1 Resizable - 1 + 0 1 wxRA_SPECIFY_COLS @@ -661,11 +661,22 @@ + + + + 5 + wxEXPAND|wxRIGHT|wxLEFT + 1 + + + bSizer7 + wxVERTICAL + none 5 wxALL - 3 - + 0 + 1 1 1 @@ -679,7 +690,7 @@ 1 0 - "Footprints with INSERT attribute set" "All SMD footprints" + 0 1 1 @@ -694,8 +705,7 @@ 0 0 wxID_ANY - Include - 1 + Include footprints with SMD pads even if not marked Surface Mount 0 @@ -703,7 +713,7 @@ 0 1 - m_radioBoxForceSmd + m_forceSMDOpt 1 @@ -711,13 +721,12 @@ 1 Resizable - 0 1 - wxRA_SPECIFY_COLS - + + ; forward_declare 0 - Only footprints with option INSERT are listed in placement file. This option can force this option for all footprints having only SMD pads. Warning: this options will modify the board. + wxFILTER_NONE wxDefaultValidator @@ -726,6 +735,7 @@ + @@ -742,7 +752,6 @@ - @@ -751,17 +760,6 @@ - - - - 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 1 - - - bSizer7 - wxVERTICAL - none 5 wxEXPAND | wxALL diff --git a/pcbnew/dialogs/dialog_gen_footprint_position_file_base.h b/pcbnew/dialogs/dialog_gen_footprint_position_file_base.h index 7d321651c5..46f454eecf 100644 --- a/pcbnew/dialogs/dialog_gen_footprint_position_file_base.h +++ b/pcbnew/dialogs/dialog_gen_footprint_position_file_base.h @@ -28,6 +28,7 @@ class WX_HTML_REPORT_PANEL; #include #include #include +#include #include #include @@ -48,7 +49,7 @@ class DIALOG_GEN_FOOTPRINT_POSITION_BASE : public DIALOG_SHIM wxRadioBox* m_rbFormat; wxRadioBox* m_radioBoxUnits; wxRadioBox* m_radioBoxFilesCount; - wxRadioBox* m_radioBoxForceSmd; + wxCheckBox* m_forceSMDOpt; WX_HTML_REPORT_PANEL* m_messagesPanel; wxStdDialogButtonSizer* m_sdbSizer1; wxButton* m_sdbSizer1OK; diff --git a/pcbnew/exporters/gen_footprints_placefile.cpp b/pcbnew/exporters/gen_footprints_placefile.cpp index 4984c26858..f88108dcd9 100644 --- a/pcbnew/exporters/gen_footprints_placefile.cpp +++ b/pcbnew/exporters/gen_footprints_placefile.cpp @@ -89,8 +89,8 @@ public: /** - * The dialog to create footprint position files, - * and choose options (one or 2 files, units and force all SMD footprints in list) + * The dialog to create footprint position files and choose options (one or 2 files, units + * and force all SMD footprints in list) */ class DIALOG_GEN_FOOTPRINT_POSITION : public DIALOG_GEN_FOOTPRINT_POSITION_BASE { @@ -149,7 +149,7 @@ private: bool ForceAllSmd() { - return m_radioBoxForceSmd->GetSelection() == 1; + return m_forceSMDOpt->GetValue(); } };