diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt
index c067236b78..13ee3072f5 100644
--- a/cvpcb/CMakeLists.txt
+++ b/cvpcb/CMakeLists.txt
@@ -37,6 +37,7 @@ set( CVPCB_DIALOGS
../pcbnew/dialogs/dialog_fp_plugin_options_base.cpp
../pcbnew/dialogs/wizard_add_fplib_base.cpp
../pcbnew/dialogs/wizard_add_fplib.cpp
+ ../pcbnew/dialogs/dialog_select_dirlist_base.cpp
)
set( CVPCB_SRCS
diff --git a/pcbnew/CMakeLists.txt b/pcbnew/CMakeLists.txt
index eba8f15d57..ae189d2223 100644
--- a/pcbnew/CMakeLists.txt
+++ b/pcbnew/CMakeLists.txt
@@ -120,6 +120,7 @@ set( PCBNEW_DIALOGS
dialogs/dialog_SVG_print_base.cpp
dialogs/dialog_select_pretty_lib.cpp
dialogs/dialog_select_pretty_lib_base.cpp
+ dialogs/dialog_select_dirlist_base.cpp
dialogs/dialog_set_grid.cpp
dialogs/dialog_set_grid_base.cpp
dialogs/dialog_target_properties_base.cpp
diff --git a/pcbnew/dialogs/dialog_select_dirlist_base.cpp b/pcbnew/dialogs/dialog_select_dirlist_base.cpp
index fb81df85d3..3e262208a1 100644
--- a/pcbnew/dialogs/dialog_select_dirlist_base.cpp
+++ b/pcbnew/dialogs/dialog_select_dirlist_base.cpp
@@ -25,10 +25,12 @@ DIALOG_SELECT_DIRLIST_BASE::DIALOG_SELECT_DIRLIST_BASE( wxWindow* parent, wxWind
m_dirCtrl = new wxGenericDirCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_DIR_ONLY|wxDIRCTRL_MULTIPLE|wxDIRCTRL_SHOW_FILTERS|wxSUNKEN_BORDER, _("*.pretty|*"), 0 );
m_dirCtrl->ShowHidden( false );
+ m_dirCtrl->SetMinSize( wxSize( 400,350 ) );
+
bSizerMain->Add( m_dirCtrl, 1, wxEXPAND | wxALL, 5 );
- m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
- bSizerMain->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
+ m_staticline = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
+ bSizerMain->Add( m_staticline, 0, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
m_sdbSizer = new wxStdDialogButtonSizer();
m_sdbSizerOK = new wxButton( this, wxID_OK );
@@ -37,7 +39,7 @@ DIALOG_SELECT_DIRLIST_BASE::DIALOG_SELECT_DIRLIST_BASE( wxWindow* parent, wxWind
m_sdbSizer->AddButton( m_sdbSizerCancel );
m_sdbSizer->Realize();
- bSizerMain->Add( m_sdbSizer, 0, wxALIGN_RIGHT, 5 );
+ bSizerMain->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxALL, 5 );
this->SetSizer( bSizerMain );
@@ -48,6 +50,8 @@ DIALOG_SELECT_DIRLIST_BASE::DIALOG_SELECT_DIRLIST_BASE( wxWindow* parent, wxWind
// Connect Events
m_dirCtrl->Connect( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnSelectFolder ), NULL, this );
m_dirCtrl->Connect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnSelectFolder ), NULL, this );
+ m_sdbSizerCancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnCancelClick ), NULL, this );
+ m_sdbSizerOK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnOKClick ), NULL, this );
}
DIALOG_SELECT_DIRLIST_BASE::~DIALOG_SELECT_DIRLIST_BASE()
@@ -55,5 +59,7 @@ DIALOG_SELECT_DIRLIST_BASE::~DIALOG_SELECT_DIRLIST_BASE()
// Disconnect Events
m_dirCtrl->Disconnect( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, wxTreeEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnSelectFolder ), NULL, this );
m_dirCtrl->Disconnect( wxEVT_COMMAND_TREE_SEL_CHANGED, wxTreeEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnSelectFolder ), NULL, this );
+ m_sdbSizerCancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnCancelClick ), NULL, this );
+ m_sdbSizerOK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_SELECT_DIRLIST_BASE::OnOKClick ), NULL, this );
}
diff --git a/pcbnew/dialogs/dialog_select_dirlist_base.fbp b/pcbnew/dialogs/dialog_select_dirlist_base.fbp
index 6119123be0..b02ebf74aa 100644
--- a/pcbnew/dialogs/dialog_select_dirlist_base.fbp
+++ b/pcbnew/dialogs/dialog_select_dirlist_base.fbp
@@ -44,7 +44,7 @@
400,300
DIALOG_SELECT_DIRLIST_BASE
- 400,300
+ 400,321
wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER
DIALOG_SHIM; dialog_shim.h
Select Footprint Library Folder
@@ -216,7 +216,7 @@
0
-
+ 400,350
1
m_dirCtrl
1
@@ -280,7 +280,7 @@
-
- 0
- wxAUI_MGR_DEFAULT
-
- wxBOTH
-
- 1
- 1
- impl_virtual
-
-
-
- 0
- wxID_ANY
-
-
- DIALOG_SELECT_DIRLIST_BASE
-
- 346,325
- wxDEFAULT_DIALOG_STYLE
-
- Select Footprint Library Folder
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- bSizerMain
- wxVERTICAL
- none
-
- 5
- wxALL|wxALIGN_CENTER_HORIZONTAL
- 0
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- Dock
- 0
- Left
- 1
-
- 1
- ,90,92,-1,70,0
- 0
- 0
- wxID_ANY
- The footprint library is a folder.
Footprints are files inside this folder.
-
- 0
-
-
- 0
-
- 1
- m_staticTextInfo
- 1
-
-
- protected
- 1
-
- Resizable
- 1
-
- wxALIGN_CENTRE
-
- 0
-
-
-
-
- -1
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 5
- wxEXPAND | wxALL
- 1
-
- 1
- 1
- 1
- 1
-
-
-
-
-
-
-
- 1
- 0
- 1
-
- 1
- 0
- 0
-
- Dock
- 0
- Left
- 1
-
-
- 1
-
- 0
- 0
- wxID_ANY
-
- 0
-
-
- 0
-
- 1
- m_dirCtrl
- 1
-
-
- protected
- 1
-
- Resizable
- 1
- 0
-
- wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_DIR_ONLY|wxDIRCTRL_MULTIPLE
-
- 0
-
-
-
- wxSUNKEN_BORDER
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 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
- wxEXPAND
- 0
-
- 0
- 1
- 0
- 0
- 0
- 1
- 0
- 0
-
- m_sdbSizer
- protected
-
- OnCancelClick
-
-
-
- OnOKClick
-
-
-
-
-
-
diff --git a/pcbnew/dialogs/wizard_add_fplib_base.h b/pcbnew/dialogs/wizard_add_fplib_base.h
index 25bf783660..884ee29215 100644
--- a/pcbnew/dialogs/wizard_add_fplib_base.h
+++ b/pcbnew/dialogs/wizard_add_fplib_base.h
@@ -31,8 +31,6 @@
#include
#include
WX_DEFINE_ARRAY_PTR( wxWizardPageSimple*, WizardPages );
-#include
-#include
///////////////////////////////////////////////////////////////////////////
@@ -87,31 +85,4 @@ class WIZARD_FPLIB_TABLE_BASE : public wxWizard
};
-///////////////////////////////////////////////////////////////////////////////
-/// Class DIALOG_SELECT_DIRLIST_BASE
-///////////////////////////////////////////////////////////////////////////////
-class DIALOG_SELECT_DIRLIST_BASE : public wxDialog
-{
- private:
-
- protected:
- wxStaticText* m_staticTextInfo;
- wxGenericDirCtrl* m_dirCtrl;
- wxStaticLine* m_staticline1;
- wxStdDialogButtonSizer* m_sdbSizer;
- wxButton* m_sdbSizerOK;
- wxButton* m_sdbSizerCancel;
-
- // Virtual event handlers, overide them in your derived class
- virtual void OnCancelClick( wxCommandEvent& event ) { event.Skip(); }
- virtual void OnOKClick( wxCommandEvent& event ) { event.Skip(); }
-
-
- public:
-
- DIALOG_SELECT_DIRLIST_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Select Footprint Library Folder"), const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxSize( 346,325 ), long style = wxDEFAULT_DIALOG_STYLE );
- ~DIALOG_SELECT_DIRLIST_BASE();
-
-};
-
#endif //__WIZARD_ADD_FPLIB_BASE_H__