diff --git a/common/build_version.cpp b/common/build_version.cpp index ba57a1fbfe..52867e07c6 100644 --- a/common/build_version.cpp +++ b/common/build_version.cpp @@ -7,9 +7,9 @@ #ifndef KICAD_BUILD_VERSION #if defined KICAD_GOST -# define KICAD_BUILD_VERSION "(2013-mar-13 GOST)" +# define KICAD_BUILD_VERSION "(2013-jun-18 GOST)" #else -# define KICAD_BUILD_VERSION "(2013-mar-13)" +# define KICAD_BUILD_VERSION "(2013-jun-18)" #endif #endif diff --git a/common/dialogs/dialog_display_info_HTML_base.cpp b/common/dialogs/dialog_display_info_HTML_base.cpp index 4d6a90aac1..346b78692f 100644 --- a/common/dialogs/dialog_display_info_HTML_base.cpp +++ b/common/dialogs/dialog_display_info_HTML_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -9,7 +9,7 @@ /////////////////////////////////////////////////////////////////////////// -DIALOG_DISPLAY_HTML_TEXT_BASE::DIALOG_DISPLAY_HTML_TEXT_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : wxDialog( parent, id, title, pos, size, style ) +DIALOG_DISPLAY_HTML_TEXT_BASE::DIALOG_DISPLAY_HTML_TEXT_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( wxSize( 400,120 ), wxDefaultSize ); @@ -23,6 +23,7 @@ DIALOG_DISPLAY_HTML_TEXT_BASE::DIALOG_DISPLAY_HTML_TEXT_BASE( wxWindow* parent, m_buttonClose->SetDefault(); bMainSizer->Add( m_buttonClose, 0, wxALIGN_RIGHT|wxRIGHT|wxLEFT, 5 ); + this->SetSizer( bMainSizer ); this->Layout(); @@ -36,4 +37,5 @@ DIALOG_DISPLAY_HTML_TEXT_BASE::~DIALOG_DISPLAY_HTML_TEXT_BASE() // Disconnect Events m_htmlWindow->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_DISPLAY_HTML_TEXT_BASE::OnHTMLLinkClicked ), NULL, this ); m_buttonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_DISPLAY_HTML_TEXT_BASE::OnCloseButtonClick ), NULL, this ); + } diff --git a/common/dialogs/dialog_display_info_HTML_base.fbp b/common/dialogs/dialog_display_info_HTML_base.fbp index be5a1cf4ba..8b7ed6f157 100644 --- a/common/dialogs/dialog_display_info_HTML_base.fbp +++ b/common/dialogs/dialog_display_info_HTML_base.fbp @@ -2,9 +2,13 @@ - + C++ 1 + source_name + 0 + 0 + res UTF-8 connect dialog_display_info_HTML_base @@ -12,64 +16,76 @@ none 1 dialog_display_info_HTML - + . - + 1 + 1 + 1 0 0 - - - + 0 + wxAUI_MGR_DEFAULT + + + + 1 1 - - - + impl_virtual + + + 0 wxID_ANY - + 400,120 DIALOG_DISPLAY_HTML_TEXT_BASE - + 431,120 wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + DIALOG_SHIM; dialog_shim.h + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -1,-1 bMainSizer @@ -80,51 +96,83 @@ wxEXPAND 1 - - + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_ANY - + + 0 + + + 0 -1,-1 + 1 m_htmlWindow + 1 + + public - - + 1 + + Resizable + 1 + wxHW_SCROLLBAR_AUTO - - - - + + 0 + + + wxSUNKEN_BORDER - - - - - + + + + + OnHTMLLinkClicked - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -132,51 +180,87 @@ wxALIGN_RIGHT|wxRIGHT|wxLEFT 0 - - + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 1 + 0 + Dock + 0 + Left 1 - - + + 1 + + 0 0 wxID_CANCEL Close - - + + 0 + + + 0 + + 1 m_buttonClose + 1 + + protected - - + 1 + + Resizable + 1 + wxBU_EXACTFIT - - - - - + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + OnCloseButtonClick - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + diff --git a/common/dialogs/dialog_display_info_HTML_base.h b/common/dialogs/dialog_display_info_HTML_base.h index cc98541a02..a184872866 100644 --- a/common/dialogs/dialog_display_info_HTML_base.h +++ b/common/dialogs/dialog_display_info_HTML_base.h @@ -1,15 +1,19 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Apr 16 2008) +// C++ code generated with wxFormBuilder (version Oct 8 2012) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! /////////////////////////////////////////////////////////////////////////// -#ifndef __dialog_display_info_HTML_base__ -#define __dialog_display_info_HTML_base__ +#ifndef __DIALOG_DISPLAY_INFO_HTML_BASE_H__ +#define __DIALOG_DISPLAY_INFO_HTML_BASE_H__ +#include +#include #include +class DIALOG_SHIM; +#include "dialog_shim.h" #include #include #include @@ -26,7 +30,7 @@ /////////////////////////////////////////////////////////////////////////////// /// Class DIALOG_DISPLAY_HTML_TEXT_BASE /////////////////////////////////////////////////////////////////////////////// -class DIALOG_DISPLAY_HTML_TEXT_BASE : public wxDialog +class DIALOG_DISPLAY_HTML_TEXT_BASE : public DIALOG_SHIM { private: @@ -34,15 +38,16 @@ class DIALOG_DISPLAY_HTML_TEXT_BASE : public wxDialog wxButton* m_buttonClose; // Virtual event handlers, overide them in your derived class - virtual void OnHTMLLinkClicked( wxHtmlLinkEvent& event ){ event.Skip(); } - virtual void OnCloseButtonClick( wxCommandEvent& event ){ event.Skip(); } + virtual void OnHTMLLinkClicked( wxHtmlLinkEvent& event ) { event.Skip(); } + virtual void OnCloseButtonClick( wxCommandEvent& event ) { event.Skip(); } public: wxHtmlWindow* m_htmlWindow; - DIALOG_DISPLAY_HTML_TEXT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 431,120 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); + + DIALOG_DISPLAY_HTML_TEXT_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxEmptyString, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 431,120 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); ~DIALOG_DISPLAY_HTML_TEXT_BASE(); }; -#endif //__dialog_display_info_HTML_base__ +#endif //__DIALOG_DISPLAY_INFO_HTML_BASE_H__ diff --git a/common/html_messagebox.cpp b/common/html_messagebox.cpp index 6d4b0567cd..c86879eae2 100644 --- a/common/html_messagebox.cpp +++ b/common/html_messagebox.cpp @@ -6,8 +6,8 @@ HTML_MESSAGE_BOX::HTML_MESSAGE_BOX( wxWindow* parent, const wxString & aTitle, wxPoint aPos, wxSize aSize) : DIALOG_DISPLAY_HTML_TEXT_BASE( parent, wxID_ANY, aTitle, aPos, aSize ) { - SetFocus(); ListClear(); + Center(); } void HTML_MESSAGE_BOX::OnCloseButtonClick( wxCommandEvent& event ) diff --git a/eeschema/dialogs/dialog_bom.cpp b/eeschema/dialogs/dialog_bom.cpp index cb01c70d2f..105a71fc06 100644 --- a/eeschema/dialogs/dialog_bom.cpp +++ b/eeschema/dialogs/dialog_bom.cpp @@ -39,7 +39,7 @@ #include #include #include -#include <../common/dialogs/dialog_display_info_HTML_base.h> +#include #define BOM_PLUGINS_KEY wxT("bom_plugins") #define BOM_PLUGIN_SELECTED_KEY wxT("bom_plugin_selected") @@ -459,8 +459,8 @@ void DIALOG_BOM::OnEditPlugin( wxCommandEvent& event ) void DIALOG_BOM::OnHelp( wxCommandEvent& event ) { - DIALOG_DISPLAY_HTML_TEXT_BASE help_Dlg( this, wxID_ANY, - _("Bom generation Help"),wxDefaultPosition, wxSize( 750,550 ) ); + HTML_MESSAGE_BOX help_Dlg( this, _("Bom Generation Help"), + wxDefaultPosition, wxSize( 750,550 ) ); wxString msg = FROM_UTF8(s_bomHelpInfo); help_Dlg.m_htmlWindow->AppendToPage( msg ); diff --git a/pcbnew/dialogs/dialog_netlist.cpp b/pcbnew/dialogs/dialog_netlist.cpp index 1acc9dd585..6284cf2cdf 100644 --- a/pcbnew/dialogs/dialog_netlist.cpp +++ b/pcbnew/dialogs/dialog_netlist.cpp @@ -6,7 +6,7 @@ /* * This program source code file is part of KiCad, a free EDA CAD application. * - * Copyright (C) 1992-2012 KiCad Developers, see change_log.txt for contributors. + * Copyright (C) 1992-2013 KiCad Developers, see change_log.txt for contributors. * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License @@ -45,6 +45,7 @@ #include +#define NETLIST_SILENTMODE_KEY wxT("SilentMode") void PCB_EDIT_FRAME::InstallNetlistFrame( wxDC* DC ) { @@ -92,12 +93,19 @@ DIALOG_NETLIST::DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxDC * aDC, { m_parent = aParent; m_dc = aDC; + m_config = wxGetApp().GetSettings(); + m_silentMode = m_config->Read( NETLIST_SILENTMODE_KEY, 0l ); m_NetlistFilenameCtrl->SetValue( aNetlistFullFilename ); m_cmpNameSourceOpt->SetSelection( m_parent->GetUseCmpFileForFpNames() ? 1 : 0 ); + m_checkBoxSilentMode->SetValue( m_silentMode ); GetSizer()->SetSizeHints( this ); } +DIALOG_NETLIST::~DIALOG_NETLIST() +{ + m_config->Write( NETLIST_SILENTMODE_KEY, (long) m_silentMode ); +} void DIALOG_NETLIST::OnOpenNetlistClick( wxCommandEvent& event ) { @@ -142,7 +150,7 @@ void DIALOG_NETLIST::OnReadNetlistFileClick( wxCommandEvent& event ) } // Give the user a chance to bail out when making changes from a netlist. - if( !m_checkDryRun->GetValue() + if( !m_checkDryRun->GetValue() && !m_silentMode && !m_parent->GetBoard()->IsEmpty() && !IsOK( NULL, _( "The changes made by reading the netlist cannot be undone. Are you " "sure you want to read the netlist?" ) ) ) diff --git a/pcbnew/dialogs/dialog_netlist.h b/pcbnew/dialogs/dialog_netlist.h index 332403c57f..800926c8ce 100644 --- a/pcbnew/dialogs/dialog_netlist.h +++ b/pcbnew/dialogs/dialog_netlist.h @@ -40,10 +40,12 @@ class DIALOG_NETLIST : public DIALOG_NETLIST_FBP private: PCB_EDIT_FRAME* m_parent; wxDC* m_dc; + bool m_silentMode; + wxConfig* m_config; public: DIALOG_NETLIST( PCB_EDIT_FRAME* aParent, wxDC* aDC, const wxString & aNetlistFullFilename ); - ~DIALOG_NETLIST() {}; + ~DIALOG_NETLIST(); // return true if the user choice is to use the .cmp file // created by CvPcb to know footprint names associated to components @@ -90,6 +92,10 @@ private: void OnCompileRatsnestClick( wxCommandEvent& event ); void OnCancelClick( wxCommandEvent& event ); void OnSaveMessagesToFile( wxCommandEvent& aEvent ); + void OnClickSilentMode( wxCommandEvent& event ) + { + m_silentMode = m_checkBoxSilentMode->GetValue(); + } void OnUpdateUISaveMessagesToFile( wxUpdateUIEvent& aEvent ); void OnUpdateUIValidNetlistFile( wxUpdateUIEvent& aEvent ); diff --git a/pcbnew/dialogs/dialog_netlist_fbp.cpp b/pcbnew/dialogs/dialog_netlist_fbp.cpp index 040213f413..0d3466cabe 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.cpp +++ b/pcbnew/dialogs/dialog_netlist_fbp.cpp @@ -19,8 +19,14 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w wxBoxSizer* bUpperSizer; bUpperSizer = new wxBoxSizer( wxHORIZONTAL ); - wxBoxSizer* bLeftSizer; - bLeftSizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bleftSizer; + bleftSizer = new wxBoxSizer( wxVERTICAL ); + + wxBoxSizer* bnetlistOptSizer; + bnetlistOptSizer = new wxBoxSizer( wxHORIZONTAL ); + + wxBoxSizer* bmodulesOptSizer; + bmodulesOptSizer = new wxBoxSizer( wxVERTICAL ); wxString m_Select_By_TimestampChoices[] = { _("Reference"), _("Timestamp") }; int m_Select_By_TimestampNChoices = sizeof( m_Select_By_TimestampChoices ) / sizeof( wxString ); @@ -28,7 +34,7 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w 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, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bmodulesOptSizer->Add( m_Select_By_Timestamp, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); wxString m_cmpNameSourceOptChoices[] = { _("From netlist"), _("From separate .cmp file") }; int m_cmpNameSourceOptNChoices = sizeof( m_cmpNameSourceOptChoices ) / sizeof( wxString ); @@ -36,7 +42,7 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w m_cmpNameSourceOpt->SetSelection( 0 ); m_cmpNameSourceOpt->SetToolTip( _("Source of footprints names for component:\n- the netlist (if you have filled the footprint field of each component in schematic)\n- the .cmp file created by CvPcb") ); - bLeftSizer->Add( m_cmpNameSourceOpt, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bmodulesOptSizer->Add( m_cmpNameSourceOpt, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); wxString m_ChangeExistingFootprintCtrlChoices[] = { _("Keep"), _("Change") }; int m_ChangeExistingFootprintCtrlNChoices = sizeof( m_ChangeExistingFootprintCtrlChoices ) / sizeof( wxString ); @@ -44,13 +50,13 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w 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, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bmodulesOptSizer->Add( m_ChangeExistingFootprintCtrl, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); - bUpperSizer->Add( bLeftSizer, 1, wxEXPAND, 5 ); + bnetlistOptSizer->Add( bmodulesOptSizer, 1, wxEXPAND, 5 ); - wxBoxSizer* bMiddleSizer; - bMiddleSizer = new wxBoxSizer( wxVERTICAL ); + wxBoxSizer* bTracksSizer; + bTracksSizer = new wxBoxSizer( wxVERTICAL ); wxString m_DeleteBadTracksChoices[] = { _("Keep"), _("Delete") }; int m_DeleteBadTracksNChoices = sizeof( m_DeleteBadTracksChoices ) / sizeof( wxString ); @@ -58,7 +64,7 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w m_DeleteBadTracks->SetSelection( 0 ); m_DeleteBadTracks->SetToolTip( _("Keep or delete bad tracks after a netlist change") ); - bMiddleSizer->Add( m_DeleteBadTracks, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); + bTracksSizer->Add( m_DeleteBadTracks, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 ); wxString m_RemoveExtraFootprintsCtrlChoices[] = { _("Keep"), _("Delete") }; int m_RemoveExtraFootprintsCtrlNChoices = sizeof( m_RemoveExtraFootprintsCtrlChoices ) / sizeof( wxString ); @@ -66,15 +72,37 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w 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 ); + bTracksSizer->Add( m_RemoveExtraFootprintsCtrl, 0, wxALL|wxEXPAND, 5 ); - bUpperSizer->Add( bMiddleSizer, 1, wxEXPAND, 5 ); + bnetlistOptSizer->Add( bTracksSizer, 1, wxEXPAND, 5 ); + + + bleftSizer->Add( bnetlistOptSizer, 1, wxEXPAND, 5 ); + + wxBoxSizer* bCenterSizer; + bCenterSizer = new wxBoxSizer( wxVERTICAL ); + + m_checkDryRun = new wxCheckBox( this, wxID_ANY, _("Dry run. Only report changes in message panel"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkDryRun->SetToolTip( _("Dry Run:\nThe netlist is read, but no change is actually made on board.\nChanges are only reported in message panel, for info") ); + + bCenterSizer->Add( m_checkDryRun, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 ); + + m_checkBoxSilentMode = new wxCheckBox( this, wxID_ANY, _("Silent mode"), wxDefaultPosition, wxDefaultSize, 0 ); + m_checkBoxSilentMode->SetToolTip( _("Silent mode:\nDo not show the warning message before reading the netlist") ); + + bCenterSizer->Add( m_checkBoxSilentMode, 0, wxRIGHT|wxLEFT, 5 ); + + + bleftSizer->Add( bCenterSizer, 0, wxALL|wxEXPAND, 5 ); + + + bUpperSizer->Add( bleftSizer, 1, wxEXPAND, 5 ); wxBoxSizer* bRightSizerButtons; bRightSizerButtons = new wxBoxSizer( wxVERTICAL ); - m_buttonBrowse = new wxButton( this, ID_OPEN_NELIST, _("Open Netlist File"), wxDefaultPosition, wxDefaultSize, 0 ); + m_buttonBrowse = new wxButton( this, ID_OPEN_NELIST, _("Browse Netlist Files"), wxDefaultPosition, wxDefaultSize, 0 ); bRightSizerButtons->Add( m_buttonBrowse, 0, wxEXPAND|wxALL, 5 ); m_buttonRead = new wxButton( this, ID_READ_NETLIST_FILE, _("Read Current Netlist"), wxDefaultPosition, wxDefaultSize, 0 ); @@ -83,6 +111,9 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w bRightSizerButtons->Add( m_buttonRead, 0, wxEXPAND|wxALL, 5 ); + m_buttonClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); + bRightSizerButtons->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 ); + m_buttonFPTest = new wxButton( this, ID_TEST_NETLIST, _("Test Footprints"), wxDefaultPosition, wxDefaultSize, 0 ); m_buttonFPTest->SetToolTip( _("Read the current neltist file and list missing and extra footprints") ); @@ -96,33 +127,21 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w m_buttonSaveMessages = new wxButton( this, wxID_ANY, _("Save Messages to File"), wxDefaultPosition, wxDefaultSize, 0 ); bRightSizerButtons->Add( m_buttonSaveMessages, 0, wxALL|wxEXPAND, 5 ); - m_buttonClose = new wxButton( this, wxID_CANCEL, _("Close"), wxDefaultPosition, wxDefaultSize, 0 ); - bRightSizerButtons->Add( m_buttonClose, 0, wxALL|wxEXPAND, 5 ); + + bUpperSizer->Add( bRightSizerButtons, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 ); - bUpperSizer->Add( bRightSizerButtons, 0, wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxTOP, 5 ); - - - bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxLEFT|wxRIGHT|wxTOP, 5 ); - - wxBoxSizer* bCenterSizer; - bCenterSizer = new wxBoxSizer( wxVERTICAL ); - - m_checkDryRun = new wxCheckBox( this, wxID_ANY, _("Only report changes in message panel"), wxDefaultPosition, wxDefaultSize, 0 ); - bCenterSizer->Add( m_checkDryRun, 0, wxALL, 5 ); - - - bMainSizer->Add( bCenterSizer, 0, wxALL|wxEXPAND, 5 ); - - m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); - bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + bMainSizer->Add( bUpperSizer, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 ); wxBoxSizer* bLowerSizer; bLowerSizer = new wxBoxSizer( wxVERTICAL ); + m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL ); + bLowerSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 ); + m_staticTextNetfilename = new wxStaticText( this, wxID_ANY, _("Netlist File:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticTextNetfilename->Wrap( -1 ); - bLowerSizer->Add( m_staticTextNetfilename, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + bLowerSizer->Add( m_staticTextNetfilename, 0, wxRIGHT|wxLEFT, 5 ); m_NetlistFilenameCtrl = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 ); m_NetlistFilenameCtrl->SetMaxLength( 0 ); @@ -130,11 +149,11 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w m_staticText1 = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 ); m_staticText1->Wrap( -1 ); - bLowerSizer->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 ); + bLowerSizer->Add( m_staticText1, 0, wxRIGHT|wxLEFT, 5 ); m_MessageWindow = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_CHARWRAP|wxTE_MULTILINE|wxTE_READONLY|wxTE_WORDWRAP ); m_MessageWindow->SetMaxLength( 0 ); - m_MessageWindow->SetMinSize( wxSize( -1,150 ) ); + m_MessageWindow->SetMinSize( wxSize( 300,150 ) ); bLowerSizer->Add( m_MessageWindow, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 ); @@ -147,30 +166,32 @@ DIALOG_NETLIST_FBP::DIALOG_NETLIST_FBP( wxWindow* parent, wxWindowID id, const w bMainSizer->Fit( this ); // Connect Events + m_checkBoxSilentMode->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnClickSilentMode ), NULL, this ); m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNetlistClick ), NULL, this ); m_buttonRead->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this ); m_buttonRead->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); + m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this ); m_buttonFPTest->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this ); m_buttonFPTest->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); m_buttonRebild->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this ); m_buttonRebild->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); m_buttonSaveMessages->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnSaveMessagesToFile ), NULL, this ); m_buttonSaveMessages->Connect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUISaveMessagesToFile ), NULL, this ); - m_buttonClose->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this ); } DIALOG_NETLIST_FBP::~DIALOG_NETLIST_FBP() { // Disconnect Events + m_checkBoxSilentMode->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnClickSilentMode ), NULL, this ); m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnOpenNetlistClick ), NULL, this ); m_buttonRead->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnReadNetlistFileClick ), NULL, this ); m_buttonRead->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); + m_buttonClose->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCancelClick ), NULL, this ); m_buttonFPTest->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnTestFootprintsClick ), NULL, this ); m_buttonFPTest->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); m_buttonRebild->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnCompileRatsnestClick ), NULL, this ); m_buttonRebild->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUIValidNetlistFile ), NULL, this ); m_buttonSaveMessages->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_NETLIST_FBP::OnSaveMessagesToFile ), NULL, this ); m_buttonSaveMessages->Disconnect( wxEVT_UPDATE_UI, wxUpdateUIEventHandler( DIALOG_NETLIST_FBP::OnUpdateUISaveMessagesToFile ), NULL, this ); - m_buttonClose->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 2d51da36b1..be1ecef1b8 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.fbp +++ b/pcbnew/dialogs/dialog_netlist_fbp.fbp @@ -93,7 +93,7 @@ none 5 - wxEXPAND|wxLEFT|wxRIGHT|wxTOP + wxEXPAND|wxRIGHT|wxLEFT 0 @@ -106,475 +106,684 @@ 1 - bLeftSizer + bleftSizer wxVERTICAL none 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Reference" "Timestamp" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Module Selection - 1 - - 0 - - - 0 + wxEXPAND + 1 + - 1 - m_Select_By_Timestamp - 1 - - - protected - 1 - - Resizable - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - 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 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "From netlist" "From separate .cmp file" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Module Name Source - 1 - - 0 - - - 0 - - 1 - m_cmpNameSourceOpt - 1 - - - protected - 1 - - Resizable - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - Source of footprints names for component: - the netlist (if you have filled the footprint field of each component in schematic) - the .cmp file created by CvPcb - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Keep" "Change" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Exchange Module - 1 - - 0 - - - 0 - - 1 - m_ChangeExistingFootprintCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - Keep or change an existing footprint when the netlist gives a different footprint - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxEXPAND - 1 - - - bMiddleSizer - wxVERTICAL - none - - 5 - wxEXPAND|wxTOP|wxRIGHT|wxLEFT - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Keep" "Delete" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Unconnected Tracks - 1 - - 0 - - - 0 - - 1 - m_DeleteBadTracks - 1 - - - protected - 1 - - Resizable - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - Keep or delete bad tracks after a netlist change - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + bnetlistOptSizer + wxHORIZONTAL + none + + 5 + wxEXPAND + 1 + + + bmodulesOptSizer + wxVERTICAL + none + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Reference" "Timestamp" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Module Selection + 1 + + 0 + + + 0 + + 1 + m_Select_By_Timestamp + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + 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 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "From netlist" "From separate .cmp file" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Module Name Source + 1 + + 0 + + + 0 + + 1 + m_cmpNameSourceOpt + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + Source of footprints names for component: - the netlist (if you have filled the footprint field of each component in schematic) - the .cmp file created by CvPcb + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Keep" "Change" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Exchange Module + 1 + + 0 + + + 0 + + 1 + m_ChangeExistingFootprintCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + Keep or change an existing footprint when the netlist gives a different footprint + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxEXPAND + 1 + + + bTracksSizer + wxVERTICAL + none + + 5 + wxEXPAND|wxTOP|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Keep" "Delete" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Unconnected Tracks + 1 + + 0 + + + 0 + + 1 + m_DeleteBadTracks + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + Keep or delete bad tracks after a netlist change + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + "Keep" "Delete" + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Extra Footprints + 1 + + 0 + + + 0 + + 1 + m_RemoveExtraFootprintsCtrl + 1 + + + protected + 1 + + Resizable + 0 + 1 + + wxRA_SPECIFY_COLS + + 0 + Remove footprints found on the Board but not in netlist Note: only not locked footprints will be removed + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 wxALL|wxEXPAND 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - "Keep" "Delete" - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - Extra Footprints - 1 - - 0 - - - 0 + - 1 - m_RemoveExtraFootprintsCtrl - 1 - - - protected - 1 - - Resizable - 0 - 1 - - wxRA_SPECIFY_COLS - - 0 - Remove footprints found on the Board but not in netlist Note: only not locked footprints will be removed - - wxFILTER_NONE - wxDefaultValidator - - - - - - - - - - - - - - - - - - - - - - - - - - - - + bCenterSizer + wxVERTICAL + none + + 5 + wxBOTTOM|wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Dry run. Only report changes in message panel + + 0 + + + 0 + + 1 + m_checkDryRun + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Dry Run: The netlist is read, but no change is actually made on board. Changes are only reported in message panel, for info + + wxFILTER_NONE + wxDefaultValidator + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 5 + wxRIGHT|wxLEFT + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 0 + 1 + + 1 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_ANY + Silent mode + + 0 + + + 0 + + 1 + m_checkBoxSilentMode + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + Silent mode: Do not show the warning message before reading the netlist + + wxFILTER_NONE + wxDefaultValidator + + + + + + OnClickSilentMode + + + + + + + + + + + + + + + + + + + + + + + + 5 - wxALIGN_CENTER_VERTICAL|wxBOTTOM|wxTOP + wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT 0 @@ -614,7 +823,7 @@ 0 0 ID_OPEN_NELIST - Open Netlist File + Browse Netlist Files 0 @@ -757,6 +966,94 @@ OnUpdateUIValidNetlistFile + + 5 + wxALL|wxEXPAND + 0 + + 1 + 1 + 1 + 1 + + + + + + + + 1 + 0 + 1 + + 1 + 0 + 0 + Dock + 0 + Left + 1 + + 1 + + 0 + 0 + wxID_CANCEL + Close + + 0 + + + 0 + + 1 + m_buttonClose + 1 + + + protected + 1 + + Resizable + 1 + + + + 0 + + + wxFILTER_NONE + wxDefaultValidator + + + + + OnCancelClick + + + + + + + + + + + + + + + + + + + + + + + + + 5 wxEXPAND|wxALL @@ -1021,112 +1318,24 @@ OnUpdateUISaveMessagesToFile - - 5 - wxALL|wxEXPAND - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_CANCEL - Close - - 0 - - - 0 - - 1 - m_buttonClose - 1 - - - protected - 1 - - Resizable - 1 - - - - 0 - - - wxFILTER_NONE - wxDefaultValidator - - - - - OnCancelClick - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxALL|wxEXPAND - 0 + wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT + 1 - bCenterSizer + bLowerSizer wxVERTICAL none 5 - wxALL + wxEXPAND | wxALL 0 - + 1 1 1 @@ -1140,7 +1349,6 @@ 1 0 - 0 1 1 @@ -1155,7 +1363,6 @@ 0 0 wxID_ANY - Only report changes in message panel 0 @@ -1163,7 +1370,7 @@ 0 1 - m_checkDryRun + m_staticline1 1 @@ -1173,19 +1380,14 @@ Resizable 1 - + wxLI_HORIZONTAL 0 - - wxFILTER_NONE - wxDefaultValidator - - @@ -1210,101 +1412,9 @@ - - - - 5 - wxEXPAND | wxALL - 0 - - 1 - 1 - 1 - 1 - - - - - - - - 1 - 0 - 1 - - 1 - 0 - Dock - 0 - Left - 1 - - 1 - - 0 - 0 - wxID_ANY - - 0 - - - 0 - - 1 - m_staticline1 - 1 - - - protected - 1 - - Resizable - 1 - - wxLI_HORIZONTAL - - 0 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 5 - wxBOTTOM|wxEXPAND|wxLEFT|wxRIGHT - 1 - - - bLowerSizer - wxVERTICAL - none 5 - wxTOP|wxRIGHT|wxLEFT + wxRIGHT|wxLEFT 0 1 @@ -1478,7 +1588,7 @@ 5 - wxTOP|wxRIGHT|wxLEFT + wxRIGHT|wxLEFT 0 1 @@ -1597,7 +1707,7 @@ 0 0 - -1,150 + 300,150 1 m_MessageWindow 1 diff --git a/pcbnew/dialogs/dialog_netlist_fbp.h b/pcbnew/dialogs/dialog_netlist_fbp.h index 39cb064223..36492e80ca 100644 --- a/pcbnew/dialogs/dialog_netlist_fbp.h +++ b/pcbnew/dialogs/dialog_netlist_fbp.h @@ -21,8 +21,8 @@ class DIALOG_SHIM; #include #include #include -#include #include +#include #include #include #include @@ -51,13 +51,14 @@ class DIALOG_NETLIST_FBP : public DIALOG_SHIM wxRadioBox* m_ChangeExistingFootprintCtrl; wxRadioBox* m_DeleteBadTracks; wxRadioBox* m_RemoveExtraFootprintsCtrl; + wxCheckBox* m_checkDryRun; + wxCheckBox* m_checkBoxSilentMode; wxButton* m_buttonBrowse; wxButton* m_buttonRead; + wxButton* m_buttonClose; wxButton* m_buttonFPTest; wxButton* m_buttonRebild; wxButton* m_buttonSaveMessages; - wxButton* m_buttonClose; - wxCheckBox* m_checkDryRun; wxStaticLine* m_staticline1; wxStaticText* m_staticTextNetfilename; wxTextCtrl* m_NetlistFilenameCtrl; @@ -65,14 +66,15 @@ class DIALOG_NETLIST_FBP : public DIALOG_SHIM wxTextCtrl* m_MessageWindow; // Virtual event handlers, overide them in your derived class + virtual void OnClickSilentMode( wxCommandEvent& event ) { event.Skip(); } virtual void OnOpenNetlistClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnReadNetlistFileClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnUpdateUIValidNetlistFile( wxUpdateUIEvent& event ) { event.Skip(); } + virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnTestFootprintsClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnCompileRatsnestClick( wxCommandEvent& event ) { event.Skip(); } virtual void OnSaveMessagesToFile( wxCommandEvent& event ) { event.Skip(); } virtual void OnUpdateUISaveMessagesToFile( wxUpdateUIEvent& event ) { event.Skip(); } - virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); } public: