From fe6890a955e9ae1eab12ecf4e826e80b1ddc80e2 Mon Sep 17 00:00:00 2001 From: Wayne Stambaugh Date: Mon, 14 Mar 2011 15:17:42 -0400 Subject: [PATCH] Dialog escape key termination and default button fixes. * Fix about dialog escape key termination bug. * Fix edit hot keys dialog escape key termination bug. * Set schematic editor component properties dialog default button. * Fix schematic editor plot DXF dialog escape key termination bug. * Set PCB editor layers setup dialog default button. * Set PCB editor swap layers dialog default button. * Set PCB editor net list dialog default button. * Add comment to UIPolicy.txt about escape key termination requiring proper dialog button IDs. --- Documentation/guidelines/UIpolicies.txt | 6 +- common/dialog_about/dialog_about_base.cpp | 4 +- common/dialog_about/dialog_about_base.fbp | 2 +- common/dialog_about/dialog_about_base.h | 2 +- common/dialogs/dialog_hotkeys_editor_base.cpp | 5 +- common/dialogs/dialog_hotkeys_editor_base.fbp | 501 +++---- common/dialogs/dialog_hotkeys_editor_base.h | 15 +- .../dialog_edit_component_in_schematic.cpp | 2 + .../dialog_plot_schematic_DXF_base.cpp | 2 +- .../dialog_plot_schematic_DXF_base.fbp | 4 +- .../dialogs/dialog_plot_schematic_DXF_base.h | 2 +- .../dialog_plot_schematic_HPGL_base.cpp | 2 +- .../dialog_plot_schematic_HPGL_base.fbp | 4 +- .../dialogs/dialog_plot_schematic_HPGL_base.h | 2 +- .../dialogs/dialog_plot_schematic_PS_base.fbp | 2 +- .../dialogs/dialog_plot_schematic_PS_base.h | 2 +- pcbnew/dialogs/dialog_layers_setup.cpp | 1 + pcbnew/dialogs/dialog_netlist_fbp.cpp | 262 ++-- pcbnew/dialogs/dialog_netlist_fbp.fbp | 1223 +++++++++-------- pcbnew/dialogs/dialog_netlist_fbp.h | 147 +- pcbnew/sel_layer.cpp | 7 +- pcbnew/swap_layers.cpp | 1 + 22 files changed, 1161 insertions(+), 1037 deletions(-) diff --git a/Documentation/guidelines/UIpolicies.txt b/Documentation/guidelines/UIpolicies.txt index 7ecfccd613..a604bdd674 100644 --- a/Documentation/guidelines/UIpolicies.txt +++ b/Documentation/guidelines/UIpolicies.txt @@ -14,7 +14,11 @@ Dialogs: Follow the recommendations here: http://library.gnome.org/devel/hig-book/2.20/windows-dialog.html.en paying particular attention to "initial focus", "sensible default values", - "default buttons", ESC key termination. + "default buttons", ESC key termination. Please note that the escape key + termination only works properly if there is a dialog button defined with + an ID of wxID_CANCEL or SetEscapeID( MY_ESCAPE_BUTTON_ID ) is called during + dialog initialization. The former is the preferred method for handling + escape key dialog termination. Use wxWidgets "sizers" in all dialogs, no matter how simple they are: http://zetcode.com/tutorials/wxwidgetstutorial/layoutmanagement diff --git a/common/dialog_about/dialog_about_base.cpp b/common/dialog_about/dialog_about_base.cpp index 768eb87f56..1f358bea87 100644 --- a/common/dialog_about/dialog_about_base.cpp +++ b/common/dialog_about/dialog_about_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 12 2010) +// C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -63,7 +63,7 @@ dialog_about_base::dialog_about_base( wxWindow* parent, wxWindowID id, const wxS bSizer1->Add( m_auiNotebook, 2, wxEXPAND | wxALL, 5 ); - m_buttonOK = new wxButton( this, wxID_ANY, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonOK = new wxButton( this, wxID_CANCEL, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonOK->SetDefault(); bSizer1->Add( m_buttonOK, 0, wxALIGN_CENTER|wxALL, 5 ); diff --git a/common/dialog_about/dialog_about_base.fbp b/common/dialog_about/dialog_about_base.fbp index 0f574fad4b..c67f7ee5da 100644 --- a/common/dialog_about/dialog_about_base.fbp +++ b/common/dialog_about/dialog_about_base.fbp @@ -535,7 +535,7 @@ 0 - wxID_ANY + wxID_CANCEL OK diff --git a/common/dialog_about/dialog_about_base.h b/common/dialog_about/dialog_about_base.h index 15866d5230..cd61604a03 100644 --- a/common/dialog_about/dialog_about_base.h +++ b/common/dialog_about/dialog_about_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Sep 12 2010) +// C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! diff --git a/common/dialogs/dialog_hotkeys_editor_base.cpp b/common/dialogs/dialog_hotkeys_editor_base.cpp index f040a01870..c890148927 100644 --- a/common/dialogs/dialog_hotkeys_editor_base.cpp +++ b/common/dialogs/dialog_hotkeys_editor_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -49,7 +49,7 @@ HOTKEYS_EDITOR_DIALOG_BASE::HOTKEYS_EDITOR_DIALOG_BASE( wxWindow* parent, wxWind m_OKButton = new wxButton( this, wxID_OK, _("OK"), wxDefaultPosition, wxDefaultSize, 0 ); b_buttonsSizer->Add( m_OKButton, 0, wxALL|wxEXPAND, 5 ); - m_cancelButton = new wxButton( this, wxID_ANY, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); + m_cancelButton = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); b_buttonsSizer->Add( m_cancelButton, 0, wxALL|wxEXPAND, 5 ); m_undoButton = new wxButton( this, wxID_CANCEL, _("Undo"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -78,4 +78,5 @@ HOTKEYS_EDITOR_DIALOG_BASE::~HOTKEYS_EDITOR_DIALOG_BASE() m_OKButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HOTKEYS_EDITOR_DIALOG_BASE::OnOKClicked ), NULL, this ); m_cancelButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HOTKEYS_EDITOR_DIALOG_BASE::CancelClicked ), NULL, this ); m_undoButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( HOTKEYS_EDITOR_DIALOG_BASE::UndoClicked ), NULL, this ); + } diff --git a/common/dialogs/dialog_hotkeys_editor_base.fbp b/common/dialogs/dialog_hotkeys_editor_base.fbp index 060e265718..6e3d2ce260 100644 --- a/common/dialogs/dialog_hotkeys_editor_base.fbp +++ b/common/dialogs/dialog_hotkeys_editor_base.fbp @@ -2,9 +2,11 @@ - + C++ 1 + source_name + 0 UTF-8 connect dialog_hotkeys_editor_base @@ -12,66 +14,73 @@ none 1 dialog_hotkeys_editor_base - + . - + 1 + 1 0 0 - - - + + + + 1 1 - - - + impl_virtual + + + 0 wxID_ANY - - + + HOTKEYS_EDITOR_DIALOG_BASE - + 304,235 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - + Hotkeys Editor - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + bMainSizer wxHORIZONTAL none @@ -82,108 +91,113 @@ 1 0 - - - + + + wxALIGN_LEFT - + wxALIGN_TOP wxALIGN_CENTRE 30 - + wxALIGN_CENTRE 2 - - + + + 1 0 1 0 1 0 1 - - - + + + 1 0 wxID_ANY - - - + + + 0 0 - - + + m_hotkeyGrid protected - + wxALIGN_CENTRE 0 - + wxALIGN_CENTRE - + 1 - - - - - + + + + + wxFILTER_NONE + wxDefaultValidator + + + wxDOUBLE_BORDER|wxTAB_TRAVERSAL|wxWANTS_CHARS OnKeyPressed - - - - - + + + + + OnRightClickOnCell - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + OnClickOnCell - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -191,7 +205,7 @@ wxALIGN_CENTER_VERTICAL 0 - + b_buttonsSizer wxVERTICAL none @@ -200,51 +214,56 @@ wxALL|wxEXPAND 0 - - + + + 1 0 1 - - + + 0 wxID_OK OK - - + + m_OKButton protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + OnOKClicked - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -252,51 +271,56 @@ wxALL|wxEXPAND 0 - - + + + 1 0 1 - - + + 0 - wxID_ANY + wxID_CANCEL Close - - + + m_cancelButton protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + CancelClicked - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -304,51 +328,56 @@ wxALL|wxEXPAND 0 - - + + + 1 0 1 - - + + 0 wxID_CANCEL Undo - - + + m_undoButton protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + UndoClicked - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/dialogs/dialog_hotkeys_editor_base.h b/common/dialogs/dialog_hotkeys_editor_base.h index 2ac21ee391..c20ca04fff 100644 --- a/common/dialogs/dialog_hotkeys_editor_base.h +++ b/common/dialogs/dialog_hotkeys_editor_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Sep 8 2010) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -37,15 +37,16 @@ class HOTKEYS_EDITOR_DIALOG_BASE : public wxDialog wxButton* m_undoButton; // Virtual event handlers, overide them in your derived class - virtual void OnKeyPressed( wxKeyEvent& event ){ event.Skip(); } - virtual void OnRightClickOnCell( wxGridEvent& event ){ event.Skip(); } - virtual void OnClickOnCell( wxGridEvent& event ){ event.Skip(); } - virtual void OnOKClicked( wxCommandEvent& event ){ event.Skip(); } - virtual void CancelClicked( wxCommandEvent& event ){ event.Skip(); } - virtual void UndoClicked( wxCommandEvent& event ){ event.Skip(); } + virtual void OnKeyPressed( wxKeyEvent& event ) { event.Skip(); } + virtual void OnRightClickOnCell( wxGridEvent& event ) { event.Skip(); } + virtual void OnClickOnCell( wxGridEvent& event ) { event.Skip(); } + virtual void OnOKClicked( wxCommandEvent& event ) { event.Skip(); } + virtual void CancelClicked( wxCommandEvent& event ) { event.Skip(); } + virtual void UndoClicked( wxCommandEvent& event ) { event.Skip(); } public: + HOTKEYS_EDITOR_DIALOG_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Hotkeys Editor"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 304,235 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~HOTKEYS_EDITOR_DIALOG_BASE(); diff --git a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp index 41abaca052..95b38df561 100644 --- a/eeschema/dialogs/dialog_edit_component_in_schematic.cpp +++ b/eeschema/dialogs/dialog_edit_component_in_schematic.cpp @@ -109,6 +109,8 @@ DIALOG_EDIT_COMPONENT_IN_SCHEMATIC::DIALOG_EDIT_COMPONENT_IN_SCHEMATIC( wxWindow { GetSizer()->SetSizeHints( this ); } + + stdDialogButtonSizerOK->SetDefault(); } diff --git a/eeschema/dialogs/dialog_plot_schematic_DXF_base.cpp b/eeschema/dialogs/dialog_plot_schematic_DXF_base.cpp index 6709a19122..c2d1ecb8bd 100644 --- a/eeschema/dialogs/dialog_plot_schematic_DXF_base.cpp +++ b/eeschema/dialogs/dialog_plot_schematic_DXF_base.cpp @@ -49,7 +49,7 @@ DIALOG_PLOT_SCHEMATIC_DXF_BASE::DIALOG_PLOT_SCHEMATIC_DXF_BASE( wxWindow* parent m_buttonPlotAll = new wxButton( this, wxID_ANY, _("Plot A&LL"), wxDefaultPosition, wxDefaultSize, 0 ); bbuttonsSizer->Add( m_buttonPlotAll, 0, wxALL|wxEXPAND, 5 ); - m_buttonClose = new wxButton( this, wxID_ANY, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 ); bupperSizer->Add( bbuttonsSizer, 1, wxALIGN_CENTER_VERTICAL, 5 ); diff --git a/eeschema/dialogs/dialog_plot_schematic_DXF_base.fbp b/eeschema/dialogs/dialog_plot_schematic_DXF_base.fbp index 3603102835..3ffa900ca3 100644 --- a/eeschema/dialogs/dialog_plot_schematic_DXF_base.fbp +++ b/eeschema/dialogs/dialog_plot_schematic_DXF_base.fbp @@ -40,7 +40,7 @@ 387,365 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - EESchema Plot DXF + Plot DXF wxFILTER_NONE @@ -376,7 +376,7 @@ 0 - wxID_ANY + wxID_CANCEL Close diff --git a/eeschema/dialogs/dialog_plot_schematic_DXF_base.h b/eeschema/dialogs/dialog_plot_schematic_DXF_base.h index 9b4eab93c1..b842a88e83 100644 --- a/eeschema/dialogs/dialog_plot_schematic_DXF_base.h +++ b/eeschema/dialogs/dialog_plot_schematic_DXF_base.h @@ -52,7 +52,7 @@ class DIALOG_PLOT_SCHEMATIC_DXF_BASE : public wxDialog public: - DIALOG_PLOT_SCHEMATIC_DXF_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("EESchema Plot DXF"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,365 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_PLOT_SCHEMATIC_DXF_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot DXF"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,365 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PLOT_SCHEMATIC_DXF_BASE(); }; diff --git a/eeschema/dialogs/dialog_plot_schematic_HPGL_base.cpp b/eeschema/dialogs/dialog_plot_schematic_HPGL_base.cpp index bd0c492759..b6eefa625b 100644 --- a/eeschema/dialogs/dialog_plot_schematic_HPGL_base.cpp +++ b/eeschema/dialogs/dialog_plot_schematic_HPGL_base.cpp @@ -96,7 +96,7 @@ DIALOG_PLOT_SCHEMATIC_HPGL_BASE::DIALOG_PLOT_SCHEMATIC_HPGL_BASE( wxWindow* pare m_buttonPlotAll = new wxButton( this, wxID_ANY, _("Plot A&LL"), wxDefaultPosition, wxDefaultSize, 0 ); bbuttonsSizer->Add( m_buttonPlotAll, 0, wxALL|wxEXPAND, 5 ); - m_buttonClose = new wxButton( this, wxID_ANY, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); bbuttonsSizer->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 ); diff --git a/eeschema/dialogs/dialog_plot_schematic_HPGL_base.fbp b/eeschema/dialogs/dialog_plot_schematic_HPGL_base.fbp index 3617fae332..729e9bc5ec 100644 --- a/eeschema/dialogs/dialog_plot_schematic_HPGL_base.fbp +++ b/eeschema/dialogs/dialog_plot_schematic_HPGL_base.fbp @@ -40,7 +40,7 @@ 387,408 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - EESchema Plot HPGL + Plot HPGL wxFILTER_NONE @@ -985,7 +985,7 @@ 0 - wxID_ANY + wxID_CANCEL Close diff --git a/eeschema/dialogs/dialog_plot_schematic_HPGL_base.h b/eeschema/dialogs/dialog_plot_schematic_HPGL_base.h index b7cb6a6770..a8e2dccb72 100644 --- a/eeschema/dialogs/dialog_plot_schematic_HPGL_base.h +++ b/eeschema/dialogs/dialog_plot_schematic_HPGL_base.h @@ -67,7 +67,7 @@ class DIALOG_PLOT_SCHEMATIC_HPGL_BASE : public wxDialog public: - DIALOG_PLOT_SCHEMATIC_HPGL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("EESchema Plot HPGL"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,408 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_PLOT_SCHEMATIC_HPGL_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot HPGL"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,408 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PLOT_SCHEMATIC_HPGL_BASE(); }; diff --git a/eeschema/dialogs/dialog_plot_schematic_PS_base.fbp b/eeschema/dialogs/dialog_plot_schematic_PS_base.fbp index e13c9b66f8..dea4449ae2 100644 --- a/eeschema/dialogs/dialog_plot_schematic_PS_base.fbp +++ b/eeschema/dialogs/dialog_plot_schematic_PS_base.fbp @@ -40,7 +40,7 @@ 387,365 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - EESchema Plot PS + Plot Postsript wxFILTER_NONE diff --git a/eeschema/dialogs/dialog_plot_schematic_PS_base.h b/eeschema/dialogs/dialog_plot_schematic_PS_base.h index ebc999b829..d72c92b962 100644 --- a/eeschema/dialogs/dialog_plot_schematic_PS_base.h +++ b/eeschema/dialogs/dialog_plot_schematic_PS_base.h @@ -55,7 +55,7 @@ class DIALOG_PLOT_SCHEMATIC_PS_BASE : public wxDialog public: - DIALOG_PLOT_SCHEMATIC_PS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("EESchema Plot PS"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,365 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + DIALOG_PLOT_SCHEMATIC_PS_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Plot Postsript"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 387,365 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_PLOT_SCHEMATIC_PS_BASE(); }; diff --git a/pcbnew/dialogs/dialog_layers_setup.cpp b/pcbnew/dialogs/dialog_layers_setup.cpp index 0e1a1dd3a2..4335d8fd6c 100644 --- a/pcbnew/dialogs/dialog_layers_setup.cpp +++ b/pcbnew/dialogs/dialog_layers_setup.cpp @@ -310,6 +310,7 @@ DIALOG_LAYERS_SETUP::DIALOG_LAYERS_SETUP( PCB_EDIT_FRAME* parent ) : Center(); m_sdbSizer2OK->SetFocus(); + m_sdbSizer2OK->SetDefault(); } diff --git a/pcbnew/dialogs/dialog_netlist_fbp.cpp b/pcbnew/dialogs/dialog_netlist_fbp.cpp index a4b493f629..2e079b2544 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.cpp +++ b/pcbnew/dialogs/dialog_netlist_fbp.cpp @@ -1,130 +1,132 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#include "dialog_netlist_fbp.h" - -/////////////////////////////////////////////////////////////////////////// - -DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) -{ - this->SetSizeHints( wxDefaultSize, wxDefaultSize ); - - wxBoxSizer* bMainSizer; - bMainSizer = new wxBoxSizer( wxVERTICAL ); - - wxBoxSizer* bUpperSizer; - bUpperSizer = new wxBoxSizer( wxHORIZONTAL ); - - wxBoxSizer* bLeftSizer; - bLeftSizer = new wxBoxSizer( wxVERTICAL ); - - wxString m_Select_By_TimestampChoices[] = { _("Reference"), _("Timestamp") }; - int m_Select_By_TimestampNChoices = sizeof( m_Select_By_TimestampChoices ) / sizeof( wxString ); - m_Select_By_Timestamp = new wxRadioBox( this, wxID_ANY, _("Module Selection:"), wxDefaultPosition, wxDefaultSize, m_Select_By_TimestampNChoices, m_Select_By_TimestampChoices, 1, wxRA_SPECIFY_COLS ); - m_Select_By_Timestamp->SetSelection( 0 ); - m_Select_By_Timestamp->SetToolTip( _("Select how footprints are recognized:\nby their reference (U1, R3...) (normal setting)\nor their time stamp (special setting after a full schematic reannotation)") ); - - bLeftSizer->Add( m_Select_By_Timestamp, 0, wxALL|wxEXPAND, 5 ); - - wxString m_ChangeExistingFootprintCtrlChoices[] = { _("Keep"), _("Change") }; - int m_ChangeExistingFootprintCtrlNChoices = sizeof( m_ChangeExistingFootprintCtrlChoices ) / sizeof( wxString ); - m_ChangeExistingFootprintCtrl = new wxRadioBox( this, wxID_ANY, _("Exchange Module:"), wxDefaultPosition, wxDefaultSize, m_ChangeExistingFootprintCtrlNChoices, m_ChangeExistingFootprintCtrlChoices, 1, wxRA_SPECIFY_COLS ); - m_ChangeExistingFootprintCtrl->SetSelection( 0 ); - m_ChangeExistingFootprintCtrl->SetToolTip( _("Keep or change an existing footprint when the netlist gives a different footprint") ); - - bLeftSizer->Add( m_ChangeExistingFootprintCtrl, 0, wxALL|wxEXPAND, 5 ); - - bUpperSizer->Add( bLeftSizer, 1, wxEXPAND, 5 ); - - wxBoxSizer* bMiddleSizer; - bMiddleSizer = new wxBoxSizer( wxVERTICAL ); - - wxString m_DeleteBadTracksChoices[] = { _("Keep"), _("Delete") }; - int m_DeleteBadTracksNChoices = sizeof( m_DeleteBadTracksChoices ) / sizeof( wxString ); - m_DeleteBadTracks = new wxRadioBox( this, wxID_ANY, _("Bad Tracks Deletion:"), wxDefaultPosition, wxDefaultSize, m_DeleteBadTracksNChoices, m_DeleteBadTracksChoices, 1, wxRA_SPECIFY_COLS ); - m_DeleteBadTracks->SetSelection( 0 ); - m_DeleteBadTracks->SetToolTip( _("Keep or delete bad tracks after a netlist change") ); - - bMiddleSizer->Add( m_DeleteBadTracks, 0, wxALL|wxEXPAND, 5 ); - - wxString m_RemoveExtraFootprintsCtrlChoices[] = { _("Keep"), _("Delete") }; - int m_RemoveExtraFootprintsCtrlNChoices = sizeof( m_RemoveExtraFootprintsCtrlChoices ) / sizeof( wxString ); - m_RemoveExtraFootprintsCtrl = new wxRadioBox( this, wxID_ANY, _("Extra Footprints"), wxDefaultPosition, wxDefaultSize, m_RemoveExtraFootprintsCtrlNChoices, m_RemoveExtraFootprintsCtrlChoices, 1, wxRA_SPECIFY_COLS ); - m_RemoveExtraFootprintsCtrl->SetSelection( 0 ); - m_RemoveExtraFootprintsCtrl->SetToolTip( _("Remove footprints found on the Board but not in netlist\nNote: only not locked footprints will be removed") ); - - bMiddleSizer->Add( m_RemoveExtraFootprintsCtrl, 0, wxALL|wxEXPAND, 5 ); - - bUpperSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 ); - - wxBoxSizer* bRightSizerButtons; - bRightSizerButtons = new wxBoxSizer( wxVERTICAL ); - - m_button1 = new wxButton( this, ID_OPEN_NELIST, _("Browse Netlist Files"), wxDefaultPosition, wxDefaultSize, 0 ); - bRightSizerButtons->Add( m_button1, 0, wxALL|wxEXPAND, 5 ); - - m_button2 = new wxButton( this, ID_READ_NETLIST_FILE, _("Read Current Netlist"), wxDefaultPosition, wxDefaultSize, 0 ); - m_button2->SetToolTip( _("Read the current netlist and update connections and connectivity info") ); - - bRightSizerButtons->Add( m_button2, 0, wxALL|wxEXPAND, 5 ); - - m_button3 = new wxButton( this, ID_TEST_NETLIST, _("Footprints Test"), wxDefaultPosition, wxDefaultSize, 0 ); - m_button3->SetToolTip( _("Read the current neltist file and list missing and extra footprints") ); - - bRightSizerButtons->Add( m_button3, 0, wxALL|wxEXPAND, 5 ); - - m_button4 = new wxButton( this, ID_COMPILE_RATSNEST, _("Rebuild Board Connectivity"), wxDefaultPosition, wxDefaultSize, 0 ); - m_button4->SetToolTip( _("Rebuild the full ratsnest (usefull after a manual pad netname edition)") ); - - bRightSizerButtons->Add( m_button4, 0, wxALL|wxEXPAND, 5 ); - - m_button5 = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); - bRightSizerButtons->Add( m_button5, 0, wxALL|wxEXPAND, 5 ); - - bUpperSizer->Add( bRightSizerButtons, 0, wxALIGN_CENTER_VERTICAL, 5 ); - - bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 ); - - m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); - - m_staticTextNetfilename = new wxStaticText( this, wxID_ANY, _("Netlist File:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticTextNetfilename->Wrap( -1 ); - bMainSizer->Add( m_staticTextNetfilename, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_NetlistFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); - bMainSizer->Add( m_NetlistFilenameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - m_staticText1 = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 ); - m_staticText1->Wrap( -1 ); - bMainSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); - - m_MessageWindow = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CHARWRAP|wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP ); - m_MessageWindow->SetMinSize( wxSize( -1,200 ) ); - - bMainSizer->Add( m_MessageWindow, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); - - this->SetSizer( bMainSizer ); - this->Layout(); - - // Connect Events - m_button1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNelistClick ), NULL, this ); - m_button2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this ); - m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this ); - m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this ); - m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this ); -} - -DIALOG_NETLIST_FBP::~DIALOG_NETLIST_FBP() -{ - // Disconnect Events - m_button1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNelistClick ), NULL, this ); - m_button2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this ); - m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this ); - m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this ); - m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this ); -} +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 8 2010) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#include "dialog_netlist_fbp.h" + +/////////////////////////////////////////////////////////////////////////// + +DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +{ + this->SetSizeHints( wxDefaultSize, wxDefaultSize ); + + wxBoxSizer* bMainSizer; + bMainSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bUpperSizer; + bUpperSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bLeftSizer; + bLeftSizer = new wxBoxSizer( wxVERTICAL ); + + wxString m_Select_By_TimestampChoices[] = { _("Reference"), _("Timestamp") }; + int m_Select_By_TimestampNChoices = sizeof( m_Select_By_TimestampChoices ) / sizeof( wxString ); + m_Select_By_Timestamp = new wxRadioBox( this, wxID_ANY, _("Module Selection:"), wxDefaultPosition, wxDefaultSize, m_Select_By_TimestampNChoices, m_Select_By_TimestampChoices, 1, wxRA_SPECIFY_COLS ); + m_Select_By_Timestamp->SetSelection( 0 ); + m_Select_By_Timestamp->SetToolTip( _("Select how footprints are recognized:\nby their reference (U1, R3...) (normal setting)\nor their time stamp (special setting after a full schematic reannotation)") ); + + bLeftSizer->Add( m_Select_By_Timestamp, 0, wxALL|wxEXPAND, 5 ); + + wxString m_ChangeExistingFootprintCtrlChoices[] = { _("Keep"), _("Change") }; + int m_ChangeExistingFootprintCtrlNChoices = sizeof( m_ChangeExistingFootprintCtrlChoices ) / sizeof( wxString ); + m_ChangeExistingFootprintCtrl = new wxRadioBox( this, wxID_ANY, _("Exchange Module:"), wxDefaultPosition, wxDefaultSize, m_ChangeExistingFootprintCtrlNChoices, m_ChangeExistingFootprintCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_ChangeExistingFootprintCtrl->SetSelection( 0 ); + m_ChangeExistingFootprintCtrl->SetToolTip( _("Keep or change an existing footprint when the netlist gives a different footprint") ); + + bLeftSizer->Add( m_ChangeExistingFootprintCtrl, 0, wxALL|wxEXPAND, 5 ); + + bUpperSizer->Add( bLeftSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bMiddleSizer; + bMiddleSizer = new wxBoxSizer( wxVERTICAL ); + + wxString m_DeleteBadTracksChoices[] = { _("Keep"), _("Delete") }; + int m_DeleteBadTracksNChoices = sizeof( m_DeleteBadTracksChoices ) / sizeof( wxString ); + m_DeleteBadTracks = new wxRadioBox( this, wxID_ANY, _("Bad Tracks Deletion:"), wxDefaultPosition, wxDefaultSize, m_DeleteBadTracksNChoices, m_DeleteBadTracksChoices, 1, wxRA_SPECIFY_COLS ); + m_DeleteBadTracks->SetSelection( 0 ); + m_DeleteBadTracks->SetToolTip( _("Keep or delete bad tracks after a netlist change") ); + + bMiddleSizer->Add( m_DeleteBadTracks, 0, wxALL|wxEXPAND, 5 ); + + wxString m_RemoveExtraFootprintsCtrlChoices[] = { _("Keep"), _("Delete") }; + int m_RemoveExtraFootprintsCtrlNChoices = sizeof( m_RemoveExtraFootprintsCtrlChoices ) / sizeof( wxString ); + m_RemoveExtraFootprintsCtrl = new wxRadioBox( this, wxID_ANY, _("Extra Footprints"), wxDefaultPosition, wxDefaultSize, m_RemoveExtraFootprintsCtrlNChoices, m_RemoveExtraFootprintsCtrlChoices, 1, wxRA_SPECIFY_COLS ); + m_RemoveExtraFootprintsCtrl->SetSelection( 0 ); + m_RemoveExtraFootprintsCtrl->SetToolTip( _("Remove footprints found on the Board but not in netlist\nNote: only not locked footprints will be removed") ); + + bMiddleSizer->Add( m_RemoveExtraFootprintsCtrl, 0, wxALL|wxEXPAND, 5 ); + + bUpperSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bRightSizerButtons; + bRightSizerButtons = new wxBoxSizer( wxVERTICAL ); + + m_button1 = new wxButton( this, ID_OPEN_NELIST, _("Browse Netlist Files"), wxDefaultPosition, wxDefaultSize, 0 ); + bRightSizerButtons->Add( m_button1, 0, wxALL|wxEXPAND, 5 ); + + m_button2 = new wxButton( this, ID_READ_NETLIST_FILE, _("Read Current Netlist"), wxDefaultPosition, wxDefaultSize, 0 ); + m_button2->SetDefault(); + m_button2->SetToolTip( _("Read the current netlist and update connections and connectivity info") ); + + bRightSizerButtons->Add( m_button2, 0, wxALL|wxEXPAND, 5 ); + + m_button3 = new wxButton( this, ID_TEST_NETLIST, _("Footprints Test"), wxDefaultPosition, wxDefaultSize, 0 ); + m_button3->SetToolTip( _("Read the current neltist file and list missing and extra footprints") ); + + bRightSizerButtons->Add( m_button3, 0, wxALL|wxEXPAND, 5 ); + + m_button4 = new wxButton( this, ID_COMPILE_RATSNEST, _("Rebuild Board Connectivity"), wxDefaultPosition, wxDefaultSize, 0 ); + m_button4->SetToolTip( _("Rebuild the full ratsnest (usefull after a manual pad netname edition)") ); + + bRightSizerButtons->Add( m_button4, 0, wxALL|wxEXPAND, 5 ); + + m_button5 = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bRightSizerButtons->Add( m_button5, 0, wxALL|wxEXPAND, 5 ); + + bUpperSizer->Add( bRightSizerButtons, 0, wxALIGN_CENTER_VERTICAL, 5 ); + + bMainSizer->Add( bUpperSizer, 0, wxEXPAND, 5 ); + + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + + m_staticTextNetfilename = new wxStaticText( this, wxID_ANY, _("Netlist File:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticTextNetfilename->Wrap( -1 ); + bMainSizer->Add( m_staticTextNetfilename, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_NetlistFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); + bMainSizer->Add( m_NetlistFilenameCtrl, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_staticText1 = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 ); + m_staticText1->Wrap( -1 ); + bMainSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + + m_MessageWindow = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CHARWRAP|wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP ); + m_MessageWindow->SetMinSize( wxSize( -1,200 ) ); + + bMainSizer->Add( m_MessageWindow, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + this->SetSizer( bMainSizer ); + this->Layout(); + + // Connect Events + m_button1->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNelistClick ), NULL, this ); + m_button2->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this ); + m_button3->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this ); + m_button4->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this ); + m_button5->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this ); +} + +DIALOG_NETLIST_FBP::~DIALOG_NETLIST_FBP() +{ + // Disconnect Events + m_button1->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNelistClick ), NULL, this ); + m_button2->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this ); + m_button3->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this ); + m_button4->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this ); + m_button5->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this ); + +} diff --git a/pcbnew/dialogs/dialog_netlist_fbp.fbp b/pcbnew/dialogs/dialog_netlist_fbp.fbp index 3cc5821359..51a25c2103 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.fbp +++ b/pcbnew/dialogs/dialog_netlist_fbp.fbp @@ -2,9 +2,11 @@ - + C++ 1 + source_name + 0 UTF-8 connect dialog_netlist_fbp @@ -12,66 +14,73 @@ none 1 dialog_netlist_fbp - + . - + 1 + 1 1 0 - - - + + + + 1 1 - - - + impl_virtual + + + 0 wxID_CANCEL - - + + DIALOG_NETLIST_FBP - + 519,431 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - - Netlist Dialog - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + Netlist + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + bMainSizer wxVERTICAL none @@ -80,7 +89,7 @@ wxEXPAND 0 - + bUpperSizer wxHORIZONTAL none @@ -89,7 +98,7 @@ wxEXPAND 1 - + bLeftSizer wxVERTICAL none @@ -98,53 +107,58 @@ wxALL|wxEXPAND 0 - + "Reference" "Timestamp" - + + 1 1 - - + + 0 wxID_ANY Module Selection: 1 - - + + m_Select_By_Timestamp protected - + 0 - + wxRA_SPECIFY_COLS - + Select how footprints are recognized: by their reference (U1, R3...) (normal setting) or their time stamp (special setting after a full schematic reannotation) - - - - - - - - - - - - - - - - - - - - - - - - - - - + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -152,53 +166,58 @@ wxALL|wxEXPAND 0 - + "Keep" "Change" - + + 1 1 - - + + 0 wxID_ANY Exchange Module: 1 - - + + m_ChangeExistingFootprintCtrl protected - + 0 - + wxRA_SPECIFY_COLS - + Keep or change an existing footprint when the netlist gives a different footprint - - - - - - - - - - - - - - - - - - - - - - - - - - - + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -208,7 +227,7 @@ wxEXPAND 1 - + bMiddleSizer wxVERTICAL none @@ -217,53 +236,58 @@ wxALL|wxEXPAND 0 - + "Keep" "Delete" - + + 1 1 - - + + 0 wxID_ANY Bad Tracks Deletion: 1 - - + + m_DeleteBadTracks protected - + 0 - + wxRA_SPECIFY_COLS - + Keep or delete bad tracks after a netlist change - - - - - - - - - - - - - - - - - - - - - - - - - - - + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -271,53 +295,58 @@ wxALL|wxEXPAND 0 - + "Keep" "Delete" - + + 1 1 - - + + 0 wxID_ANY Extra Footprints 1 - - + + m_RemoveExtraFootprintsCtrl protected - + 0 - + wxRA_SPECIFY_COLS - + Remove footprints found on the Board but not in netlist Note: only not locked footprints will be removed - - - - - - - - - - - - - - - - - - - - - - - - - - - + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -327,7 +356,7 @@ wxALIGN_CENTER_VERTICAL 0 - + bRightSizerButtons wxVERTICAL none @@ -336,51 +365,56 @@ wxALL|wxEXPAND 0 - - + + + 1 0 1 - - + + 0 ID_OPEN_NELIST Browse Netlist Files - - + + m_button1 protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + OnOpenNelistClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -388,51 +422,56 @@ wxALL|wxEXPAND 0 - - - 0 + + + 1 + 1 1 - - + + 0 ID_READ_NETLIST_FILE Read Current Netlist - - + + m_button2 protected - - - - + + + + Read the current netlist and update connections and connectivity info - - - + + wxFILTER_NONE + wxDefaultValidator + + + + OnReadNetlistFileClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -440,51 +479,56 @@ wxALL|wxEXPAND 0 - - + + + 1 0 1 - - + + 0 ID_TEST_NETLIST Footprints Test - - + + m_button3 protected - - - - + + + + Read the current neltist file and list missing and extra footprints - - - + + wxFILTER_NONE + wxDefaultValidator + + + + OnTestFootprintsClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -492,51 +536,56 @@ wxALL|wxEXPAND 0 - - + + + 1 0 1 - - + + 0 ID_COMPILE_RATSNEST Rebuild Board Connectivity - - + + m_button4 protected - - - - + + + + Rebuild the full ratsnest (usefull after a manual pad netname edition) - - - + + wxFILTER_NONE + wxDefaultValidator + + + + OnCompileRatsnestClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -544,51 +593,56 @@ wxALL|wxEXPAND 0 - - + + + 1 0 1 - - + + 0 wxID_CANCEL Close - - + + m_button5 protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + OnCancelClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -600,48 +654,53 @@ wxEXPAND | wxALL 0 - - + + + 1 1 - - + + 0 wxID_ANY - - + + m_staticline1 protected - - + + wxLI_HORIZONTAL - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -649,50 +708,55 @@ wxTOP|wxRIGHT|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY Netlist File: - - + + m_staticTextNetfilename protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -700,54 +764,59 @@ wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY - + 0 - + m_NetlistFilenameCtrl protected - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -755,50 +824,55 @@ wxTOP|wxRIGHT|wxLEFT 0 - - + + + 1 1 - - + + 0 wxID_ANY Messages: - - + + m_staticText1 protected - - - - - - - - + + + + + + + wxFILTER_NONE + wxDefaultValidator + + + + -1 - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + @@ -806,54 +880,59 @@ wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT 1 - - + + + 1 1 - - + + 0 wxID_ANY - + 0 -1,200 m_MessageWindow protected - - + + wxTE_CHARWRAP|wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/pcbnew/dialogs/dialog_netlist_fbp.h b/pcbnew/dialogs/dialog_netlist_fbp.h index 8b738e771d..95b709d2db 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.h +++ b/pcbnew/dialogs/dialog_netlist_fbp.h @@ -1,73 +1,74 @@ -/////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) -// http://www.wxformbuilder.org/ -// -// PLEASE DO "NOT" EDIT THIS FILE! -/////////////////////////////////////////////////////////////////////////// - -#ifndef __dialog_netlist_fbp__ -#define __dialog_netlist_fbp__ - -#include - -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/////////////////////////////////////////////////////////////////////////// - -/////////////////////////////////////////////////////////////////////////////// -/// Class DIALOG_NETLIST_FBP -/////////////////////////////////////////////////////////////////////////////// -class DIALOG_NETLIST_FBP : public wxDialog -{ - private: - - protected: - enum - { - ID_OPEN_NELIST = 1000, - ID_READ_NETLIST_FILE, - ID_TEST_NETLIST, - ID_COMPILE_RATSNEST, - }; - - wxRadioBox* m_Select_By_Timestamp; - wxRadioBox* m_ChangeExistingFootprintCtrl; - wxRadioBox* m_DeleteBadTracks; - wxRadioBox* m_RemoveExtraFootprintsCtrl; - wxButton* m_button1; - wxButton* m_button2; - wxButton* m_button3; - wxButton* m_button4; - wxButton* m_button5; - wxStaticLine* m_staticline1; - wxStaticText* m_staticTextNetfilename; - wxTextCtrl* m_NetlistFilenameCtrl; - wxStaticText* m_staticText1; - wxTextCtrl* m_MessageWindow; - - // Virtual event handlers, overide them in your derived class - virtual void OnOpenNelistClick( wxCommandEvent& event ){ event.Skip(); } - virtual void OnReadNetlistFileClick( wxCommandEvent& event ){ event.Skip(); } - virtual void OnTestFootprintsClick( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCompileRatsnestClick( wxCommandEvent& event ){ event.Skip(); } - virtual void OnCancelClick( wxCommandEvent& event ){ event.Skip(); } - - - public: - DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id = wxID_CANCEL, const wxString& title = _("Netlist Dialog"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 519,431 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); - ~DIALOG_NETLIST_FBP(); - -}; - -#endif //__dialog_netlist_fbp__ +/////////////////////////////////////////////////////////////////////////// +// C++ code generated with wxFormBuilder (version Sep 8 2010) +// http://www.wxformbuilder.org/ +// +// PLEASE DO "NOT" EDIT THIS FILE! +/////////////////////////////////////////////////////////////////////////// + +#ifndef __dialog_netlist_fbp__ +#define __dialog_netlist_fbp__ + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +/////////////////////////////////////////////////////////////////////////// + +/////////////////////////////////////////////////////////////////////////////// +/// Class DIALOG_NETLIST_FBP +/////////////////////////////////////////////////////////////////////////////// +class DIALOG_NETLIST_FBP : public wxDialog +{ + private: + + protected: + enum + { + ID_OPEN_NELIST = 1000, + ID_READ_NETLIST_FILE, + ID_TEST_NETLIST, + ID_COMPILE_RATSNEST, + }; + + wxRadioBox* m_Select_By_Timestamp; + wxRadioBox* m_ChangeExistingFootprintCtrl; + wxRadioBox* m_DeleteBadTracks; + wxRadioBox* m_RemoveExtraFootprintsCtrl; + wxButton* m_button1; + wxButton* m_button2; + wxButton* m_button3; + wxButton* m_button4; + wxButton* m_button5; + wxStaticLine* m_staticline1; + wxStaticText* m_staticTextNetfilename; + wxTextCtrl* m_NetlistFilenameCtrl; + wxStaticText* m_staticText1; + wxTextCtrl* m_MessageWindow; + + // Virtual event handlers, overide them in your derived class + virtual void OnOpenNelistClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnReadNetlistFileClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnTestFootprintsClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCompileRatsnestClick( wxCommandEvent& event ) { event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } + + + public: + + DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id = wxID_CANCEL, const wxString& title = _("Netlist"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 519,431 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + ~DIALOG_NETLIST_FBP(); + +}; + +#endif //__dialog_netlist_fbp__ diff --git a/pcbnew/sel_layer.cpp b/pcbnew/sel_layer.cpp index bc515007cd..32ac4a222e 100644 --- a/pcbnew/sel_layer.cpp +++ b/pcbnew/sel_layer.cpp @@ -106,9 +106,9 @@ WinEDA_SelLayerFrame::WinEDA_SelLayerFrame( PCB_BASE_FRAME* parent, /* Build the layer list */ LayerCount = 0; - int Masque_Layer = - g_TabAllCopperLayerMask[board->GetCopperLayerCount() - 1]; + int Masque_Layer = g_TabAllCopperLayerMask[board->GetCopperLayerCount() - 1]; Masque_Layer += ALL_NO_CU_LAYERS; + for( ii = 0; ii < NB_LAYERS; ii++ ) { m_LayerId[ii] = 0; @@ -122,6 +122,7 @@ WinEDA_SelLayerFrame::WinEDA_SelLayerFrame( PCB_BASE_FRAME* parent, break; LayerList[LayerCount] = board->GetLayerName( ii ); + if( ii == default_layer ) LayerSelect = LayerCount; @@ -134,6 +135,7 @@ WinEDA_SelLayerFrame::WinEDA_SelLayerFrame( PCB_BASE_FRAME* parent, if( null_layer ) { LayerList[LayerCount] = _( "(Deselect)" ); + if( NB_LAYERS == default_layer ) LayerSelect = LayerCount; @@ -157,6 +159,7 @@ WinEDA_SelLayerFrame::WinEDA_SelLayerFrame( PCB_BASE_FRAME* parent, FrameBoxSizer->Add( ButtonBoxSizer, 0, wxALIGN_BOTTOM | wxALL, 0 ); Button = new wxButton( this, wxID_OK, _( "OK" ) ); + Button->SetDefault(); ButtonBoxSizer->Add( Button, 0, wxGROW | wxALL, 5 ); Button = new wxButton( this, wxID_CANCEL, _( "Cancel" ) ); diff --git a/pcbnew/swap_layers.cpp b/pcbnew/swap_layers.cpp index 362fa66882..e4e4e2cca9 100644 --- a/pcbnew/swap_layers.cpp +++ b/pcbnew/swap_layers.cpp @@ -254,6 +254,7 @@ WinEDA_SwapLayerFrame::WinEDA_SwapLayerFrame( PCB_BASE_FRAME* parent ) : Button = new wxButton( this, wxID_OK, _( "&OK" ), wxDefaultPosition, wxDefaultSize, 0 ); + Button->SetDefault(); StdDialogButtonSizer->AddButton( Button ); Button = new wxButton( this, wxID_CANCEL, _( "&Cancel" ),