Pcbnew: minor fixes to exchange footprint dialog.
* Replace module nomenclature with footprint for improved consistency. * Replace abbreviations in control text. * Replace exchange nomenclature with change.
This commit is contained in:
parent
90a53b9aa2
commit
09d8e85d84
|
@ -1124,7 +1124,7 @@ public:
|
|||
*/
|
||||
void Change_Side_Module( MODULE* Module, wxDC* DC );
|
||||
|
||||
void InstallExchangeModuleFrame( MODULE* ExchangeModuleModule );
|
||||
int InstallExchangeModuleFrame( MODULE* ExchangeModuleModule );
|
||||
|
||||
/**
|
||||
* Function Exchange_Module
|
||||
|
|
|
@ -55,14 +55,14 @@ DIALOG_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWi
|
|||
wxBoxSizer* bMiddleSizer;
|
||||
bMiddleSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
||||
wxString m_SelectionChoices[] = { _("Change footprint"), _("Change same footprint"), _("Ch. same footprint+value"), _("Change all") };
|
||||
wxString m_SelectionChoices[] = { _("Change footprint"), _("Reload footprint"), _("Change footprint and value"), _("Change all footprints") };
|
||||
int m_SelectionNChoices = sizeof( m_SelectionChoices ) / sizeof( wxString );
|
||||
m_Selection = new wxRadioBox( this, ID_SELECTION_CLICKED, _("Options"), wxDefaultPosition, wxDefaultSize, m_SelectionNChoices, m_SelectionChoices, 1, wxRA_SPECIFY_COLS );
|
||||
m_Selection->SetSelection( 1 );
|
||||
bMiddleSizer->Add( m_Selection, 0, wxALL, 5 );
|
||||
|
||||
|
||||
bUpperSizer->Add( bMiddleSizer, 0, 0, 5 );
|
||||
bUpperSizer->Add( bMiddleSizer, 0, wxALL, 5 );
|
||||
|
||||
wxBoxSizer* bRightSizer;
|
||||
bRightSizer = new wxBoxSizer( wxVERTICAL );
|
||||
|
@ -73,33 +73,34 @@ DIALOG_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWi
|
|||
m_Quitbutton = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bRightSizer->Add( m_Quitbutton, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_buttonCmpList = new wxButton( this, wxID_ANY, _("Export .cmp List"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_buttonCmpList = new wxButton( this, wxID_ANY, _("Export Footprint Association File"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bRightSizer->Add( m_buttonCmpList, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_Browsebutton = new wxButton( this, wxID_ANY, _("Browse FP List"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_Browsebutton = new wxButton( this, wxID_ANY, _("List Footprints"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bRightSizer->Add( m_Browsebutton, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_buttonFPViewer = new wxButton( this, wxID_ANY, _("FP Viewer"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_buttonFPViewer = new wxButton( this, wxID_ANY, _("View Footprints"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
bRightSizer->Add( m_buttonFPViewer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
|
||||
bUpperSizer->Add( bRightSizer, 0, wxALIGN_CENTER_VERTICAL, 5 );
|
||||
|
||||
|
||||
bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 );
|
||||
bMainSizer->Add( bUpperSizer, 0, wxALL|wxEXPAND, 5 );
|
||||
|
||||
m_staticTextMsg = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
|
||||
m_staticTextMsg->Wrap( -1 );
|
||||
bMainSizer->Add( m_staticTextMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
m_WinMessages = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
|
||||
m_WinMessages->SetMinSize( wxSize( 450,300 ) );
|
||||
m_WinMessages->SetMinSize( wxSize( -1,75 ) );
|
||||
|
||||
bMainSizer->Add( m_WinMessages, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
|
||||
|
||||
|
||||
this->SetSizer( bMainSizer );
|
||||
this->Layout();
|
||||
bMainSizer->Fit( this );
|
||||
|
||||
// Connect Events
|
||||
m_Selection->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( DIALOG_EXCHANGE_MODULE_BASE::OnSelectionClicked ), NULL, this );
|
||||
|
|
|
@ -44,10 +44,10 @@
|
|||
<property name="minimum_size"></property>
|
||||
<property name="name">DIALOG_EXCHANGE_MODULE_BASE</property>
|
||||
<property name="pos"></property>
|
||||
<property name="size">421,517</property>
|
||||
<property name="size">-1,-1</property>
|
||||
<property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
|
||||
<property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
|
||||
<property name="title">Exchange Footprints</property>
|
||||
<property name="title">Change Footprint</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="window_extra_style"></property>
|
||||
<property name="window_name"></property>
|
||||
|
@ -95,7 +95,7 @@
|
|||
<property name="permission">none</property>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxEXPAND</property>
|
||||
<property name="flag">wxALL|wxEXPAND</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -647,7 +647,7 @@
|
|||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag"></property>
|
||||
<property name="flag">wxALL</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBoxSizer" expanded="1">
|
||||
<property name="minimum_size"></property>
|
||||
|
@ -672,7 +672,7 @@
|
|||
<property name="caption"></property>
|
||||
<property name="caption_visible">1</property>
|
||||
<property name="center_pane">0</property>
|
||||
<property name="choices">"Change footprint" "Change same footprint" "Ch. same footprint+value" "Change all"</property>
|
||||
<property name="choices">"Change footprint" "Reload footprint" "Change footprint and value" "Change all footprints"</property>
|
||||
<property name="close_button">1</property>
|
||||
<property name="context_help"></property>
|
||||
<property name="context_menu">1</property>
|
||||
|
@ -964,7 +964,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Export .cmp List</property>
|
||||
<property name="label">Export Footprint Association File</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -1052,7 +1052,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Browse FP List</property>
|
||||
<property name="label">List Footprints</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -1140,7 +1140,7 @@
|
|||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">FP Viewer</property>
|
||||
<property name="label">View Footprints</property>
|
||||
<property name="max_size"></property>
|
||||
<property name="maximize_button">0</property>
|
||||
<property name="maximum_size"></property>
|
||||
|
@ -1320,7 +1320,7 @@
|
|||
<property name="maxlength"></property>
|
||||
<property name="min_size"></property>
|
||||
<property name="minimize_button">0</property>
|
||||
<property name="minimum_size">450,300</property>
|
||||
<property name="minimum_size">-1,75</property>
|
||||
<property name="moveable">1</property>
|
||||
<property name="name">m_WinMessages</property>
|
||||
<property name="pane_border">1</property>
|
||||
|
|
|
@ -64,7 +64,7 @@ class DIALOG_EXCHANGE_MODULE_BASE : public DIALOG_SHIM
|
|||
|
||||
public:
|
||||
|
||||
DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Exchange Footprints"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 421,517 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Change Footprint"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( -1,-1 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
|
||||
~DIALOG_EXCHANGE_MODULE_BASE();
|
||||
|
||||
};
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
|
||||
static bool RecreateCmpFile( BOARD * aBrd, const wxString& aFullCmpFileName );
|
||||
|
||||
|
||||
class DIALOG_EXCHANGE_MODULE : public DIALOG_EXCHANGE_MODULE_BASE
|
||||
{
|
||||
private:
|
||||
|
@ -78,8 +79,10 @@ private:
|
|||
PICKED_ITEMS_LIST m_undoPickList;
|
||||
};
|
||||
|
||||
|
||||
int DIALOG_EXCHANGE_MODULE::m_selectionMode = 0;
|
||||
|
||||
|
||||
DIALOG_EXCHANGE_MODULE::DIALOG_EXCHANGE_MODULE( PCB_EDIT_FRAME* parent, MODULE* Module ) :
|
||||
DIALOG_EXCHANGE_MODULE_BASE( parent )
|
||||
{
|
||||
|
@ -91,12 +94,11 @@ DIALOG_EXCHANGE_MODULE::DIALOG_EXCHANGE_MODULE( PCB_EDIT_FRAME* parent, MODULE*
|
|||
}
|
||||
|
||||
|
||||
void PCB_EDIT_FRAME::InstallExchangeModuleFrame( MODULE* Module )
|
||||
int PCB_EDIT_FRAME::InstallExchangeModuleFrame( MODULE* Module )
|
||||
{
|
||||
DIALOG_EXCHANGE_MODULE dialog( this, Module );
|
||||
|
||||
int ret = dialog.ShowQuasiModal();
|
||||
(void) ret; // make coverity quiet.
|
||||
return dialog.ShowQuasiModal();
|
||||
}
|
||||
|
||||
|
||||
|
@ -263,14 +265,14 @@ bool DIALOG_EXCHANGE_MODULE::changeSameFootprints( bool aUseValue )
|
|||
{
|
||||
check_module_value = true;
|
||||
value = m_currentModule->GetValue();
|
||||
msg.Printf( _( "Change modules %s -> %s (for value = %s)?" ),
|
||||
msg.Printf( _( "Change footprint %s -> %s (for value = %s)?" ),
|
||||
GetChars( FROM_UTF8( m_currentModule->GetFPID().Format().c_str() ) ),
|
||||
GetChars( newmodulename ),
|
||||
GetChars( m_currentModule->GetValue() ) );
|
||||
}
|
||||
else
|
||||
{
|
||||
msg.Printf( _( "Change modules %s -> %s ?" ),
|
||||
msg.Printf( _( "Change footprint %s -> %s ?" ),
|
||||
GetChars( FROM_UTF8( lib_reference.Format().c_str() ) ),
|
||||
GetChars( newmodulename ) );
|
||||
}
|
||||
|
@ -325,7 +327,7 @@ bool DIALOG_EXCHANGE_MODULE::changeAllFootprints()
|
|||
if( m_parent->GetBoard()->m_Modules == NULL )
|
||||
return false;
|
||||
|
||||
if( !IsOK( this, _( "Change ALL modules ?" ) ) )
|
||||
if( !IsOK( this, _( "Are you sure you want to change all footprints?" ) ) )
|
||||
return false;
|
||||
|
||||
/* The change is done from the last module because the function
|
||||
|
@ -482,6 +484,7 @@ void DIALOG_EXCHANGE_MODULE::BrowseAndSelectFootprint( wxCommandEvent& event )
|
|||
m_NewModule->SetValue( newname );
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Displays the footprint viewer to select a footprint.
|
||||
*/
|
||||
|
@ -520,7 +523,7 @@ void PCB_EDIT_FRAME::RecreateCmpFileFromBoard( wxCommandEvent& aEvent )
|
|||
|
||||
wxString pro_dir = wxPathOnly( Prj().GetProjectFullName() );
|
||||
|
||||
wxFileDialog dlg( this, _( "Save Component Files" ), pro_dir,
|
||||
wxFileDialog dlg( this, _( "Save Footprint Association File" ), pro_dir,
|
||||
fn.GetFullName(), wildcard,
|
||||
wxFD_SAVE | wxFD_OVERWRITE_PROMPT );
|
||||
|
||||
|
@ -537,6 +540,7 @@ void PCB_EDIT_FRAME::RecreateCmpFileFromBoard( wxCommandEvent& aEvent )
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
bool RecreateCmpFile( BOARD * aBrd, const wxString& aFullCmpFileName )
|
||||
{
|
||||
FILE* cmpFile;
|
||||
|
|
Loading…
Reference in New Issue