From cdbe2fd2d2013a2edf06a3a24582676d652f4e93 Mon Sep 17 00:00:00 2001 From: Jeff Young Date: Tue, 15 Sep 2020 23:52:53 +0100 Subject: [PATCH] User terminology specific to Change Footprint/Symbol. Also implements separate session settings for the reset checkboxes for Change Footprint and Update Footprint. Fixes https://gitlab.com/kicad/code/kicad/issues/5614 --- eeschema/dialogs/dialog_change_symbols.cpp | 19 +- .../dialogs/dialog_change_symbols_base.cpp | 51 +- .../dialogs/dialog_change_symbols_base.fbp | 1289 +++++++++-------- eeschema/dialogs/dialog_change_symbols_base.h | 2 +- pcbnew/dialogs/dialog_exchange_footprints.cpp | 43 +- .../dialog_exchange_footprints_base.cpp | 8 +- .../dialog_exchange_footprints_base.fbp | 8 +- 7 files changed, 740 insertions(+), 680 deletions(-) diff --git a/eeschema/dialogs/dialog_change_symbols.cpp b/eeschema/dialogs/dialog_change_symbols.cpp index c481d99780..281ca670ee 100644 --- a/eeschema/dialogs/dialog_change_symbols.cpp +++ b/eeschema/dialogs/dialog_change_symbols.cpp @@ -52,7 +52,9 @@ DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS( SCH_EDIT_FRAME* aParent, SCH_COMPO { wxASSERT( aParent ); wxString label; - wxString verb = ( m_mode == MODE::UPDATE ) ? _( "Update" ) : _( "Change" ); + wxString verb = ( m_mode == MODE::UPDATE ) ? _( "Update" ) : _( "Change" ); + wxString reset = ( m_mode == MODE::UPDATE ) ? _( "Reset" ) : _( "Update" ); + wxString library = ( m_mode == MODE::UPDATE ) ? _( "library" ) : _( "new" ); label.Printf( m_matchAll->GetLabel(), verb ); @@ -111,6 +113,21 @@ DIALOG_CHANGE_SYMBOLS::DIALOG_CHANGE_SYMBOLS( SCH_EDIT_FRAME* aParent, SCH_COMPO m_matchByReference->SetValue( true ); } + label.Printf( m_removeExtraBox->GetLabel(), library ); + m_removeExtraBox->SetLabel( label ); + + label.Printf( m_resetEmptyFields->GetLabel(), library ); + m_resetEmptyFields->SetLabel( label ); + + label.Printf( m_resetFieldVisibilities->GetLabel(), reset ); + m_resetFieldVisibilities->SetLabel( label ); + + label.Printf( m_resetFieldEffects->GetLabel(), reset ); + m_resetFieldEffects->SetLabel( label ); + + label.Printf( m_resetFieldPositions->GetLabel(), reset ); + m_resetFieldPositions->SetLabel( label ); + m_removeExtraBox->SetValue( g_removeExtraFields ); m_resetEmptyFields->SetValue( g_resetEmptyFields ); m_resetFieldVisibilities->SetValue( g_resetFieldVisibilities ); diff --git a/eeschema/dialogs/dialog_change_symbols_base.cpp b/eeschema/dialogs/dialog_change_symbols_base.cpp index 0ef0d10ef4..359efe4963 100644 --- a/eeschema/dialogs/dialog_change_symbols_base.cpp +++ b/eeschema/dialogs/dialog_change_symbols_base.cpp @@ -17,45 +17,54 @@ DIALOG_CHANGE_SYMBOLS_BASE::DIALOG_CHANGE_SYMBOLS_BASE( wxWindow* parent, wxWind m_mainSizer = new wxBoxSizer( wxVERTICAL ); - m_matchSizer = new wxGridBagSizer( 5, 5 ); + wxBoxSizer* matchSizerMargins; + matchSizerMargins = new wxBoxSizer( wxVERTICAL ); + + m_matchSizer = new wxGridBagSizer( 3, 5 ); m_matchSizer->SetFlexibleDirection( wxBOTH ); m_matchSizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED ); m_matchAll = new wxRadioButton( this, wxID_ANY, _("%s all symbols in schematic"), wxDefaultPosition, wxDefaultSize, 0 ); - m_matchSizer->Add( m_matchAll, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 5 ); + m_matchSizer->Add( m_matchAll, wxGBPosition( 0, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); m_matchBySelection = new wxRadioButton( this, wxID_ANY, _("%s selected symbol"), wxDefaultPosition, wxDefaultSize, 0 ); - m_matchSizer->Add( m_matchBySelection, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT, 3 ); + m_matchSizer->Add( m_matchBySelection, wxGBPosition( 1, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 5 ); m_matchByReference = new wxRadioButton( this, wxID_ANY, _("%s by reference:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_matchSizer->Add( m_matchByReference, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_matchSizer->Add( m_matchByReference, wxGBPosition( 2, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxBOTTOM, 2 ); m_specifiedReference = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxSize( 200,-1 ), wxTE_PROCESS_ENTER ); - m_matchSizer->Add( m_specifiedReference, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); + m_matchSizer->Add( m_specifiedReference, wxGBPosition( 2, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM, 2 ); m_matchByValue = new wxRadioButton( this, wxID_ANY, _("%s by value:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_matchSizer->Add( m_matchByValue, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxLEFT, 5 ); + m_matchSizer->Add( m_matchByValue, wxGBPosition( 3, 0 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); m_specifiedValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); m_matchSizer->Add( m_specifiedValue, wxGBPosition( 3, 1 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_matchById = new wxRadioButton( this, wxID_ANY, _("%s by library indentifier:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_matchSizer->Add( m_matchById, wxGBPosition( 4, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT, 5 ); + m_matchSizer->Add( m_matchById, wxGBPosition( 4, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxTOP, 6 ); m_specifiedId = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_PROCESS_ENTER ); - m_matchSizer->Add( m_specifiedId, wxGBPosition( 5, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT, 5 ); + m_matchSizer->Add( m_specifiedId, wxGBPosition( 5, 0 ), wxGBSpan( 1, 2 ), wxALIGN_CENTER_VERTICAL|wxEXPAND, 5 ); m_matchIdBrowserButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - m_matchSizer->Add( m_matchIdBrowserButton, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL, 5 ); + m_matchSizer->Add( m_matchIdBrowserButton, wxGBPosition( 5, 2 ), wxGBSpan( 1, 1 ), wxALIGN_CENTER_VERTICAL|wxRIGHT, 3 ); m_matchSizer->AddGrowableCol( 1 ); m_matchSizer->AddGrowableRow( 1 ); - m_mainSizer->Add( m_matchSizer, 0, wxALL|wxEXPAND, 5 ); + matchSizerMargins->Add( m_matchSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + + + m_mainSizer->Add( matchSizerMargins, 0, wxEXPAND|wxLEFT, 5 ); + + + m_mainSizer->Add( 0, 8, 0, wxEXPAND, 5 ); m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - m_mainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + m_mainSizer->Add( m_staticline1, 0, wxEXPAND|wxALL, 4 ); m_newIdSizer = new wxBoxSizer( wxVERTICAL ); @@ -71,38 +80,38 @@ DIALOG_CHANGE_SYMBOLS_BASE::DIALOG_CHANGE_SYMBOLS_BASE( wxWindow* parent, wxWind bSizer1->Add( m_newId, 1, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); m_newIdBrowserButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 ); - bSizer1->Add( m_newIdBrowserButton, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 2 ); + bSizer1->Add( m_newIdBrowserButton, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT, 5 ); - m_newIdSizer->Add( bSizer1, 0, wxEXPAND|wxBOTTOM, 5 ); + m_newIdSizer->Add( bSizer1, 0, wxEXPAND|wxTOP|wxBOTTOM, 2 ); - m_mainSizer->Add( m_newIdSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); + m_mainSizer->Add( m_newIdSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); m_updateOptionsSizer = new wxStaticBoxSizer( new wxStaticBox( this, wxID_ANY, _("Update Options") ), wxVERTICAL ); - m_removeExtraBox = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Remove fields which are not in library symbol"), wxDefaultPosition, wxDefaultSize, 0 ); + m_removeExtraBox = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Remove fields which are not in %s symbol"), wxDefaultPosition, wxDefaultSize, 0 ); m_removeExtraBox->SetToolTip( _("Removes fields that do not occur in the original library symbols") ); m_updateOptionsSizer->Add( m_removeExtraBox, 0, wxBOTTOM|wxRIGHT, 4 ); - m_resetEmptyFields = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset fields which are empty in library"), wxDefaultPosition, wxDefaultSize, 0 ); + m_resetEmptyFields = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset fields which are empty in %s symbol"), wxDefaultPosition, wxDefaultSize, 0 ); m_updateOptionsSizer->Add( m_resetEmptyFields, 0, wxBOTTOM|wxRIGHT, 4 ); - m_updateOptionsSizer->Add( 0, 6, 0, wxEXPAND, 5 ); + m_updateOptionsSizer->Add( 0, 10, 0, wxEXPAND, 5 ); - m_resetFieldVisibilities = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset field visibilities"), wxDefaultPosition, wxDefaultSize, 0 ); + m_resetFieldVisibilities = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("%s field visibilities"), wxDefaultPosition, wxDefaultSize, 0 ); m_updateOptionsSizer->Add( m_resetFieldVisibilities, 0, wxBOTTOM|wxRIGHT, 4 ); - m_resetFieldEffects = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset field sizes and styles"), wxDefaultPosition, wxDefaultSize, 0 ); + m_resetFieldEffects = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("%s field sizes and styles"), wxDefaultPosition, wxDefaultSize, 0 ); m_updateOptionsSizer->Add( m_resetFieldEffects, 0, wxBOTTOM|wxRIGHT, 4 ); - m_resetFieldPositions = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset field positions"), wxDefaultPosition, wxDefaultSize, 0 ); + m_resetFieldPositions = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("%s field positions"), wxDefaultPosition, wxDefaultSize, 0 ); m_updateOptionsSizer->Add( m_resetFieldPositions, 0, wxBOTTOM|wxRIGHT, 4 ); - m_mainSizer->Add( m_updateOptionsSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 10 ); + m_mainSizer->Add( m_updateOptionsSizer, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 8 ); wxBoxSizer* bSizer2; bSizer2 = new wxBoxSizer( wxVERTICAL ); diff --git a/eeschema/dialogs/dialog_change_symbols_base.fbp b/eeschema/dialogs/dialog_change_symbols_base.fbp index e5cbd7a6db..847c462af4 100644 --- a/eeschema/dialogs/dialog_change_symbols_base.fbp +++ b/eeschema/dialogs/dialog_change_symbols_base.fbp @@ -60,639 +60,660 @@ protected 5 - wxALL|wxEXPAND + wxEXPAND|wxLEFT 0 - - - wxBOTH - 1 - 1 - 5 + - m_matchSizer - wxFLEX_GROWMODE_SPECIFIED - protected - 5 - + matchSizerMargins + wxVERTICAL + none + 5 - 2 - 0 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT - 0 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - %s all symbols in schematic - - 0 - - - 0 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 0 + + + wxBOTH + 1 + 1 + 5 - 1 - m_matchAll - 1 - - + m_matchSizer + wxFLEX_GROWMODE_SPECIFIED protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - - - - 3 - 1 - 0 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxLEFT - 1 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - %s selected symbol - - 0 - - - 0 - - 1 - m_matchBySelection - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - - - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL|wxLEFT - 2 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - %s by reference: - - 0 - - - 0 - - 1 - m_matchByReference - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - onMatchByReference - - - - 5 - 1 - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 2 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_specifiedReference - 1 - - - protected - 1 - - Resizable - 1 - 200,-1 - wxTE_PROCESS_ENTER - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - 1 - 0 - wxALIGN_CENTER_VERTICAL|wxLEFT - 3 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - %s by value: - - 0 - - - 0 - - 1 - m_matchByValue - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - onMatchByValue - - - - 5 - 1 - 1 - wxALIGN_CENTER_VERTICAL|wxEXPAND - 3 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_specifiedValue - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_PROCESS_ENTER - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - 2 - 0 - wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT - 4 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - %s by library indentifier: - - 0 - - - 0 - - 1 - m_matchById - 1 - - - protected - 1 - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - 0 - - - - onMatchById - - - - 5 - 2 - 0 - wxALIGN_CENTER_VERTICAL|wxEXPAND|wxLEFT - 5 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - - 0 - - 1 - m_specifiedId - 1 - - - protected - 1 - - Resizable - 1 - - wxTE_PROCESS_ENTER - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - 5 - 1 - 2 - wxALIGN_CENTER_VERTICAL - 5 - 1 - - 1 - 1 - 1 - 1 - - - - - - - - - 1 - 0 - 1 - - 1 - - 0 - 0 - - Dock - 0 - Left - 1 - - 1 - - - 0 - 0 - wxID_ANY - MyButton - - 0 - - 0 - - - 0 - - 1 - m_matchIdBrowserButton - 1 - - - protected - 1 - - - - Resizable - 1 - - - ; ; forward_declare - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - launchMatchIdSymbolBrowser + 3 + + 5 + 2 + 0 + wxALIGN_CENTER_VERTICAL|wxBOTTOM + 0 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + %s all symbols in schematic + + 0 + + + 0 + + 1 + m_matchAll + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxBOTTOM + 1 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + %s selected symbol + + 0 + + + 0 + + 1 + m_matchBySelection + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + + + + 2 + 1 + 0 + wxALIGN_CENTER_VERTICAL|wxBOTTOM + 2 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + %s by reference: + + 0 + + + 0 + + 1 + m_matchByReference + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + onMatchByReference + + + + 2 + 1 + 1 + wxALIGN_CENTER_VERTICAL|wxEXPAND|wxBOTTOM + 2 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_specifiedReference + 1 + + + protected + 1 + + Resizable + 1 + 200,-1 + wxTE_PROCESS_ENTER + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 5 + 1 + 0 + wxALIGN_CENTER_VERTICAL + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + %s by value: + + 0 + + + 0 + + 1 + m_matchByValue + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + onMatchByValue + + + + 5 + 1 + 1 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 3 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_specifiedValue + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_PROCESS_ENTER + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 6 + 2 + 0 + wxALIGN_CENTER_VERTICAL|wxTOP + 4 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + %s by library indentifier: + + 0 + + + 0 + + 1 + m_matchById + 1 + + + protected + 1 + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + 0 + + + + onMatchById + + + + 5 + 2 + 0 + wxALIGN_CENTER_VERTICAL|wxEXPAND + 5 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + + 0 + + + + 0 + + 1 + m_specifiedId + 1 + + + protected + 1 + + Resizable + 1 + + wxTE_PROCESS_ENTER + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + 3 + 1 + 2 + wxALIGN_CENTER_VERTICAL|wxRIGHT + 5 + 1 + + 1 + 1 + 1 + 1 + + + + + + + + + 1 + 0 + 1 + + 1 + + 0 + 0 + + Dock + 0 + Left + 1 + + 1 + + + 0 + 0 + wxID_ANY + MyButton + + 0 + + 0 + + + 0 + + 1 + m_matchIdBrowserButton + 1 + + + protected + 1 + + + + Resizable + 1 + + + ; ; forward_declare + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + launchMatchIdSymbolBrowser + + 5 - wxEXPAND | wxALL + wxEXPAND + 0 + + 8 + protected + 0 + + + + 4 + wxEXPAND|wxALL 0 1 @@ -750,7 +771,7 @@ 5 - wxEXPAND|wxRIGHT|wxLEFT + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 @@ -819,8 +840,8 @@ - 5 - wxEXPAND|wxBOTTOM + 2 + wxEXPAND|wxTOP|wxBOTTOM 0 @@ -892,7 +913,7 @@ - 2 + 5 wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxRIGHT 0 @@ -969,8 +990,8 @@ - 10 - wxEXPAND|wxRIGHT|wxLEFT + 8 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT 0 wxID_ANY @@ -1013,7 +1034,7 @@ 0 0 wxID_ANY - Remove fields which are not in library symbol + Remove fields which are not in %s symbol 0 @@ -1077,7 +1098,7 @@ 0 0 wxID_ANY - Reset fields which are empty in library + Reset fields which are empty in %s symbol 0 @@ -1113,7 +1134,7 @@ wxEXPAND 0 - 6 + 10 protected 0 @@ -1151,7 +1172,7 @@ 0 0 wxID_ANY - Reset field visibilities + %s field visibilities 0 @@ -1215,7 +1236,7 @@ 0 0 wxID_ANY - Reset field sizes and styles + %s field sizes and styles 0 @@ -1279,7 +1300,7 @@ 0 0 wxID_ANY - Reset field positions + %s field positions 0 diff --git a/eeschema/dialogs/dialog_change_symbols_base.h b/eeschema/dialogs/dialog_change_symbols_base.h index ae5c041f65..deda123af5 100644 --- a/eeschema/dialogs/dialog_change_symbols_base.h +++ b/eeschema/dialogs/dialog_change_symbols_base.h @@ -26,9 +26,9 @@ class WX_HTML_REPORT_PANEL; #include #include #include +#include #include #include -#include #include #include #include diff --git a/pcbnew/dialogs/dialog_exchange_footprints.cpp b/pcbnew/dialogs/dialog_exchange_footprints.cpp index ebf70cc402..5138626698 100644 --- a/pcbnew/dialogs/dialog_exchange_footprints.cpp +++ b/pcbnew/dialogs/dialog_exchange_footprints.cpp @@ -51,11 +51,11 @@ int g_matchModeForUpdateSelected = ID_MATCH_FP_SELECTED; int g_matchModeForExchange = ID_MATCH_FP_REF; int g_matchModeForExchangeSelected = ID_MATCH_FP_SELECTED; -bool g_removeExtraTextItems = false; -bool g_resetTextItemLayers = false; -bool g_resetTextItemEffects = false; -bool g_resetFabricationAttrs = false; -bool g_reset3DModels = false; +bool g_removeExtraTextItems[2] = { false, false }; +bool g_resetTextItemLayers[2] = { false, true }; +bool g_resetTextItemEffects[2] = { false, true }; +bool g_resetFabricationAttrs[2] = { false, true }; +bool g_reset3DModels[2] = { false, true }; DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent, MODULE* aModule, @@ -68,6 +68,7 @@ DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent, { wxString title = updateMode ? _( "Update Footprints from Library" ) : _( "Change Footprints" ); wxString verb = updateMode ? _( "Update" ) : _( "Change" ); + wxString reset = updateMode ? _( "Reset" ) : _( "Update" ); wxString label; SetTitle( title ); @@ -137,11 +138,23 @@ DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent, default: break; } - m_removeExtraBox->SetValue( g_removeExtraTextItems ); - m_resetTextItemLayers->SetValue( g_resetTextItemLayers ); - m_resetTextItemEffects->SetValue( g_resetTextItemEffects ); - m_resetFabricationAttrs->SetValue( g_resetFabricationAttrs ); - m_reset3DModels->SetValue( g_reset3DModels ); + label.Printf( m_resetTextItemLayers->GetLabel(), reset ); + m_resetTextItemLayers->SetLabel( label ); + + label.Printf( m_resetTextItemEffects->GetLabel(), reset ); + m_resetTextItemEffects->SetLabel( label ); + + label.Printf( m_resetFabricationAttrs->GetLabel(), reset ); + m_resetFabricationAttrs->SetLabel( label ); + + label.Printf( m_reset3DModels->GetLabel(), reset ); + m_reset3DModels->SetLabel( label ); + + m_removeExtraBox->SetValue( g_removeExtraTextItems[ m_updateMode ? 0 : 1 ] ); + m_resetTextItemLayers->SetValue( g_resetTextItemLayers[ m_updateMode ? 0 : 1 ] ); + m_resetTextItemEffects->SetValue( g_resetTextItemEffects[ m_updateMode ? 0 : 1 ] ); + m_resetFabricationAttrs->SetValue( g_resetFabricationAttrs[ m_updateMode ? 0 : 1 ] ); + m_reset3DModels->SetValue( g_reset3DModels[ m_updateMode ? 0 : 1 ] ); m_MessageWindow->SetLazyUpdate( true ); @@ -162,11 +175,11 @@ DIALOG_EXCHANGE_FOOTPRINTS::DIALOG_EXCHANGE_FOOTPRINTS( PCB_EDIT_FRAME* aParent, DIALOG_EXCHANGE_FOOTPRINTS::~DIALOG_EXCHANGE_FOOTPRINTS() { - g_removeExtraTextItems = m_removeExtraBox->GetValue(); - g_resetTextItemLayers = m_resetTextItemLayers->GetValue(); - g_resetTextItemEffects = m_resetTextItemEffects->GetValue(); - g_resetFabricationAttrs = m_resetFabricationAttrs->GetValue(); - g_reset3DModels = m_reset3DModels->GetValue(); + g_removeExtraTextItems[ m_updateMode ? 0 : 1 ] = m_removeExtraBox->GetValue(); + g_resetTextItemLayers[ m_updateMode ? 0 : 1 ] = m_resetTextItemLayers->GetValue(); + g_resetTextItemEffects[ m_updateMode ? 0 : 1 ] = m_resetTextItemEffects->GetValue(); + g_resetFabricationAttrs[ m_updateMode ? 0 : 1 ] = m_resetFabricationAttrs->GetValue(); + g_reset3DModels[ m_updateMode ? 0 : 1 ] = m_reset3DModels->GetValue(); } diff --git a/pcbnew/dialogs/dialog_exchange_footprints_base.cpp b/pcbnew/dialogs/dialog_exchange_footprints_base.cpp index 4eaa71f3fe..6daea12a46 100644 --- a/pcbnew/dialogs/dialog_exchange_footprints_base.cpp +++ b/pcbnew/dialogs/dialog_exchange_footprints_base.cpp @@ -98,16 +98,16 @@ DIALOG_EXCHANGE_FOOTPRINTS_BASE::DIALOG_EXCHANGE_FOOTPRINTS_BASE( wxWindow* pare m_updateOptionsSizer->Add( m_removeExtraBox, 0, wxBOTTOM|wxRIGHT, 5 ); - m_resetTextItemLayers = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset text layers and visibilities"), wxDefaultPosition, wxDefaultSize, 0 ); + m_resetTextItemLayers = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("%s text layers and visibilities"), wxDefaultPosition, wxDefaultSize, 0 ); m_updateOptionsSizer->Add( m_resetTextItemLayers, 0, wxBOTTOM|wxRIGHT, 5 ); - m_resetTextItemEffects = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset text sizes, styles and positions"), wxDefaultPosition, wxDefaultSize, 0 ); + m_resetTextItemEffects = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("%s text sizes, styles and positions"), wxDefaultPosition, wxDefaultSize, 0 ); m_updateOptionsSizer->Add( m_resetTextItemEffects, 0, wxBOTTOM|wxRIGHT, 5 ); - m_resetFabricationAttrs = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset fabrication attributes"), wxDefaultPosition, wxDefaultSize, 0 ); + m_resetFabricationAttrs = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("%s fabrication attributes"), wxDefaultPosition, wxDefaultSize, 0 ); m_updateOptionsSizer->Add( m_resetFabricationAttrs, 0, wxBOTTOM|wxRIGHT, 5 ); - m_reset3DModels = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("Reset 3D models"), wxDefaultPosition, wxDefaultSize, 0 ); + m_reset3DModels = new wxCheckBox( m_updateOptionsSizer->GetStaticBox(), wxID_ANY, _("%s 3D models"), wxDefaultPosition, wxDefaultSize, 0 ); m_updateOptionsSizer->Add( m_reset3DModels, 0, wxBOTTOM|wxRIGHT, 5 ); diff --git a/pcbnew/dialogs/dialog_exchange_footprints_base.fbp b/pcbnew/dialogs/dialog_exchange_footprints_base.fbp index ea930c18b4..f3d288b54d 100644 --- a/pcbnew/dialogs/dialog_exchange_footprints_base.fbp +++ b/pcbnew/dialogs/dialog_exchange_footprints_base.fbp @@ -1091,7 +1091,7 @@ 0 0 wxID_ANY - Reset text layers and visibilities + %s text layers and visibilities 0 @@ -1155,7 +1155,7 @@ 0 0 wxID_ANY - Reset text sizes, styles and positions + %s text sizes, styles and positions 0 @@ -1219,7 +1219,7 @@ 0 0 wxID_ANY - Reset fabrication attributes + %s fabrication attributes 0 @@ -1283,7 +1283,7 @@ 0 0 wxID_ANY - Reset 3D models + %s 3D models 0