← Back to team overview

kicad-developers team mailing list archive

Re: [RFC] Footprint wizard

 

The new wizard is ready, available either as a patch (attached to this
message) or in a Github repository [1].

It is not in the product branch yet, as I wanted to have a few
confirmations that it works on some other machines than mine,
particularly on Mac OS X platform.

The patch also removes Webkit and dialog_select_dirlist_base. I do not
want to remove it arbitrarily, but with the permission of the author(s).

Regards,
Orson

1. https://github.com/orsonmmz/kicad-source-mirror/tree/fplib-wizard
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1d7b8f3..3c37ff3 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -36,26 +36,6 @@ option( KICAD_KEEPCASE
     ON
     )
 
-# The footprint library wizard uses wxWebview, which needs a system webkit to be built
-# The default build option in wxWidgets is to build wxWebview, but it could be not built
-# if web kit devel tools are missing
-# So this option disable use of wxWebview, if building wxWebview creates issues
-# see:
-# http://docs.wxwidgets.org/3.0/classwx_web_view.html
-# * No issues on Windows.
-# * needs webkitgtk-devel package installed on Linux, and wxWidgets rebuilt with this package.
-# * Seems also OK on OSX.
-# This option has effect only if BUILD_GITHUB_PLUGIN is ON
-#
-# This option is set to OFF because Kicad developers cannot be sure the use of Webkit does no open
-# a security issue when runnig Kicad.
-# the probability is low, but not zero.
-option( KICAD_USE_WEBKIT
-    "Use system web kit to build a web viewer in footprint library wizard to easily select github libraries (default ON)."
-    OFF
-    )
-
-
 option( USE_WX_GRAPHICS_CONTEXT
     "Use wxGraphicsContext for rendering (default OFF).  Warning, this is experimental" )
 
@@ -102,17 +82,6 @@ mark_as_advanced( KICAD_SKIP_BOOST )    # Normal builders should build Boost.
 
 option( BUILD_GITHUB_PLUGIN "Build the GITHUB_PLUGIN for pcbnew." ON )
 
-# When KICAD_USE_WEBKIT in on, the Kicad web viewer has access to the www.
-# Kicad developers cannot be sure the use of Web viewer does no open a security issue when runnig Kicad.
-# the probability is low, but not zero.
-#so warn the user:
-if( KICAD_USE_WEBKIT )
-    message( STATUS "by setting KICAD_USE_WEBKIT ON, you are building a web viewer inside Kicad.
-Kicad developers cannot be sure the Web access does no open a security issue,
-when running a Web Viewer inside Kicad. The probability is low, but not zero.
-You are warned" )
-endif()
-
 
 # This can be set to a custom name to brag about a particular branch in the "About" dialog:
 set( KICAD_REPO_NAME "product" CACHE STRING "Name of the tree from which this build came." )
@@ -439,14 +408,7 @@ add_definitions( -DWX_COMPATIBILITY )
 # See line 41 of CMakeModules/FindwxWidgets.cmake
 set( wxWidgets_CONFIG_OPTIONS --static=no )
 
-if( KICAD_USE_WEBKIT AND BUILD_GITHUB_PLUGIN )
-    set( webkitlib "webview" )
-    add_definitions( -DKICAD_USE_WEBKIT )
-else()
-    set( webkitlib "" )
-endif()
-
-find_package( wxWidgets 3.0.0 COMPONENTS gl aui adv html core net base xml ${webkitlib} stc REQUIRED )
+find_package( wxWidgets 3.0.0 COMPONENTS gl aui adv html core net base xml stc REQUIRED )
 
 # Include wxWidgets macros.
 include( ${wxWidgets_USE_FILE} )
@@ -761,9 +723,6 @@ add_subdirectory( cvpcb )
 add_subdirectory( eeschema )
 add_subdirectory( gerbview )
 add_subdirectory( lib_dxf )
-if( KICAD_USE_WEBKIT )
-    add_subdirectory( webviewer )
-endif()
 add_subdirectory( pcbnew )
 add_subdirectory( polygon )
 add_subdirectory( pagelayout_editor )
diff --git a/cvpcb/CMakeLists.txt b/cvpcb/CMakeLists.txt
index 2bb481b..64ee8af 100644
--- a/cvpcb/CMakeLists.txt
+++ b/cvpcb/CMakeLists.txt
@@ -38,7 +38,6 @@ 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 62bb9d1..e6d0a07 100644
--- a/pcbnew/CMakeLists.txt
+++ b/pcbnew/CMakeLists.txt
@@ -130,7 +130,6 @@ 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_fp_lib_table.cpp b/pcbnew/dialogs/dialog_fp_lib_table.cpp
index 986b936..e92bdbc 100644
--- a/pcbnew/dialogs/dialog_fp_lib_table.cpp
+++ b/pcbnew/dialogs/dialog_fp_lib_table.cpp
@@ -808,38 +808,50 @@ void DIALOG_FP_LIB_TABLE::OnClickLibraryWizard( wxCommandEvent& event )
     for( int ii = 0; ii <  m_path_subs_grid->GetTable()->GetRowsCount(); ii ++ )
         envVariableList.Add( m_path_subs_grid->GetCellValue( wxGridCellCoords( ii, 0 ) ) );
 
-    WIZARD_FPLIB_TABLE dlg( this, envVariableList );
+    WIZARD_FPLIB_TABLE dlg( this );
 
-    if( ! dlg.RunWizard( dlg.GetFirstPage() ) )
+    if( !dlg.RunWizard( dlg.GetFirstPage() ) )
         return;     // Aborted by user
 
-    wxGrid* libgrid = m_cur_grid;
-    FP_TBL_MODEL*  tbl = (FP_TBL_MODEL*) libgrid->GetTable();
+    const std::vector<WIZARD_FPLIB_TABLE::LIBRARY>& libs = dlg.GetLibraries();
+    bool global_scope = dlg.GetLibScope() == WIZARD_FPLIB_TABLE::GLOBAL;
+    wxGrid* libgrid = global_scope ? m_global_grid : m_project_grid;
+    FP_TBL_MODEL* tbl = (FP_TBL_MODEL*) libgrid->GetTable();
 
-    // Import fp library list
-    int idx = 0;
-    wxArrayString libDescr;   // Will contain nickname, URI, plugin
-
-    while( dlg.GetLibDescr( idx++, libDescr ) )
+    for( std::vector<WIZARD_FPLIB_TABLE::LIBRARY>::const_iterator it = libs.begin();
+            it != libs.end(); ++it )
     {
-        if( ! libDescr[0].IsEmpty() && m_cur_grid->AppendRows( 1 ) )
+        if( it->GetStatus() == WIZARD_FPLIB_TABLE::LIBRARY::INVALID )
+            continue;
+
+        if( libgrid->AppendRows( 1 ) )
         {
             int last_row = libgrid->GetNumberRows() - 1;
 
             // Add the nickname: currently make it from filename
-            tbl->SetValue( last_row, COL_NICKNAME, libDescr[0] );
-            // Add the full path:
-            tbl->SetValue( last_row, COL_URI, libDescr[1] );
+            tbl->SetValue( last_row, COL_NICKNAME, it->GetDescription() );
+
+            // Add the path:
+            if( global_scope )
+                tbl->SetValue( last_row, COL_URI, it->GetAbsolutePath() );
+            else
+                tbl->SetValue( last_row, COL_URI, it->GetProjectPath( Prj().GetProjectPath() ) );
+
             // Add the plugin name:
-            tbl->SetValue( last_row, COL_TYPE, libDescr[2] );
+            std::cout << it->GetPluginName() << std::endl;
+            tbl->SetValue( last_row, COL_TYPE, it->GetPluginName() );
 
             libgrid->MakeCellVisible( last_row, 0 );
             libgrid->SetGridCursor( last_row, 0 );
         }
-
-        libDescr.Clear();
     }
 
+    // Switch to the current scope tab
+    if( global_scope )
+        m_auinotebook->SetSelection( 0 );
+    else
+        m_auinotebook->SetSelection( 1 );
+
     libgrid->SelectRow( libgrid->GetGridCursorRow() );
 }
 
diff --git a/pcbnew/dialogs/dialog_fp_lib_table_base.cpp b/pcbnew/dialogs/dialog_fp_lib_table_base.cpp
index 00dcde2..9b1f611 100644
--- a/pcbnew/dialogs/dialog_fp_lib_table_base.cpp
+++ b/pcbnew/dialogs/dialog_fp_lib_table_base.cpp
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jun  5 2014)
+// C++ code generated with wxFormBuilder (version Mar  9 2015)
 // http://www.wxformbuilder.org/
 //
 // PLEASE DO "NOT" EDIT THIS FILE!
@@ -130,14 +130,14 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
 	wxBoxSizer* bSizer51;
 	bSizer51 = new wxBoxSizer( wxHORIZONTAL );
 	
+	m_buttonWizard = new wxButton( this, wxID_ANY, _("Append with Wizard"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizer51->Add( m_buttonWizard, 0, wxALL, 5 );
+	
 	m_append_button = new wxButton( this, wxID_ANY, _("Append Library"), wxDefaultPosition, wxDefaultSize, 0 );
 	m_append_button->SetToolTip( _("Add a PCB library row to this table") );
 	
 	bSizer51->Add( m_append_button, 0, wxALL, 5 );
 	
-	m_buttonWizard = new wxButton( this, wxID_ANY, _("Append with Wizard"), wxDefaultPosition, wxDefaultSize, 0 );
-	bSizer51->Add( m_buttonWizard, 0, wxALL, 5 );
-	
 	m_delete_button = new wxButton( this, wxID_ANY, _("Remove Library"), wxDefaultPosition, wxDefaultSize, 0 );
 	m_delete_button->SetToolTip( _("Remove a PCB library from this library table") );
 	
@@ -228,8 +228,8 @@ DIALOG_FP_LIB_TABLE_BASE::DIALOG_FP_LIB_TABLE_BASE( wxWindow* parent, wxWindowID
 	this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelCaptionButtonClick ) );
 	this->Connect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FP_LIB_TABLE_BASE::onKeyDown ) );
 	m_auinotebook->Connect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( DIALOG_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this );
-	m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
 	m_buttonWizard->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::OnClickLibraryWizard ), NULL, this );
+	m_append_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
 	m_delete_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
 	m_move_up_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
 	m_move_down_button->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
@@ -244,8 +244,8 @@ DIALOG_FP_LIB_TABLE_BASE::~DIALOG_FP_LIB_TABLE_BASE()
 	this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_FP_LIB_TABLE_BASE::onCancelCaptionButtonClick ) );
 	this->Disconnect( wxEVT_KEY_DOWN, wxKeyEventHandler( DIALOG_FP_LIB_TABLE_BASE::onKeyDown ) );
 	m_auinotebook->Disconnect( wxEVT_COMMAND_AUINOTEBOOK_PAGE_CHANGED, wxAuiNotebookEventHandler( DIALOG_FP_LIB_TABLE_BASE::pageChangedHandler ), NULL, this );
-	m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
 	m_buttonWizard->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::OnClickLibraryWizard ), NULL, this );
+	m_append_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::appendRowHandler ), NULL, this );
 	m_delete_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::deleteRowHandler ), NULL, this );
 	m_move_up_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveUpHandler ), NULL, this );
 	m_move_down_button->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_FP_LIB_TABLE_BASE::moveDownHandler ), NULL, this );
diff --git a/pcbnew/dialogs/dialog_fp_lib_table_base.fbp b/pcbnew/dialogs/dialog_fp_lib_table_base.fbp
index 7499807..32d1a98 100644
--- a/pcbnew/dialogs/dialog_fp_lib_table_base.fbp
+++ b/pcbnew/dialogs/dialog_fp_lib_table_base.fbp
@@ -1031,11 +1031,11 @@
                                 <property name="name">bSizer51</property>
                                 <property name="orient">wxHORIZONTAL</property>
                                 <property name="permission">none</property>
-                                <object class="sizeritem" expanded="0">
+                                <object class="sizeritem" expanded="1">
                                     <property name="border">5</property>
                                     <property name="flag">wxALL</property>
                                     <property name="proportion">0</property>
-                                    <object class="wxButton" expanded="0">
+                                    <object class="wxButton" expanded="1">
                                         <property name="BottomDockable">1</property>
                                         <property name="LeftDockable">1</property>
                                         <property name="RightDockable">1</property>
@@ -1064,7 +1064,7 @@
                                         <property name="gripper">0</property>
                                         <property name="hidden">0</property>
                                         <property name="id">wxID_ANY</property>
-                                        <property name="label">Append Library</property>
+                                        <property name="label">Append with Wizard</property>
                                         <property name="max_size"></property>
                                         <property name="maximize_button">0</property>
                                         <property name="maximum_size"></property>
@@ -1072,7 +1072,7 @@
                                         <property name="minimize_button">0</property>
                                         <property name="minimum_size"></property>
                                         <property name="moveable">1</property>
-                                        <property name="name">m_append_button</property>
+                                        <property name="name">m_buttonWizard</property>
                                         <property name="pane_border">1</property>
                                         <property name="pane_position"></property>
                                         <property name="pane_size"></property>
@@ -1085,7 +1085,7 @@
                                         <property name="style"></property>
                                         <property name="subclass"></property>
                                         <property name="toolbar_pane">0</property>
-                                        <property name="tooltip">Add a PCB library row to this table</property>
+                                        <property name="tooltip"></property>
                                         <property name="validator_data_type"></property>
                                         <property name="validator_style">wxFILTER_NONE</property>
                                         <property name="validator_type">wxDefaultValidator</property>
@@ -1093,7 +1093,7 @@
                                         <property name="window_extra_style"></property>
                                         <property name="window_name"></property>
                                         <property name="window_style"></property>
-                                        <event name="OnButtonClick">appendRowHandler</event>
+                                        <event name="OnButtonClick">OnClickLibraryWizard</event>
                                         <event name="OnChar"></event>
                                         <event name="OnEnterWindow"></event>
                                         <event name="OnEraseBackground"></event>
@@ -1119,11 +1119,11 @@
                                         <event name="OnUpdateUI"></event>
                                     </object>
                                 </object>
-                                <object class="sizeritem" expanded="1">
+                                <object class="sizeritem" expanded="0">
                                     <property name="border">5</property>
                                     <property name="flag">wxALL</property>
                                     <property name="proportion">0</property>
-                                    <object class="wxButton" expanded="1">
+                                    <object class="wxButton" expanded="0">
                                         <property name="BottomDockable">1</property>
                                         <property name="LeftDockable">1</property>
                                         <property name="RightDockable">1</property>
@@ -1152,7 +1152,7 @@
                                         <property name="gripper">0</property>
                                         <property name="hidden">0</property>
                                         <property name="id">wxID_ANY</property>
-                                        <property name="label">Append with Wizard</property>
+                                        <property name="label">Append Library</property>
                                         <property name="max_size"></property>
                                         <property name="maximize_button">0</property>
                                         <property name="maximum_size"></property>
@@ -1160,7 +1160,7 @@
                                         <property name="minimize_button">0</property>
                                         <property name="minimum_size"></property>
                                         <property name="moveable">1</property>
-                                        <property name="name">m_buttonWizard</property>
+                                        <property name="name">m_append_button</property>
                                         <property name="pane_border">1</property>
                                         <property name="pane_position"></property>
                                         <property name="pane_size"></property>
@@ -1173,7 +1173,7 @@
                                         <property name="style"></property>
                                         <property name="subclass"></property>
                                         <property name="toolbar_pane">0</property>
-                                        <property name="tooltip"></property>
+                                        <property name="tooltip">Add a PCB library row to this table</property>
                                         <property name="validator_data_type"></property>
                                         <property name="validator_style">wxFILTER_NONE</property>
                                         <property name="validator_type">wxDefaultValidator</property>
@@ -1181,7 +1181,7 @@
                                         <property name="window_extra_style"></property>
                                         <property name="window_name"></property>
                                         <property name="window_style"></property>
-                                        <event name="OnButtonClick">OnClickLibraryWizard</event>
+                                        <event name="OnButtonClick">appendRowHandler</event>
                                         <event name="OnChar"></event>
                                         <event name="OnEnterWindow"></event>
                                         <event name="OnEraseBackground"></event>
diff --git a/pcbnew/dialogs/dialog_fp_lib_table_base.h b/pcbnew/dialogs/dialog_fp_lib_table_base.h
index 576479f..0ba7e63 100644
--- a/pcbnew/dialogs/dialog_fp_lib_table_base.h
+++ b/pcbnew/dialogs/dialog_fp_lib_table_base.h
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jun  5 2014)
+// C++ code generated with wxFormBuilder (version Mar  9 2015)
 // http://www.wxformbuilder.org/
 //
 // PLEASE DO "NOT" EDIT THIS FILE!
@@ -51,8 +51,8 @@ class DIALOG_FP_LIB_TABLE_BASE : public DIALOG_SHIM
 		wxStaticText* m_staticText4;
 		wxStaticText* m_PrjTableFilename;
 		wxGrid* m_project_grid;
-		wxButton* m_append_button;
 		wxButton* m_buttonWizard;
+		wxButton* m_append_button;
 		wxButton* m_delete_button;
 		wxButton* m_move_up_button;
 		wxButton* m_move_down_button;
@@ -66,8 +66,8 @@ class DIALOG_FP_LIB_TABLE_BASE : public DIALOG_SHIM
 		virtual void onCancelCaptionButtonClick( wxCloseEvent& event ) = 0;
 		virtual void onKeyDown( wxKeyEvent& event ) = 0;
 		virtual void pageChangedHandler( wxAuiNotebookEvent& event ) = 0;
-		virtual void appendRowHandler( wxCommandEvent& event ) = 0;
 		virtual void OnClickLibraryWizard( wxCommandEvent& event ) = 0;
+		virtual void appendRowHandler( wxCommandEvent& event ) = 0;
 		virtual void deleteRowHandler( wxCommandEvent& event ) = 0;
 		virtual void moveUpHandler( wxCommandEvent& event ) = 0;
 		virtual void moveDownHandler( wxCommandEvent& event ) = 0;
diff --git a/pcbnew/dialogs/dialog_select_dirlist_base.cpp b/pcbnew/dialogs/dialog_select_dirlist_base.cpp
deleted file mode 100644
index 3e26220..0000000
--- a/pcbnew/dialogs/dialog_select_dirlist_base.cpp
+++ /dev/null
@@ -1,65 +0,0 @@
-///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jun  5 2014)
-// http://www.wxformbuilder.org/
-//
-// PLEASE DO "NOT" EDIT THIS FILE!
-///////////////////////////////////////////////////////////////////////////
-
-#include "dialog_select_dirlist_base.h"
-
-///////////////////////////////////////////////////////////////////////////
-
-DIALOG_SELECT_DIRLIST_BASE::DIALOG_SELECT_DIRLIST_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,300 ), wxDefaultSize );
-	
-	wxBoxSizer* bSizerMain;
-	bSizerMain = new wxBoxSizer( wxVERTICAL );
-	
-	m_staticText = new wxStaticText( this, wxID_ANY, _("The footprint library is a folder.\nFootprints are files inside this folder."), wxDefaultPosition, wxDefaultSize, 0 );
-	m_staticText->Wrap( -1 );
-	m_staticText->SetFont( wxFont( wxNORMAL_FONT->GetPointSize(), 70, 90, 92, false, wxEmptyString ) );
-	
-	bSizerMain->Add( m_staticText, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
-	
-	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_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 );
-	m_sdbSizer->AddButton( m_sdbSizerOK );
-	m_sdbSizerCancel = new wxButton( this, wxID_CANCEL );
-	m_sdbSizer->AddButton( m_sdbSizerCancel );
-	m_sdbSizer->Realize();
-	
-	bSizerMain->Add( m_sdbSizer, 0, wxALIGN_RIGHT|wxALL, 5 );
-	
-	
-	this->SetSizer( bSizerMain );
-	this->Layout();
-	
-	this->Centre( wxBOTH );
-	
-	// 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()
-{
-	// 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
deleted file mode 100644
index b02ebf7..0000000
--- a/pcbnew/dialogs/dialog_select_dirlist_base.fbp
+++ /dev/null
@@ -1,391 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
-<wxFormBuilder_Project>
-    <FileVersion major="1" minor="13" />
-    <object class="Project" expanded="1">
-        <property name="class_decoration"></property>
-        <property name="code_generation">C++</property>
-        <property name="disconnect_events">1</property>
-        <property name="disconnect_mode">source_name</property>
-        <property name="disconnect_php_events">0</property>
-        <property name="disconnect_python_events">0</property>
-        <property name="embedded_files_path">res</property>
-        <property name="encoding">UTF-8</property>
-        <property name="event_generation">connect</property>
-        <property name="file">dialog_select_dirlist_base</property>
-        <property name="first_id">1000</property>
-        <property name="help_provider">none</property>
-        <property name="internationalize">1</property>
-        <property name="name">dialog_select_dirlist_base</property>
-        <property name="namespace"></property>
-        <property name="path">.</property>
-        <property name="precompiled_header"></property>
-        <property name="relative_path">1</property>
-        <property name="skip_lua_events">1</property>
-        <property name="skip_php_events">1</property>
-        <property name="skip_python_events">1</property>
-        <property name="ui_table">UI</property>
-        <property name="use_enum">0</property>
-        <property name="use_microsoft_bom">0</property>
-        <object class="Dialog" expanded="1">
-            <property name="aui_managed">0</property>
-            <property name="aui_manager_style">wxAUI_MGR_DEFAULT</property>
-            <property name="bg"></property>
-            <property name="center">wxBOTH</property>
-            <property name="context_help"></property>
-            <property name="context_menu">1</property>
-            <property name="enabled">1</property>
-            <property name="event_handler">impl_virtual</property>
-            <property name="extra_style"></property>
-            <property name="fg"></property>
-            <property name="font"></property>
-            <property name="hidden">0</property>
-            <property name="id">wxID_ANY</property>
-            <property name="maximum_size"></property>
-            <property name="minimum_size">400,300</property>
-            <property name="name">DIALOG_SELECT_DIRLIST_BASE</property>
-            <property name="pos"></property>
-            <property name="size">400,321</property>
-            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
-            <property name="subclass">DIALOG_SHIM; dialog_shim.h</property>
-            <property name="title">Select Footprint Library Folder</property>
-            <property name="tooltip"></property>
-            <property name="window_extra_style"></property>
-            <property name="window_name"></property>
-            <property name="window_style"></property>
-            <event name="OnActivate"></event>
-            <event name="OnActivateApp"></event>
-            <event name="OnAuiFindManager"></event>
-            <event name="OnAuiPaneButton"></event>
-            <event name="OnAuiPaneClose"></event>
-            <event name="OnAuiPaneMaximize"></event>
-            <event name="OnAuiPaneRestore"></event>
-            <event name="OnAuiRender"></event>
-            <event name="OnChar"></event>
-            <event name="OnClose"></event>
-            <event name="OnEnterWindow"></event>
-            <event name="OnEraseBackground"></event>
-            <event name="OnHibernate"></event>
-            <event name="OnIconize"></event>
-            <event name="OnIdle"></event>
-            <event name="OnInitDialog"></event>
-            <event name="OnKeyDown"></event>
-            <event name="OnKeyUp"></event>
-            <event name="OnKillFocus"></event>
-            <event name="OnLeaveWindow"></event>
-            <event name="OnLeftDClick"></event>
-            <event name="OnLeftDown"></event>
-            <event name="OnLeftUp"></event>
-            <event name="OnMiddleDClick"></event>
-            <event name="OnMiddleDown"></event>
-            <event name="OnMiddleUp"></event>
-            <event name="OnMotion"></event>
-            <event name="OnMouseEvents"></event>
-            <event name="OnMouseWheel"></event>
-            <event name="OnPaint"></event>
-            <event name="OnRightDClick"></event>
-            <event name="OnRightDown"></event>
-            <event name="OnRightUp"></event>
-            <event name="OnSetFocus"></event>
-            <event name="OnSize"></event>
-            <event name="OnUpdateUI"></event>
-            <object class="wxBoxSizer" expanded="1">
-                <property name="minimum_size"></property>
-                <property name="name">bSizerMain</property>
-                <property name="orient">wxVERTICAL</property>
-                <property name="permission">none</property>
-                <object class="sizeritem" expanded="1">
-                    <property name="border">5</property>
-                    <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
-                    <property name="proportion">0</property>
-                    <object class="wxStaticText" expanded="1">
-                        <property name="BottomDockable">1</property>
-                        <property name="LeftDockable">1</property>
-                        <property name="RightDockable">1</property>
-                        <property name="TopDockable">1</property>
-                        <property name="aui_layer"></property>
-                        <property name="aui_name"></property>
-                        <property name="aui_position"></property>
-                        <property name="aui_row"></property>
-                        <property name="best_size"></property>
-                        <property name="bg"></property>
-                        <property name="caption"></property>
-                        <property name="caption_visible">1</property>
-                        <property name="center_pane">0</property>
-                        <property name="close_button">1</property>
-                        <property name="context_help"></property>
-                        <property name="context_menu">1</property>
-                        <property name="default_pane">0</property>
-                        <property name="dock">Dock</property>
-                        <property name="dock_fixed">0</property>
-                        <property name="docking">Left</property>
-                        <property name="enabled">1</property>
-                        <property name="fg"></property>
-                        <property name="floatable">1</property>
-                        <property name="font">,90,92,-1,70,0</property>
-                        <property name="gripper">0</property>
-                        <property name="hidden">0</property>
-                        <property name="id">wxID_ANY</property>
-                        <property name="label">The footprint library is a folder.&#x0A;Footprints are files inside this folder.</property>
-                        <property name="max_size"></property>
-                        <property name="maximize_button">0</property>
-                        <property name="maximum_size"></property>
-                        <property name="min_size"></property>
-                        <property name="minimize_button">0</property>
-                        <property name="minimum_size"></property>
-                        <property name="moveable">1</property>
-                        <property name="name">m_staticText</property>
-                        <property name="pane_border">1</property>
-                        <property name="pane_position"></property>
-                        <property name="pane_size"></property>
-                        <property name="permission">protected</property>
-                        <property name="pin_button">1</property>
-                        <property name="pos"></property>
-                        <property name="resize">Resizable</property>
-                        <property name="show">1</property>
-                        <property name="size"></property>
-                        <property name="style"></property>
-                        <property name="subclass"></property>
-                        <property name="toolbar_pane">0</property>
-                        <property name="tooltip"></property>
-                        <property name="window_extra_style"></property>
-                        <property name="window_name"></property>
-                        <property name="window_style"></property>
-                        <property name="wrap">-1</property>
-                        <event name="OnChar"></event>
-                        <event name="OnEnterWindow"></event>
-                        <event name="OnEraseBackground"></event>
-                        <event name="OnKeyDown"></event>
-                        <event name="OnKeyUp"></event>
-                        <event name="OnKillFocus"></event>
-                        <event name="OnLeaveWindow"></event>
-                        <event name="OnLeftDClick"></event>
-                        <event name="OnLeftDown"></event>
-                        <event name="OnLeftUp"></event>
-                        <event name="OnMiddleDClick"></event>
-                        <event name="OnMiddleDown"></event>
-                        <event name="OnMiddleUp"></event>
-                        <event name="OnMotion"></event>
-                        <event name="OnMouseEvents"></event>
-                        <event name="OnMouseWheel"></event>
-                        <event name="OnPaint"></event>
-                        <event name="OnRightDClick"></event>
-                        <event name="OnRightDown"></event>
-                        <event name="OnRightUp"></event>
-                        <event name="OnSetFocus"></event>
-                        <event name="OnSize"></event>
-                        <event name="OnUpdateUI"></event>
-                    </object>
-                </object>
-                <object class="sizeritem" expanded="1">
-                    <property name="border">5</property>
-                    <property name="flag">wxEXPAND | wxALL</property>
-                    <property name="proportion">1</property>
-                    <object class="wxGenericDirCtrl" expanded="1">
-                        <property name="BottomDockable">1</property>
-                        <property name="LeftDockable">1</property>
-                        <property name="RightDockable">1</property>
-                        <property name="TopDockable">1</property>
-                        <property name="aui_layer"></property>
-                        <property name="aui_name"></property>
-                        <property name="aui_position"></property>
-                        <property name="aui_row"></property>
-                        <property name="best_size"></property>
-                        <property name="bg"></property>
-                        <property name="caption"></property>
-                        <property name="caption_visible">1</property>
-                        <property name="center_pane">0</property>
-                        <property name="close_button">1</property>
-                        <property name="context_help"></property>
-                        <property name="context_menu">1</property>
-                        <property name="default_pane">0</property>
-                        <property name="defaultfilter">0</property>
-                        <property name="defaultfolder"></property>
-                        <property name="dock">Dock</property>
-                        <property name="dock_fixed">0</property>
-                        <property name="docking">Left</property>
-                        <property name="enabled">1</property>
-                        <property name="fg"></property>
-                        <property name="filter">*.pretty|*</property>
-                        <property name="floatable">1</property>
-                        <property name="font"></property>
-                        <property name="gripper">0</property>
-                        <property name="hidden">0</property>
-                        <property name="id">wxID_ANY</property>
-                        <property name="max_size"></property>
-                        <property name="maximize_button">0</property>
-                        <property name="maximum_size"></property>
-                        <property name="min_size"></property>
-                        <property name="minimize_button">0</property>
-                        <property name="minimum_size">400,350</property>
-                        <property name="moveable">1</property>
-                        <property name="name">m_dirCtrl</property>
-                        <property name="pane_border">1</property>
-                        <property name="pane_position"></property>
-                        <property name="pane_size"></property>
-                        <property name="permission">protected</property>
-                        <property name="pin_button">1</property>
-                        <property name="pos"></property>
-                        <property name="resize">Resizable</property>
-                        <property name="show">1</property>
-                        <property name="show_hidden">0</property>
-                        <property name="size"></property>
-                        <property name="style">wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_DIR_ONLY|wxDIRCTRL_MULTIPLE|wxDIRCTRL_SHOW_FILTERS</property>
-                        <property name="subclass"></property>
-                        <property name="toolbar_pane">0</property>
-                        <property name="tooltip"></property>
-                        <property name="window_extra_style"></property>
-                        <property name="window_name"></property>
-                        <property name="window_style">wxSUNKEN_BORDER</property>
-                        <event name="OnChar"></event>
-                        <event name="OnEnterWindow"></event>
-                        <event name="OnEraseBackground"></event>
-                        <event name="OnKeyDown"></event>
-                        <event name="OnKeyUp"></event>
-                        <event name="OnKillFocus"></event>
-                        <event name="OnLeaveWindow"></event>
-                        <event name="OnLeftDClick"></event>
-                        <event name="OnLeftDown"></event>
-                        <event name="OnLeftUp"></event>
-                        <event name="OnMiddleDClick"></event>
-                        <event name="OnMiddleDown"></event>
-                        <event name="OnMiddleUp"></event>
-                        <event name="OnMotion"></event>
-                        <event name="OnMouseEvents"></event>
-                        <event name="OnMouseWheel"></event>
-                        <event name="OnPaint"></event>
-                        <event name="OnRightDClick"></event>
-                        <event name="OnRightDown"></event>
-                        <event name="OnRightUp"></event>
-                        <event name="OnSetFocus"></event>
-                        <event name="OnSize"></event>
-                        <event name="OnTreeBeginDrag"></event>
-                        <event name="OnTreeBeginLabelEdit"></event>
-                        <event name="OnTreeBeginRDrag"></event>
-                        <event name="OnTreeDeleteItem"></event>
-                        <event name="OnTreeEndDrag"></event>
-                        <event name="OnTreeEndLabelEdit"></event>
-                        <event name="OnTreeItemActivated">OnSelectFolder</event>
-                        <event name="OnTreeItemCollapsed"></event>
-                        <event name="OnTreeItemCollapsing"></event>
-                        <event name="OnTreeItemExpanded"></event>
-                        <event name="OnTreeItemExpanding"></event>
-                        <event name="OnTreeItemMenu"></event>
-                        <event name="OnTreeItemMiddleClick"></event>
-                        <event name="OnTreeItemRightClick"></event>
-                        <event name="OnTreeKeyDown"></event>
-                        <event name="OnTreeSelChanged">OnSelectFolder</event>
-                        <event name="OnTreeSelChanging"></event>
-                        <event name="OnUpdateUI"></event>
-                    </object>
-                </object>
-                <object class="sizeritem" expanded="1">
-                    <property name="border">5</property>
-                    <property name="flag">wxEXPAND|wxTOP|wxRIGHT|wxLEFT</property>
-                    <property name="proportion">0</property>
-                    <object class="wxStaticLine" expanded="1">
-                        <property name="BottomDockable">1</property>
-                        <property name="LeftDockable">1</property>
-                        <property name="RightDockable">1</property>
-                        <property name="TopDockable">1</property>
-                        <property name="aui_layer"></property>
-                        <property name="aui_name"></property>
-                        <property name="aui_position"></property>
-                        <property name="aui_row"></property>
-                        <property name="best_size"></property>
-                        <property name="bg"></property>
-                        <property name="caption"></property>
-                        <property name="caption_visible">1</property>
-                        <property name="center_pane">0</property>
-                        <property name="close_button">1</property>
-                        <property name="context_help"></property>
-                        <property name="context_menu">1</property>
-                        <property name="default_pane">0</property>
-                        <property name="dock">Dock</property>
-                        <property name="dock_fixed">0</property>
-                        <property name="docking">Left</property>
-                        <property name="enabled">1</property>
-                        <property name="fg"></property>
-                        <property name="floatable">1</property>
-                        <property name="font"></property>
-                        <property name="gripper">0</property>
-                        <property name="hidden">0</property>
-                        <property name="id">wxID_ANY</property>
-                        <property name="max_size"></property>
-                        <property name="maximize_button">0</property>
-                        <property name="maximum_size"></property>
-                        <property name="min_size"></property>
-                        <property name="minimize_button">0</property>
-                        <property name="minimum_size"></property>
-                        <property name="moveable">1</property>
-                        <property name="name">m_staticline</property>
-                        <property name="pane_border">1</property>
-                        <property name="pane_position"></property>
-                        <property name="pane_size"></property>
-                        <property name="permission">protected</property>
-                        <property name="pin_button">1</property>
-                        <property name="pos"></property>
-                        <property name="resize">Resizable</property>
-                        <property name="show">1</property>
-                        <property name="size"></property>
-                        <property name="style">wxLI_HORIZONTAL</property>
-                        <property name="subclass"></property>
-                        <property name="toolbar_pane">0</property>
-                        <property name="tooltip"></property>
-                        <property name="window_extra_style"></property>
-                        <property name="window_name"></property>
-                        <property name="window_style"></property>
-                        <event name="OnChar"></event>
-                        <event name="OnEnterWindow"></event>
-                        <event name="OnEraseBackground"></event>
-                        <event name="OnKeyDown"></event>
-                        <event name="OnKeyUp"></event>
-                        <event name="OnKillFocus"></event>
-                        <event name="OnLeaveWindow"></event>
-                        <event name="OnLeftDClick"></event>
-                        <event name="OnLeftDown"></event>
-                        <event name="OnLeftUp"></event>
-                        <event name="OnMiddleDClick"></event>
-                        <event name="OnMiddleDown"></event>
-                        <event name="OnMiddleUp"></event>
-                        <event name="OnMotion"></event>
-                        <event name="OnMouseEvents"></event>
-                        <event name="OnMouseWheel"></event>
-                        <event name="OnPaint"></event>
-                        <event name="OnRightDClick"></event>
-                        <event name="OnRightDown"></event>
-                        <event name="OnRightUp"></event>
-                        <event name="OnSetFocus"></event>
-                        <event name="OnSize"></event>
-                        <event name="OnUpdateUI"></event>
-                    </object>
-                </object>
-                <object class="sizeritem" expanded="1">
-                    <property name="border">5</property>
-                    <property name="flag">wxALIGN_RIGHT|wxALL</property>
-                    <property name="proportion">0</property>
-                    <object class="wxStdDialogButtonSizer" expanded="1">
-                        <property name="Apply">0</property>
-                        <property name="Cancel">1</property>
-                        <property name="ContextHelp">0</property>
-                        <property name="Help">0</property>
-                        <property name="No">0</property>
-                        <property name="OK">1</property>
-                        <property name="Save">0</property>
-                        <property name="Yes">0</property>
-                        <property name="minimum_size"></property>
-                        <property name="name">m_sdbSizer</property>
-                        <property name="permission">protected</property>
-                        <event name="OnApplyButtonClick"></event>
-                        <event name="OnCancelButtonClick">OnCancelClick</event>
-                        <event name="OnContextHelpButtonClick"></event>
-                        <event name="OnHelpButtonClick"></event>
-                        <event name="OnNoButtonClick"></event>
-                        <event name="OnOKButtonClick">OnOKClick</event>
-                        <event name="OnSaveButtonClick"></event>
-                        <event name="OnYesButtonClick"></event>
-                    </object>
-                </object>
-            </object>
-        </object>
-    </object>
-</wxFormBuilder_Project>
diff --git a/pcbnew/dialogs/dialog_select_dirlist_base.h b/pcbnew/dialogs/dialog_select_dirlist_base.h
deleted file mode 100644
index 916ffd3..0000000
--- a/pcbnew/dialogs/dialog_select_dirlist_base.h
+++ /dev/null
@@ -1,60 +0,0 @@
-///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jun  5 2014)
-// http://www.wxformbuilder.org/
-//
-// PLEASE DO "NOT" EDIT THIS FILE!
-///////////////////////////////////////////////////////////////////////////
-
-#ifndef __DIALOG_SELECT_DIRLIST_BASE_H__
-#define __DIALOG_SELECT_DIRLIST_BASE_H__
-
-#include <wx/artprov.h>
-#include <wx/xrc/xmlres.h>
-#include <wx/intl.h>
-class DIALOG_SHIM;
-
-#include "dialog_shim.h"
-#include <wx/string.h>
-#include <wx/stattext.h>
-#include <wx/gdicmn.h>
-#include <wx/font.h>
-#include <wx/colour.h>
-#include <wx/settings.h>
-#include <wx/dirctrl.h>
-#include <wx/statline.h>
-#include <wx/sizer.h>
-#include <wx/button.h>
-#include <wx/dialog.h>
-
-///////////////////////////////////////////////////////////////////////////
-
-
-///////////////////////////////////////////////////////////////////////////////
-/// Class DIALOG_SELECT_DIRLIST_BASE
-///////////////////////////////////////////////////////////////////////////////
-class DIALOG_SELECT_DIRLIST_BASE : public DIALOG_SHIM
-{
-	private:
-	
-	protected:
-		wxStaticText* m_staticText;
-		wxGenericDirCtrl* m_dirCtrl;
-		wxStaticLine* m_staticline;
-		wxStdDialogButtonSizer* m_sdbSizer;
-		wxButton* m_sdbSizerOK;
-		wxButton* m_sdbSizerCancel;
-		
-		// Virtual event handlers, overide them in your derived class
-		virtual void OnSelectFolder( wxTreeEvent& event ) { event.Skip(); }
-		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( 400,321 ), long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER ); 
-		~DIALOG_SELECT_DIRLIST_BASE();
-	
-};
-
-#endif //__DIALOG_SELECT_DIRLIST_BASE_H__
diff --git a/pcbnew/dialogs/wizard_add_fplib.cpp b/pcbnew/dialogs/wizard_add_fplib.cpp
index d20890f..d04113f 100644
--- a/pcbnew/dialogs/wizard_add_fplib.cpp
+++ b/pcbnew/dialogs/wizard_add_fplib.cpp
@@ -1,11 +1,9 @@
-/**
- * @file wizard_add_fplib.cpp
- */
-
 /*
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
- * Copyright (C) 2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 2015 CERN
+ * @author Maciej Suminski <maciej.suminski@xxxxxxx>
+ * Copyright (C) 2014-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
  * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.txt for contributors.
  *
  * This program is free software; you can redistribute it and/or
@@ -26,936 +24,609 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
  */
 
-/** @brief this code creates a wizard to add entries in the footprint library table.
- * The wizard contains 3 pages:
- * The first is the selection of the type of libraries (plugin type):
- *  * Kicad .pretty library (actually a folder containing .kicad_mod footprint files)
- *  * Gihtub .pretty on line library, accessible via a internet connection
- *  * Legacy library (old .mod format file containing footprints desc)
- *  * Eagle xml V6 library (.lbr files)
- *  * Geda-PCB library (actually a folder containing .fp footprint files
- * The second is the selection of path management:
- *  use environment variable or absolute path.
- *  When using an environment variable, selec it
- * The third is the library list selection
- *  It allows entering entries by running a tool to select a set of libraries
- *  The tool depend on the type of lib (files/folder/urls):
- *    * multi files selector
- *    * multi folder selector
- *    * multi URL selector (via a web viewer)
- * The path and the plugin type comes from the selection, and a library nickname
- * is built from the path.
+/**
+ * @brief Wizard for selecting footprint libraries consisting of 4 steps:
+ * - select source (Github/local files)
+ * - pick libraries
+ * - present a review of libraries (including validation)
+ * - select scope (global/project)
  */
 
 #include <wx/wx.h>
-#include <wx/url.h>
 #include <wx/progdlg.h>
 
 #include <pgm_base.h>
-#include <kiface_i.h>
-#include <dialog_helpers.h>
-#include <project.h>        // For PROJECT_VAR_NAME definition
-#include <fp_lib_table.h>   // For KISYSMOD definition
-#include <io_mgr.h>
 #include <wizard_add_fplib.h>
-#include <dialog_select_dirlist_base.h>
 
-// a key to store the default Kicad Github libs URL
-#define KICAD_FPLIBS_URL_KEY wxT( "kicad_fplib_url" )
+#include <class_module.h>
 
-// key to store last options of th wizard
-#define WIZARD_LAST_PLUGIN_KEY wxT( "wizard_plugin" )
-#define WIZARD_LAST_PATHOPTION_KEY wxT( "wizard_path_option" )
+#ifdef BUILD_GITHUB_PLUGIN
+#include <../github/github_getliblist.h>
+#endif
 
-// static members to store last choices during a session
-int WIZARD_FPLIB_TABLE::m_last_plugin_choice = 0;
-int WIZARD_FPLIB_TABLE::m_last_defaultpath_choice = 2;
+// a key to store the default Kicad Github libs URL
+#define KICAD_FPLIBS_URL_KEY wxT( "kicad_fplib_url" )
 
-WIZARD_FPLIB_TABLE::WIZARD_FPLIB_TABLE( wxWindow* aParent, wxArrayString& aEnvVariableList )
-        : WIZARD_FPLIB_TABLE_BASE( aParent )
+// Filters for the file picker
+static const int FILTER_COUNT = 4;
+static const struct
 {
-    initDlg( aEnvVariableList );
-
-    // Allows github plugin selection only when the plugin is compiled:
-#ifndef BUILD_GITHUB_PLUGIN
-    m_rbFpLibFormat->Enable( GITHUB_PLUGIN, false );
+    wxString m_Description;
+    wxString m_Extension;
+    bool m_IsFile;
+    IO_MGR::PCB_FILE_T m_Plugin;
+} fileFilters[FILTER_COUNT] =
+{
+    { "KiCad (*.pretty folders)",      ".pretty", false,   IO_MGR::KICAD },
+    { "Eagle 6.x (*.lbr)",             ".lbr",    true,    IO_MGR::EAGLE },
+    { "KiCad legacy (*.mod)",          ".mod",    true,    IO_MGR::LEGACY },
+    { "Geda (folder with *.fp files)", "",        false,   IO_MGR::GEDA_PCB },
+};
 
-    if( m_rbFpLibFormat->GetSelection() == GITHUB_PLUGIN )
-        m_rbFpLibFormat->SetSelection( KICAD_PLUGIN );
-#endif
 
-    // Currently, I (JPC) do not know the best way to add/store
-    // what is currently called env variables
-    // So do not show tools to change them,
-    // but do not remove the code, just in case
-	m_buttonAddEV->Show( false );
-	m_buttonRemoveEV->Show( false );
+// Returns the filter string for the file picker
+static wxString getFilterString()
+{
+    wxString filterInit = _( "All supported library formats|" );
+    wxString filter;
 
-#ifndef BUILD_GITHUB_PLUGIN
-    m_buttonGithubLibList->Show( false );
-#endif
+    for( int i = 0; i < FILTER_COUNT; ++i )
+    {
+        // Init part
+        if( i != 0 )
+            filterInit += ";";
 
-    // Gives a minimal size to the dialog, which allows displaying any page
-    wxSize minsize;
+        filterInit += "*" + fileFilters[i].m_Extension;
 
-    for( unsigned ii = 0; ii < m_pages.size(); ii++ )
-    {
-        wxSize size = m_pages[ii]->GetSizer()->CalcMin();
-        minsize.x = std::max( minsize.x, size.x );
-        minsize.y = std::max( minsize.y, size.y );
+        // Rest of the filter string
+        filter += "|" + fileFilters[i].m_Description + "|*" + fileFilters[i].m_Extension;
     }
 
-    SetMinSize( minsize );
-    SetPageSize( minsize );
-    GetSizer()->SetSizeHints( this );
-    Center();
+    return filterInit + filter;
 }
 
 
-WIZARD_FPLIB_TABLE::~WIZARD_FPLIB_TABLE()
+// Tries to guess the plugin type basing on the path
+static boost::optional<IO_MGR::PCB_FILE_T> getPluginType( const wxString& aPath )
 {
-    // Use this if you want to store kicad lib URL in pcbnew/cvpcb section config:
-//    wxConfigBase* cfg = Kiface().KifaceSettings();
-    // Use this if you want to store kicad lib URL in common section config:
-    wxConfigBase* cfg = Pgm().CommonSettings();
-    cfg->Write( KICAD_FPLIBS_URL_KEY, m_textCtrlGithubURL->GetValue() );
+    if( ( aPath.StartsWith( "http://"; ) || aPath.StartsWith( "https://"; ) ) && aPath.EndsWith( ".pretty" ) )
+        return boost::optional<IO_MGR::PCB_FILE_T>( IO_MGR::GITHUB );
 
-    m_last_plugin_choice = m_rbFpLibFormat->GetSelection();
-    m_last_defaultpath_choice = m_rbPathManagement->GetSelection();
+    wxFileName file( aPath );
 
-    cfg->Write( WIZARD_LAST_PLUGIN_KEY, m_last_plugin_choice );
-    cfg->Write( WIZARD_LAST_PATHOPTION_KEY, m_last_defaultpath_choice );
+    for( int i = 0; i < FILTER_COUNT; ++i )
+    {
+        if( aPath.EndsWith( fileFilters[i].m_Extension ) &&
+                file.FileExists() == fileFilters[i].m_IsFile )
+            return boost::optional<IO_MGR::PCB_FILE_T>( fileFilters[i].m_Plugin );
+    }
+
+    return boost::optional<IO_MGR::PCB_FILE_T>();
 }
 
 
-void WIZARD_FPLIB_TABLE::initDlg( wxArrayString& aEnvVariableList )
+// Checks if a filename fits specific filter
+static bool passesFilter( const wxString& aFileName, int aFilterIndex )
 {
-    m_currLibDescr = NULL;
-
-    SetBitmap( KiBitmap( wizard_add_fplib_icon_xpm ) );
+    wxASSERT( aFilterIndex <= FILTER_COUNT );
+    wxFileName file( aFileName );
 
-    wxString msg;
-    wxConfigBase* cfg = Pgm().CommonSettings();
-    cfg->Read( WIZARD_LAST_PLUGIN_KEY, &m_last_plugin_choice );
-    cfg->Read( WIZARD_LAST_PATHOPTION_KEY, &m_last_defaultpath_choice );
-    cfg->Read( KICAD_FPLIBS_URL_KEY, &msg );
-
-    if( msg.IsEmpty() )     // Give our current KiCad github URL
-        msg = wxT( "http://github.com/KiCad"; );
-
-    // Be sure there is no trailing '/' at the end of the repo name
-    if( msg.EndsWith( wxT("/" ) ) )
-        msg.RemoveLast();
-
-    m_textCtrlGithubURL->SetValue( msg );
-
-    // KIGITHUB is frequently used (examples in docs, and other place)
-    // So add it if it not yet in list, but if it is defined as env var
-    // (note this env var is not hardcoded or existing in kicad sources)
-    if( aEnvVariableList.Index( wxT("KIGITHUB"), false ) == wxNOT_FOUND )
+    if( aFilterIndex == 0 )         // any supported library format
     {
-        //  Not yet in use in lib table, see in env. vars
-        wxString evValue;
-        wxGetEnv( wxT("KIGITHUB"), &evValue );
-
-        //  Not yet in use in lib table, but it is defined in environment,
-        // so add it, just in case
-        if( ! evValue.IsEmpty() )
-            aEnvVariableList.Add( wxT("KIGITHUB") );
+        boost::optional<IO_MGR::PCB_FILE_T> result = getPluginType( aFileName );
+        return ( result ? true : false );
     }
-
-    m_rowPrjEnvVarPosition = 0;
-    m_predefinedEnvVarCnt = aEnvVariableList.GetCount();
-
-    for( int row = 0; row < m_predefinedEnvVarCnt; row++ )
+    else
     {
-        if( GetEnvVarCount() <= row )
-            m_gridEnvironmentVariablesList->AppendRows(1);
-
-        m_gridEnvironmentVariablesList->SetCellValue( row, 0, aEnvVariableList[row] );
-
-        if( aEnvVariableList[row] == PROJECT_VAR_NAME )
-            m_rowPrjEnvVarPosition = row;
-
-        wxString evValue;
-
-        if( wxGetEnv( aEnvVariableList[row], &evValue ) )
-            m_gridEnvironmentVariablesList->SetCellValue( row, 1, evValue );
-
-        // All these env var are defined outside the wizard,
-        // and cannot be modified in this dialog
-        m_gridEnvironmentVariablesList->SetReadOnly( row, 0, true );
-        m_gridEnvironmentVariablesList->SetReadOnly( row, 1, true );
+        if( aFileName.EndsWith( fileFilters[aFilterIndex - 1].m_Extension ) &&
+                file.FileExists() == fileFilters[aFilterIndex - 1].m_IsFile )
+            return true;
     }
 
-    m_gridEnvironmentVariablesList->Fit();
-
-    m_buttonRemoveEV->Enable( GetEnvVarCount() > m_predefinedEnvVarCnt );
-    m_gridEnvironmentVariablesList->AutoSizeColumns();
+    return false;
+}
 
-    m_rbFpLibFormat->SetSelection( m_last_plugin_choice );
-    m_rbPathManagement->SetSelection( m_last_defaultpath_choice );
 
-    wxCommandEvent event;
-    updateFromPlugingChoice();
-    OnPathManagementSelection( event );
+WIZARD_FPLIB_TABLE::LIBRARY::LIBRARY( const wxString& aPath, const wxString& aDescription ) :
+    m_path( aPath ), m_description( aDescription ), m_status( NOT_CHECKED )
+{
+    m_plugin = getPluginType( aPath );
 }
 
-int WIZARD_FPLIB_TABLE::HasGithubEnvVarCompatible()
+
+bool WIZARD_FPLIB_TABLE::LIBRARY::Test()
 {
-    // Return true if at least one env var defines a url relative to github
-    for( int row = 0; row < GetEnvVarCount(); row++ )
+    if( !m_plugin )
     {
-        if( m_gridEnvironmentVariablesList->GetCellValue(
-                wxGridCellCoords( row, 1 ) ).Lower().StartsWith( "http" ) )
-            return row;
+        m_status = LIBRARY::INVALID;
+        return false;
     }
 
-    return -1;
-}
-
+    PLUGIN* p = IO_MGR::PluginFind( *m_plugin );
+    wxArrayString footprints;
 
-bool WIZARD_FPLIB_TABLE::ValidateOptions()
-{
-    // Some choices can be conficting or do not work.
-    // Warn the user when this is the case
-    wxString msg;
+    if( !p )
+    {
+        m_status = LIBRARY::INVALID;
+        return false;
+    }
 
-    if( getSelectedEnvVarValue().IsEmpty() )
+    try
     {
-        // PROJECT_PATH option cannot be used with empty local path
-        if( m_rbPathManagement->GetSelection() == PROJECT_PATH )
-        {
-            msg = _("The project path is empty and this option is not valid.\n"
-                    "Looks like you are running the wizard outside a project.");
-            wxMessageBox( msg );
-            return false;
-        }
-        else if( m_rbPathManagement->GetSelection() != ABSOLUTE_PATH )
-        {
-            wxMessageBox( wxString::Format(
-                _("The default path defined by env var \"%s\" is empty.\nCannot use it"),
-                GetChars( getSelectedEnvVar() ) ) );
-            return false;
-        }
+        footprints = p->FootprintEnumerate( m_path );
     }
-    else
+    catch( IO_ERROR& e )
     {
-        if( IsGithubPlugin() )
-        {
-            // Github plugin cannot be used with local path; Need absolute path or valid URL
-            if( !getSelectedEnvVarValue().Lower().StartsWith( "http" ) )
-            {
-                msg = _("Github Plugin uses a valid Internet URL starting by http.\n"
-                        "Cannot be used as URL");
-                wxMessageBox( msg );
-                return false;
-            }
-        }
-        else
-        {
-            if( getSelectedEnvVarValue().Lower().StartsWith( "http" ) )
-            {
-                msg = _("This default path looks strange.\n"
-                        "Cannot be used for a file path");
-                wxMessageBox( msg );
-                return false;
-            }
-        }
+        m_status = LIBRARY::INVALID;
+        return false;
     }
 
-    // Other conficts: TODO
+    if( footprints.GetCount() == 0 )
+    {
+        m_status = LIBRARY::INVALID;
+        return false;
+    }
 
+    m_status = LIBRARY::OK;
     return true;
 }
 
 
-void WIZARD_FPLIB_TABLE::OnPluginSelection( wxCommandEvent& event )
+wxString WIZARD_FPLIB_TABLE::LIBRARY::GetPluginName() const
 {
-    updateFromPlugingChoice();
-}
+    if( !m_plugin )
+        return _( "UNKNOWN" );
 
-void WIZARD_FPLIB_TABLE::updateFromPlugingChoice()
-{
-    #ifdef BUILD_GITHUB_PLUGIN
-    m_buttonGithubLibList->Show( IsGithubPlugin() || IsKicadPlugin() );
-    #endif
+    switch( *m_plugin )
+    {
+        case IO_MGR::LEGACY:
+            return wxT( "Legacy" );
 
-    // update dialog options and widgets depending on a plugin choice
-    // Project path has no sense for GITHUB_PLUGIN
-    bool enablePrjPathOpt = not IsGithubPlugin();
+        case IO_MGR::KICAD:
+            return wxT( "KiCad" );
 
-    // Project path cannot be used if unknown
-    if( m_gridEnvironmentVariablesList->GetCellValue(
-                                wxGridCellCoords( m_rowPrjEnvVarPosition, 1 ) ).IsEmpty() )
-        enablePrjPathOpt = false;
+        case IO_MGR::EAGLE:
+            return wxT( "Eagle" );
 
-    m_rbPathManagement->Enable( PROJECT_PATH, enablePrjPathOpt );
+        case IO_MGR::GEDA_PCB:
+            return wxT( "Geda-PCB" );
 
-    // Sometimes only the choice "absolute path" is allowed;
-    // Force this choice, at least make it the default choice
-    bool force_absolute_path = false;
+        case IO_MGR::GITHUB:
+            return wxT( "Github" );
 
-    // For github plugin, the project path is not allowed
-    if( ( m_rbPathManagement->GetSelection() == PROJECT_PATH ) && !enablePrjPathOpt )
-        force_absolute_path = true;
+        default:
+            return _( "UNKNOWN" );
+    }
 
-    // For github plugin, at least one github compatible path must exist
-    // If no github path, force absolute path
-    int first_github_envvar = HasGithubEnvVarCompatible();
-    if( IsGithubPlugin() )
-    {
-        if( first_github_envvar < 0 )
-            force_absolute_path = true;
-        else if( !getSelectedEnvVarValue().StartsWith( "http" ) )
-                m_gridEnvironmentVariablesList->SelectRow( first_github_envvar );
+    /*PLUGIN* p = IO_MGR::PluginFind( *m_plugin );
 
-    }
+    if( !p )
+        return _( "UNKNOWN" );
 
-    if( force_absolute_path )
-        m_rbPathManagement->SetSelection( ABSOLUTE_PATH );
+    return p->PluginName();*/
 }
 
 
-void WIZARD_FPLIB_TABLE::OnPathManagementSelection( wxCommandEvent& event )
+wxString WIZARD_FPLIB_TABLE::LIBRARY::GetProjectPath( const wxString& aBase ) const
 {
-    // Disable irrevant options, and enable others.
-    int row_count = GetEnvVarCount();
-
-    switch( m_rbPathManagement->GetSelection() )
-    {
-        case PROJECT_PATH:          // Choice = path relative to the project
-            m_gridEnvironmentVariablesList->Enable( true );
-            m_buttonAddEV->Enable( false );
-            m_gridEnvironmentVariablesList->ShowRow( PROJECT_PATH );
+    // Somehow URLs are not easy to make them relative to the project path
+    if( m_plugin && *m_plugin == IO_MGR::GITHUB )
+        return m_path;
+
+    wxFileName libPath( m_path );
+    if( libPath.MakeRelativeTo( aBase ) )
+        // Successfully got the relative path
+        return wxT( "$(KIPRJMOD)/" ) + libPath.GetFullPath();
+    else
+        // Probably on another drive, relative path will not work - return the absolute path
+        return m_path;
+}
 
-            for( int row = 0; row < row_count; row++ )
-            {
-                if( row == PROJECT_PATH )
-                    continue;
 
-                m_gridEnvironmentVariablesList->HideRow( row );
-            }
-            break;
+wxString WIZARD_FPLIB_TABLE::LIBRARY::GetDescription() const
+{
+    if( !m_description.IsEmpty() )
+        return m_description;
 
-        case ENV_VAR_PATH:          // Choice = path relative to env var
-            m_gridEnvironmentVariablesList->Enable( true );
-            m_buttonAddEV->Enable( true );
+    wxFileName filename( m_path );
+    return filename.GetFullName();
+}
 
-            for( int row = 0; row < row_count; row++ )
-                m_gridEnvironmentVariablesList->ShowRow( row );
 
-            break;
+WIZARD_FPLIB_TABLE::WIZARD_FPLIB_TABLE( wxWindow* aParent ) :
+    WIZARD_FPLIB_TABLE_BASE( aParent ), m_welcomeDlg( m_pages[0] ),
+    m_fileSelectDlg( m_pages[1] ), m_githubListDlg( m_pages[2] ),
+    m_reviewDlg( m_pages[3] ), m_targetDlg( m_pages[4] ), m_selectedFilter( 0 )
+{
+    m_filePicker->SetFilter( getFilterString() );
 
-        case ABSOLUTE_PATH:          // Choice = path relative to the project
-            m_gridEnvironmentVariablesList->Enable( false );
-            m_buttonAddEV->Enable( false );
-            break;
-    }
-}
+#ifndef BUILD_GITHUB_PLUGIN
+    m_radioAddGithub->Enable( false );
+    m_textCtrlGithubURL->Enable( false );
+#endif
 
-void WIZARD_FPLIB_TABLE::OnAddEVariable( wxCommandEvent& event )
-{
-    m_gridEnvironmentVariablesList->AppendRows( 1 );
-    m_gridEnvironmentVariablesList->AutoSizeColumns();
-    m_buttonRemoveEV->Enable( GetEnvVarCount() > m_predefinedEnvVarCnt );
-    m_gridEnvironmentVariablesList->SetGridCursor( GetEnvVarCount()-1, 0 );
-}
+    // Restore the Github url
+    wxString githubUrl;
+    wxConfigBase* cfg = Pgm().CommonSettings();
+    cfg->Read( KICAD_FPLIBS_URL_KEY, &githubUrl );
 
-void WIZARD_FPLIB_TABLE::OnRemoveEVariable( wxCommandEvent& event )
-{
-    wxArrayInt selectedRows	= m_gridEnvironmentVariablesList->GetSelectedRows();
-    int row_cursor = m_gridEnvironmentVariablesList->GetGridCursorRow();
+    if( githubUrl.IsEmpty() )
+        githubUrl = wxT( "http://github.com/KiCad"; );
 
-    if( selectedRows.size() == 0 && row_cursor >= 0 )
-        selectedRows.Add( row_cursor );
+    SetGithubURL( githubUrl );
 
-    std::sort( selectedRows.begin(), selectedRows.end() );
+    // Give the minimal size to the dialog, which allows displaying any page
+    wxSize minsize;
 
-    for( int ii = selectedRows.GetCount()-1; ii >= 0; ii-- )
+    for( unsigned ii = 0; ii < m_pages.size(); ii++ )
     {
-        int row = selectedRows[ii];
-
-        // don't remove them env var. which are already existing in lib table
-        if( row > m_predefinedEnvVarCnt-1 )
-            m_gridEnvironmentVariablesList->DeleteRows( row, 1 );
+        wxSize size = m_pages[ii]->GetSizer()->CalcMin();
+        minsize.x = std::max( minsize.x, size.x );
+        minsize.y = std::max( minsize.y, size.y );
     }
 
-    m_gridEnvironmentVariablesList->SelectRow( m_gridEnvironmentVariablesList->GetGridCursorRow() );
-    m_buttonRemoveEV->Enable( GetEnvVarCount() > m_predefinedEnvVarCnt );
-}
+    SetMinSize( minsize );
+    SetPageSize( minsize );
+    GetSizer()->SetSizeHints( this );
+    Center();
 
-void WIZARD_FPLIB_TABLE::OnSelectEnvVarCell( wxGridEvent& event )
-{
-    // Ensure the selected row is also the row which have the focus.
-    // useful when the user want to delete a row, and select it by the mouse
-    m_gridEnvironmentVariablesList->SelectRow( event.GetRow() );
-}
+    if( !m_radioAddGithub->GetValue() && !m_radioAddLocal->GetValue() )
+        m_radioAddLocal->SetValue( true );
 
-wxString WIZARD_FPLIB_TABLE::getSelectedEnvVar()
-{
-    wxString envVar;
-    wxArrayInt selectedRows	= m_gridEnvironmentVariablesList->GetSelectedRows();
-    int row   = selectedRows.GetCount() ? selectedRows[0] :
-                m_gridEnvironmentVariablesList->GetGridCursorRow();
+    setupDialogOrder();
 
-    switch( m_rbPathManagement->GetSelection() )
-    {
-        case ENV_VAR_PATH:    // Choice = path relative to env var
-            envVar = m_gridEnvironmentVariablesList->GetCellValue(
-                                wxGridCellCoords( row, 0 ) );
-            break;
+    Connect( wxEVT_RADIOBUTTON, wxCommandEventHandler( WIZARD_FPLIB_TABLE::OnRadioCheck ), NULL, this );
+    Connect( wxEVT_DIRCTRL_SELECTIONCHANGED, wxCommandEventHandler( WIZARD_FPLIB_TABLE::OnSelectFiles ), NULL, this );
+    Connect( wxEVT_CHECKLISTBOX, wxCommandEventHandler( WIZARD_FPLIB_TABLE::OnCheckGithubList ), NULL, this );
+}
 
-        case PROJECT_PATH:    // Choice = path relative to the project
-            envVar = PROJECT_VAR_NAME;
-            break;
 
-        case ABSOLUTE_PATH:    // Choice = absolute path
-        default:
-            break;
-    }
+WIZARD_FPLIB_TABLE::~WIZARD_FPLIB_TABLE()
+{
+    // Use this if you want to store kicad lib URL in pcbnew/cvpcb section config:
+//    wxConfigBase* cfg = Kiface().KifaceSettings();
 
-    return envVar;
+    // Use this if you want to store kicad lib URL in common section config:
+    wxConfigBase* cfg = Pgm().CommonSettings();
+    cfg->Write( KICAD_FPLIBS_URL_KEY, GetGithubURL() );
 }
 
 
-wxString WIZARD_FPLIB_TABLE::getSelectedEnvVarValue()
+WIZARD_FPLIB_TABLE::LIB_SOURCE WIZARD_FPLIB_TABLE::GetLibSource() const
 {
-    wxString envVarValue;
-    wxArrayInt selectedRows	= m_gridEnvironmentVariablesList->GetSelectedRows();
-    int row   = selectedRows.GetCount() ? selectedRows[0] :
-                m_gridEnvironmentVariablesList->GetGridCursorRow();
-
-    switch( m_rbPathManagement->GetSelection() )
-    {
-        case ENV_VAR_PATH:    // Choice = path relative tp env var
-            envVarValue = m_gridEnvironmentVariablesList->GetCellValue(
-                                wxGridCellCoords( row, 1 ) );
-            break;
+    if( m_radioAddGithub->GetValue() )
+        return GITHUB;
 
-        case PROJECT_PATH:    // Choice = path relative to the project
-            envVarValue = m_gridEnvironmentVariablesList->GetCellValue(
-                                wxGridCellCoords( m_rowPrjEnvVarPosition, 1 ) );
-            break;
+    wxASSERT( m_radioAddLocal->GetValue() );
 
-        case ABSOLUTE_PATH:    // Choice = absolute path
-        default:
-            break;
-    }
-
-    return envVarValue;
+    return LOCAL;
 }
 
-void WIZARD_FPLIB_TABLE::OnPageChanged( wxWizardEvent& event )
-{
-    if( GetCurrentPage() == m_pages[2] )
-        setLastPage();
-    else if( GetCurrentPage() == m_pages[1] )
-        setSecondPage();
-}
 
-void WIZARD_FPLIB_TABLE::OnPageChanging( wxWizardEvent& event )
+WIZARD_FPLIB_TABLE::LIB_SCOPE WIZARD_FPLIB_TABLE::GetLibScope() const
 {
-    if( !( GetCurrentPage() == m_pages[1] && event.GetDirection() ) )
-        return;
+    if( m_radioGlobal->GetValue() )
+        return GLOBAL;
 
-    if( ! ValidateOptions() )
-    {
-        event.Veto();
-        return;
-    }
+    wxASSERT( m_radioProject->GetValue() );
 
-    if( ( m_rbPathManagement->GetSelection() != ABSOLUTE_PATH ) &&
-        ( IsGithubPlugin() ) )
-    {
-        wxURI uri( getSelectedEnvVarValue() );
+    return PROJECT;
+}
 
-        // We cannot use wxURL to test the validity of the url, because
-        // wxURL does not know https protocol we are using, and aways returns
-        // error for url starting by https
-        bool badurl = !uri.HasPath();
 
-        if( badurl )
-        {
-            wxMessageBox( wxString::Format(
-                _("The URL defined by env var \"%s\" is an incorrect URL.\nCannot use it"),
-                GetChars( getSelectedEnvVar() ) ) );
-            event.Veto();
-        }
-    }
+void WIZARD_FPLIB_TABLE::OnPageChanged( wxWizardEvent& aEvent )
+{
+    SetBitmap( KiBitmap( wizard_add_fplib_icon_xpm ) );
+    EnableNext( true );
+
+    if( GetCurrentPage() == m_githubListDlg )
+        setupGithubList();
+    else if( GetCurrentPage() == m_fileSelectDlg )
+        setupFileSelect();
+    else if( GetCurrentPage() == m_reviewDlg )
+        setupReview();
 }
 
-bool WIZARD_FPLIB_TABLE::setSecondPage()
-{
-    // Init parameters for the second wizard page: this is only
-    // the current library description.
-    updateFromPlugingChoice();
 
-    delete m_currLibDescr;
-    m_currLibDescr = NULL;
+void WIZARD_FPLIB_TABLE::OnSelectFiles( wxCommandEvent& aEvent )
+{
+    int filterIdx = m_filePicker->GetFilterIndex();
 
-    switch( m_rbFpLibFormat->GetSelection() )
+    if( m_selectedFilter != filterIdx )
     {
-        case 0:     // Kicad lib type
-            m_currLibDescr = new LIB_DESCR_KICAD;
-            m_buttonGithubLibList->SetLabel( _("Download Github Libs") );
-            break;
-
-        case 1:     // Github lib type
-            m_currLibDescr = new LIB_DESCR_GITHUB;
-            m_buttonGithubLibList->SetLabel( _("Github Libs List") );
-            break;
-
-        case 2:     // Legacy lib type
-            m_currLibDescr = new LIB_DESCR_LEGACY;
-            break;
-
-        case 3:     // Eagle V6 lib type
-            m_currLibDescr = new LIB_DESCR_EAGLE;
-            break;
-
-        case 4:     // Geda lib type
-            m_currLibDescr = new LIB_DESCR_GEDA;
-            break;
-    }
+        m_selectedFilter = filterIdx;
 
-    if( IsGithubPlugin() )
-    {
-#ifdef KICAD_USE_WEBKIT
-        m_buttonAddLib->SetLabel( _("Add Libs with WebViewer") );
-#else
-        m_buttonAddLib->SetLabel( _("Add FP Library entry") );
-#endif
+        // Process the event again, as in the first iteration we cannot get the list of selected items
+        wxCommandEvent ev( wxEVT_DIRCTRL_SELECTIONCHANGED );
+        AddPendingEvent( ev );
+        return;
     }
-    else
-        m_buttonAddLib->SetLabel( _("Add FP Libraries") );
 
-    return m_currLibDescr!= NULL;
+    EnableNext( checkFiles() );
 }
 
-bool WIZARD_FPLIB_TABLE::setLastPage()     // Init prms for the last wizard page
-{
-    // Update texts in last wizard page
-    m_textPluginType->SetLabel( m_rbFpLibFormat->GetStringSelection() );
 
-    switch( m_rbPathManagement->GetSelection() )
-    {
-        case ENV_VAR_PATH:    // Choice = path relative env var
-        case PROJECT_PATH:    // Choice = path relative to the project
-            m_currLibDescr->m_EnvVarName = getSelectedEnvVar();
-            m_currLibDescr->m_DefaultPath = getSelectedEnvVarValue();
-            m_currLibDescr->m_IsAbsolutePath = false;
+void WIZARD_FPLIB_TABLE::OnCheckGithubList( wxCommandEvent& aEvent )
+{
+    wxArrayInt dummy;
 
-            m_textOption->SetLabel( wxString::Format( wxT("%s (%s)"),
-                m_rbPathManagement->GetStringSelection().GetData(),
-                getSelectedEnvVar().GetData() ) );
+    EnableNext( m_checkListGH->GetCheckedItems( dummy ) > 0 );
+}
 
-            m_textPath->SetLabel( getSelectedEnvVarValue() );
-            break;
 
-        case ABSOLUTE_PATH:    // Choice = absolute path
-            m_currLibDescr->m_IsAbsolutePath = true;
+void WIZARD_FPLIB_TABLE::OnRadioCheck( wxCommandEvent& aEvent )
+{
+    setupDialogOrder();
+}
 
-            m_textOption->SetLabel( m_rbPathManagement->GetStringSelection() );
 
-            if( IsGithubPlugin() )
-                m_textPath->SetLabel( _("Full URL") );
-            else
-                m_textPath->SetLabel( _("Full filename") );
-            break;
-    }
+void WIZARD_FPLIB_TABLE::OnSelectAllGH( wxCommandEvent& aEvent )
+{
+    for( unsigned int i = 0; i < m_checkListGH->GetCount(); ++i )
+        m_checkListGH->Check( i, true );
 
-    return true;
+    // The list might be empty, e.g. in case of download error
+    wxArrayInt dummy;
+    EnableNext( m_checkListGH->GetCheckedItems( dummy ) > 0 );
 }
 
 
-
-void WIZARD_FPLIB_TABLE::OnAddFpLibs( wxCommandEvent& event )
+void WIZARD_FPLIB_TABLE::OnUnselectAllGH( wxCommandEvent& aEvent )
 {
-    if( m_currLibDescr->m_IsFile )
-        selectLibsFiles();
-    else if( m_currLibDescr->m_IsGitHub )
-        selectLibsGithubWithWebViewer();
-    else
-        selectLibsFolders();
+    for( unsigned int i = 0; i < m_checkListGH->GetCount(); ++i )
+        m_checkListGH->Check( i, false );
 
-    m_gridFpListLibs->SetGridCursor( GetLibsCount()-1, 0 );
-    m_gridFpListLibs->SelectRow( GetLibsCount()-1 );
+    EnableNext( false );
 }
 
-void WIZARD_FPLIB_TABLE::selectLibsFiles()     // select a set of library files
-{
-    wxString msk = wxT("*.") + m_currLibDescr->m_Ext;
 
-    wxFileDialog dlg( this, _("Select Library Files"), m_currLibDescr->m_DefaultPath,
-                      wxEmptyString, msk,
-                      wxFD_DEFAULT_STYLE|wxFD_FILE_MUST_EXIST|wxFD_MULTIPLE );
+void WIZARD_FPLIB_TABLE::OnChangeSearch( wxCommandEvent& aEvent )
+{
+    wxString searchPhrase = m_searchCtrlGH->GetValue().Lower();
 
-    dlg.ShowModal();
+    // Store the current selection
+    wxArrayInt checkedIndices;
+    m_checkListGH->GetCheckedItems( checkedIndices );
+    wxArrayString checkedStrings;
 
-    wxArrayString filepaths;
-    dlg.GetPaths( filepaths );
+    for( unsigned int i = 0; i < checkedIndices.GetCount(); ++i )
+        checkedStrings.Add( m_checkListGH->GetString( checkedIndices[i] ).AfterLast( '/' ) );
 
-    // Create the nickname: currently make it from the filename
-    wxArrayString nicknames;
-    wxFileName fn;
+    m_checkListGH->Clear();
 
-    for( unsigned ii = 0; ii < filepaths.GetCount(); ii++ )
+    // Rebuild the list, putting the matching entries on the top
+    int matching = 0;   // number of entries matching the search phrase
+    for( unsigned int i = 0; i < m_githubLibs.GetCount(); ++i )
     {
-        fn = filepaths[ii];
-        nicknames.Add( fn.GetName() );
+        const wxString& lib = m_githubLibs[i].AfterLast( '/' );
+        bool wasChecked = ( checkedStrings.Index( lib ) != wxNOT_FOUND );
+        int insertedIdx = -1;
 
-        if( m_currLibDescr->m_IsAbsolutePath || m_currLibDescr->m_DefaultPath.IsEmpty() )
+        if( !searchPhrase.IsEmpty() && lib.Lower().Contains( searchPhrase ) )
         {
-            filepaths[ii] = fn.GetPathWithSep();
+            insertedIdx = m_checkListGH->Insert( lib, matching++ );
+            m_checkListGH->SetSelection( insertedIdx );
         }
         else
-        {
-            if( ! fn.MakeRelativeTo( m_currLibDescr->m_DefaultPath ) )
-                filepaths[ii] = fn.GetFullPath();
-            else
-                filepaths[ii].Printf( wxT("${%s}%c%s"),
-                    GetChars( m_currLibDescr->m_EnvVarName ),
-                    fn.GetPathSeparator(),
-                    GetChars( fn.GetFullPath() ) );
-        }
-#ifdef __WINDOWS__
-        // We store paths using Unix notation, which also works fine on Windows
-        filepaths[ii].Replace( wxT("\\"), wxT("/") );
-#endif
+            insertedIdx = m_checkListGH->Append( lib );
+
+        if( wasChecked )
+            m_checkListGH->Check( insertedIdx );
     }
 
-    populateLibList( nicknames, filepaths, m_currLibDescr->m_PluginName );
-    m_gridFpListLibs->AutoSizeColumns();
+    if( !m_checkListGH->IsEmpty() )
+        m_checkListGH->EnsureVisible( 0 );
 }
 
 
-void WIZARD_FPLIB_TABLE::populateLibList( const wxArrayString& aNickNames,
-                                          const wxArrayString& aPaths,
-                                          const wxString& aPluginName )
+bool WIZARD_FPLIB_TABLE::checkFiles() const
 {
-    if( aPaths.GetCount() <= 0 )
-        return;
+    // Get current selection (files & directories)
+    wxArrayString candidates;
+    m_filePicker->GetPaths( candidates );
 
-    // Ensure there is room for selected libs
-    int first_row = m_gridFpListLibs->GetTable()->GetRowsCount();
-    m_gridFpListLibs->AppendRows( aPaths.GetCount() );
-
-    // Populates the library list
-    for( unsigned ii = 0; ii < aPaths.GetCount(); ii++ )
-    {
-        int jj = first_row + ii;
-        // Add the nickname: currently make it from filename
-        m_gridFpListLibs->SetCellValue( jj, 0, aNickNames[ii] );
-        // Add the full path:
-        m_gridFpListLibs->SetCellValue( jj, 1, aPaths[ii] );
-        // Add the plugin name:
-        m_gridFpListLibs->SetCellValue( jj, 2, aPluginName );
-        m_gridFpListLibs->SetReadOnly( jj, 2, true );
-    }
-
-    m_gridFpListLibs->Fit();
-}
+    // Workaround, when you change filters "/" is automatically selected
+    int slash_index = candidates.Index( "/", true, true );
+    if( slash_index != wxNOT_FOUND )
+        candidates.RemoveAt( slash_index, 1 );
 
+    if( candidates.IsEmpty() )
+        return false;
 
-// A helper dialog to show and select a set of directories
-class DIALOG_SELECT_DIRLIST : public DIALOG_SELECT_DIRLIST_BASE
-{
-public:
-    DIALOG_SELECT_DIRLIST( wxWindow* parent,
-                              const wxString& aDefaultPath ):
-                DIALOG_SELECT_DIRLIST_BASE( parent, wxID_ANY )
+    // Verify all the files/folders comply to the selected library type filter
+    for( unsigned int i = 0; i < candidates.GetCount(); ++i )
     {
-        if( !aDefaultPath.IsEmpty() )
-            m_dirCtrl->SetPath( aDefaultPath );
-
-        Layout();
-        GetSizer()->Fit( this );
-        GetSizer()->SetSizeHints(this);
-        Centre();
+        if( !passesFilter( candidates[i], m_filePicker->GetFilterIndex() ) )
+            return false;
     }
 
-    ~DIALOG_SELECT_DIRLIST() {};
+    return true;
+}
 
-    void GetPaths( wxArrayString& aPaths ) { m_dirCtrl->GetPaths( aPaths ); }
-};
 
-void WIZARD_FPLIB_TABLE::selectLibsFolders()   // select a set of library folders
+#ifdef BUILD_GITHUB_PLUGIN
+void WIZARD_FPLIB_TABLE::getLibsListGithub( wxArrayString& aList )
 {
-    DIALOG_SELECT_DIRLIST dlg( this, m_currLibDescr->m_DefaultPath );
-
-    if( dlg.ShowModal() != wxID_OK )
-        return;
-
-    wxArrayString filepaths;
-
-    dlg.GetPaths( filepaths );
+    wxBeginBusyCursor();
 
-    // Create the nickname: currently make it from the filename
-    wxArrayString nicknames;
-    wxFileName fn;
+    // Be sure there is no trailing '/' at the end of the repo name
+    wxString git_url = m_textCtrlGithubURL->GetValue();
 
-    for( unsigned ii = 0; ii < filepaths.GetCount(); ii++ )
+    if( git_url.EndsWith( wxT( "/" ) ) )
     {
-        fn = filepaths[ii];
-        nicknames.Add( fn.GetName() );
-
-        fn.AssignDir( filepaths[ii] );
-
-        if( m_currLibDescr->m_IsAbsolutePath || m_currLibDescr->m_DefaultPath.IsEmpty() )
-        {
-            filepaths[ii] = fn.GetFullPath();
-        }
-        else
-        {
-            if( ! fn.MakeRelativeTo( m_currLibDescr->m_DefaultPath ) )
-                filepaths[ii] = fn.GetFullPath();
-            else
-                filepaths[ii].Printf( wxT("${%s}%c%s"),
-                    GetChars( m_currLibDescr->m_EnvVarName ),
-                    fn.GetPathSeparator(),
-                    GetChars( fn.GetFullPath() ) );
-        }
-#ifdef __WINDOWS__
-        // We store paths using Unix notation, which also works fine on Windows
-        filepaths[ii].Replace( wxT("\\"), wxT("/") );
-#endif
-        // Remove trailing path separator, if any.
-        if( filepaths[ii].EndsWith( wxT("/") ) )
-            filepaths[ii].RemoveLast();
+        git_url.RemoveLast();
+        m_textCtrlGithubURL->SetValue( git_url );
     }
 
-    populateLibList( nicknames, filepaths, m_currLibDescr->m_PluginName );
-}
-
-#ifdef KICAD_USE_WEBKIT
-
-// A helper function to run the wen viewer (see webviewer.cpp)
-extern int RunWebViewer( wxWindow * aParent, const wxString& aUrlOnStart,
-                         wxArrayString* aUrlListSelection = NULL );
-#endif
+    GITHUB_GETLIBLIST getter( git_url );
+    getter.GetLibraryList( aList );
 
-void WIZARD_FPLIB_TABLE::selectLibsGithubWithWebViewer()    // select a set of library on Github
-{
-    // A string array to store the URLs selected from the web viewer:
-    wxArrayString urls;
-
-    // Run the web viewer and open the default URL: the default path
-    // or our github library repos
-    wxString defaultURL = m_currLibDescr->m_DefaultPath;
-
-    if( defaultURL.IsEmpty() )
-        defaultURL = wxT( "https://github.com/KiCad"; );
-#ifdef KICAD_USE_WEBKIT
-    RunWebViewer( this, defaultURL, &urls );
-#else
-    // If the Web Viewer is not available, just add a template
-    // to the fp lib table.
-    // The user have to edit it
-    urls.Add( defaultURL + wxT("/newlibname.pretty") );
-#endif
-    installGithubLibsFromList( urls );
+    wxEndBusyCursor();
 }
+#endif /* BUILD_GITHUB_PLUGIN */
 
-void WIZARD_FPLIB_TABLE::installGithubLibsFromList( wxArrayString& aUrlList )
+
+void WIZARD_FPLIB_TABLE::updateLibraries()
 {
-    // add the libs found in aUrlList, after calculating a nickname and
-    // replacing the path by an env variable, if needed
-    // Create the nickname: currently make it from the url
-    wxArrayString filepaths;
-    wxArrayString nicknames;
+    // No need to update, the review list is ready
+    if( m_listCtrlReview->GetItemCount() != 0 )
+        return;
 
-    for( unsigned ii = 0; ii < aUrlList.GetCount(); ii++ )
+    switch( GetLibSource() )
     {
-        wxString urlstring( aUrlList[ii] );
+    case LOCAL:
+    {
+        wxArrayString libs;
+        m_filePicker->GetPaths( libs );
 
-        wxURI uri( urlstring );
+        // Workaround, when you change filters "/" is automatically selected
+        int slash_index = libs.Index( "/", true, true );
+        if( slash_index != wxNOT_FOUND )
+            libs.RemoveAt( slash_index, 1 );
 
-        // We cannot use wxURL to test the validity of the url, because
-        // wxURL does not know https protocol we are using, and aways returns
-        // error for URLs starting by https. Hope this test is enough
-        if( uri.HasPath() )
-            nicknames.Add( uri.GetPath().AfterLast( '/').BeforeLast( '.' ) );
-        else
-            continue;   // Should not happen: bad URL
+        m_libraries.reserve( libs.GetCount() );
 
-        if( m_currLibDescr->m_IsAbsolutePath ||
-            m_currLibDescr->m_DefaultPath.IsEmpty() )
-        {
-            filepaths.Add( aUrlList[ii] );  // use the full URL
-        }
-        else
-        {
-            wxString shortURI;
-            if( aUrlList[ii].Lower().StartsWith(
-                        m_currLibDescr->m_DefaultPath.Lower(), &shortURI ) )
-            {
-                shortURI.Prepend( wxT("${") + m_currLibDescr->m_EnvVarName + wxT("}") );
-                filepaths.Add( shortURI );
-            }
-            else    //  keep the full URL
-                filepaths.Add( aUrlList[ii] );   // use the full URL
-        }
+        for( unsigned int i = 0; i < libs.GetCount(); ++i )
+            m_libraries.push_back( libs[i] );
     }
+    break;
 
-    populateLibList( nicknames, filepaths, m_currLibDescr->m_PluginName );
-}
-
-
-void WIZARD_FPLIB_TABLE::OnRemoveFpLibs( wxCommandEvent& event )
-{
-    wxArrayInt selectedRows	= m_gridFpListLibs->GetSelectedRows();
-    int row_cursor = m_gridFpListLibs->GetGridCursorRow();
-
-    if( selectedRows.size() == 0 && row_cursor >= 0 )
-        selectedRows.Add( row_cursor );
+    case GITHUB:
+    {
+        wxArrayInt checkedLibs;
+        m_checkListGH->GetCheckedItems( checkedLibs );
 
-    std::sort( selectedRows.begin(), selectedRows.end() );
+        m_libraries.reserve( checkedLibs.GetCount() );
 
-    for( int ii = selectedRows.GetCount()-1; ii >= 0; ii-- )
-    {
-        int row = selectedRows[ii];
-        m_gridFpListLibs->DeleteRows( row, 1 );
+        for( unsigned int i = 0; i < checkedLibs.GetCount(); ++i )
+            m_libraries.push_back( GetGithubURL() + "/" + m_checkListGH->GetString( checkedLibs[i] ) );
     }
+    break;
 
-    m_gridFpListLibs->SelectRow( m_gridFpListLibs->GetGridCursorRow() );
+    default:
+        wxASSERT( false );
+        break;
+    }
 }
 
-#ifdef BUILD_GITHUB_PLUGIN
-#include <../github/github_getliblist.h>
 
-void WIZARD_FPLIB_TABLE::OnGithubLibsList( wxCommandEvent& event )
+void WIZARD_FPLIB_TABLE::setupDialogOrder()
 {
-    wxArrayString liblist;
-    getLibsListGithub( liblist );
+    // Alternate the wizard pages flow depending on the selected option
+    switch( GetLibSource() )
+    {
+    case LOCAL:
+        m_welcomeDlg->SetNext( m_fileSelectDlg );
+        m_fileSelectDlg->SetPrev( m_welcomeDlg );
 
-    if( liblist.GetCount() == 0 )   // No lib selected
-        return;
+        m_fileSelectDlg->SetNext( m_reviewDlg );
+        m_reviewDlg->SetPrev( m_fileSelectDlg );
+        break;
 
-    if( IsKicadPlugin() )
-    {
-        wxString msg;
+    case GITHUB:
+        m_welcomeDlg->SetNext( m_githubListDlg );
+        m_githubListDlg->SetPrev( m_welcomeDlg );
 
-        if( !downloadGithubLibsFromList( liblist, &msg ) )
-        {
-            wxMessageBox( msg );
-            return;
-        }
+        m_githubListDlg->SetNext( m_reviewDlg );
+        m_reviewDlg->SetPrev( m_githubListDlg );
+        break;
+
+    default:
+        wxASSERT( false );
+        break;
     }
-    else
-        installGithubLibsFromList( liblist );
 }
 
-void WIZARD_FPLIB_TABLE::getLibsListGithub( wxArrayString& aList )
-{
-    wxBeginBusyCursor();
 
-    // Be sure there is no trailing '/' at the end of the repo name
-    wxString git_url = m_textCtrlGithubURL->GetValue();
-    if( git_url.EndsWith( wxT("/" ) ) )
-    {
-        git_url.RemoveLast();
-        m_textCtrlGithubURL->SetValue( git_url );
-    }
+void WIZARD_FPLIB_TABLE::setupGithubList()
+{
+    // Enable 'Next' only if there is at least one library selected
+    wxArrayInt checkedIndices;
+    m_checkListGH->GetCheckedItems( checkedIndices );
+    EnableNext( checkedIndices.GetCount() > 0 );
 
-    GITHUB_GETLIBLIST getter( git_url );
+    // Update only if necessary
+    if( m_githubLibs.GetCount() == 0 )
+        getLibsListGithub( m_githubLibs );
 
-    wxArrayString fullList;
-    getter.GetLibraryList( fullList );
+    m_searchCtrlGH->Clear();
 
-    wxEndBusyCursor();
+    // Clear the review list so it will be reloaded
+    m_libraries.clear();
+    m_listCtrlReview->DeleteAllItems();
+}
 
-    wxArrayInt choices;
-    wxString msg( _( "Urls detected as footprint .pretty libraries.\n"
-                     "Selected urls will be added to the current footprint library list" ) );
 
-    if( wxGetSelectedChoices( choices, msg,
-                _( "Footprint libraries" ), fullList, this ) <= 0 )
-        return;
+void WIZARD_FPLIB_TABLE::setupFileSelect()
+{
+    // Disable the button until something is selected
+    EnableNext( checkFiles() );
 
-    // Add selected url in list
-    for( unsigned ii = 0; ii < choices.GetCount(); ii++ )
-    {
-        wxString& url = fullList[choices[ii]];
-        aList.Add( url );
-    }
+    // Clear the review list so it will be reloaded
+    m_libraries.clear();
+    m_listCtrlReview->DeleteAllItems();
 }
 
 
-// Download the .pretty libraries found in aUrlLis and store them on disk
-// in a master folder
-bool WIZARD_FPLIB_TABLE::downloadGithubLibsFromList( wxArrayString& aUrlList,
-                                                     wxString * aErrorMessage )
+void WIZARD_FPLIB_TABLE::setupReview()
 {
-    wxString masterFolder;
-    wxString default_path;
-    wxGetEnv(  FP_LIB_TABLE::GlobalPathEnvVariableName(), &default_path );
+    wxBeginBusyCursor();
+    updateLibraries();
 
-    masterFolder =	wxDirSelector( _("Choose Folder to Copy Downloaded '.pretty' Libraries" ),
-                                   default_path, 0, wxDefaultPosition, this );
+    int libTotalCount = m_libraries.size();
+    int libCount = 0;
+    bool validate = true;
+    wxProgressDialog progressDlg( _( "Please wait..." ), _( "Validating libraries" ),
+                                  libTotalCount, this,
+                                  wxPD_APP_MODAL | wxPD_CAN_ABORT | wxPD_AUTO_HIDE );
 
-    if( masterFolder.IsEmpty() )    // Aborted by user
-    {
-        if( aErrorMessage )
-            *aErrorMessage = _( "Aborted" );
+    m_dvLibName->SetWidth( 280 );
 
-        return false;
-    }
+    // Prepare the review list
+    m_listCtrlReview->DeleteAllItems();
 
-    if( !wxDirExists( masterFolder ) )
+    for( std::vector<LIBRARY>::iterator it = m_libraries.begin(); it != m_libraries.end(); ++it )
     {
-        if( aErrorMessage )
-            aErrorMessage->Printf( _( "Folder '%s' does not exists" ),
-                                   GetChars( masterFolder ) );
-
-        return false;
-    }
+        wxVector<wxVariant> row;
+        LIBRARY::STATUS status = it->GetStatus();
 
-    // Display a progress bar to show the downlaod state
-    wxProgressDialog pdlg( _("Download libraries"), wxEmptyString, aUrlList.GetCount() );
+        if( status == LIBRARY::NOT_CHECKED && validate )
+        {
+            it->Test();
+            status = it->GetStatus();
+        }
 
-    // Download libs:
-    for( unsigned ii = 0; ii < aUrlList.GetCount(); ii++ )
-    {
-        wxString& libsrc_name = aUrlList[ii];
-        wxString libdst_name;
+        // Show only the file name
+        wxFileName filename( it->GetAbsolutePath() );
+        row.push_back( wxVariant( filename.GetFullName() ) );
 
-        // Extract the lib name from the full URL:
-        wxURI url( libsrc_name );
-        wxFileName fn( url.GetPath() );
-        // Set our local path
-        fn.SetPath( masterFolder );
-        libdst_name = fn.GetFullPath();
+        switch( it->GetStatus() )
+        {
+            case LIBRARY::NOT_CHECKED:
+                row.push_back( wxVariant( _( "NOT CHECKED" ) ) );
+                break;
 
-        if( !wxDirExists( libdst_name ) )
-            wxMkdir( libdst_name );
+            case LIBRARY::OK:
+                row.push_back( wxVariant( _( "OK" ) ) );
+                break;
 
-        pdlg.Update( ii, libsrc_name);
+            case LIBRARY::INVALID:
+                row.push_back( wxVariant( _( "INVALID" ) ) );
+                break;
+        }
 
-        try
-        {
-            PLUGIN::RELEASER src( IO_MGR::PluginFind( IO_MGR::GITHUB ) );
-            PLUGIN::RELEASER dst( IO_MGR::PluginFind( IO_MGR::KICAD ) );
+        row.push_back( wxVariant( it->GetPluginName() ) );
 
-            wxArrayString footprints = src->FootprintEnumerate( libsrc_name );
+        m_listCtrlReview->AppendItem( row );
 
-            for( unsigned i = 0;  i < footprints.size();  ++i )
-            {
-                std::auto_ptr<MODULE> m( src->FootprintLoad( libsrc_name, footprints[i] ) );
-                dst->FootprintSave( libdst_name, m.get() );
-                // m is deleted here by auto_ptr.
-            }
-        }
-        catch( const IO_ERROR& ioe )
-        {
-            if( aErrorMessage )
-                aErrorMessage->Printf( _("Error:\n'%s'\nwhile downloading library:\n'%s'"),
-                                       GetChars( ioe.errorText ), GetChars( libsrc_name ) );
-            return false;
-        }
+        ++libCount;
+        if( !progressDlg.Update( libCount, wxString::Format( _( "Validating libraries %d/%d" ),
+                                 libCount, libTotalCount ) ) )
+            validate = false;
     }
 
-    return true;
-}
-#endif
+    // The list should never be empty, but who knows?
+    EnableNext( m_listCtrlReview->GetItemCount() > 0 );
 
+    wxEndBusyCursor();
+}
diff --git a/pcbnew/dialogs/wizard_add_fplib.h b/pcbnew/dialogs/wizard_add_fplib.h
index 867d544..2672270 100644
--- a/pcbnew/dialogs/wizard_add_fplib.h
+++ b/pcbnew/dialogs/wizard_add_fplib.h
@@ -1,12 +1,10 @@
-/**
- * @file wizard_add_fplib.h
- */
-
 /*
  * This program source code file is part of KiCad, a free EDA CAD application.
  *
- * Copyright (C) 2014 Jean-Pierre Charras, jp.charras at wanadoo.fr
- * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.txt for contributors.
+ * Copyright (C) 2015 CERN
+ * @author Maciej Suminski <maciej.suminski@xxxxxxx>
+ * Copyright (C) 2014-2015 Jean-Pierre Charras, jp.charras at wanadoo.fr
+ * Copyright (C) 1992-2015 KiCad Developers, see AUTHORS.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
@@ -26,230 +24,172 @@
  * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
  */
 
-#include <wx/wx.h>
-#include <dialog_helpers.h>
 #include <wizard_add_fplib_base.h>
+#include <io_mgr.h>
+#include <boost/optional.hpp>
 
-// A helper class to handle the different types of lib depending
-// on the plugin: ext, type of lib: files/folders ... and info
-// needed to populate the main fp lib table
-class LIB_DESCR
-{
-public:
-    wxString m_PluginName;  // The "official" name of the plugin (see fp lib table dialog)
-    wxString m_Ext;         // standard extension (.mod, .pretty ...)
-    wxString m_EnvVarName;  // the environment var if selected, or empty
-    wxString m_DefaultPath;
-    bool     m_IsAbsolutePath;  // true if absolue path is selected
-    bool     m_IsFile;      // true for libs which are single files,
-                            // false for libs which are directories containing footprints
-    bool     m_IsGitHub;    // true only for GitHub plugin
-
-    LIB_DESCR()
-    {
-        m_IsAbsolutePath = true;
-        m_IsFile = true;
-        m_IsGitHub = false;
-    }
-};
-
+class KIWAY_PLAYER;
 
 class WIZARD_FPLIB_TABLE : public WIZARD_FPLIB_TABLE_BASE
 {
-    int m_rowPrjEnvVarPosition;     // the row of the PROJECT_VAR_NAME
-    int m_predefinedEnvVarCnt;      // number of predefined env var when calling the wizard
-                                    // at least 3 are always defined
-    LIB_DESCR * m_currLibDescr;
-
-    // static members to store options during a session
-    static int m_last_plugin_choice;
-    static int m_last_defaultpath_choice;
-
-    // This enum must have the same order than m_rbPathManagement
-    enum OPT_PATH {
-        PROJECT_PATH,
-        ENV_VAR_PATH,
-        ABSOLUTE_PATH
-    };
-
-    // This enum must have the same order than m_rbFpLibFormat
-    enum OPT_PLUGIN {
-        KICAD_PLUGIN,
-        GITHUB_PLUGIN,
-        LEGACY_PLUGIN,
-        EAGLE_PLUGIN,
-        GEDA_PCB_PLUGIN
-    };
-
 public:
-    WIZARD_FPLIB_TABLE( wxWindow* aParent, wxArrayString& aEnvVariableList );
-    wxWizardPage* GetFirstPage() { return m_pages[0]; }
-
+    WIZARD_FPLIB_TABLE( wxWindow* aParent );
     ~WIZARD_FPLIB_TABLE();
 
-    /**
-     * Return info on lib at line aIdx in aLibDescr
-     * @param aLibDescr = a wxArrayString to return the nickname, the lib URI and the lin type
-     * @return true if aIdx lin exists
-     */
-    bool GetLibDescr( int aIdx, wxArrayString& aLibDescr )
-    {
-        int count = m_gridFpListLibs->GetTable()->GetRowsCount();
+    ///> Source of the libraries (local files or Github)
+    enum LIB_SOURCE { LOCAL, GITHUB };
 
-        if( aIdx >= count )
-            return false;
+    ///> Scope (global/project)
+    enum LIB_SCOPE { GLOBAL, PROJECT };
 
-        // Return info
-        // Add the nickname:
-        aLibDescr.Add( m_gridFpListLibs->GetCellValue( aIdx, 0 ) );
-        // Add the full path:
-        aLibDescr.Add( m_gridFpListLibs->GetCellValue( aIdx, 1 ) );
-        // Add the plugin name:
-        aLibDescr.Add( m_gridFpListLibs->GetCellValue( aIdx, 2 ) );
-
-        return true;
-    }
-
-private:
-    void initDlg( wxArrayString& aEnvVariableList );
-    wxString getSelectedEnvVar();       // return the selected env variable
-    wxString getSelectedEnvVarValue();  // return the selected env variable value
-    bool setSecondPage();               // Init prms for the second wizard page
-    bool setLastPage();                 // Init prms for the last wizard page
-    void selectLibsFiles();             // select a set of library files
-    void selectLibsFolders();           // select a set of library folders
-
-    /** select a set of library on Github, using the Web viewer to explore
-     * the repos
+    /**
+     * Function GetFirstPage
+     * Returns the welcoming page for the wizard.
      */
-    void selectLibsGithubWithWebViewer();
+    inline wxWizardPage* GetFirstPage() const { return m_welcomeDlg; }
 
-    /** Get the list of .pretty libraries on Github,
-     * without using the viewer, from the lib list extracted from the KiCad repos
+    /**
+     * Function GetGithubURL
+     * Returns the current Github repository URL set in the wizard.
      */
-    void getLibsListGithub( wxArrayString& aList );
+    inline wxString GetGithubURL() const { return m_textCtrlGithubURL->GetValue(); }
 
-    /** Helper function.
-     * add the .pretty libraries found in aUrlList, after calculating a nickname and
-     * replacing the path by an env variable, if allowed and possible
+    /**
+     * Function SetGithubURL
+     * Sets the current Github repository URL used by the wizard.
+     * @param aUrl is the new URL to be applied.
      */
-    void installGithubLibsFromList( wxArrayString& aUrlList );
+    inline void SetGithubURL( const wxString& aUrl ) { m_textCtrlGithubURL->SetValue( aUrl ); }
 
     /**
-     * Download the .pretty libraries found in aUrlLis and store them on disk
-     * in a master folder
-     * @return true if OK, false on error
-     * @param aUrlList is the list of Github .pretty libs to download
-     * @param aErrorMessage is a wxString pointer to store error messages if any.
+     * Function GetLibSource
+     * Returns the source of libraries (local / Github).
      */
-    bool downloadGithubLibsFromList( wxArrayString& aUrlList, wxString * aErrorMessage = NULL );
+    LIB_SOURCE GetLibSource() const;
 
-    void updateFromPlugingChoice();     // update dialog options and widgets
-                                        // depending on the plugin choice
-    int GetEnvVarCount()                // Get the number of rows in env var table
-    {
-        return m_gridEnvironmentVariablesList->GetTable()->GetRowsCount();
-    }
-
-    int GetLibsCount()                // Get the number of rows in libs table
+    /**
+     * Function GetLibScope
+     * Returns the scope for the added libraries (global / project specific).
+     */
+    LIB_SCOPE GetLibScope() const;
+
+    // Wizard event handlers
+    void OnRadioCheck( wxCommandEvent& aEvent );
+    void OnSelectFiles( wxCommandEvent& aEvent );
+    void OnCheckGithubList( wxCommandEvent& aEvent );
+    void OnPageChanged( wxWizardEvent& aEvent );
+    void OnSelectAllGH( wxCommandEvent& aEvent );
+    void OnUnselectAllGH( wxCommandEvent& aEvent );
+    void OnChangeSearch( wxCommandEvent& aEvent );
+
+    class LIBRARY
     {
-        return m_gridFpListLibs->GetTable()->GetRowsCount();
-    }
-
-    bool IsGithubPlugin()               // Helper funct, return true if
-    {                                   // the Github plugin is the choice
-        return m_rbFpLibFormat->GetSelection() == GITHUB_PLUGIN;
-    }
-
+    public:
+        LIBRARY( const wxString& aPath, const wxString& aDescription = wxEmptyString );
+
+        /**
+         * Function Test
+         * Uses the associated plugin to validate the library contents.
+         * @return True if the library and the matched plugin type are valid.
+         */
+        bool Test();
+
+        /**
+         * Function GetPluginType
+         * Returns the plugin type, autodetected basing on the path.
+         * @return Returns empty boost::optional if the type could not be autodetected.
+         */
+        inline boost::optional<IO_MGR::PCB_FILE_T> GetPluginType() const { return m_plugin; }
+
+        /**
+         * Function GetPluginName
+         * Returns the plugin name, as used in the FPLIB table editor.
+         */
+        wxString GetPluginName() const;
+
+        /**
+         * Function GetAbsolutePath
+         * Returns the absolute path for the library.
+         */
+        inline const wxString& GetAbsolutePath() const { return m_path; }
+
+        /**
+         * Function GetProjectPath
+         * Returns the relative path, based on the input path.
+         * @param aBase is the base for the relative path.
+         */
+        wxString GetProjectPath( const wxString& aBase ) const;
+
+        /**
+         * Function GetDescription
+         * Returns the description for the library. If it is not specified in the constructor,
+         * it is just the filename.
+         */
+        wxString GetDescription() const;
+
+        ///> Possible states of validation.
+        enum STATUS { OK, INVALID, NOT_CHECKED };
+
+        /**
+         * Function GetStatus
+         * Returns the validity status for the library. It requires running Test() before, to get
+         * a result different than NOT_CHECKED.
+         */
+        STATUS GetStatus() const { return m_status; }
+
+    protected:
+        wxString m_path;
+        wxString m_description;
+        boost::optional<IO_MGR::PCB_FILE_T> m_plugin;
+        STATUS m_status;
+    };
 
-    bool IsKicadPlugin()                // Helper funct, return true if
-    {                                   // the Kicad plugin is the choice
-        return m_rbFpLibFormat->GetSelection() == KICAD_PLUGIN;
-    }
+    /**
+     * Function GetLibraries
+     * Returns libraries selected by the user.
+     */
+    const std::vector<LIBRARY>& GetLibraries() const { return m_libraries; }
 
-    int HasGithubEnvVarCompatible();    // Return the first index to one env var
-                                        // which defines a url compatible github
-                                        // or -1 if not found
-
-    // Populate the library list with the currently selected libs
-    void populateLibList( const wxArrayString& aNickNames,
-                          const wxArrayString& aPaths,
-                          const wxString&      aPluginName );
-
-    // Virtual event functions, from WIZARD_FPLIB_TABLE_BASE
-    void OnFinish( wxWizardEvent& event ) { event.Skip(); }
-    void OnPageChanged( wxWizardEvent& event );
-    void OnPageChanging( wxWizardEvent& event );
-    void OnAddEVariable( wxCommandEvent& event );
-    void OnRemoveEVariable( wxCommandEvent& event );
-    void OnAddFpLibs( wxCommandEvent& event );
-    void OnRemoveFpLibs( wxCommandEvent& event );
-    void OnPathManagementSelection( wxCommandEvent& event );
-    void OnSelectEnvVarCell( wxGridEvent& event );
-    void OnPluginSelection( wxCommandEvent& event );
-#ifdef BUILD_GITHUB_PLUGIN
-    void OnGithubLibsList( wxCommandEvent& event );
-#endif
-    bool ValidateOptions();
-};
+protected:
+    // Initialization of wizard pages
+    void setupDialogOrder();
+    void setupGithubList();
+    void setupFileSelect();
+    void setupReview();
 
+    ///> Checks the selection in file picker
+    bool checkFiles() const;
 
-// Specialized helper classes to handle the different plugin types:
-class LIB_DESCR_KICAD: public LIB_DESCR
-{
-public:
-    LIB_DESCR_KICAD(): LIB_DESCR()
-    {
-        m_PluginName = IO_MGR::ShowType( IO_MGR::KICAD );
-        m_Ext = wxT("pretty");
-        m_IsFile = false;
-    }
-};
+    ///> Downloads the list of Github libraries
+    void getLibsListGithub( wxArrayString& aList );
 
+    ///> Updates m_libraries basing on dialogs contents
+    void updateLibraries();
 
-class LIB_DESCR_GITHUB: public LIB_DESCR
-{
-public:
-    LIB_DESCR_GITHUB(): LIB_DESCR()
+    ///> Enables/disable 'Next' button
+    inline void EnableNext( bool aEnable )
     {
-        m_PluginName = IO_MGR::ShowType( IO_MGR::GITHUB );
-        m_Ext = wxT("pretty");
-        m_IsFile = false;
-        m_IsGitHub = true;
-    }
-};
+        wxWindow* nextBtn = FindWindowById( wxID_FORWARD );
 
-class LIB_DESCR_LEGACY: public LIB_DESCR
-{
-public:
-    LIB_DESCR_LEGACY(): LIB_DESCR()
-    {
-        m_PluginName = IO_MGR::ShowType( IO_MGR::LEGACY );
-        m_Ext = wxT("mod");
+        if( nextBtn )
+            nextBtn->Enable( aEnable );
     }
-};
 
+    ///> Cache for the downloaded Github library list
+    wxArrayString m_githubLibs;
 
-class LIB_DESCR_EAGLE: public LIB_DESCR
-{
-public:
-    LIB_DESCR_EAGLE(): LIB_DESCR()
-    {
-        m_PluginName = IO_MGR::ShowType( IO_MGR::EAGLE );
-        m_Ext = wxT("lbr");
-        m_IsFile = true;
-    }
-};
+    ///> Libraries selected in the wizard
+    std::vector<LIBRARY> m_libraries;
 
+    // Aliases for wizard pages to make code more readable
+    wxWizardPageSimple* const m_welcomeDlg;
+    wxWizardPageSimple* const m_fileSelectDlg;
+    wxWizardPageSimple* const m_githubListDlg;
+    wxWizardPageSimple* const m_reviewDlg;
+    wxWizardPageSimple* const m_targetDlg;
 
-class LIB_DESCR_GEDA: public LIB_DESCR
-{
-public:
-    // No specific extension known for folders
-    LIB_DESCR_GEDA(): LIB_DESCR()
-    {
-        m_PluginName = IO_MGR::ShowType( IO_MGR::GEDA_PCB );
-        m_IsFile = false;
-    }
+    // Since the same event is used for changing the selection/filter type, we need a way to
+    // determine what's the real cause of the event. Therefore here we store the number of the
+    // selected file type filter.
+    int m_selectedFilter;
 };
-
diff --git a/pcbnew/dialogs/wizard_add_fplib_base.cpp b/pcbnew/dialogs/wizard_add_fplib_base.cpp
index 4253ee3..a60b8bf 100644
--- a/pcbnew/dialogs/wizard_add_fplib_base.cpp
+++ b/pcbnew/dialogs/wizard_add_fplib_base.cpp
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jun  5 2014)
+// C++ code generated with wxFormBuilder (version Mar  9 2015)
 // http://www.wxformbuilder.org/
 //
 // PLEASE DO "NOT" EDIT THIS FILE!
@@ -12,210 +12,171 @@
 WIZARD_FPLIB_TABLE_BASE::WIZARD_FPLIB_TABLE_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxBitmap& bitmap, const wxPoint& pos, long style ) 
 {
 	this->Create( parent, id, title, bitmap, pos, style );
-	this->SetSizeHints( wxSize( 450,-1 ), wxDefaultSize );
+	this->SetSizeHints( wxSize( 720,480 ), wxDefaultSize );
 	
-	wxWizardPageSimple* m_wizPage1 = new wxWizardPageSimple( this );
+	wxWizardPageSimple* m_wizPage1 = new wxWizardPageSimple( this, NULL, NULL, wxArtProvider::GetBitmap( wxART_HELP_BOOK, wxART_FRAME_ICON ) );
 	m_pages.Add( m_wizPage1 );
 	
-	m_wizPage1->SetMinSize( wxSize( 500,-1 ) );
+	m_wizPage1->SetMinSize( wxSize( 720,480 ) );
 	
-	wxBoxSizer* bSizerPage1;
-	bSizerPage1 = new wxBoxSizer( wxVERTICAL );
+	wxBoxSizer* bSizer1;
+	bSizer1 = new wxBoxSizer( wxVERTICAL );
 	
-	wxString m_rbFpLibFormatChoices[] = { _("KiCad (*.Pretty folder containing .kicad_mod files)"), _("GitHub (.Pretty lib stored on GitHub repos)"), _("Legacy ( old *.mod lib file)"), _("Eagle V6 xml library file"), _("Geda footprint folder (folder containing *.fp files)") };
-	int m_rbFpLibFormatNChoices = sizeof( m_rbFpLibFormatChoices ) / sizeof( wxString );
-	m_rbFpLibFormat = new wxRadioBox( m_wizPage1, wxID_ANY, _("Library Format:"), wxDefaultPosition, wxDefaultSize, m_rbFpLibFormatNChoices, m_rbFpLibFormatChoices, 1, wxRA_SPECIFY_COLS );
-	m_rbFpLibFormat->SetSelection( 0 );
-	bSizerPage1->Add( m_rbFpLibFormat, 0, wxALL|wxEXPAND, 5 );
+	wxFlexGridSizer* fgSizer112;
+	fgSizer112 = new wxFlexGridSizer( 3, 1, 0, 0 );
+	fgSizer112->AddGrowableRow( 1 );
+	fgSizer112->SetFlexibleDirection( wxBOTH );
+	fgSizer112->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
 	
-	m_staticline2 = new wxStaticLine( m_wizPage1, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
-	bSizerPage1->Add( m_staticline2, 0, wxEXPAND | wxALL, 5 );
-	
-	m_bitmapGithubURL = new wxStaticBitmap( m_wizPage1, wxID_ANY, wxArtProvider::GetBitmap( wxART_INFORMATION, wxART_OTHER ), wxDefaultPosition, wxDefaultSize, 0 );
-	bSizerPage1->Add( m_bitmapGithubURL, 0, wxALL|wxALIGN_CENTER_HORIZONTAL, 5 );
-	
-	m_staticText10 = new wxStaticText( m_wizPage1, wxID_ANY, _("Default URL for KiCad libraries on Github:"), wxDefaultPosition, wxDefaultSize, 0 );
-	m_staticText10->Wrap( -1 );
-	bSizerPage1->Add( m_staticText10, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
-	
-	m_textCtrlGithubURL = new wxTextCtrl( m_wizPage1, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
-	bSizerPage1->Add( m_textCtrlGithubURL, 0, wxALL|wxEXPAND, 5 );
-	
-	
-	m_wizPage1->SetSizer( bSizerPage1 );
-	m_wizPage1->Layout();
-	bSizerPage1->Fit( m_wizPage1 );
-	wxWizardPageSimple* m_wizPage2 = new wxWizardPageSimple( this );
-	m_pages.Add( m_wizPage2 );
+	m_staticText1 = new wxStaticText( m_wizPage1, wxID_ANY, wxT("Welcome to the Add Footprint Libraries Wizard!\n\nPlease select the source for the libraries to add:"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticText1->Wrap( -1 );
+	fgSizer112->Add( m_staticText1, 1, wxALL|wxEXPAND, 5 );
 	
-	m_wizPage2->SetMinSize( wxSize( 450,-1 ) );
+	wxBoxSizer* bSizer19;
+	bSizer19 = new wxBoxSizer( wxVERTICAL );
 	
-	wxBoxSizer* bSizerPage2;
-	bSizerPage2 = new wxBoxSizer( wxVERTICAL );
+	m_radioAddLocal = new wxRadioButton( m_wizPage1, wxID_ANY, wxT("Files on my computer"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizer19->Add( m_radioAddLocal, 0, wxALL|wxEXPAND, 5 );
 	
-	wxString m_rbPathManagementChoices[] = { _("Use  path relative to the project"), _("Use environment variable in path"), _("Use absolute path") };
-	int m_rbPathManagementNChoices = sizeof( m_rbPathManagementChoices ) / sizeof( wxString );
-	m_rbPathManagement = new wxRadioBox( m_wizPage2, wxID_ANY, _("Path management:"), wxDefaultPosition, wxDefaultSize, m_rbPathManagementNChoices, m_rbPathManagementChoices, 1, wxRA_SPECIFY_COLS );
-	m_rbPathManagement->SetSelection( 2 );
-	bSizerPage2->Add( m_rbPathManagement, 0, wxALL|wxEXPAND, 5 );
+	wxBoxSizer* m_sizerGithub;
+	m_sizerGithub = new wxBoxSizer( wxHORIZONTAL );
 	
-	m_staticText1 = new wxStaticText( m_wizPage2, wxID_ANY, _("Environment variables:"), wxDefaultPosition, wxDefaultSize, 0 );
-	m_staticText1->Wrap( -1 );
-	bSizerPage2->Add( m_staticText1, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+	m_radioAddGithub = new wxRadioButton( m_wizPage1, wxID_ANY, wxT("Github repository"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_sizerGithub->Add( m_radioAddGithub, 0, wxALL|wxEXPAND, 5 );
 	
-	m_gridEnvironmentVariablesList = new wxGrid( m_wizPage2, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+	m_textCtrlGithubURL = new wxTextCtrl( m_wizPage1, wxID_ANY, wxT("http://github.com/KiCad";), wxDefaultPosition, wxDefaultSize, 0 );
+	m_sizerGithub->Add( m_textCtrlGithubURL, 1, wxALL, 5 );
 	
-	// Grid
-	m_gridEnvironmentVariablesList->CreateGrid( 3, 2 );
-	m_gridEnvironmentVariablesList->EnableEditing( true );
-	m_gridEnvironmentVariablesList->EnableGridLines( true );
-	m_gridEnvironmentVariablesList->EnableDragGridSize( false );
-	m_gridEnvironmentVariablesList->SetMargins( 0, 0 );
 	
-	// Columns
-	m_gridEnvironmentVariablesList->SetColSize( 0, 125 );
-	m_gridEnvironmentVariablesList->SetColSize( 1, 154 );
-	m_gridEnvironmentVariablesList->AutoSizeColumns();
-	m_gridEnvironmentVariablesList->EnableDragColMove( false );
-	m_gridEnvironmentVariablesList->EnableDragColSize( true );
-	m_gridEnvironmentVariablesList->SetColLabelSize( 30 );
-	m_gridEnvironmentVariablesList->SetColLabelValue( 0, _("Environment Variable") );
-	m_gridEnvironmentVariablesList->SetColLabelValue( 1, _("Path Segment") );
-	m_gridEnvironmentVariablesList->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+	bSizer19->Add( m_sizerGithub, 0, wxEXPAND, 5 );
 	
-	// Rows
-	m_gridEnvironmentVariablesList->AutoSizeRows();
-	m_gridEnvironmentVariablesList->EnableDragRowSize( false );
-	m_gridEnvironmentVariablesList->SetRowLabelSize( 40 );
-	m_gridEnvironmentVariablesList->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
 	
-	// Label Appearance
+	fgSizer112->Add( bSizer19, 0, wxEXPAND, 5 );
 	
-	// Cell Defaults
-	m_gridEnvironmentVariablesList->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
-	bSizerPage2->Add( m_gridEnvironmentVariablesList, 1, wxALL|wxEXPAND, 5 );
+	wxFlexGridSizer* fgSizer12;
+	fgSizer12 = new wxFlexGridSizer( 0, 3, 0, 0 );
+	fgSizer12->SetFlexibleDirection( wxBOTH );
+	fgSizer12->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
 	
-	wxBoxSizer* bSizerButs;
-	bSizerButs = new wxBoxSizer( wxHORIZONTAL );
+	m_staticText8 = new wxStaticText( m_wizPage1, wxID_ANY, wxT("Visit the official"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticText8->Wrap( -1 );
+	fgSizer12->Add( m_staticText8, 0, wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT, 5 );
 	
-	m_buttonAddEV = new wxButton( m_wizPage2, wxID_ANY, _("Add Environment Variable"), wxDefaultPosition, wxDefaultSize, 0 );
-	bSizerButs->Add( m_buttonAddEV, 0, wxALL, 5 );
+	m_hyperlink1 = new wxHyperlinkCtrl( m_wizPage1, wxID_ANY, wxT("Kicad repository on Github"), wxT("https://github.com/KiCad";), wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
+	fgSizer12->Add( m_hyperlink1, 0, wxTOP|wxBOTTOM, 5 );
 	
-	m_buttonRemoveEV = new wxButton( m_wizPage2, wxID_ANY, _("Remove Environment Variable"), wxDefaultPosition, wxDefaultSize, 0 );
-	bSizerButs->Add( m_buttonRemoveEV, 0, wxALL, 5 );
+	m_staticText9 = new wxStaticText( m_wizPage1, wxID_ANY, wxT("to find numerous footprint libraries!"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticText9->Wrap( -1 );
+	fgSizer12->Add( m_staticText9, 0, wxTOP|wxBOTTOM|wxALIGN_CENTER_VERTICAL, 5 );
 	
 	
-	bSizerPage2->Add( bSizerButs, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+	fgSizer112->Add( fgSizer12, 1, wxEXPAND, 5 );
 	
 	
-	m_wizPage2->SetSizer( bSizerPage2 );
-	m_wizPage2->Layout();
-	bSizerPage2->Fit( m_wizPage2 );
-	wxWizardPageSimple* m_wizPage3 = new wxWizardPageSimple( this );
-	m_pages.Add( m_wizPage3 );
+	bSizer1->Add( fgSizer112, 1, wxEXPAND, 5 );
 	
-	m_wizPage3->SetMinSize( wxSize( 450,-1 ) );
 	
-	wxBoxSizer* bSizerPage3;
-	bSizerPage3 = new wxBoxSizer( wxVERTICAL );
+	m_wizPage1->SetSizer( bSizer1 );
+	m_wizPage1->Layout();
+	wxWizardPageSimple* m_wizPage2_Local = new wxWizardPageSimple( this, NULL, NULL, wxArtProvider::GetBitmap( wxART_HELP_BOOK, wxART_FRAME_ICON ) );
+	m_pages.Add( m_wizPage2_Local );
 	
-	wxStaticBoxSizer* sbSizer1;
-	sbSizer1 = new wxStaticBoxSizer( new wxStaticBox( m_wizPage3, wxID_ANY, _("Options") ), wxVERTICAL );
+	wxBoxSizer* bSizer8;
+	bSizer8 = new wxBoxSizer( wxVERTICAL );
 	
-	wxFlexGridSizer* fgSizer1;
-	fgSizer1 = new wxFlexGridSizer( 0, 2, 0, 0 );
-	fgSizer1->AddGrowableCol( 1 );
-	fgSizer1->SetFlexibleDirection( wxBOTH );
-	fgSizer1->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
+	m_staticText7 = new wxStaticText( m_wizPage2_Local, wxID_ANY, wxT("Select files or folders to add:"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticText7->Wrap( -1 );
+	bSizer8->Add( m_staticText7, 0, wxALL, 5 );
 	
-	m_textPluginTitle = new wxStaticText( m_wizPage3, wxID_ANY, _("Plugin type:"), wxDefaultPosition, wxDefaultSize, 0 );
-	m_textPluginTitle->Wrap( -1 );
-	fgSizer1->Add( m_textPluginTitle, 0, wxALL, 5 );
+	m_filePicker = new wxGenericDirCtrl( m_wizPage2_Local, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_MULTIPLE|wxDIRCTRL_SHOW_FILTERS|wxSUNKEN_BORDER, wxEmptyString, 0 );
 	
-	m_textPluginType = new wxStaticText( m_wizPage3, wxID_ANY, _("KiCad"), wxDefaultPosition, wxDefaultSize, 0 );
-	m_textPluginType->Wrap( -1 );
-	fgSizer1->Add( m_textPluginType, 1, wxALL, 5 );
+	m_filePicker->ShowHidden( false );
+	bSizer8->Add( m_filePicker, 1, wxEXPAND | wxALL, 5 );
 	
-	m_textOptionTitle = new wxStaticText( m_wizPage3, wxID_ANY, _("Option:"), wxDefaultPosition, wxDefaultSize, 0 );
-	m_textOptionTitle->Wrap( -1 );
-	fgSizer1->Add( m_textOptionTitle, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
 	
-	m_textOption = new wxStaticText( m_wizPage3, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
-	m_textOption->Wrap( -1 );
-	fgSizer1->Add( m_textOption, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+	m_wizPage2_Local->SetSizer( bSizer8 );
+	m_wizPage2_Local->Layout();
+	bSizer8->Fit( m_wizPage2_Local );
+	wxWizardPageSimple* m_wizPage2_Github = new wxWizardPageSimple( this, NULL, NULL, wxArtProvider::GetBitmap( wxART_HELP_BOOK, wxART_FRAME_ICON ) );
+	m_pages.Add( m_wizPage2_Github );
 	
-	m_stPathTitle = new wxStaticText( m_wizPage3, wxID_ANY, _("Path:"), wxDefaultPosition, wxDefaultSize, 0 );
-	m_stPathTitle->Wrap( -1 );
-	fgSizer1->Add( m_stPathTitle, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+	wxBoxSizer* bSizer111;
+	bSizer111 = new wxBoxSizer( wxVERTICAL );
 	
-	m_textPath = new wxStaticText( m_wizPage3, wxID_ANY, _("dummy"), wxDefaultPosition, wxDefaultSize, 0 );
-	m_textPath->Wrap( -1 );
-	fgSizer1->Add( m_textPath, 1, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+	m_staticText112 = new wxStaticText( m_wizPage2_Github, wxID_ANY, wxT("Select Github libraries to add:"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticText112->Wrap( -1 );
+	bSizer111->Add( m_staticText112, 0, wxALL|wxEXPAND, 5 );
 	
+	wxArrayString m_checkListGHChoices;
+	m_checkListGH = new wxCheckListBox( m_wizPage2_Github, wxID_ANY, wxDefaultPosition, wxDefaultSize, m_checkListGHChoices, wxLB_MULTIPLE|wxLB_NEEDED_SB );
+	bSizer111->Add( m_checkListGH, 1, wxALL|wxEXPAND, 5 );
 	
-	sbSizer1->Add( fgSizer1, 0, wxEXPAND, 5 );
+	wxBoxSizer* bSizer7;
+	bSizer7 = new wxBoxSizer( wxHORIZONTAL );
 	
+	m_btnSelectAllGH = new wxButton( m_wizPage2_Github, wxID_ANY, wxT("Select all"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizer7->Add( m_btnSelectAllGH, 1, wxALL, 5 );
 	
-	bSizerPage3->Add( sbSizer1, 0, wxEXPAND|wxBOTTOM, 5 );
+	m_btnUnselectAllGH = new wxButton( m_wizPage2_Github, wxID_ANY, wxT("Unselect all"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizer7->Add( m_btnUnselectAllGH, 1, wxALL, 5 );
 	
-	m_staticText2 = new wxStaticText( m_wizPage3, wxID_ANY, _("Library list to add in Fp table:"), wxDefaultPosition, wxDefaultSize, 0 );
-	m_staticText2->Wrap( -1 );
-	bSizerPage3->Add( m_staticText2, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
 	
-	wxBoxSizer* bSizer6;
-	bSizer6 = new wxBoxSizer( wxVERTICAL );
+	bSizer7->Add( 0, 0, 1, wxEXPAND, 5 );
 	
-	m_gridFpListLibs = new wxGrid( m_wizPage3, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
+	m_searchCtrlGH = new wxSearchCtrl( m_wizPage2_Github, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
+	#ifndef __WXMAC__
+	m_searchCtrlGH->ShowSearchButton( true );
+	#endif
+	m_searchCtrlGH->ShowCancelButton( false );
+	bSizer7->Add( m_searchCtrlGH, 2, wxALL, 5 );
 	
-	// Grid
-	m_gridFpListLibs->CreateGrid( 0, 3 );
-	m_gridFpListLibs->EnableEditing( true );
-	m_gridFpListLibs->EnableGridLines( true );
-	m_gridFpListLibs->EnableDragGridSize( false );
-	m_gridFpListLibs->SetMargins( 0, 0 );
 	
-	// Columns
-	m_gridFpListLibs->EnableDragColMove( false );
-	m_gridFpListLibs->EnableDragColSize( true );
-	m_gridFpListLibs->SetColLabelSize( 30 );
-	m_gridFpListLibs->SetColLabelValue( 0, _("NickName") );
-	m_gridFpListLibs->SetColLabelValue( 1, _("Path") );
-	m_gridFpListLibs->SetColLabelValue( 2, _("Plugin") );
-	m_gridFpListLibs->SetColLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
+	bSizer111->Add( bSizer7, 0, wxEXPAND, 5 );
 	
-	// Rows
-	m_gridFpListLibs->EnableDragRowSize( true );
-	m_gridFpListLibs->SetRowLabelSize( 30 );
-	m_gridFpListLibs->SetRowLabelAlignment( wxALIGN_CENTRE, wxALIGN_CENTRE );
 	
-	// Label Appearance
+	m_wizPage2_Github->SetSizer( bSizer111 );
+	m_wizPage2_Github->Layout();
+	bSizer111->Fit( m_wizPage2_Github );
+	wxWizardPageSimple* m_wizPage3_Review = new wxWizardPageSimple( this, NULL, NULL, wxArtProvider::GetBitmap( wxART_HELP_BOOK, wxART_FRAME_ICON ) );
+	m_pages.Add( m_wizPage3_Review );
 	
-	// Cell Defaults
-	m_gridFpListLibs->SetDefaultCellAlignment( wxALIGN_LEFT, wxALIGN_TOP );
-	bSizer6->Add( m_gridFpListLibs, 1, wxALL|wxEXPAND, 5 );
+	wxBoxSizer* bSizer1111;
+	bSizer1111 = new wxBoxSizer( wxVERTICAL );
 	
+	m_staticText1121 = new wxStaticText( m_wizPage3_Review, wxID_ANY, wxT("Review and confirm the changes to the libraries:"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticText1121->Wrap( -1 );
+	bSizer1111->Add( m_staticText1121, 0, wxALL|wxEXPAND, 5 );
 	
-	bSizerPage3->Add( bSizer6, 1, wxEXPAND, 5 );
+	m_listCtrlReview = new wxDataViewListCtrl( m_wizPage3_Review, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_HORIZ_RULES|wxDV_ROW_LINES|wxDV_VERT_RULES );
+	m_dvLibName = m_listCtrlReview->AppendTextColumn( wxT("Library") ); 
+	m_dvLibStatus = m_listCtrlReview->AppendTextColumn( wxT("Status") ); 
+	m_dvLibFormat = m_listCtrlReview->AppendTextColumn( wxT("Format") ); 
+	bSizer1111->Add( m_listCtrlReview, 1, wxALL|wxEXPAND, 5 );
 	
-	wxBoxSizer* bSizer5;
-	bSizer5 = new wxBoxSizer( wxHORIZONTAL );
 	
-	m_buttonGithubLibList = new wxButton( m_wizPage3, wxID_ANY, _("Github Libs List"), wxDefaultPosition, wxDefaultSize, 0 );
-	bSizer5->Add( m_buttonGithubLibList, 0, wxALL, 5 );
+	m_wizPage3_Review->SetSizer( bSizer1111 );
+	m_wizPage3_Review->Layout();
+	bSizer1111->Fit( m_wizPage3_Review );
+	wxWizardPageSimple* m_wizPage4_SelectTarget = new wxWizardPageSimple( this, NULL, NULL, wxArtProvider::GetBitmap( wxART_HELP_BOOK, wxART_FRAME_ICON ) );
+	m_pages.Add( m_wizPage4_SelectTarget );
 	
-	m_buttonAddLib = new wxButton( m_wizPage3, wxID_ANY, _("Add FP Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
-	bSizer5->Add( m_buttonAddLib, 0, wxALL, 5 );
+	wxBoxSizer* bSizer12;
+	bSizer12 = new wxBoxSizer( wxVERTICAL );
 	
-	m_buttonRemoveLib = new wxButton( m_wizPage3, wxID_ANY, _("Remove FP Libraries"), wxDefaultPosition, wxDefaultSize, 0 );
-	bSizer5->Add( m_buttonRemoveLib, 0, wxALL, 5 );
+	m_staticText12 = new wxStaticText( m_wizPage4_SelectTarget, wxID_ANY, wxT("Where do you wish the new libraries to be added:"), wxDefaultPosition, wxDefaultSize, 0 );
+	m_staticText12->Wrap( -1 );
+	bSizer12->Add( m_staticText12, 0, wxALL|wxEXPAND, 5 );
 	
+	m_radioGlobal = new wxRadioButton( m_wizPage4_SelectTarget, wxID_ANY, wxT("To global library configuration (visible by all projects)"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizer12->Add( m_radioGlobal, 0, wxALL|wxEXPAND, 5 );
 	
-	bSizerPage3->Add( bSizer5, 0, wxALIGN_CENTER_HORIZONTAL, 5 );
+	m_radioProject = new wxRadioButton( m_wizPage4_SelectTarget, wxID_ANY, wxT("To the current project only"), wxDefaultPosition, wxDefaultSize, 0 );
+	bSizer12->Add( m_radioProject, 0, wxALL|wxEXPAND, 5 );
 	
 	
-	m_wizPage3->SetSizer( bSizerPage3 );
-	m_wizPage3->Layout();
-	bSizerPage3->Fit( m_wizPage3 );
+	m_wizPage4_SelectTarget->SetSizer( bSizer12 );
+	m_wizPage4_SelectTarget->Layout();
+	bSizer12->Fit( m_wizPage4_SelectTarget );
 	
 	this->Centre( wxBOTH );
 	
@@ -226,33 +187,21 @@ WIZARD_FPLIB_TABLE_BASE::WIZARD_FPLIB_TABLE_BASE( wxWindow* parent, wxWindowID i
 	}
 	
 	// Connect Events
-	this->Connect( wxID_ANY, wxEVT_WIZARD_FINISHED, wxWizardEventHandler( WIZARD_FPLIB_TABLE_BASE::OnFinish ) );
 	this->Connect( wxID_ANY, wxEVT_WIZARD_PAGE_CHANGED, wxWizardEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPageChanged ) );
 	this->Connect( wxID_ANY, wxEVT_WIZARD_PAGE_CHANGING, wxWizardEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPageChanging ) );
-	m_rbFpLibFormat->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPluginSelection ), NULL, this );
-	m_rbPathManagement->Connect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPathManagementSelection ), NULL, this );
-	m_gridEnvironmentVariablesList->Connect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( WIZARD_FPLIB_TABLE_BASE::OnSelectEnvVarCell ), NULL, this );
-	m_buttonAddEV->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnAddEVariable ), NULL, this );
-	m_buttonRemoveEV->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnRemoveEVariable ), NULL, this );
-	m_buttonGithubLibList->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnGithubLibsList ), NULL, this );
-	m_buttonAddLib->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnAddFpLibs ), NULL, this );
-	m_buttonRemoveLib->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnRemoveFpLibs ), NULL, this );
+	m_btnSelectAllGH->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnSelectAllGH ), NULL, this );
+	m_btnUnselectAllGH->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnUnselectAllGH ), NULL, this );
+	m_searchCtrlGH->Connect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnChangeSearch ), NULL, this );
 }
 
 WIZARD_FPLIB_TABLE_BASE::~WIZARD_FPLIB_TABLE_BASE()
 {
 	// Disconnect Events
-	this->Disconnect( wxID_ANY, wxEVT_WIZARD_FINISHED, wxWizardEventHandler( WIZARD_FPLIB_TABLE_BASE::OnFinish ) );
 	this->Disconnect( wxID_ANY, wxEVT_WIZARD_PAGE_CHANGED, wxWizardEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPageChanged ) );
 	this->Disconnect( wxID_ANY, wxEVT_WIZARD_PAGE_CHANGING, wxWizardEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPageChanging ) );
-	m_rbFpLibFormat->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPluginSelection ), NULL, this );
-	m_rbPathManagement->Disconnect( wxEVT_COMMAND_RADIOBOX_SELECTED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnPathManagementSelection ), NULL, this );
-	m_gridEnvironmentVariablesList->Disconnect( wxEVT_GRID_SELECT_CELL, wxGridEventHandler( WIZARD_FPLIB_TABLE_BASE::OnSelectEnvVarCell ), NULL, this );
-	m_buttonAddEV->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnAddEVariable ), NULL, this );
-	m_buttonRemoveEV->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnRemoveEVariable ), NULL, this );
-	m_buttonGithubLibList->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnGithubLibsList ), NULL, this );
-	m_buttonAddLib->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnAddFpLibs ), NULL, this );
-	m_buttonRemoveLib->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnRemoveFpLibs ), NULL, this );
+	m_btnSelectAllGH->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnSelectAllGH ), NULL, this );
+	m_btnUnselectAllGH->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnUnselectAllGH ), NULL, this );
+	m_searchCtrlGH->Disconnect( wxEVT_COMMAND_TEXT_UPDATED, wxCommandEventHandler( WIZARD_FPLIB_TABLE_BASE::OnChangeSearch ), NULL, this );
 	
 	m_pages.Clear();
 }
diff --git a/pcbnew/dialogs/wizard_add_fplib_base.fbp b/pcbnew/dialogs/wizard_add_fplib_base.fbp
index d8f2961..1fac87d 100644
--- a/pcbnew/dialogs/wizard_add_fplib_base.fbp
+++ b/pcbnew/dialogs/wizard_add_fplib_base.fbp
@@ -14,8 +14,8 @@
         <property name="file">wizard_add_fplib_base</property>
         <property name="first_id">1000</property>
         <property name="help_provider">none</property>
-        <property name="internationalize">1</property>
-        <property name="name">wizard_add_fplib_base</property>
+        <property name="internationalize">0</property>
+        <property name="name">MyProject1</property>
         <property name="namespace"></property>
         <property name="path">.</property>
         <property name="precompiled_header"></property>
@@ -40,13 +40,13 @@
             <property name="hidden">0</property>
             <property name="id">wxID_ANY</property>
             <property name="maximum_size"></property>
-            <property name="minimum_size">450,-1</property>
+            <property name="minimum_size">720,480</property>
             <property name="name">WIZARD_FPLIB_TABLE_BASE</property>
             <property name="pos"></property>
-            <property name="size">450,389</property>
-            <property name="style">wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER</property>
+            <property name="size">720,480</property>
+            <property name="style">wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER</property>
             <property name="subclass">; </property>
-            <property name="title">Footprint Library Wizard</property>
+            <property name="title">Add Footprint Libraries Wizard</property>
             <property name="tooltip"></property>
             <property name="window_extra_style"></property>
             <property name="window_name"></property>
@@ -82,13 +82,13 @@
             <event name="OnSize"></event>
             <event name="OnUpdateUI"></event>
             <event name="OnWizardCancel"></event>
-            <event name="OnWizardFinished">OnFinish</event>
+            <event name="OnWizardFinished"></event>
             <event name="OnWizardHelp"></event>
             <event name="OnWizardPageChanged">OnPageChanged</event>
             <event name="OnWizardPageChanging">OnPageChanging</event>
             <object class="WizardPageSimple" expanded="1">
                 <property name="bg"></property>
-                <property name="bitmap"></property>
+                <property name="bitmap">Load From Art Provider; wxART_HELP_BOOK; wxART_FRAME_ICON</property>
                 <property name="context_help"></property>
                 <property name="context_menu">1</property>
                 <property name="enabled">1</property>
@@ -97,16 +97,16 @@
                 <property name="hidden">0</property>
                 <property name="id">wxID_ANY</property>
                 <property name="maximum_size"></property>
-                <property name="minimum_size">500,-1</property>
+                <property name="minimum_size">720,480</property>
                 <property name="name">m_wizPage1</property>
-                <property name="permission">public</property>
+                <property name="permission">protected</property>
                 <property name="pos"></property>
-                <property name="size"></property>
+                <property name="size">720,480</property>
                 <property name="subclass"></property>
                 <property name="tooltip"></property>
                 <property name="window_extra_style"></property>
                 <property name="window_name"></property>
-                <property name="window_style">wxSUNKEN_BORDER</property>
+                <property name="window_style"></property>
                 <event name="OnChar"></event>
                 <event name="OnEnterWindow"></event>
                 <event name="OnEraseBackground"></event>
@@ -132,904 +132,30 @@
                 <event name="OnUpdateUI"></event>
                 <object class="wxBoxSizer" expanded="1">
                     <property name="minimum_size"></property>
-                    <property name="name">bSizerPage1</property>
+                    <property name="name">bSizer1</property>
                     <property name="orient">wxVERTICAL</property>
                     <property name="permission">none</property>
                     <object class="sizeritem" expanded="1">
                         <property name="border">5</property>
-                        <property name="flag">wxALL|wxEXPAND</property>
-                        <property name="proportion">0</property>
-                        <object class="wxRadioBox" expanded="1">
-                            <property name="BottomDockable">1</property>
-                            <property name="LeftDockable">1</property>
-                            <property name="RightDockable">1</property>
-                            <property name="TopDockable">1</property>
-                            <property name="aui_layer"></property>
-                            <property name="aui_name"></property>
-                            <property name="aui_position"></property>
-                            <property name="aui_row"></property>
-                            <property name="best_size"></property>
-                            <property name="bg"></property>
-                            <property name="caption"></property>
-                            <property name="caption_visible">1</property>
-                            <property name="center_pane">0</property>
-                            <property name="choices">&quot;KiCad (*.Pretty folder containing .kicad_mod files)&quot; &quot;GitHub (.Pretty lib stored on GitHub repos)&quot; &quot;Legacy ( old *.mod lib file)&quot; &quot;Eagle V6 xml library file&quot; &quot;Geda footprint folder (folder containing *.fp files)&quot;</property>
-                            <property name="close_button">1</property>
-                            <property name="context_help"></property>
-                            <property name="context_menu">1</property>
-                            <property name="default_pane">0</property>
-                            <property name="dock">Dock</property>
-                            <property name="dock_fixed">0</property>
-                            <property name="docking">Left</property>
-                            <property name="enabled">1</property>
-                            <property name="fg"></property>
-                            <property name="floatable">1</property>
-                            <property name="font"></property>
-                            <property name="gripper">0</property>
-                            <property name="hidden">0</property>
-                            <property name="id">wxID_ANY</property>
-                            <property name="label">Library Format:</property>
-                            <property name="majorDimension">1</property>
-                            <property name="max_size"></property>
-                            <property name="maximize_button">0</property>
-                            <property name="maximum_size"></property>
-                            <property name="min_size"></property>
-                            <property name="minimize_button">0</property>
-                            <property name="minimum_size"></property>
-                            <property name="moveable">1</property>
-                            <property name="name">m_rbFpLibFormat</property>
-                            <property name="pane_border">1</property>
-                            <property name="pane_position"></property>
-                            <property name="pane_size"></property>
-                            <property name="permission">protected</property>
-                            <property name="pin_button">1</property>
-                            <property name="pos"></property>
-                            <property name="resize">Resizable</property>
-                            <property name="selection">0</property>
-                            <property name="show">1</property>
-                            <property name="size"></property>
-                            <property name="style">wxRA_SPECIFY_COLS</property>
-                            <property name="subclass"></property>
-                            <property name="toolbar_pane">0</property>
-                            <property name="tooltip"></property>
-                            <property name="validator_data_type"></property>
-                            <property name="validator_style">wxFILTER_NONE</property>
-                            <property name="validator_type">wxDefaultValidator</property>
-                            <property name="validator_variable"></property>
-                            <property name="window_extra_style"></property>
-                            <property name="window_name"></property>
-                            <property name="window_style"></property>
-                            <event name="OnChar"></event>
-                            <event name="OnEnterWindow"></event>
-                            <event name="OnEraseBackground"></event>
-                            <event name="OnKeyDown"></event>
-                            <event name="OnKeyUp"></event>
-                            <event name="OnKillFocus"></event>
-                            <event name="OnLeaveWindow"></event>
-                            <event name="OnLeftDClick"></event>
-                            <event name="OnLeftDown"></event>
-                            <event name="OnLeftUp"></event>
-                            <event name="OnMiddleDClick"></event>
-                            <event name="OnMiddleDown"></event>
-                            <event name="OnMiddleUp"></event>
-                            <event name="OnMotion"></event>
-                            <event name="OnMouseEvents"></event>
-                            <event name="OnMouseWheel"></event>
-                            <event name="OnPaint"></event>
-                            <event name="OnRadioBox">OnPluginSelection</event>
-                            <event name="OnRightDClick"></event>
-                            <event name="OnRightDown"></event>
-                            <event name="OnRightUp"></event>
-                            <event name="OnSetFocus"></event>
-                            <event name="OnSize"></event>
-                            <event name="OnUpdateUI"></event>
-                        </object>
-                    </object>
-                    <object class="sizeritem" expanded="1">
-                        <property name="border">5</property>
-                        <property name="flag">wxEXPAND | wxALL</property>
-                        <property name="proportion">0</property>
-                        <object class="wxStaticLine" expanded="1">
-                            <property name="BottomDockable">1</property>
-                            <property name="LeftDockable">1</property>
-                            <property name="RightDockable">1</property>
-                            <property name="TopDockable">1</property>
-                            <property name="aui_layer"></property>
-                            <property name="aui_name"></property>
-                            <property name="aui_position"></property>
-                            <property name="aui_row"></property>
-                            <property name="best_size"></property>
-                            <property name="bg"></property>
-                            <property name="caption"></property>
-                            <property name="caption_visible">1</property>
-                            <property name="center_pane">0</property>
-                            <property name="close_button">1</property>
-                            <property name="context_help"></property>
-                            <property name="context_menu">1</property>
-                            <property name="default_pane">0</property>
-                            <property name="dock">Dock</property>
-                            <property name="dock_fixed">0</property>
-                            <property name="docking">Left</property>
-                            <property name="enabled">1</property>
-                            <property name="fg"></property>
-                            <property name="floatable">1</property>
-                            <property name="font"></property>
-                            <property name="gripper">0</property>
-                            <property name="hidden">0</property>
-                            <property name="id">wxID_ANY</property>
-                            <property name="max_size"></property>
-                            <property name="maximize_button">0</property>
-                            <property name="maximum_size"></property>
-                            <property name="min_size"></property>
-                            <property name="minimize_button">0</property>
-                            <property name="minimum_size"></property>
-                            <property name="moveable">1</property>
-                            <property name="name">m_staticline2</property>
-                            <property name="pane_border">1</property>
-                            <property name="pane_position"></property>
-                            <property name="pane_size"></property>
-                            <property name="permission">protected</property>
-                            <property name="pin_button">1</property>
-                            <property name="pos"></property>
-                            <property name="resize">Resizable</property>
-                            <property name="show">1</property>
-                            <property name="size"></property>
-                            <property name="style">wxLI_HORIZONTAL</property>
-                            <property name="subclass"></property>
-                            <property name="toolbar_pane">0</property>
-                            <property name="tooltip"></property>
-                            <property name="window_extra_style"></property>
-                            <property name="window_name"></property>
-                            <property name="window_style"></property>
-                            <event name="OnChar"></event>
-                            <event name="OnEnterWindow"></event>
-                            <event name="OnEraseBackground"></event>
-                            <event name="OnKeyDown"></event>
-                            <event name="OnKeyUp"></event>
-                            <event name="OnKillFocus"></event>
-                            <event name="OnLeaveWindow"></event>
-                            <event name="OnLeftDClick"></event>
-                            <event name="OnLeftDown"></event>
-                            <event name="OnLeftUp"></event>
-                            <event name="OnMiddleDClick"></event>
-                            <event name="OnMiddleDown"></event>
-                            <event name="OnMiddleUp"></event>
-                            <event name="OnMotion"></event>
-                            <event name="OnMouseEvents"></event>
-                            <event name="OnMouseWheel"></event>
-                            <event name="OnPaint"></event>
-                            <event name="OnRightDClick"></event>
-                            <event name="OnRightDown"></event>
-                            <event name="OnRightUp"></event>
-                            <event name="OnSetFocus"></event>
-                            <event name="OnSize"></event>
-                            <event name="OnUpdateUI"></event>
-                        </object>
-                    </object>
-                    <object class="sizeritem" expanded="1">
-                        <property name="border">5</property>
-                        <property name="flag">wxALL|wxALIGN_CENTER_HORIZONTAL</property>
-                        <property name="proportion">0</property>
-                        <object class="wxStaticBitmap" expanded="1">
-                            <property name="BottomDockable">1</property>
-                            <property name="LeftDockable">1</property>
-                            <property name="RightDockable">1</property>
-                            <property name="TopDockable">1</property>
-                            <property name="aui_layer"></property>
-                            <property name="aui_name"></property>
-                            <property name="aui_position"></property>
-                            <property name="aui_row"></property>
-                            <property name="best_size"></property>
-                            <property name="bg"></property>
-                            <property name="bitmap">Load From Art Provider; wxART_INFORMATION; wxART_OTHER</property>
-                            <property name="caption"></property>
-                            <property name="caption_visible">1</property>
-                            <property name="center_pane">0</property>
-                            <property name="close_button">1</property>
-                            <property name="context_help"></property>
-                            <property name="context_menu">1</property>
-                            <property name="default_pane">0</property>
-                            <property name="dock">Dock</property>
-                            <property name="dock_fixed">0</property>
-                            <property name="docking">Left</property>
-                            <property name="enabled">1</property>
-                            <property name="fg"></property>
-                            <property name="floatable">1</property>
-                            <property name="font"></property>
-                            <property name="gripper">0</property>
-                            <property name="hidden">0</property>
-                            <property name="id">wxID_ANY</property>
-                            <property name="max_size"></property>
-                            <property name="maximize_button">0</property>
-                            <property name="maximum_size"></property>
-                            <property name="min_size"></property>
-                            <property name="minimize_button">0</property>
+                        <property name="flag">wxEXPAND</property>
+                        <property name="proportion">1</property>
+                        <object class="wxFlexGridSizer" expanded="0">
+                            <property name="cols">1</property>
+                            <property name="flexible_direction">wxBOTH</property>
+                            <property name="growablecols"></property>
+                            <property name="growablerows">1</property>
+                            <property name="hgap">0</property>
                             <property name="minimum_size"></property>
-                            <property name="moveable">1</property>
-                            <property name="name">m_bitmapGithubURL</property>
-                            <property name="pane_border">1</property>
-                            <property name="pane_position"></property>
-                            <property name="pane_size"></property>
-                            <property name="permission">protected</property>
-                            <property name="pin_button">1</property>
-                            <property name="pos"></property>
-                            <property name="resize">Resizable</property>
-                            <property name="show">1</property>
-                            <property name="size"></property>
-                            <property name="subclass"></property>
-                            <property name="toolbar_pane">0</property>
-                            <property name="tooltip"></property>
-                            <property name="window_extra_style"></property>
-                            <property name="window_name"></property>
-                            <property name="window_style"></property>
-                            <event name="OnChar"></event>
-                            <event name="OnEnterWindow"></event>
-                            <event name="OnEraseBackground"></event>
-                            <event name="OnKeyDown"></event>
-                            <event name="OnKeyUp"></event>
-                            <event name="OnKillFocus"></event>
-                            <event name="OnLeaveWindow"></event>
-                            <event name="OnLeftDClick"></event>
-                            <event name="OnLeftDown"></event>
-                            <event name="OnLeftUp"></event>
-                            <event name="OnMiddleDClick"></event>
-                            <event name="OnMiddleDown"></event>
-                            <event name="OnMiddleUp"></event>
-                            <event name="OnMotion"></event>
-                            <event name="OnMouseEvents"></event>
-                            <event name="OnMouseWheel"></event>
-                            <event name="OnPaint"></event>
-                            <event name="OnRightDClick"></event>
-                            <event name="OnRightDown"></event>
-                            <event name="OnRightUp"></event>
-                            <event name="OnSetFocus"></event>
-                            <event name="OnSize"></event>
-                            <event name="OnUpdateUI"></event>
-                        </object>
-                    </object>
-                    <object class="sizeritem" expanded="1">
-                        <property name="border">5</property>
-                        <property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
-                        <property name="proportion">0</property>
-                        <object class="wxStaticText" expanded="1">
-                            <property name="BottomDockable">1</property>
-                            <property name="LeftDockable">1</property>
-                            <property name="RightDockable">1</property>
-                            <property name="TopDockable">1</property>
-                            <property name="aui_layer"></property>
-                            <property name="aui_name"></property>
-                            <property name="aui_position"></property>
-                            <property name="aui_row"></property>
-                            <property name="best_size"></property>
-                            <property name="bg"></property>
-                            <property name="caption"></property>
-                            <property name="caption_visible">1</property>
-                            <property name="center_pane">0</property>
-                            <property name="close_button">1</property>
-                            <property name="context_help"></property>
-                            <property name="context_menu">1</property>
-                            <property name="default_pane">0</property>
-                            <property name="dock">Dock</property>
-                            <property name="dock_fixed">0</property>
-                            <property name="docking">Left</property>
-                            <property name="enabled">1</property>
-                            <property name="fg"></property>
-                            <property name="floatable">1</property>
-                            <property name="font"></property>
-                            <property name="gripper">0</property>
-                            <property name="hidden">0</property>
-                            <property name="id">wxID_ANY</property>
-                            <property name="label">Default URL for KiCad libraries on Github:</property>
-                            <property name="max_size"></property>
-                            <property name="maximize_button">0</property>
-                            <property name="maximum_size"></property>
-                            <property name="min_size"></property>
-                            <property name="minimize_button">0</property>
-                            <property name="minimum_size"></property>
-                            <property name="moveable">1</property>
-                            <property name="name">m_staticText10</property>
-                            <property name="pane_border">1</property>
-                            <property name="pane_position"></property>
-                            <property name="pane_size"></property>
-                            <property name="permission">protected</property>
-                            <property name="pin_button">1</property>
-                            <property name="pos"></property>
-                            <property name="resize">Resizable</property>
-                            <property name="show">1</property>
-                            <property name="size"></property>
-                            <property name="style"></property>
-                            <property name="subclass"></property>
-                            <property name="toolbar_pane">0</property>
-                            <property name="tooltip"></property>
-                            <property name="window_extra_style"></property>
-                            <property name="window_name"></property>
-                            <property name="window_style"></property>
-                            <property name="wrap">-1</property>
-                            <event name="OnChar"></event>
-                            <event name="OnEnterWindow"></event>
-                            <event name="OnEraseBackground"></event>
-                            <event name="OnKeyDown"></event>
-                            <event name="OnKeyUp"></event>
-                            <event name="OnKillFocus"></event>
-                            <event name="OnLeaveWindow"></event>
-                            <event name="OnLeftDClick"></event>
-                            <event name="OnLeftDown"></event>
-                            <event name="OnLeftUp"></event>
-                            <event name="OnMiddleDClick"></event>
-                            <event name="OnMiddleDown"></event>
-                            <event name="OnMiddleUp"></event>
-                            <event name="OnMotion"></event>
-                            <event name="OnMouseEvents"></event>
-                            <event name="OnMouseWheel"></event>
-                            <event name="OnPaint"></event>
-                            <event name="OnRightDClick"></event>
-                            <event name="OnRightDown"></event>
-                            <event name="OnRightUp"></event>
-                            <event name="OnSetFocus"></event>
-                            <event name="OnSize"></event>
-                            <event name="OnUpdateUI"></event>
-                        </object>
-                    </object>
-                    <object class="sizeritem" expanded="1">
-                        <property name="border">5</property>
-                        <property name="flag">wxALL|wxEXPAND</property>
-                        <property name="proportion">0</property>
-                        <object class="wxTextCtrl" expanded="1">
-                            <property name="BottomDockable">1</property>
-                            <property name="LeftDockable">1</property>
-                            <property name="RightDockable">1</property>
-                            <property name="TopDockable">1</property>
-                            <property name="aui_layer"></property>
-                            <property name="aui_name"></property>
-                            <property name="aui_position"></property>
-                            <property name="aui_row"></property>
-                            <property name="best_size"></property>
-                            <property name="bg"></property>
-                            <property name="caption"></property>
-                            <property name="caption_visible">1</property>
-                            <property name="center_pane">0</property>
-                            <property name="close_button">1</property>
-                            <property name="context_help"></property>
-                            <property name="context_menu">1</property>
-                            <property name="default_pane">0</property>
-                            <property name="dock">Dock</property>
-                            <property name="dock_fixed">0</property>
-                            <property name="docking">Left</property>
-                            <property name="enabled">1</property>
-                            <property name="fg"></property>
-                            <property name="floatable">1</property>
-                            <property name="font"></property>
-                            <property name="gripper">0</property>
-                            <property name="hidden">0</property>
-                            <property name="id">wxID_ANY</property>
-                            <property name="max_size"></property>
-                            <property name="maximize_button">0</property>
-                            <property name="maximum_size"></property>
-                            <property name="maxlength"></property>
-                            <property name="min_size"></property>
-                            <property name="minimize_button">0</property>
-                            <property name="minimum_size"></property>
-                            <property name="moveable">1</property>
-                            <property name="name">m_textCtrlGithubURL</property>
-                            <property name="pane_border">1</property>
-                            <property name="pane_position"></property>
-                            <property name="pane_size"></property>
-                            <property name="permission">protected</property>
-                            <property name="pin_button">1</property>
-                            <property name="pos"></property>
-                            <property name="resize">Resizable</property>
-                            <property name="show">1</property>
-                            <property name="size"></property>
-                            <property name="style"></property>
-                            <property name="subclass"></property>
-                            <property name="toolbar_pane">0</property>
-                            <property name="tooltip"></property>
-                            <property name="validator_data_type"></property>
-                            <property name="validator_style">wxFILTER_NONE</property>
-                            <property name="validator_type">wxDefaultValidator</property>
-                            <property name="validator_variable"></property>
-                            <property name="value"></property>
-                            <property name="window_extra_style"></property>
-                            <property name="window_name"></property>
-                            <property name="window_style"></property>
-                            <event name="OnChar"></event>
-                            <event name="OnEnterWindow"></event>
-                            <event name="OnEraseBackground"></event>
-                            <event name="OnKeyDown"></event>
-                            <event name="OnKeyUp"></event>
-                            <event name="OnKillFocus"></event>
-                            <event name="OnLeaveWindow"></event>
-                            <event name="OnLeftDClick"></event>
-                            <event name="OnLeftDown"></event>
-                            <event name="OnLeftUp"></event>
-                            <event name="OnMiddleDClick"></event>
-                            <event name="OnMiddleDown"></event>
-                            <event name="OnMiddleUp"></event>
-                            <event name="OnMotion"></event>
-                            <event name="OnMouseEvents"></event>
-                            <event name="OnMouseWheel"></event>
-                            <event name="OnPaint"></event>
-                            <event name="OnRightDClick"></event>
-                            <event name="OnRightDown"></event>
-                            <event name="OnRightUp"></event>
-                            <event name="OnSetFocus"></event>
-                            <event name="OnSize"></event>
-                            <event name="OnText"></event>
-                            <event name="OnTextEnter"></event>
-                            <event name="OnTextMaxLen"></event>
-                            <event name="OnTextURL"></event>
-                            <event name="OnUpdateUI"></event>
-                        </object>
-                    </object>
-                </object>
-            </object>
-            <object class="WizardPageSimple" expanded="1">
-                <property name="bg"></property>
-                <property name="bitmap"></property>
-                <property name="context_help"></property>
-                <property name="context_menu">1</property>
-                <property name="enabled">1</property>
-                <property name="fg"></property>
-                <property name="font"></property>
-                <property name="hidden">0</property>
-                <property name="id">wxID_ANY</property>
-                <property name="maximum_size"></property>
-                <property name="minimum_size">450,-1</property>
-                <property name="name">m_wizPage2</property>
-                <property name="permission">public</property>
-                <property name="pos"></property>
-                <property name="size"></property>
-                <property name="subclass"></property>
-                <property name="tooltip"></property>
-                <property name="window_extra_style"></property>
-                <property name="window_name"></property>
-                <property name="window_style">wxSUNKEN_BORDER</property>
-                <event name="OnChar"></event>
-                <event name="OnEnterWindow"></event>
-                <event name="OnEraseBackground"></event>
-                <event name="OnKeyDown"></event>
-                <event name="OnKeyUp"></event>
-                <event name="OnKillFocus"></event>
-                <event name="OnLeaveWindow"></event>
-                <event name="OnLeftDClick"></event>
-                <event name="OnLeftDown"></event>
-                <event name="OnLeftUp"></event>
-                <event name="OnMiddleDClick"></event>
-                <event name="OnMiddleDown"></event>
-                <event name="OnMiddleUp"></event>
-                <event name="OnMotion"></event>
-                <event name="OnMouseEvents"></event>
-                <event name="OnMouseWheel"></event>
-                <event name="OnPaint"></event>
-                <event name="OnRightDClick"></event>
-                <event name="OnRightDown"></event>
-                <event name="OnRightUp"></event>
-                <event name="OnSetFocus"></event>
-                <event name="OnSize"></event>
-                <event name="OnUpdateUI"></event>
-                <object class="wxBoxSizer" expanded="1">
-                    <property name="minimum_size">-1,-1</property>
-                    <property name="name">bSizerPage2</property>
-                    <property name="orient">wxVERTICAL</property>
-                    <property name="permission">none</property>
-                    <object class="sizeritem" expanded="1">
-                        <property name="border">5</property>
-                        <property name="flag">wxALL|wxEXPAND</property>
-                        <property name="proportion">0</property>
-                        <object class="wxRadioBox" expanded="1">
-                            <property name="BottomDockable">1</property>
-                            <property name="LeftDockable">1</property>
-                            <property name="RightDockable">1</property>
-                            <property name="TopDockable">1</property>
-                            <property name="aui_layer"></property>
-                            <property name="aui_name"></property>
-                            <property name="aui_position"></property>
-                            <property name="aui_row"></property>
-                            <property name="best_size"></property>
-                            <property name="bg"></property>
-                            <property name="caption"></property>
-                            <property name="caption_visible">1</property>
-                            <property name="center_pane">0</property>
-                            <property name="choices">&quot;Use  path relative to the project&quot; &quot;Use environment variable in path&quot; &quot;Use absolute path&quot;</property>
-                            <property name="close_button">1</property>
-                            <property name="context_help"></property>
-                            <property name="context_menu">1</property>
-                            <property name="default_pane">0</property>
-                            <property name="dock">Dock</property>
-                            <property name="dock_fixed">0</property>
-                            <property name="docking">Left</property>
-                            <property name="enabled">1</property>
-                            <property name="fg"></property>
-                            <property name="floatable">1</property>
-                            <property name="font"></property>
-                            <property name="gripper">0</property>
-                            <property name="hidden">0</property>
-                            <property name="id">wxID_ANY</property>
-                            <property name="label">Path management:</property>
-                            <property name="majorDimension">1</property>
-                            <property name="max_size"></property>
-                            <property name="maximize_button">0</property>
-                            <property name="maximum_size"></property>
-                            <property name="min_size"></property>
-                            <property name="minimize_button">0</property>
-                            <property name="minimum_size"></property>
-                            <property name="moveable">1</property>
-                            <property name="name">m_rbPathManagement</property>
-                            <property name="pane_border">1</property>
-                            <property name="pane_position"></property>
-                            <property name="pane_size"></property>
-                            <property name="permission">protected</property>
-                            <property name="pin_button">1</property>
-                            <property name="pos"></property>
-                            <property name="resize">Resizable</property>
-                            <property name="selection">2</property>
-                            <property name="show">1</property>
-                            <property name="size"></property>
-                            <property name="style">wxRA_SPECIFY_COLS</property>
-                            <property name="subclass"></property>
-                            <property name="toolbar_pane">0</property>
-                            <property name="tooltip"></property>
-                            <property name="validator_data_type"></property>
-                            <property name="validator_style">wxFILTER_NONE</property>
-                            <property name="validator_type">wxDefaultValidator</property>
-                            <property name="validator_variable"></property>
-                            <property name="window_extra_style"></property>
-                            <property name="window_name"></property>
-                            <property name="window_style"></property>
-                            <event name="OnChar"></event>
-                            <event name="OnEnterWindow"></event>
-                            <event name="OnEraseBackground"></event>
-                            <event name="OnKeyDown"></event>
-                            <event name="OnKeyUp"></event>
-                            <event name="OnKillFocus"></event>
-                            <event name="OnLeaveWindow"></event>
-                            <event name="OnLeftDClick"></event>
-                            <event name="OnLeftDown"></event>
-                            <event name="OnLeftUp"></event>
-                            <event name="OnMiddleDClick"></event>
-                            <event name="OnMiddleDown"></event>
-                            <event name="OnMiddleUp"></event>
-                            <event name="OnMotion"></event>
-                            <event name="OnMouseEvents"></event>
-                            <event name="OnMouseWheel"></event>
-                            <event name="OnPaint"></event>
-                            <event name="OnRadioBox">OnPathManagementSelection</event>
-                            <event name="OnRightDClick"></event>
-                            <event name="OnRightDown"></event>
-                            <event name="OnRightUp"></event>
-                            <event name="OnSetFocus"></event>
-                            <event name="OnSize"></event>
-                            <event name="OnUpdateUI"></event>
-                        </object>
-                    </object>
-                    <object class="sizeritem" expanded="1">
-                        <property name="border">5</property>
-                        <property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
-                        <property name="proportion">0</property>
-                        <object class="wxStaticText" expanded="1">
-                            <property name="BottomDockable">1</property>
-                            <property name="LeftDockable">1</property>
-                            <property name="RightDockable">1</property>
-                            <property name="TopDockable">1</property>
-                            <property name="aui_layer"></property>
-                            <property name="aui_name"></property>
-                            <property name="aui_position"></property>
-                            <property name="aui_row"></property>
-                            <property name="best_size"></property>
-                            <property name="bg"></property>
-                            <property name="caption"></property>
-                            <property name="caption_visible">1</property>
-                            <property name="center_pane">0</property>
-                            <property name="close_button">1</property>
-                            <property name="context_help"></property>
-                            <property name="context_menu">1</property>
-                            <property name="default_pane">0</property>
-                            <property name="dock">Dock</property>
-                            <property name="dock_fixed">0</property>
-                            <property name="docking">Left</property>
-                            <property name="enabled">1</property>
-                            <property name="fg"></property>
-                            <property name="floatable">1</property>
-                            <property name="font"></property>
-                            <property name="gripper">0</property>
-                            <property name="hidden">0</property>
-                            <property name="id">wxID_ANY</property>
-                            <property name="label">Environment variables:</property>
-                            <property name="max_size"></property>
-                            <property name="maximize_button">0</property>
-                            <property name="maximum_size"></property>
-                            <property name="min_size"></property>
-                            <property name="minimize_button">0</property>
-                            <property name="minimum_size"></property>
-                            <property name="moveable">1</property>
-                            <property name="name">m_staticText1</property>
-                            <property name="pane_border">1</property>
-                            <property name="pane_position"></property>
-                            <property name="pane_size"></property>
-                            <property name="permission">protected</property>
-                            <property name="pin_button">1</property>
-                            <property name="pos"></property>
-                            <property name="resize">Resizable</property>
-                            <property name="show">1</property>
-                            <property name="size"></property>
-                            <property name="style"></property>
-                            <property name="subclass"></property>
-                            <property name="toolbar_pane">0</property>
-                            <property name="tooltip"></property>
-                            <property name="window_extra_style"></property>
-                            <property name="window_name"></property>
-                            <property name="window_style"></property>
-                            <property name="wrap">-1</property>
-                            <event name="OnChar"></event>
-                            <event name="OnEnterWindow"></event>
-                            <event name="OnEraseBackground"></event>
-                            <event name="OnKeyDown"></event>
-                            <event name="OnKeyUp"></event>
-                            <event name="OnKillFocus"></event>
-                            <event name="OnLeaveWindow"></event>
-                            <event name="OnLeftDClick"></event>
-                            <event name="OnLeftDown"></event>
-                            <event name="OnLeftUp"></event>
-                            <event name="OnMiddleDClick"></event>
-                            <event name="OnMiddleDown"></event>
-                            <event name="OnMiddleUp"></event>
-                            <event name="OnMotion"></event>
-                            <event name="OnMouseEvents"></event>
-                            <event name="OnMouseWheel"></event>
-                            <event name="OnPaint"></event>
-                            <event name="OnRightDClick"></event>
-                            <event name="OnRightDown"></event>
-                            <event name="OnRightUp"></event>
-                            <event name="OnSetFocus"></event>
-                            <event name="OnSize"></event>
-                            <event name="OnUpdateUI"></event>
-                        </object>
-                    </object>
-                    <object class="sizeritem" expanded="1">
-                        <property name="border">5</property>
-                        <property name="flag">wxALL|wxEXPAND</property>
-                        <property name="proportion">1</property>
-                        <object class="wxGrid" expanded="1">
-                            <property name="BottomDockable">1</property>
-                            <property name="LeftDockable">1</property>
-                            <property name="RightDockable">1</property>
-                            <property name="TopDockable">1</property>
-                            <property name="aui_layer"></property>
-                            <property name="aui_name"></property>
-                            <property name="aui_position"></property>
-                            <property name="aui_row"></property>
-                            <property name="autosize_cols">1</property>
-                            <property name="autosize_rows">1</property>
-                            <property name="best_size"></property>
-                            <property name="bg"></property>
-                            <property name="caption"></property>
-                            <property name="caption_visible">1</property>
-                            <property name="cell_bg"></property>
-                            <property name="cell_font"></property>
-                            <property name="cell_horiz_alignment">wxALIGN_LEFT</property>
-                            <property name="cell_text"></property>
-                            <property name="cell_vert_alignment">wxALIGN_TOP</property>
-                            <property name="center_pane">0</property>
-                            <property name="close_button">1</property>
-                            <property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
-                            <property name="col_label_size">30</property>
-                            <property name="col_label_values">&quot;Environment Variable&quot; &quot;Path Segment&quot;</property>
-                            <property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
-                            <property name="cols">2</property>
-                            <property name="column_sizes">125,154</property>
-                            <property name="context_help"></property>
-                            <property name="context_menu">1</property>
-                            <property name="default_pane">0</property>
-                            <property name="dock">Dock</property>
-                            <property name="dock_fixed">0</property>
-                            <property name="docking">Left</property>
-                            <property name="drag_col_move">0</property>
-                            <property name="drag_col_size">1</property>
-                            <property name="drag_grid_size">0</property>
-                            <property name="drag_row_size">0</property>
-                            <property name="editing">1</property>
-                            <property name="enabled">1</property>
-                            <property name="fg"></property>
-                            <property name="floatable">1</property>
-                            <property name="font"></property>
-                            <property name="grid_line_color"></property>
-                            <property name="grid_lines">1</property>
-                            <property name="gripper">0</property>
-                            <property name="hidden">0</property>
-                            <property name="id">wxID_ANY</property>
-                            <property name="label_bg"></property>
-                            <property name="label_font"></property>
-                            <property name="label_text"></property>
-                            <property name="margin_height">0</property>
-                            <property name="margin_width">0</property>
-                            <property name="max_size"></property>
-                            <property name="maximize_button">0</property>
-                            <property name="maximum_size"></property>
-                            <property name="min_size"></property>
-                            <property name="minimize_button">0</property>
-                            <property name="minimum_size"></property>
-                            <property name="moveable">1</property>
-                            <property name="name">m_gridEnvironmentVariablesList</property>
-                            <property name="pane_border">1</property>
-                            <property name="pane_position"></property>
-                            <property name="pane_size"></property>
-                            <property name="permission">protected</property>
-                            <property name="pin_button">1</property>
-                            <property name="pos"></property>
-                            <property name="resize">Resizable</property>
-                            <property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
-                            <property name="row_label_size">40</property>
-                            <property name="row_label_values"></property>
-                            <property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
-                            <property name="row_sizes"></property>
-                            <property name="rows">3</property>
-                            <property name="show">1</property>
-                            <property name="size"></property>
-                            <property name="subclass"></property>
-                            <property name="toolbar_pane">0</property>
-                            <property name="tooltip"></property>
-                            <property name="window_extra_style"></property>
-                            <property name="window_name"></property>
-                            <property name="window_style"></property>
-                            <event name="OnChar"></event>
-                            <event name="OnEnterWindow"></event>
-                            <event name="OnEraseBackground"></event>
-                            <event name="OnGridCellChange"></event>
-                            <event name="OnGridCellLeftClick"></event>
-                            <event name="OnGridCellLeftDClick"></event>
-                            <event name="OnGridCellRightClick"></event>
-                            <event name="OnGridCellRightDClick"></event>
-                            <event name="OnGridCmdCellChange"></event>
-                            <event name="OnGridCmdCellLeftClick"></event>
-                            <event name="OnGridCmdCellLeftDClick"></event>
-                            <event name="OnGridCmdCellRightClick"></event>
-                            <event name="OnGridCmdCellRightDClick"></event>
-                            <event name="OnGridCmdColSize"></event>
-                            <event name="OnGridCmdEditorCreated"></event>
-                            <event name="OnGridCmdEditorHidden"></event>
-                            <event name="OnGridCmdEditorShown"></event>
-                            <event name="OnGridCmdLabelLeftClick"></event>
-                            <event name="OnGridCmdLabelLeftDClick"></event>
-                            <event name="OnGridCmdLabelRightClick"></event>
-                            <event name="OnGridCmdLabelRightDClick"></event>
-                            <event name="OnGridCmdRangeSelect"></event>
-                            <event name="OnGridCmdRowSize"></event>
-                            <event name="OnGridCmdSelectCell"></event>
-                            <event name="OnGridColSize"></event>
-                            <event name="OnGridEditorCreated"></event>
-                            <event name="OnGridEditorHidden"></event>
-                            <event name="OnGridEditorShown"></event>
-                            <event name="OnGridLabelLeftClick"></event>
-                            <event name="OnGridLabelLeftDClick"></event>
-                            <event name="OnGridLabelRightClick"></event>
-                            <event name="OnGridLabelRightDClick"></event>
-                            <event name="OnGridRangeSelect"></event>
-                            <event name="OnGridRowSize"></event>
-                            <event name="OnGridSelectCell">OnSelectEnvVarCell</event>
-                            <event name="OnKeyDown"></event>
-                            <event name="OnKeyUp"></event>
-                            <event name="OnKillFocus"></event>
-                            <event name="OnLeaveWindow"></event>
-                            <event name="OnLeftDClick"></event>
-                            <event name="OnLeftDown"></event>
-                            <event name="OnLeftUp"></event>
-                            <event name="OnMiddleDClick"></event>
-                            <event name="OnMiddleDown"></event>
-                            <event name="OnMiddleUp"></event>
-                            <event name="OnMotion"></event>
-                            <event name="OnMouseEvents"></event>
-                            <event name="OnMouseWheel"></event>
-                            <event name="OnPaint"></event>
-                            <event name="OnRightDClick"></event>
-                            <event name="OnRightDown"></event>
-                            <event name="OnRightUp"></event>
-                            <event name="OnSetFocus"></event>
-                            <event name="OnSize"></event>
-                            <event name="OnUpdateUI"></event>
-                        </object>
-                    </object>
-                    <object class="sizeritem" expanded="1">
-                        <property name="border">5</property>
-                        <property name="flag">wxALIGN_CENTER_HORIZONTAL</property>
-                        <property name="proportion">0</property>
-                        <object class="wxBoxSizer" expanded="1">
-                            <property name="minimum_size"></property>
-                            <property name="name">bSizerButs</property>
-                            <property name="orient">wxHORIZONTAL</property>
-                            <property name="permission">none</property>
-                            <object class="sizeritem" expanded="1">
-                                <property name="border">5</property>
-                                <property name="flag">wxALL</property>
-                                <property name="proportion">0</property>
-                                <object class="wxButton" expanded="1">
-                                    <property name="BottomDockable">1</property>
-                                    <property name="LeftDockable">1</property>
-                                    <property name="RightDockable">1</property>
-                                    <property name="TopDockable">1</property>
-                                    <property name="aui_layer"></property>
-                                    <property name="aui_name"></property>
-                                    <property name="aui_position"></property>
-                                    <property name="aui_row"></property>
-                                    <property name="best_size"></property>
-                                    <property name="bg"></property>
-                                    <property name="caption"></property>
-                                    <property name="caption_visible">1</property>
-                                    <property name="center_pane">0</property>
-                                    <property name="close_button">1</property>
-                                    <property name="context_help"></property>
-                                    <property name="context_menu">1</property>
-                                    <property name="default">0</property>
-                                    <property name="default_pane">0</property>
-                                    <property name="dock">Dock</property>
-                                    <property name="dock_fixed">0</property>
-                                    <property name="docking">Left</property>
-                                    <property name="enabled">1</property>
-                                    <property name="fg"></property>
-                                    <property name="floatable">1</property>
-                                    <property name="font"></property>
-                                    <property name="gripper">0</property>
-                                    <property name="hidden">0</property>
-                                    <property name="id">wxID_ANY</property>
-                                    <property name="label">Add Environment Variable</property>
-                                    <property name="max_size"></property>
-                                    <property name="maximize_button">0</property>
-                                    <property name="maximum_size"></property>
-                                    <property name="min_size"></property>
-                                    <property name="minimize_button">0</property>
-                                    <property name="minimum_size"></property>
-                                    <property name="moveable">1</property>
-                                    <property name="name">m_buttonAddEV</property>
-                                    <property name="pane_border">1</property>
-                                    <property name="pane_position"></property>
-                                    <property name="pane_size"></property>
-                                    <property name="permission">protected</property>
-                                    <property name="pin_button">1</property>
-                                    <property name="pos"></property>
-                                    <property name="resize">Resizable</property>
-                                    <property name="show">1</property>
-                                    <property name="size"></property>
-                                    <property name="style"></property>
-                                    <property name="subclass"></property>
-                                    <property name="toolbar_pane">0</property>
-                                    <property name="tooltip"></property>
-                                    <property name="validator_data_type"></property>
-                                    <property name="validator_style">wxFILTER_NONE</property>
-                                    <property name="validator_type">wxDefaultValidator</property>
-                                    <property name="validator_variable"></property>
-                                    <property name="window_extra_style"></property>
-                                    <property name="window_name"></property>
-                                    <property name="window_style"></property>
-                                    <event name="OnButtonClick">OnAddEVariable</event>
-                                    <event name="OnChar"></event>
-                                    <event name="OnEnterWindow"></event>
-                                    <event name="OnEraseBackground"></event>
-                                    <event name="OnKeyDown"></event>
-                                    <event name="OnKeyUp"></event>
-                                    <event name="OnKillFocus"></event>
-                                    <event name="OnLeaveWindow"></event>
-                                    <event name="OnLeftDClick"></event>
-                                    <event name="OnLeftDown"></event>
-                                    <event name="OnLeftUp"></event>
-                                    <event name="OnMiddleDClick"></event>
-                                    <event name="OnMiddleDown"></event>
-                                    <event name="OnMiddleUp"></event>
-                                    <event name="OnMotion"></event>
-                                    <event name="OnMouseEvents"></event>
-                                    <event name="OnMouseWheel"></event>
-                                    <event name="OnPaint"></event>
-                                    <event name="OnRightDClick"></event>
-                                    <event name="OnRightDown"></event>
-                                    <event name="OnRightUp"></event>
-                                    <event name="OnSetFocus"></event>
-                                    <event name="OnSize"></event>
-                                    <event name="OnUpdateUI"></event>
-                                </object>
-                            </object>
-                            <object class="sizeritem" expanded="1">
+                            <property name="name">fgSizer112</property>
+                            <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                            <property name="permission">none</property>
+                            <property name="rows">3</property>
+                            <property name="vgap">0</property>
+                            <object class="sizeritem" expanded="0">
                                 <property name="border">5</property>
-                                <property name="flag">wxALL</property>
-                                <property name="proportion">0</property>
-                                <object class="wxButton" expanded="1">
+                                <property name="flag">wxALL|wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxStaticText" expanded="0">
                                     <property name="BottomDockable">1</property>
                                     <property name="LeftDockable">1</property>
                                     <property name="RightDockable">1</property>
@@ -1046,7 +172,6 @@
                                     <property name="close_button">1</property>
                                     <property name="context_help"></property>
                                     <property name="context_menu">1</property>
-                                    <property name="default">0</property>
                                     <property name="default_pane">0</property>
                                     <property name="dock">Dock</property>
                                     <property name="dock_fixed">0</property>
@@ -1058,7 +183,7 @@
                                     <property name="gripper">0</property>
                                     <property name="hidden">0</property>
                                     <property name="id">wxID_ANY</property>
-                                    <property name="label">Remove Environment Variable</property>
+                                    <property name="label">Welcome to the Add Footprint Libraries Wizard!&#x0A;&#x0A;Please select the source for the libraries to add:</property>
                                     <property name="max_size"></property>
                                     <property name="maximize_button">0</property>
                                     <property name="maximum_size"></property>
@@ -1066,222 +191,63 @@
                                     <property name="minimize_button">0</property>
                                     <property name="minimum_size"></property>
                                     <property name="moveable">1</property>
-                                    <property name="name">m_buttonRemoveEV</property>
+                                    <property name="name">m_staticText1</property>
                                     <property name="pane_border">1</property>
-                                    <property name="pane_position"></property>
-                                    <property name="pane_size"></property>
-                                    <property name="permission">protected</property>
-                                    <property name="pin_button">1</property>
-                                    <property name="pos"></property>
-                                    <property name="resize">Resizable</property>
-                                    <property name="show">1</property>
-                                    <property name="size"></property>
-                                    <property name="style"></property>
-                                    <property name="subclass"></property>
-                                    <property name="toolbar_pane">0</property>
-                                    <property name="tooltip"></property>
-                                    <property name="validator_data_type"></property>
-                                    <property name="validator_style">wxFILTER_NONE</property>
-                                    <property name="validator_type">wxDefaultValidator</property>
-                                    <property name="validator_variable"></property>
-                                    <property name="window_extra_style"></property>
-                                    <property name="window_name"></property>
-                                    <property name="window_style"></property>
-                                    <event name="OnButtonClick">OnRemoveEVariable</event>
-                                    <event name="OnChar"></event>
-                                    <event name="OnEnterWindow"></event>
-                                    <event name="OnEraseBackground"></event>
-                                    <event name="OnKeyDown"></event>
-                                    <event name="OnKeyUp"></event>
-                                    <event name="OnKillFocus"></event>
-                                    <event name="OnLeaveWindow"></event>
-                                    <event name="OnLeftDClick"></event>
-                                    <event name="OnLeftDown"></event>
-                                    <event name="OnLeftUp"></event>
-                                    <event name="OnMiddleDClick"></event>
-                                    <event name="OnMiddleDown"></event>
-                                    <event name="OnMiddleUp"></event>
-                                    <event name="OnMotion"></event>
-                                    <event name="OnMouseEvents"></event>
-                                    <event name="OnMouseWheel"></event>
-                                    <event name="OnPaint"></event>
-                                    <event name="OnRightDClick"></event>
-                                    <event name="OnRightDown"></event>
-                                    <event name="OnRightUp"></event>
-                                    <event name="OnSetFocus"></event>
-                                    <event name="OnSize"></event>
-                                    <event name="OnUpdateUI"></event>
-                                </object>
-                            </object>
-                        </object>
-                    </object>
-                </object>
-            </object>
-            <object class="WizardPageSimple" expanded="1">
-                <property name="bg"></property>
-                <property name="bitmap"></property>
-                <property name="context_help"></property>
-                <property name="context_menu">1</property>
-                <property name="enabled">1</property>
-                <property name="fg"></property>
-                <property name="font"></property>
-                <property name="hidden">0</property>
-                <property name="id">wxID_ANY</property>
-                <property name="maximum_size"></property>
-                <property name="minimum_size">450,-1</property>
-                <property name="name">m_wizPage3</property>
-                <property name="permission">public</property>
-                <property name="pos"></property>
-                <property name="size"></property>
-                <property name="subclass"></property>
-                <property name="tooltip"></property>
-                <property name="window_extra_style"></property>
-                <property name="window_name"></property>
-                <property name="window_style">wxSUNKEN_BORDER</property>
-                <event name="OnChar"></event>
-                <event name="OnEnterWindow"></event>
-                <event name="OnEraseBackground"></event>
-                <event name="OnKeyDown"></event>
-                <event name="OnKeyUp"></event>
-                <event name="OnKillFocus"></event>
-                <event name="OnLeaveWindow"></event>
-                <event name="OnLeftDClick"></event>
-                <event name="OnLeftDown"></event>
-                <event name="OnLeftUp"></event>
-                <event name="OnMiddleDClick"></event>
-                <event name="OnMiddleDown"></event>
-                <event name="OnMiddleUp"></event>
-                <event name="OnMotion"></event>
-                <event name="OnMouseEvents"></event>
-                <event name="OnMouseWheel"></event>
-                <event name="OnPaint"></event>
-                <event name="OnRightDClick"></event>
-                <event name="OnRightDown"></event>
-                <event name="OnRightUp"></event>
-                <event name="OnSetFocus"></event>
-                <event name="OnSize"></event>
-                <event name="OnUpdateUI"></event>
-                <object class="wxBoxSizer" expanded="1">
-                    <property name="minimum_size">-1,-1</property>
-                    <property name="name">bSizerPage3</property>
-                    <property name="orient">wxVERTICAL</property>
-                    <property name="permission">none</property>
-                    <object class="sizeritem" expanded="1">
-                        <property name="border">5</property>
-                        <property name="flag">wxEXPAND|wxBOTTOM</property>
-                        <property name="proportion">0</property>
-                        <object class="wxStaticBoxSizer" expanded="1">
-                            <property name="id">wxID_ANY</property>
-                            <property name="label">Options</property>
-                            <property name="minimum_size"></property>
-                            <property name="name">sbSizer1</property>
-                            <property name="orient">wxVERTICAL</property>
-                            <property name="permission">none</property>
-                            <event name="OnUpdateUI"></event>
-                            <object class="sizeritem" expanded="1">
-                                <property name="border">5</property>
-                                <property name="flag">wxEXPAND</property>
-                                <property name="proportion">0</property>
-                                <object class="wxFlexGridSizer" expanded="1">
-                                    <property name="cols">2</property>
-                                    <property name="flexible_direction">wxBOTH</property>
-                                    <property name="growablecols">1</property>
-                                    <property name="growablerows"></property>
-                                    <property name="hgap">0</property>
-                                    <property name="minimum_size"></property>
-                                    <property name="name">fgSizer1</property>
-                                    <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
-                                    <property name="permission">none</property>
-                                    <property name="rows">0</property>
-                                    <property name="vgap">0</property>
-                                    <object class="sizeritem" expanded="1">
-                                        <property name="border">5</property>
-                                        <property name="flag">wxALL</property>
-                                        <property name="proportion">0</property>
-                                        <object class="wxStaticText" expanded="1">
-                                            <property name="BottomDockable">1</property>
-                                            <property name="LeftDockable">1</property>
-                                            <property name="RightDockable">1</property>
-                                            <property name="TopDockable">1</property>
-                                            <property name="aui_layer"></property>
-                                            <property name="aui_name"></property>
-                                            <property name="aui_position"></property>
-                                            <property name="aui_row"></property>
-                                            <property name="best_size"></property>
-                                            <property name="bg"></property>
-                                            <property name="caption"></property>
-                                            <property name="caption_visible">1</property>
-                                            <property name="center_pane">0</property>
-                                            <property name="close_button">1</property>
-                                            <property name="context_help"></property>
-                                            <property name="context_menu">1</property>
-                                            <property name="default_pane">0</property>
-                                            <property name="dock">Dock</property>
-                                            <property name="dock_fixed">0</property>
-                                            <property name="docking">Left</property>
-                                            <property name="enabled">1</property>
-                                            <property name="fg"></property>
-                                            <property name="floatable">1</property>
-                                            <property name="font"></property>
-                                            <property name="gripper">0</property>
-                                            <property name="hidden">0</property>
-                                            <property name="id">wxID_ANY</property>
-                                            <property name="label">Plugin type:</property>
-                                            <property name="max_size"></property>
-                                            <property name="maximize_button">0</property>
-                                            <property name="maximum_size"></property>
-                                            <property name="min_size"></property>
-                                            <property name="minimize_button">0</property>
-                                            <property name="minimum_size"></property>
-                                            <property name="moveable">1</property>
-                                            <property name="name">m_textPluginTitle</property>
-                                            <property name="pane_border">1</property>
-                                            <property name="pane_position"></property>
-                                            <property name="pane_size"></property>
-                                            <property name="permission">protected</property>
-                                            <property name="pin_button">1</property>
-                                            <property name="pos"></property>
-                                            <property name="resize">Resizable</property>
-                                            <property name="show">1</property>
-                                            <property name="size"></property>
-                                            <property name="style"></property>
-                                            <property name="subclass"></property>
-                                            <property name="toolbar_pane">0</property>
-                                            <property name="tooltip"></property>
-                                            <property name="window_extra_style"></property>
-                                            <property name="window_name"></property>
-                                            <property name="window_style"></property>
-                                            <property name="wrap">-1</property>
-                                            <event name="OnChar"></event>
-                                            <event name="OnEnterWindow"></event>
-                                            <event name="OnEraseBackground"></event>
-                                            <event name="OnKeyDown"></event>
-                                            <event name="OnKeyUp"></event>
-                                            <event name="OnKillFocus"></event>
-                                            <event name="OnLeaveWindow"></event>
-                                            <event name="OnLeftDClick"></event>
-                                            <event name="OnLeftDown"></event>
-                                            <event name="OnLeftUp"></event>
-                                            <event name="OnMiddleDClick"></event>
-                                            <event name="OnMiddleDown"></event>
-                                            <event name="OnMiddleUp"></event>
-                                            <event name="OnMotion"></event>
-                                            <event name="OnMouseEvents"></event>
-                                            <event name="OnMouseWheel"></event>
-                                            <event name="OnPaint"></event>
-                                            <event name="OnRightDClick"></event>
-                                            <event name="OnRightDown"></event>
-                                            <event name="OnRightUp"></event>
-                                            <event name="OnSetFocus"></event>
-                                            <event name="OnSize"></event>
-                                            <event name="OnUpdateUI"></event>
-                                        </object>
-                                    </object>
-                                    <object class="sizeritem" expanded="1">
+                                    <property name="pane_position"></property>
+                                    <property name="pane_size"></property>
+                                    <property name="permission">protected</property>
+                                    <property name="pin_button">1</property>
+                                    <property name="pos"></property>
+                                    <property name="resize">Resizable</property>
+                                    <property name="show">1</property>
+                                    <property name="size"></property>
+                                    <property name="style"></property>
+                                    <property name="subclass"></property>
+                                    <property name="toolbar_pane">0</property>
+                                    <property name="tooltip"></property>
+                                    <property name="window_extra_style"></property>
+                                    <property name="window_name"></property>
+                                    <property name="window_style"></property>
+                                    <property name="wrap">-1</property>
+                                    <event name="OnChar"></event>
+                                    <event name="OnEnterWindow"></event>
+                                    <event name="OnEraseBackground"></event>
+                                    <event name="OnKeyDown"></event>
+                                    <event name="OnKeyUp"></event>
+                                    <event name="OnKillFocus"></event>
+                                    <event name="OnLeaveWindow"></event>
+                                    <event name="OnLeftDClick"></event>
+                                    <event name="OnLeftDown"></event>
+                                    <event name="OnLeftUp"></event>
+                                    <event name="OnMiddleDClick"></event>
+                                    <event name="OnMiddleDown"></event>
+                                    <event name="OnMiddleUp"></event>
+                                    <event name="OnMotion"></event>
+                                    <event name="OnMouseEvents"></event>
+                                    <event name="OnMouseWheel"></event>
+                                    <event name="OnPaint"></event>
+                                    <event name="OnRightDClick"></event>
+                                    <event name="OnRightDown"></event>
+                                    <event name="OnRightUp"></event>
+                                    <event name="OnSetFocus"></event>
+                                    <event name="OnSize"></event>
+                                    <event name="OnUpdateUI"></event>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">0</property>
+                                <object class="wxBoxSizer" expanded="0">
+                                    <property name="minimum_size"></property>
+                                    <property name="name">bSizer19</property>
+                                    <property name="orient">wxVERTICAL</property>
+                                    <property name="permission">none</property>
+                                    <object class="sizeritem" expanded="0">
                                         <property name="border">5</property>
-                                        <property name="flag">wxALL</property>
-                                        <property name="proportion">1</property>
-                                        <object class="wxStaticText" expanded="1">
+                                        <property name="flag">wxALL|wxEXPAND</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxRadioButton" expanded="0">
                                             <property name="BottomDockable">1</property>
                                             <property name="LeftDockable">1</property>
                                             <property name="RightDockable">1</property>
@@ -1309,7 +275,7 @@
                                             <property name="gripper">0</property>
                                             <property name="hidden">0</property>
                                             <property name="id">wxID_ANY</property>
-                                            <property name="label">KiCad</property>
+                                            <property name="label">Files on my computer</property>
                                             <property name="max_size"></property>
                                             <property name="maximize_button">0</property>
                                             <property name="maximum_size"></property>
@@ -1317,7 +283,7 @@
                                             <property name="minimize_button">0</property>
                                             <property name="minimum_size"></property>
                                             <property name="moveable">1</property>
-                                            <property name="name">m_textPluginType</property>
+                                            <property name="name">m_radioAddLocal</property>
                                             <property name="pane_border">1</property>
                                             <property name="pane_position"></property>
                                             <property name="pane_size"></property>
@@ -1331,10 +297,14 @@
                                             <property name="subclass"></property>
                                             <property name="toolbar_pane">0</property>
                                             <property name="tooltip"></property>
+                                            <property name="validator_data_type"></property>
+                                            <property name="validator_style">wxFILTER_NONE</property>
+                                            <property name="validator_type">wxDefaultValidator</property>
+                                            <property name="validator_variable"></property>
+                                            <property name="value">0</property>
                                             <property name="window_extra_style"></property>
                                             <property name="window_name"></property>
                                             <property name="window_style"></property>
-                                            <property name="wrap">-1</property>
                                             <event name="OnChar"></event>
                                             <event name="OnEnterWindow"></event>
                                             <event name="OnEraseBackground"></event>
@@ -1352,6 +322,7 @@
                                             <event name="OnMouseEvents"></event>
                                             <event name="OnMouseWheel"></event>
                                             <event name="OnPaint"></event>
+                                            <event name="OnRadioButton"></event>
                                             <event name="OnRightDClick"></event>
                                             <event name="OnRightDown"></event>
                                             <event name="OnRightUp"></event>
@@ -1360,94 +331,219 @@
                                             <event name="OnUpdateUI"></event>
                                         </object>
                                     </object>
-                                    <object class="sizeritem" expanded="1">
+                                    <object class="sizeritem" expanded="0">
                                         <property name="border">5</property>
-                                        <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                        <property name="flag">wxEXPAND</property>
                                         <property name="proportion">0</property>
-                                        <object class="wxStaticText" expanded="1">
-                                            <property name="BottomDockable">1</property>
-                                            <property name="LeftDockable">1</property>
-                                            <property name="RightDockable">1</property>
-                                            <property name="TopDockable">1</property>
-                                            <property name="aui_layer"></property>
-                                            <property name="aui_name"></property>
-                                            <property name="aui_position"></property>
-                                            <property name="aui_row"></property>
-                                            <property name="best_size"></property>
-                                            <property name="bg"></property>
-                                            <property name="caption"></property>
-                                            <property name="caption_visible">1</property>
-                                            <property name="center_pane">0</property>
-                                            <property name="close_button">1</property>
-                                            <property name="context_help"></property>
-                                            <property name="context_menu">1</property>
-                                            <property name="default_pane">0</property>
-                                            <property name="dock">Dock</property>
-                                            <property name="dock_fixed">0</property>
-                                            <property name="docking">Left</property>
-                                            <property name="enabled">1</property>
-                                            <property name="fg"></property>
-                                            <property name="floatable">1</property>
-                                            <property name="font"></property>
-                                            <property name="gripper">0</property>
-                                            <property name="hidden">0</property>
-                                            <property name="id">wxID_ANY</property>
-                                            <property name="label">Option:</property>
-                                            <property name="max_size"></property>
-                                            <property name="maximize_button">0</property>
-                                            <property name="maximum_size"></property>
-                                            <property name="min_size"></property>
-                                            <property name="minimize_button">0</property>
+                                        <object class="wxBoxSizer" expanded="0">
                                             <property name="minimum_size"></property>
-                                            <property name="moveable">1</property>
-                                            <property name="name">m_textOptionTitle</property>
-                                            <property name="pane_border">1</property>
-                                            <property name="pane_position"></property>
-                                            <property name="pane_size"></property>
-                                            <property name="permission">protected</property>
-                                            <property name="pin_button">1</property>
-                                            <property name="pos"></property>
-                                            <property name="resize">Resizable</property>
-                                            <property name="show">1</property>
-                                            <property name="size"></property>
-                                            <property name="style"></property>
-                                            <property name="subclass"></property>
-                                            <property name="toolbar_pane">0</property>
-                                            <property name="tooltip"></property>
-                                            <property name="window_extra_style"></property>
-                                            <property name="window_name"></property>
-                                            <property name="window_style"></property>
-                                            <property name="wrap">-1</property>
-                                            <event name="OnChar"></event>
-                                            <event name="OnEnterWindow"></event>
-                                            <event name="OnEraseBackground"></event>
-                                            <event name="OnKeyDown"></event>
-                                            <event name="OnKeyUp"></event>
-                                            <event name="OnKillFocus"></event>
-                                            <event name="OnLeaveWindow"></event>
-                                            <event name="OnLeftDClick"></event>
-                                            <event name="OnLeftDown"></event>
-                                            <event name="OnLeftUp"></event>
-                                            <event name="OnMiddleDClick"></event>
-                                            <event name="OnMiddleDown"></event>
-                                            <event name="OnMiddleUp"></event>
-                                            <event name="OnMotion"></event>
-                                            <event name="OnMouseEvents"></event>
-                                            <event name="OnMouseWheel"></event>
-                                            <event name="OnPaint"></event>
-                                            <event name="OnRightDClick"></event>
-                                            <event name="OnRightDown"></event>
-                                            <event name="OnRightUp"></event>
-                                            <event name="OnSetFocus"></event>
-                                            <event name="OnSize"></event>
-                                            <event name="OnUpdateUI"></event>
+                                            <property name="name">m_sizerGithub</property>
+                                            <property name="orient">wxHORIZONTAL</property>
+                                            <property name="permission">none</property>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL|wxEXPAND</property>
+                                                <property name="proportion">0</property>
+                                                <object class="wxRadioButton" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="label">Github repository</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_radioAddGithub</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="value">0</property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRadioButton"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
+                                            <object class="sizeritem" expanded="0">
+                                                <property name="border">5</property>
+                                                <property name="flag">wxALL</property>
+                                                <property name="proportion">1</property>
+                                                <object class="wxTextCtrl" expanded="0">
+                                                    <property name="BottomDockable">1</property>
+                                                    <property name="LeftDockable">1</property>
+                                                    <property name="RightDockable">1</property>
+                                                    <property name="TopDockable">1</property>
+                                                    <property name="aui_layer"></property>
+                                                    <property name="aui_name"></property>
+                                                    <property name="aui_position"></property>
+                                                    <property name="aui_row"></property>
+                                                    <property name="best_size"></property>
+                                                    <property name="bg"></property>
+                                                    <property name="caption"></property>
+                                                    <property name="caption_visible">1</property>
+                                                    <property name="center_pane">0</property>
+                                                    <property name="close_button">1</property>
+                                                    <property name="context_help"></property>
+                                                    <property name="context_menu">1</property>
+                                                    <property name="default_pane">0</property>
+                                                    <property name="dock">Dock</property>
+                                                    <property name="dock_fixed">0</property>
+                                                    <property name="docking">Left</property>
+                                                    <property name="enabled">1</property>
+                                                    <property name="fg"></property>
+                                                    <property name="floatable">1</property>
+                                                    <property name="font"></property>
+                                                    <property name="gripper">0</property>
+                                                    <property name="hidden">0</property>
+                                                    <property name="id">wxID_ANY</property>
+                                                    <property name="max_size"></property>
+                                                    <property name="maximize_button">0</property>
+                                                    <property name="maximum_size"></property>
+                                                    <property name="maxlength"></property>
+                                                    <property name="min_size"></property>
+                                                    <property name="minimize_button">0</property>
+                                                    <property name="minimum_size"></property>
+                                                    <property name="moveable">1</property>
+                                                    <property name="name">m_textCtrlGithubURL</property>
+                                                    <property name="pane_border">1</property>
+                                                    <property name="pane_position"></property>
+                                                    <property name="pane_size"></property>
+                                                    <property name="permission">protected</property>
+                                                    <property name="pin_button">1</property>
+                                                    <property name="pos"></property>
+                                                    <property name="resize">Resizable</property>
+                                                    <property name="show">1</property>
+                                                    <property name="size"></property>
+                                                    <property name="style"></property>
+                                                    <property name="subclass"></property>
+                                                    <property name="toolbar_pane">0</property>
+                                                    <property name="tooltip"></property>
+                                                    <property name="validator_data_type"></property>
+                                                    <property name="validator_style">wxFILTER_NONE</property>
+                                                    <property name="validator_type">wxDefaultValidator</property>
+                                                    <property name="validator_variable"></property>
+                                                    <property name="value">http://github.com/KiCad</property>
+                                                    <property name="window_extra_style"></property>
+                                                    <property name="window_name"></property>
+                                                    <property name="window_style"></property>
+                                                    <event name="OnChar"></event>
+                                                    <event name="OnEnterWindow"></event>
+                                                    <event name="OnEraseBackground"></event>
+                                                    <event name="OnKeyDown"></event>
+                                                    <event name="OnKeyUp"></event>
+                                                    <event name="OnKillFocus"></event>
+                                                    <event name="OnLeaveWindow"></event>
+                                                    <event name="OnLeftDClick"></event>
+                                                    <event name="OnLeftDown"></event>
+                                                    <event name="OnLeftUp"></event>
+                                                    <event name="OnMiddleDClick"></event>
+                                                    <event name="OnMiddleDown"></event>
+                                                    <event name="OnMiddleUp"></event>
+                                                    <event name="OnMotion"></event>
+                                                    <event name="OnMouseEvents"></event>
+                                                    <event name="OnMouseWheel"></event>
+                                                    <event name="OnPaint"></event>
+                                                    <event name="OnRightDClick"></event>
+                                                    <event name="OnRightDown"></event>
+                                                    <event name="OnRightUp"></event>
+                                                    <event name="OnSetFocus"></event>
+                                                    <event name="OnSize"></event>
+                                                    <event name="OnText"></event>
+                                                    <event name="OnTextEnter"></event>
+                                                    <event name="OnTextMaxLen"></event>
+                                                    <event name="OnTextURL"></event>
+                                                    <event name="OnUpdateUI"></event>
+                                                </object>
+                                            </object>
                                         </object>
                                     </object>
-                                    <object class="sizeritem" expanded="1">
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="0">
+                                <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="wxFlexGridSizer" expanded="0">
+                                    <property name="cols">3</property>
+                                    <property name="flexible_direction">wxBOTH</property>
+                                    <property name="growablecols"></property>
+                                    <property name="growablerows"></property>
+                                    <property name="hgap">0</property>
+                                    <property name="minimum_size"></property>
+                                    <property name="name">fgSizer12</property>
+                                    <property name="non_flexible_grow_mode">wxFLEX_GROWMODE_SPECIFIED</property>
+                                    <property name="permission">none</property>
+                                    <property name="rows">0</property>
+                                    <property name="vgap">0</property>
+                                    <object class="sizeritem" expanded="0">
                                         <property name="border">5</property>
-                                        <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
-                                        <property name="proportion">1</property>
-                                        <object class="wxStaticText" expanded="1">
+                                        <property name="flag">wxALIGN_CENTER_VERTICAL|wxTOP|wxBOTTOM|wxLEFT</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
                                             <property name="BottomDockable">1</property>
                                             <property name="LeftDockable">1</property>
                                             <property name="RightDockable">1</property>
@@ -1475,7 +571,7 @@
                                             <property name="gripper">0</property>
                                             <property name="hidden">0</property>
                                             <property name="id">wxID_ANY</property>
-                                            <property name="label">dummy</property>
+                                            <property name="label">Visit the official</property>
                                             <property name="max_size"></property>
                                             <property name="maximize_button">0</property>
                                             <property name="maximum_size"></property>
@@ -1483,7 +579,7 @@
                                             <property name="minimize_button">0</property>
                                             <property name="minimum_size"></property>
                                             <property name="moveable">1</property>
-                                            <property name="name">m_textOption</property>
+                                            <property name="name">m_staticText8</property>
                                             <property name="pane_border">1</property>
                                             <property name="pane_position"></property>
                                             <property name="pane_size"></property>
@@ -1526,11 +622,11 @@
                                             <event name="OnUpdateUI"></event>
                                         </object>
                                     </object>
-                                    <object class="sizeritem" expanded="1">
+                                    <object class="sizeritem" expanded="0">
                                         <property name="border">5</property>
-                                        <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
+                                        <property name="flag">wxTOP|wxBOTTOM</property>
                                         <property name="proportion">0</property>
-                                        <object class="wxStaticText" expanded="1">
+                                        <object class="wxHyperlinkCtrl" expanded="0">
                                             <property name="BottomDockable">1</property>
                                             <property name="LeftDockable">1</property>
                                             <property name="RightDockable">1</property>
@@ -1557,8 +653,9 @@
                                             <property name="font"></property>
                                             <property name="gripper">0</property>
                                             <property name="hidden">0</property>
+                                            <property name="hover_color"></property>
                                             <property name="id">wxID_ANY</property>
-                                            <property name="label">Path:</property>
+                                            <property name="label">Kicad repository on Github</property>
                                             <property name="max_size"></property>
                                             <property name="maximize_button">0</property>
                                             <property name="maximum_size"></property>
@@ -1566,7 +663,8 @@
                                             <property name="minimize_button">0</property>
                                             <property name="minimum_size"></property>
                                             <property name="moveable">1</property>
-                                            <property name="name">m_stPathTitle</property>
+                                            <property name="name">m_hyperlink1</property>
+                                            <property name="normal_color"></property>
                                             <property name="pane_border">1</property>
                                             <property name="pane_position"></property>
                                             <property name="pane_size"></property>
@@ -1576,17 +674,19 @@
                                             <property name="resize">Resizable</property>
                                             <property name="show">1</property>
                                             <property name="size"></property>
-                                            <property name="style"></property>
+                                            <property name="style">wxHL_DEFAULT_STYLE</property>
                                             <property name="subclass"></property>
                                             <property name="toolbar_pane">0</property>
                                             <property name="tooltip"></property>
+                                            <property name="url">https://github.com/KiCad</property>
+                                            <property name="visited_color"></property>
                                             <property name="window_extra_style"></property>
                                             <property name="window_name"></property>
                                             <property name="window_style"></property>
-                                            <property name="wrap">-1</property>
                                             <event name="OnChar"></event>
                                             <event name="OnEnterWindow"></event>
                                             <event name="OnEraseBackground"></event>
+                                            <event name="OnHyperlink"></event>
                                             <event name="OnKeyDown"></event>
                                             <event name="OnKeyUp"></event>
                                             <event name="OnKillFocus"></event>
@@ -1609,11 +709,11 @@
                                             <event name="OnUpdateUI"></event>
                                         </object>
                                     </object>
-                                    <object class="sizeritem" expanded="1">
+                                    <object class="sizeritem" expanded="0">
                                         <property name="border">5</property>
-                                        <property name="flag">wxBOTTOM|wxRIGHT|wxLEFT</property>
-                                        <property name="proportion">1</property>
-                                        <object class="wxStaticText" expanded="1">
+                                        <property name="flag">wxTOP|wxBOTTOM|wxALIGN_CENTER_VERTICAL</property>
+                                        <property name="proportion">0</property>
+                                        <object class="wxStaticText" expanded="0">
                                             <property name="BottomDockable">1</property>
                                             <property name="LeftDockable">1</property>
                                             <property name="RightDockable">1</property>
@@ -1641,7 +741,7 @@
                                             <property name="gripper">0</property>
                                             <property name="hidden">0</property>
                                             <property name="id">wxID_ANY</property>
-                                            <property name="label">dummy</property>
+                                            <property name="label">to find numerous footprint libraries!</property>
                                             <property name="max_size"></property>
                                             <property name="maximize_button">0</property>
                                             <property name="maximum_size"></property>
@@ -1649,7 +749,7 @@
                                             <property name="minimize_button">0</property>
                                             <property name="minimum_size"></property>
                                             <property name="moveable">1</property>
-                                            <property name="name">m_textPath</property>
+                                            <property name="name">m_staticText9</property>
                                             <property name="pane_border">1</property>
                                             <property name="pane_position"></property>
                                             <property name="pane_size"></property>
@@ -1696,11 +796,298 @@
                             </object>
                         </object>
                     </object>
+                </object>
+            </object>
+            <object class="WizardPageSimple" expanded="1">
+                <property name="bg"></property>
+                <property name="bitmap">Load From Art Provider; wxART_HELP_BOOK; wxART_FRAME_ICON</property>
+                <property name="context_help"></property>
+                <property name="context_menu">1</property>
+                <property name="enabled">1</property>
+                <property name="fg"></property>
+                <property name="font"></property>
+                <property name="hidden">0</property>
+                <property name="id">wxID_ANY</property>
+                <property name="maximum_size"></property>
+                <property name="minimum_size"></property>
+                <property name="name">m_wizPage2_Local</property>
+                <property name="permission">protected</property>
+                <property name="pos"></property>
+                <property name="size"></property>
+                <property name="subclass"></property>
+                <property name="tooltip"></property>
+                <property name="window_extra_style"></property>
+                <property name="window_name"></property>
+                <property name="window_style"></property>
+                <event name="OnChar"></event>
+                <event name="OnEnterWindow"></event>
+                <event name="OnEraseBackground"></event>
+                <event name="OnKeyDown"></event>
+                <event name="OnKeyUp"></event>
+                <event name="OnKillFocus"></event>
+                <event name="OnLeaveWindow"></event>
+                <event name="OnLeftDClick"></event>
+                <event name="OnLeftDown"></event>
+                <event name="OnLeftUp"></event>
+                <event name="OnMiddleDClick"></event>
+                <event name="OnMiddleDown"></event>
+                <event name="OnMiddleUp"></event>
+                <event name="OnMotion"></event>
+                <event name="OnMouseEvents"></event>
+                <event name="OnMouseWheel"></event>
+                <event name="OnPaint"></event>
+                <event name="OnRightDClick"></event>
+                <event name="OnRightDown"></event>
+                <event name="OnRightUp"></event>
+                <event name="OnSetFocus"></event>
+                <event name="OnSize"></event>
+                <event name="OnUpdateUI"></event>
+                <object class="wxBoxSizer" expanded="1">
+                    <property name="minimum_size"></property>
+                    <property name="name">bSizer8</property>
+                    <property name="orient">wxVERTICAL</property>
+                    <property name="permission">none</property>
+                    <object class="sizeritem" expanded="1">
+                        <property name="border">5</property>
+                        <property name="flag">wxALL</property>
+                        <property name="proportion">0</property>
+                        <object class="wxStaticText" expanded="1">
+                            <property name="BottomDockable">1</property>
+                            <property name="LeftDockable">1</property>
+                            <property name="RightDockable">1</property>
+                            <property name="TopDockable">1</property>
+                            <property name="aui_layer"></property>
+                            <property name="aui_name"></property>
+                            <property name="aui_position"></property>
+                            <property name="aui_row"></property>
+                            <property name="best_size"></property>
+                            <property name="bg"></property>
+                            <property name="caption"></property>
+                            <property name="caption_visible">1</property>
+                            <property name="center_pane">0</property>
+                            <property name="close_button">1</property>
+                            <property name="context_help"></property>
+                            <property name="context_menu">1</property>
+                            <property name="default_pane">0</property>
+                            <property name="dock">Dock</property>
+                            <property name="dock_fixed">0</property>
+                            <property name="docking">Left</property>
+                            <property name="enabled">1</property>
+                            <property name="fg"></property>
+                            <property name="floatable">1</property>
+                            <property name="font"></property>
+                            <property name="gripper">0</property>
+                            <property name="hidden">0</property>
+                            <property name="id">wxID_ANY</property>
+                            <property name="label">Select files or folders to add:</property>
+                            <property name="max_size"></property>
+                            <property name="maximize_button">0</property>
+                            <property name="maximum_size"></property>
+                            <property name="min_size"></property>
+                            <property name="minimize_button">0</property>
+                            <property name="minimum_size"></property>
+                            <property name="moveable">1</property>
+                            <property name="name">m_staticText7</property>
+                            <property name="pane_border">1</property>
+                            <property name="pane_position"></property>
+                            <property name="pane_size"></property>
+                            <property name="permission">protected</property>
+                            <property name="pin_button">1</property>
+                            <property name="pos"></property>
+                            <property name="resize">Resizable</property>
+                            <property name="show">1</property>
+                            <property name="size"></property>
+                            <property name="style"></property>
+                            <property name="subclass"></property>
+                            <property name="toolbar_pane">0</property>
+                            <property name="tooltip"></property>
+                            <property name="window_extra_style"></property>
+                            <property name="window_name"></property>
+                            <property name="window_style"></property>
+                            <property name="wrap">-1</property>
+                            <event name="OnChar"></event>
+                            <event name="OnEnterWindow"></event>
+                            <event name="OnEraseBackground"></event>
+                            <event name="OnKeyDown"></event>
+                            <event name="OnKeyUp"></event>
+                            <event name="OnKillFocus"></event>
+                            <event name="OnLeaveWindow"></event>
+                            <event name="OnLeftDClick"></event>
+                            <event name="OnLeftDown"></event>
+                            <event name="OnLeftUp"></event>
+                            <event name="OnMiddleDClick"></event>
+                            <event name="OnMiddleDown"></event>
+                            <event name="OnMiddleUp"></event>
+                            <event name="OnMotion"></event>
+                            <event name="OnMouseEvents"></event>
+                            <event name="OnMouseWheel"></event>
+                            <event name="OnPaint"></event>
+                            <event name="OnRightDClick"></event>
+                            <event name="OnRightDown"></event>
+                            <event name="OnRightUp"></event>
+                            <event name="OnSetFocus"></event>
+                            <event name="OnSize"></event>
+                            <event name="OnUpdateUI"></event>
+                        </object>
+                    </object>
                     <object class="sizeritem" expanded="1">
                         <property name="border">5</property>
-                        <property name="flag">wxTOP|wxRIGHT|wxLEFT</property>
+                        <property name="flag">wxEXPAND | wxALL</property>
+                        <property name="proportion">1</property>
+                        <object class="wxGenericDirCtrl" expanded="1">
+                            <property name="BottomDockable">1</property>
+                            <property name="LeftDockable">1</property>
+                            <property name="RightDockable">1</property>
+                            <property name="TopDockable">1</property>
+                            <property name="aui_layer"></property>
+                            <property name="aui_name"></property>
+                            <property name="aui_position"></property>
+                            <property name="aui_row"></property>
+                            <property name="best_size"></property>
+                            <property name="bg"></property>
+                            <property name="caption"></property>
+                            <property name="caption_visible">1</property>
+                            <property name="center_pane">0</property>
+                            <property name="close_button">1</property>
+                            <property name="context_help"></property>
+                            <property name="context_menu">1</property>
+                            <property name="default_pane">0</property>
+                            <property name="defaultfilter">0</property>
+                            <property name="defaultfolder"></property>
+                            <property name="dock">Dock</property>
+                            <property name="dock_fixed">0</property>
+                            <property name="docking">Left</property>
+                            <property name="enabled">1</property>
+                            <property name="fg"></property>
+                            <property name="filter"></property>
+                            <property name="floatable">1</property>
+                            <property name="font"></property>
+                            <property name="gripper">0</property>
+                            <property name="hidden">0</property>
+                            <property name="id">wxID_ANY</property>
+                            <property name="max_size"></property>
+                            <property name="maximize_button">0</property>
+                            <property name="maximum_size"></property>
+                            <property name="min_size"></property>
+                            <property name="minimize_button">0</property>
+                            <property name="minimum_size"></property>
+                            <property name="moveable">1</property>
+                            <property name="name">m_filePicker</property>
+                            <property name="pane_border">1</property>
+                            <property name="pane_position"></property>
+                            <property name="pane_size"></property>
+                            <property name="permission">protected</property>
+                            <property name="pin_button">1</property>
+                            <property name="pos"></property>
+                            <property name="resize">Resizable</property>
+                            <property name="show">1</property>
+                            <property name="show_hidden">0</property>
+                            <property name="size"></property>
+                            <property name="style">wxDIRCTRL_3D_INTERNAL|wxDIRCTRL_MULTIPLE|wxDIRCTRL_SHOW_FILTERS</property>
+                            <property name="subclass"></property>
+                            <property name="toolbar_pane">0</property>
+                            <property name="tooltip"></property>
+                            <property name="window_extra_style"></property>
+                            <property name="window_name"></property>
+                            <property name="window_style">wxSUNKEN_BORDER</property>
+                            <event name="OnChar"></event>
+                            <event name="OnEnterWindow"></event>
+                            <event name="OnEraseBackground"></event>
+                            <event name="OnKeyDown"></event>
+                            <event name="OnKeyUp"></event>
+                            <event name="OnKillFocus"></event>
+                            <event name="OnLeaveWindow"></event>
+                            <event name="OnLeftDClick"></event>
+                            <event name="OnLeftDown"></event>
+                            <event name="OnLeftUp"></event>
+                            <event name="OnMiddleDClick"></event>
+                            <event name="OnMiddleDown"></event>
+                            <event name="OnMiddleUp"></event>
+                            <event name="OnMotion"></event>
+                            <event name="OnMouseEvents"></event>
+                            <event name="OnMouseWheel"></event>
+                            <event name="OnPaint"></event>
+                            <event name="OnRightDClick"></event>
+                            <event name="OnRightDown"></event>
+                            <event name="OnRightUp"></event>
+                            <event name="OnSetFocus"></event>
+                            <event name="OnSize"></event>
+                            <event name="OnTreeBeginDrag"></event>
+                            <event name="OnTreeBeginLabelEdit"></event>
+                            <event name="OnTreeBeginRDrag"></event>
+                            <event name="OnTreeDeleteItem"></event>
+                            <event name="OnTreeEndDrag"></event>
+                            <event name="OnTreeEndLabelEdit"></event>
+                            <event name="OnTreeItemActivated"></event>
+                            <event name="OnTreeItemCollapsed"></event>
+                            <event name="OnTreeItemCollapsing"></event>
+                            <event name="OnTreeItemExpanded"></event>
+                            <event name="OnTreeItemExpanding"></event>
+                            <event name="OnTreeItemMenu"></event>
+                            <event name="OnTreeItemMiddleClick"></event>
+                            <event name="OnTreeItemRightClick"></event>
+                            <event name="OnTreeKeyDown"></event>
+                            <event name="OnTreeSelChanged"></event>
+                            <event name="OnTreeSelChanging"></event>
+                            <event name="OnUpdateUI"></event>
+                        </object>
+                    </object>
+                </object>
+            </object>
+            <object class="WizardPageSimple" expanded="1">
+                <property name="bg"></property>
+                <property name="bitmap">Load From Art Provider; wxART_HELP_BOOK; wxART_FRAME_ICON</property>
+                <property name="context_help"></property>
+                <property name="context_menu">1</property>
+                <property name="enabled">1</property>
+                <property name="fg"></property>
+                <property name="font"></property>
+                <property name="hidden">0</property>
+                <property name="id">wxID_ANY</property>
+                <property name="maximum_size"></property>
+                <property name="minimum_size"></property>
+                <property name="name">m_wizPage2_Github</property>
+                <property name="permission">protected</property>
+                <property name="pos"></property>
+                <property name="size"></property>
+                <property name="subclass"></property>
+                <property name="tooltip"></property>
+                <property name="window_extra_style"></property>
+                <property name="window_name"></property>
+                <property name="window_style"></property>
+                <event name="OnChar"></event>
+                <event name="OnEnterWindow"></event>
+                <event name="OnEraseBackground"></event>
+                <event name="OnKeyDown"></event>
+                <event name="OnKeyUp"></event>
+                <event name="OnKillFocus"></event>
+                <event name="OnLeaveWindow"></event>
+                <event name="OnLeftDClick"></event>
+                <event name="OnLeftDown"></event>
+                <event name="OnLeftUp"></event>
+                <event name="OnMiddleDClick"></event>
+                <event name="OnMiddleDown"></event>
+                <event name="OnMiddleUp"></event>
+                <event name="OnMotion"></event>
+                <event name="OnMouseEvents"></event>
+                <event name="OnMouseWheel"></event>
+                <event name="OnPaint"></event>
+                <event name="OnRightDClick"></event>
+                <event name="OnRightDown"></event>
+                <event name="OnRightUp"></event>
+                <event name="OnSetFocus"></event>
+                <event name="OnSize"></event>
+                <event name="OnUpdateUI"></event>
+                <object class="wxBoxSizer" expanded="1">
+                    <property name="minimum_size"></property>
+                    <property name="name">bSizer111</property>
+                    <property name="orient">wxVERTICAL</property>
+                    <property name="permission">none</property>
+                    <object class="sizeritem" expanded="0">
+                        <property name="border">5</property>
+                        <property name="flag">wxALL|wxEXPAND</property>
                         <property name="proportion">0</property>
-                        <object class="wxStaticText" expanded="1">
+                        <object class="wxStaticText" expanded="0">
                             <property name="BottomDockable">1</property>
                             <property name="LeftDockable">1</property>
                             <property name="RightDockable">1</property>
@@ -1728,7 +1115,7 @@
                             <property name="gripper">0</property>
                             <property name="hidden">0</property>
                             <property name="id">wxID_ANY</property>
-                            <property name="label">Library list to add in Fp table:</property>
+                            <property name="label">Select Github libraries to add:</property>
                             <property name="max_size"></property>
                             <property name="maximize_button">0</property>
                             <property name="maximum_size"></property>
@@ -1736,7 +1123,7 @@
                             <property name="minimize_button">0</property>
                             <property name="minimum_size"></property>
                             <property name="moveable">1</property>
-                            <property name="name">m_staticText2</property>
+                            <property name="name">m_staticText112</property>
                             <property name="pane_border">1</property>
                             <property name="pane_position"></property>
                             <property name="pane_size"></property>
@@ -1779,174 +1166,109 @@
                             <event name="OnUpdateUI"></event>
                         </object>
                     </object>
-                    <object class="sizeritem" expanded="1">
+                    <object class="sizeritem" expanded="0">
                         <property name="border">5</property>
-                        <property name="flag">wxEXPAND</property>
+                        <property name="flag">wxALL|wxEXPAND</property>
                         <property name="proportion">1</property>
-                        <object class="wxBoxSizer" expanded="1">
+                        <object class="wxCheckListBox" expanded="0">
+                            <property name="BottomDockable">1</property>
+                            <property name="LeftDockable">1</property>
+                            <property name="RightDockable">1</property>
+                            <property name="TopDockable">1</property>
+                            <property name="aui_layer"></property>
+                            <property name="aui_name"></property>
+                            <property name="aui_position"></property>
+                            <property name="aui_row"></property>
+                            <property name="best_size"></property>
+                            <property name="bg"></property>
+                            <property name="caption"></property>
+                            <property name="caption_visible">1</property>
+                            <property name="center_pane">0</property>
+                            <property name="choices"></property>
+                            <property name="close_button">1</property>
+                            <property name="context_help"></property>
+                            <property name="context_menu">1</property>
+                            <property name="default_pane">0</property>
+                            <property name="dock">Dock</property>
+                            <property name="dock_fixed">0</property>
+                            <property name="docking">Left</property>
+                            <property name="enabled">1</property>
+                            <property name="fg"></property>
+                            <property name="floatable">1</property>
+                            <property name="font"></property>
+                            <property name="gripper">0</property>
+                            <property name="hidden">0</property>
+                            <property name="id">wxID_ANY</property>
+                            <property name="max_size"></property>
+                            <property name="maximize_button">0</property>
+                            <property name="maximum_size"></property>
+                            <property name="min_size"></property>
+                            <property name="minimize_button">0</property>
                             <property name="minimum_size"></property>
-                            <property name="name">bSizer6</property>
-                            <property name="orient">wxVERTICAL</property>
-                            <property name="permission">none</property>
-                            <object class="sizeritem" expanded="1">
-                                <property name="border">5</property>
-                                <property name="flag">wxALL|wxEXPAND</property>
-                                <property name="proportion">1</property>
-                                <object class="wxGrid" expanded="1">
-                                    <property name="BottomDockable">1</property>
-                                    <property name="LeftDockable">1</property>
-                                    <property name="RightDockable">1</property>
-                                    <property name="TopDockable">1</property>
-                                    <property name="aui_layer"></property>
-                                    <property name="aui_name"></property>
-                                    <property name="aui_position"></property>
-                                    <property name="aui_row"></property>
-                                    <property name="autosize_cols">0</property>
-                                    <property name="autosize_rows">0</property>
-                                    <property name="best_size"></property>
-                                    <property name="bg"></property>
-                                    <property name="caption"></property>
-                                    <property name="caption_visible">1</property>
-                                    <property name="cell_bg"></property>
-                                    <property name="cell_font"></property>
-                                    <property name="cell_horiz_alignment">wxALIGN_LEFT</property>
-                                    <property name="cell_text"></property>
-                                    <property name="cell_vert_alignment">wxALIGN_TOP</property>
-                                    <property name="center_pane">0</property>
-                                    <property name="close_button">1</property>
-                                    <property name="col_label_horiz_alignment">wxALIGN_CENTRE</property>
-                                    <property name="col_label_size">30</property>
-                                    <property name="col_label_values">&quot;NickName&quot; &quot;Path&quot; &quot;Plugin&quot;</property>
-                                    <property name="col_label_vert_alignment">wxALIGN_CENTRE</property>
-                                    <property name="cols">3</property>
-                                    <property name="column_sizes"></property>
-                                    <property name="context_help"></property>
-                                    <property name="context_menu">1</property>
-                                    <property name="default_pane">0</property>
-                                    <property name="dock">Dock</property>
-                                    <property name="dock_fixed">0</property>
-                                    <property name="docking">Left</property>
-                                    <property name="drag_col_move">0</property>
-                                    <property name="drag_col_size">1</property>
-                                    <property name="drag_grid_size">0</property>
-                                    <property name="drag_row_size">1</property>
-                                    <property name="editing">1</property>
-                                    <property name="enabled">1</property>
-                                    <property name="fg"></property>
-                                    <property name="floatable">1</property>
-                                    <property name="font"></property>
-                                    <property name="grid_line_color"></property>
-                                    <property name="grid_lines">1</property>
-                                    <property name="gripper">0</property>
-                                    <property name="hidden">0</property>
-                                    <property name="id">wxID_ANY</property>
-                                    <property name="label_bg"></property>
-                                    <property name="label_font"></property>
-                                    <property name="label_text"></property>
-                                    <property name="margin_height">0</property>
-                                    <property name="margin_width">0</property>
-                                    <property name="max_size"></property>
-                                    <property name="maximize_button">0</property>
-                                    <property name="maximum_size"></property>
-                                    <property name="min_size"></property>
-                                    <property name="minimize_button">0</property>
-                                    <property name="minimum_size"></property>
-                                    <property name="moveable">1</property>
-                                    <property name="name">m_gridFpListLibs</property>
-                                    <property name="pane_border">1</property>
-                                    <property name="pane_position"></property>
-                                    <property name="pane_size"></property>
-                                    <property name="permission">protected</property>
-                                    <property name="pin_button">1</property>
-                                    <property name="pos"></property>
-                                    <property name="resize">Resizable</property>
-                                    <property name="row_label_horiz_alignment">wxALIGN_CENTRE</property>
-                                    <property name="row_label_size">30</property>
-                                    <property name="row_label_values"></property>
-                                    <property name="row_label_vert_alignment">wxALIGN_CENTRE</property>
-                                    <property name="row_sizes"></property>
-                                    <property name="rows">0</property>
-                                    <property name="show">1</property>
-                                    <property name="size"></property>
-                                    <property name="subclass"></property>
-                                    <property name="toolbar_pane">0</property>
-                                    <property name="tooltip"></property>
-                                    <property name="window_extra_style"></property>
-                                    <property name="window_name"></property>
-                                    <property name="window_style"></property>
-                                    <event name="OnChar"></event>
-                                    <event name="OnEnterWindow"></event>
-                                    <event name="OnEraseBackground"></event>
-                                    <event name="OnGridCellChange"></event>
-                                    <event name="OnGridCellLeftClick"></event>
-                                    <event name="OnGridCellLeftDClick"></event>
-                                    <event name="OnGridCellRightClick"></event>
-                                    <event name="OnGridCellRightDClick"></event>
-                                    <event name="OnGridCmdCellChange"></event>
-                                    <event name="OnGridCmdCellLeftClick"></event>
-                                    <event name="OnGridCmdCellLeftDClick"></event>
-                                    <event name="OnGridCmdCellRightClick"></event>
-                                    <event name="OnGridCmdCellRightDClick"></event>
-                                    <event name="OnGridCmdColSize"></event>
-                                    <event name="OnGridCmdEditorCreated"></event>
-                                    <event name="OnGridCmdEditorHidden"></event>
-                                    <event name="OnGridCmdEditorShown"></event>
-                                    <event name="OnGridCmdLabelLeftClick"></event>
-                                    <event name="OnGridCmdLabelLeftDClick"></event>
-                                    <event name="OnGridCmdLabelRightClick"></event>
-                                    <event name="OnGridCmdLabelRightDClick"></event>
-                                    <event name="OnGridCmdRangeSelect"></event>
-                                    <event name="OnGridCmdRowSize"></event>
-                                    <event name="OnGridCmdSelectCell"></event>
-                                    <event name="OnGridColSize"></event>
-                                    <event name="OnGridEditorCreated"></event>
-                                    <event name="OnGridEditorHidden"></event>
-                                    <event name="OnGridEditorShown"></event>
-                                    <event name="OnGridLabelLeftClick"></event>
-                                    <event name="OnGridLabelLeftDClick"></event>
-                                    <event name="OnGridLabelRightClick"></event>
-                                    <event name="OnGridLabelRightDClick"></event>
-                                    <event name="OnGridRangeSelect"></event>
-                                    <event name="OnGridRowSize"></event>
-                                    <event name="OnGridSelectCell"></event>
-                                    <event name="OnKeyDown"></event>
-                                    <event name="OnKeyUp"></event>
-                                    <event name="OnKillFocus"></event>
-                                    <event name="OnLeaveWindow"></event>
-                                    <event name="OnLeftDClick"></event>
-                                    <event name="OnLeftDown"></event>
-                                    <event name="OnLeftUp"></event>
-                                    <event name="OnMiddleDClick"></event>
-                                    <event name="OnMiddleDown"></event>
-                                    <event name="OnMiddleUp"></event>
-                                    <event name="OnMotion"></event>
-                                    <event name="OnMouseEvents"></event>
-                                    <event name="OnMouseWheel"></event>
-                                    <event name="OnPaint"></event>
-                                    <event name="OnRightDClick"></event>
-                                    <event name="OnRightDown"></event>
-                                    <event name="OnRightUp"></event>
-                                    <event name="OnSetFocus"></event>
-                                    <event name="OnSize"></event>
-                                    <event name="OnUpdateUI"></event>
-                                </object>
-                            </object>
+                            <property name="moveable">1</property>
+                            <property name="name">m_checkListGH</property>
+                            <property name="pane_border">1</property>
+                            <property name="pane_position"></property>
+                            <property name="pane_size"></property>
+                            <property name="permission">protected</property>
+                            <property name="pin_button">1</property>
+                            <property name="pos"></property>
+                            <property name="resize">Resizable</property>
+                            <property name="show">1</property>
+                            <property name="size"></property>
+                            <property name="style">wxLB_MULTIPLE|wxLB_NEEDED_SB</property>
+                            <property name="subclass"></property>
+                            <property name="toolbar_pane">0</property>
+                            <property name="tooltip"></property>
+                            <property name="validator_data_type"></property>
+                            <property name="validator_style">wxFILTER_NONE</property>
+                            <property name="validator_type">wxDefaultValidator</property>
+                            <property name="validator_variable"></property>
+                            <property name="window_extra_style"></property>
+                            <property name="window_name"></property>
+                            <property name="window_style"></property>
+                            <event name="OnChar"></event>
+                            <event name="OnCheckListBox"></event>
+                            <event name="OnCheckListBoxDClick"></event>
+                            <event name="OnCheckListBoxToggled"></event>
+                            <event name="OnEnterWindow"></event>
+                            <event name="OnEraseBackground"></event>
+                            <event name="OnKeyDown"></event>
+                            <event name="OnKeyUp"></event>
+                            <event name="OnKillFocus"></event>
+                            <event name="OnLeaveWindow"></event>
+                            <event name="OnLeftDClick"></event>
+                            <event name="OnLeftDown"></event>
+                            <event name="OnLeftUp"></event>
+                            <event name="OnMiddleDClick"></event>
+                            <event name="OnMiddleDown"></event>
+                            <event name="OnMiddleUp"></event>
+                            <event name="OnMotion"></event>
+                            <event name="OnMouseEvents"></event>
+                            <event name="OnMouseWheel"></event>
+                            <event name="OnPaint"></event>
+                            <event name="OnRightDClick"></event>
+                            <event name="OnRightDown"></event>
+                            <event name="OnRightUp"></event>
+                            <event name="OnSetFocus"></event>
+                            <event name="OnSize"></event>
+                            <event name="OnUpdateUI"></event>
                         </object>
                     </object>
                     <object class="sizeritem" expanded="1">
                         <property name="border">5</property>
-                        <property name="flag">wxALIGN_CENTER_HORIZONTAL</property>
+                        <property name="flag">wxEXPAND</property>
                         <property name="proportion">0</property>
                         <object class="wxBoxSizer" expanded="1">
                             <property name="minimum_size"></property>
-                            <property name="name">bSizer5</property>
+                            <property name="name">bSizer7</property>
                             <property name="orient">wxHORIZONTAL</property>
                             <property name="permission">none</property>
-                            <object class="sizeritem" expanded="1">
+                            <object class="sizeritem" expanded="0">
                                 <property name="border">5</property>
                                 <property name="flag">wxALL</property>
-                                <property name="proportion">0</property>
-                                <object class="wxButton" expanded="1">
+                                <property name="proportion">1</property>
+                                <object class="wxButton" expanded="0">
                                     <property name="BottomDockable">1</property>
                                     <property name="LeftDockable">1</property>
                                     <property name="RightDockable">1</property>
@@ -1975,7 +1297,7 @@
                                     <property name="gripper">0</property>
                                     <property name="hidden">0</property>
                                     <property name="id">wxID_ANY</property>
-                                    <property name="label">Github Libs List</property>
+                                    <property name="label">Select all</property>
                                     <property name="max_size"></property>
                                     <property name="maximize_button">0</property>
                                     <property name="maximum_size"></property>
@@ -1983,7 +1305,7 @@
                                     <property name="minimize_button">0</property>
                                     <property name="minimum_size"></property>
                                     <property name="moveable">1</property>
-                                    <property name="name">m_buttonGithubLibList</property>
+                                    <property name="name">m_btnSelectAllGH</property>
                                     <property name="pane_border">1</property>
                                     <property name="pane_position"></property>
                                     <property name="pane_size"></property>
@@ -2004,7 +1326,7 @@
                                     <property name="window_extra_style"></property>
                                     <property name="window_name"></property>
                                     <property name="window_style"></property>
-                                    <event name="OnButtonClick">OnGithubLibsList</event>
+                                    <event name="OnButtonClick">OnSelectAllGH</event>
                                     <event name="OnChar"></event>
                                     <event name="OnEnterWindow"></event>
                                     <event name="OnEraseBackground"></event>
@@ -2030,11 +1352,11 @@
                                     <event name="OnUpdateUI"></event>
                                 </object>
                             </object>
-                            <object class="sizeritem" expanded="1">
+                            <object class="sizeritem" expanded="0">
                                 <property name="border">5</property>
                                 <property name="flag">wxALL</property>
-                                <property name="proportion">0</property>
-                                <object class="wxButton" expanded="1">
+                                <property name="proportion">1</property>
+                                <object class="wxButton" expanded="0">
                                     <property name="BottomDockable">1</property>
                                     <property name="LeftDockable">1</property>
                                     <property name="RightDockable">1</property>
@@ -2063,7 +1385,7 @@
                                     <property name="gripper">0</property>
                                     <property name="hidden">0</property>
                                     <property name="id">wxID_ANY</property>
-                                    <property name="label">Add FP Libraries</property>
+                                    <property name="label">Unselect all</property>
                                     <property name="max_size"></property>
                                     <property name="maximize_button">0</property>
                                     <property name="maximum_size"></property>
@@ -2071,7 +1393,7 @@
                                     <property name="minimize_button">0</property>
                                     <property name="minimum_size"></property>
                                     <property name="moveable">1</property>
-                                    <property name="name">m_buttonAddLib</property>
+                                    <property name="name">m_btnUnselectAllGH</property>
                                     <property name="pane_border">1</property>
                                     <property name="pane_position"></property>
                                     <property name="pane_size"></property>
@@ -2092,7 +1414,7 @@
                                     <property name="window_extra_style"></property>
                                     <property name="window_name"></property>
                                     <property name="window_style"></property>
-                                    <event name="OnButtonClick">OnAddFpLibs</event>
+                                    <event name="OnButtonClick">OnUnselectAllGH</event>
                                     <event name="OnChar"></event>
                                     <event name="OnEnterWindow"></event>
                                     <event name="OnEraseBackground"></event>
@@ -2120,9 +1442,19 @@
                             </object>
                             <object class="sizeritem" expanded="1">
                                 <property name="border">5</property>
+                                <property name="flag">wxEXPAND</property>
+                                <property name="proportion">1</property>
+                                <object class="spacer" expanded="1">
+                                    <property name="height">0</property>
+                                    <property name="permission">protected</property>
+                                    <property name="width">0</property>
+                                </object>
+                            </object>
+                            <object class="sizeritem" expanded="1">
+                                <property name="border">5</property>
                                 <property name="flag">wxALL</property>
-                                <property name="proportion">0</property>
-                                <object class="wxButton" expanded="1">
+                                <property name="proportion">2</property>
+                                <object class="wxSearchCtrl" expanded="1">
                                     <property name="BottomDockable">1</property>
                                     <property name="LeftDockable">1</property>
                                     <property name="RightDockable">1</property>
@@ -2133,13 +1465,13 @@
                                     <property name="aui_row"></property>
                                     <property name="best_size"></property>
                                     <property name="bg"></property>
+                                    <property name="cancel_button">0</property>
                                     <property name="caption"></property>
                                     <property name="caption_visible">1</property>
                                     <property name="center_pane">0</property>
                                     <property name="close_button">1</property>
                                     <property name="context_help"></property>
                                     <property name="context_menu">1</property>
-                                    <property name="default">0</property>
                                     <property name="default_pane">0</property>
                                     <property name="dock">Dock</property>
                                     <property name="dock_fixed">0</property>
@@ -2151,7 +1483,6 @@
                                     <property name="gripper">0</property>
                                     <property name="hidden">0</property>
                                     <property name="id">wxID_ANY</property>
-                                    <property name="label">Remove FP Libraries</property>
                                     <property name="max_size"></property>
                                     <property name="maximize_button">0</property>
                                     <property name="maximum_size"></property>
@@ -2159,7 +1490,7 @@
                                     <property name="minimize_button">0</property>
                                     <property name="minimum_size"></property>
                                     <property name="moveable">1</property>
-                                    <property name="name">m_buttonRemoveLib</property>
+                                    <property name="name">m_searchCtrlGH</property>
                                     <property name="pane_border">1</property>
                                     <property name="pane_position"></property>
                                     <property name="pane_size"></property>
@@ -2167,6 +1498,7 @@
                                     <property name="pin_button">1</property>
                                     <property name="pos"></property>
                                     <property name="resize">Resizable</property>
+                                    <property name="search_button">1</property>
                                     <property name="show">1</property>
                                     <property name="size"></property>
                                     <property name="style"></property>
@@ -2177,10 +1509,11 @@
                                     <property name="validator_style">wxFILTER_NONE</property>
                                     <property name="validator_type">wxDefaultValidator</property>
                                     <property name="validator_variable"></property>
+                                    <property name="value"></property>
                                     <property name="window_extra_style"></property>
                                     <property name="window_name"></property>
                                     <property name="window_style"></property>
-                                    <event name="OnButtonClick">OnRemoveFpLibs</event>
+                                    <event name="OnCancelButton"></event>
                                     <event name="OnChar"></event>
                                     <event name="OnEnterWindow"></event>
                                     <event name="OnEraseBackground"></event>
@@ -2201,8 +1534,11 @@
                                     <event name="OnRightDClick"></event>
                                     <event name="OnRightDown"></event>
                                     <event name="OnRightUp"></event>
+                                    <event name="OnSearchButton"></event>
                                     <event name="OnSetFocus"></event>
                                     <event name="OnSize"></event>
+                                    <event name="OnText">OnChangeSearch</event>
+                                    <event name="OnTextEnter"></event>
                                     <event name="OnUpdateUI"></event>
                                 </object>
                             </object>
@@ -2210,6 +1546,536 @@
                     </object>
                 </object>
             </object>
+            <object class="WizardPageSimple" expanded="1">
+                <property name="bg"></property>
+                <property name="bitmap">Load From Art Provider; wxART_HELP_BOOK; wxART_FRAME_ICON</property>
+                <property name="context_help"></property>
+                <property name="context_menu">1</property>
+                <property name="enabled">1</property>
+                <property name="fg"></property>
+                <property name="font"></property>
+                <property name="hidden">0</property>
+                <property name="id">wxID_ANY</property>
+                <property name="maximum_size"></property>
+                <property name="minimum_size"></property>
+                <property name="name">m_wizPage3_Review</property>
+                <property name="permission">protected</property>
+                <property name="pos"></property>
+                <property name="size"></property>
+                <property name="subclass"></property>
+                <property name="tooltip"></property>
+                <property name="window_extra_style"></property>
+                <property name="window_name"></property>
+                <property name="window_style"></property>
+                <event name="OnChar"></event>
+                <event name="OnEnterWindow"></event>
+                <event name="OnEraseBackground"></event>
+                <event name="OnKeyDown"></event>
+                <event name="OnKeyUp"></event>
+                <event name="OnKillFocus"></event>
+                <event name="OnLeaveWindow"></event>
+                <event name="OnLeftDClick"></event>
+                <event name="OnLeftDown"></event>
+                <event name="OnLeftUp"></event>
+                <event name="OnMiddleDClick"></event>
+                <event name="OnMiddleDown"></event>
+                <event name="OnMiddleUp"></event>
+                <event name="OnMotion"></event>
+                <event name="OnMouseEvents"></event>
+                <event name="OnMouseWheel"></event>
+                <event name="OnPaint"></event>
+                <event name="OnRightDClick"></event>
+                <event name="OnRightDown"></event>
+                <event name="OnRightUp"></event>
+                <event name="OnSetFocus"></event>
+                <event name="OnSize"></event>
+                <event name="OnUpdateUI"></event>
+                <object class="wxBoxSizer" expanded="1">
+                    <property name="minimum_size"></property>
+                    <property name="name">bSizer1111</property>
+                    <property name="orient">wxVERTICAL</property>
+                    <property name="permission">none</property>
+                    <object class="sizeritem" expanded="0">
+                        <property name="border">5</property>
+                        <property name="flag">wxALL|wxEXPAND</property>
+                        <property name="proportion">0</property>
+                        <object class="wxStaticText" expanded="0">
+                            <property name="BottomDockable">1</property>
+                            <property name="LeftDockable">1</property>
+                            <property name="RightDockable">1</property>
+                            <property name="TopDockable">1</property>
+                            <property name="aui_layer"></property>
+                            <property name="aui_name"></property>
+                            <property name="aui_position"></property>
+                            <property name="aui_row"></property>
+                            <property name="best_size"></property>
+                            <property name="bg"></property>
+                            <property name="caption"></property>
+                            <property name="caption_visible">1</property>
+                            <property name="center_pane">0</property>
+                            <property name="close_button">1</property>
+                            <property name="context_help"></property>
+                            <property name="context_menu">1</property>
+                            <property name="default_pane">0</property>
+                            <property name="dock">Dock</property>
+                            <property name="dock_fixed">0</property>
+                            <property name="docking">Left</property>
+                            <property name="enabled">1</property>
+                            <property name="fg"></property>
+                            <property name="floatable">1</property>
+                            <property name="font"></property>
+                            <property name="gripper">0</property>
+                            <property name="hidden">0</property>
+                            <property name="id">wxID_ANY</property>
+                            <property name="label">Review and confirm the changes to the libraries:</property>
+                            <property name="max_size"></property>
+                            <property name="maximize_button">0</property>
+                            <property name="maximum_size"></property>
+                            <property name="min_size"></property>
+                            <property name="minimize_button">0</property>
+                            <property name="minimum_size"></property>
+                            <property name="moveable">1</property>
+                            <property name="name">m_staticText1121</property>
+                            <property name="pane_border">1</property>
+                            <property name="pane_position"></property>
+                            <property name="pane_size"></property>
+                            <property name="permission">protected</property>
+                            <property name="pin_button">1</property>
+                            <property name="pos"></property>
+                            <property name="resize">Resizable</property>
+                            <property name="show">1</property>
+                            <property name="size"></property>
+                            <property name="style"></property>
+                            <property name="subclass"></property>
+                            <property name="toolbar_pane">0</property>
+                            <property name="tooltip"></property>
+                            <property name="window_extra_style"></property>
+                            <property name="window_name"></property>
+                            <property name="window_style"></property>
+                            <property name="wrap">-1</property>
+                            <event name="OnChar"></event>
+                            <event name="OnEnterWindow"></event>
+                            <event name="OnEraseBackground"></event>
+                            <event name="OnKeyDown"></event>
+                            <event name="OnKeyUp"></event>
+                            <event name="OnKillFocus"></event>
+                            <event name="OnLeaveWindow"></event>
+                            <event name="OnLeftDClick"></event>
+                            <event name="OnLeftDown"></event>
+                            <event name="OnLeftUp"></event>
+                            <event name="OnMiddleDClick"></event>
+                            <event name="OnMiddleDown"></event>
+                            <event name="OnMiddleUp"></event>
+                            <event name="OnMotion"></event>
+                            <event name="OnMouseEvents"></event>
+                            <event name="OnMouseWheel"></event>
+                            <event name="OnPaint"></event>
+                            <event name="OnRightDClick"></event>
+                            <event name="OnRightDown"></event>
+                            <event name="OnRightUp"></event>
+                            <event name="OnSetFocus"></event>
+                            <event name="OnSize"></event>
+                            <event name="OnUpdateUI"></event>
+                        </object>
+                    </object>
+                    <object class="sizeritem" expanded="1">
+                        <property name="border">5</property>
+                        <property name="flag">wxALL|wxEXPAND</property>
+                        <property name="proportion">1</property>
+                        <object class="wxDataViewListCtrl" expanded="1">
+                            <property name="bg"></property>
+                            <property name="context_help"></property>
+                            <property name="context_menu">1</property>
+                            <property name="enabled">1</property>
+                            <property name="fg"></property>
+                            <property name="font"></property>
+                            <property name="hidden">0</property>
+                            <property name="id">wxID_ANY</property>
+                            <property name="maximum_size"></property>
+                            <property name="minimum_size"></property>
+                            <property name="name">m_listCtrlReview</property>
+                            <property name="permission">protected</property>
+                            <property name="pos"></property>
+                            <property name="size"></property>
+                            <property name="style">wxDV_HORIZ_RULES|wxDV_ROW_LINES|wxDV_VERT_RULES</property>
+                            <property name="subclass"></property>
+                            <property name="tooltip"></property>
+                            <property name="window_extra_style"></property>
+                            <property name="window_name"></property>
+                            <property name="window_style"></property>
+                            <event name="OnChar"></event>
+                            <event name="OnDataViewListCtrlColumnHeaderClick"></event>
+                            <event name="OnDataViewListCtrlColumnHeaderRightClick"></event>
+                            <event name="OnDataViewListCtrlColumnReordered"></event>
+                            <event name="OnDataViewListCtrlColumnSorted"></event>
+                            <event name="OnDataViewListCtrlItemActivated"></event>
+                            <event name="OnDataViewListCtrlItemBeginDrag"></event>
+                            <event name="OnDataViewListCtrlItemCollapsed"></event>
+                            <event name="OnDataViewListCtrlItemCollapsing"></event>
+                            <event name="OnDataViewListCtrlItemContextMenu"></event>
+                            <event name="OnDataViewListCtrlItemDrop"></event>
+                            <event name="OnDataViewListCtrlItemDropPossible"></event>
+                            <event name="OnDataViewListCtrlItemEditingDone"></event>
+                            <event name="OnDataViewListCtrlItemEditingStarted"></event>
+                            <event name="OnDataViewListCtrlItemExpanded"></event>
+                            <event name="OnDataViewListCtrlItemExpanding"></event>
+                            <event name="OnDataViewListCtrlItemStartEditing"></event>
+                            <event name="OnDataViewListCtrlItemValueChanged"></event>
+                            <event name="OnDataViewListCtrlSelectionChanged"></event>
+                            <event name="OnEnterWindow"></event>
+                            <event name="OnEraseBackground"></event>
+                            <event name="OnKeyDown"></event>
+                            <event name="OnKeyUp"></event>
+                            <event name="OnKillFocus"></event>
+                            <event name="OnLeaveWindow"></event>
+                            <event name="OnLeftDClick"></event>
+                            <event name="OnLeftDown"></event>
+                            <event name="OnLeftUp"></event>
+                            <event name="OnMiddleDClick"></event>
+                            <event name="OnMiddleDown"></event>
+                            <event name="OnMiddleUp"></event>
+                            <event name="OnMotion"></event>
+                            <event name="OnMouseEvents"></event>
+                            <event name="OnMouseWheel"></event>
+                            <event name="OnPaint"></event>
+                            <event name="OnRightDClick"></event>
+                            <event name="OnRightDown"></event>
+                            <event name="OnRightUp"></event>
+                            <event name="OnSetFocus"></event>
+                            <event name="OnSize"></event>
+                            <event name="OnUpdateUI"></event>
+                            <object class="dataViewListColumn" expanded="0">
+                                <property name="label">Library</property>
+                                <property name="name">m_dvLibName</property>
+                                <property name="permission">protected</property>
+                                <property name="type">Text</property>
+                            </object>
+                            <object class="dataViewListColumn" expanded="0">
+                                <property name="label">Status</property>
+                                <property name="name">m_dvLibStatus</property>
+                                <property name="permission">protected</property>
+                                <property name="type">Text</property>
+                            </object>
+                            <object class="dataViewListColumn" expanded="0">
+                                <property name="label">Format</property>
+                                <property name="name">m_dvLibFormat</property>
+                                <property name="permission">protected</property>
+                                <property name="type">Text</property>
+                            </object>
+                        </object>
+                    </object>
+                </object>
+            </object>
+            <object class="WizardPageSimple" expanded="1">
+                <property name="bg"></property>
+                <property name="bitmap">Load From Art Provider; wxART_HELP_BOOK; wxART_FRAME_ICON</property>
+                <property name="context_help"></property>
+                <property name="context_menu">1</property>
+                <property name="enabled">1</property>
+                <property name="fg"></property>
+                <property name="font"></property>
+                <property name="hidden">0</property>
+                <property name="id">wxID_ANY</property>
+                <property name="maximum_size"></property>
+                <property name="minimum_size"></property>
+                <property name="name">m_wizPage4_SelectTarget</property>
+                <property name="permission">protected</property>
+                <property name="pos"></property>
+                <property name="size"></property>
+                <property name="subclass"></property>
+                <property name="tooltip"></property>
+                <property name="window_extra_style"></property>
+                <property name="window_name"></property>
+                <property name="window_style"></property>
+                <event name="OnChar"></event>
+                <event name="OnEnterWindow"></event>
+                <event name="OnEraseBackground"></event>
+                <event name="OnKeyDown"></event>
+                <event name="OnKeyUp"></event>
+                <event name="OnKillFocus"></event>
+                <event name="OnLeaveWindow"></event>
+                <event name="OnLeftDClick"></event>
+                <event name="OnLeftDown"></event>
+                <event name="OnLeftUp"></event>
+                <event name="OnMiddleDClick"></event>
+                <event name="OnMiddleDown"></event>
+                <event name="OnMiddleUp"></event>
+                <event name="OnMotion"></event>
+                <event name="OnMouseEvents"></event>
+                <event name="OnMouseWheel"></event>
+                <event name="OnPaint"></event>
+                <event name="OnRightDClick"></event>
+                <event name="OnRightDown"></event>
+                <event name="OnRightUp"></event>
+                <event name="OnSetFocus"></event>
+                <event name="OnSize"></event>
+                <event name="OnUpdateUI"></event>
+                <object class="wxBoxSizer" expanded="1">
+                    <property name="minimum_size"></property>
+                    <property name="name">bSizer12</property>
+                    <property name="orient">wxVERTICAL</property>
+                    <property name="permission">none</property>
+                    <object class="sizeritem" expanded="0">
+                        <property name="border">5</property>
+                        <property name="flag">wxALL|wxEXPAND</property>
+                        <property name="proportion">0</property>
+                        <object class="wxStaticText" expanded="0">
+                            <property name="BottomDockable">1</property>
+                            <property name="LeftDockable">1</property>
+                            <property name="RightDockable">1</property>
+                            <property name="TopDockable">1</property>
+                            <property name="aui_layer"></property>
+                            <property name="aui_name"></property>
+                            <property name="aui_position"></property>
+                            <property name="aui_row"></property>
+                            <property name="best_size"></property>
+                            <property name="bg"></property>
+                            <property name="caption"></property>
+                            <property name="caption_visible">1</property>
+                            <property name="center_pane">0</property>
+                            <property name="close_button">1</property>
+                            <property name="context_help"></property>
+                            <property name="context_menu">1</property>
+                            <property name="default_pane">0</property>
+                            <property name="dock">Dock</property>
+                            <property name="dock_fixed">0</property>
+                            <property name="docking">Left</property>
+                            <property name="enabled">1</property>
+                            <property name="fg"></property>
+                            <property name="floatable">1</property>
+                            <property name="font"></property>
+                            <property name="gripper">0</property>
+                            <property name="hidden">0</property>
+                            <property name="id">wxID_ANY</property>
+                            <property name="label">Where do you wish the new libraries to be added:</property>
+                            <property name="max_size"></property>
+                            <property name="maximize_button">0</property>
+                            <property name="maximum_size"></property>
+                            <property name="min_size"></property>
+                            <property name="minimize_button">0</property>
+                            <property name="minimum_size"></property>
+                            <property name="moveable">1</property>
+                            <property name="name">m_staticText12</property>
+                            <property name="pane_border">1</property>
+                            <property name="pane_position"></property>
+                            <property name="pane_size"></property>
+                            <property name="permission">protected</property>
+                            <property name="pin_button">1</property>
+                            <property name="pos"></property>
+                            <property name="resize">Resizable</property>
+                            <property name="show">1</property>
+                            <property name="size"></property>
+                            <property name="style"></property>
+                            <property name="subclass"></property>
+                            <property name="toolbar_pane">0</property>
+                            <property name="tooltip"></property>
+                            <property name="window_extra_style"></property>
+                            <property name="window_name"></property>
+                            <property name="window_style"></property>
+                            <property name="wrap">-1</property>
+                            <event name="OnChar"></event>
+                            <event name="OnEnterWindow"></event>
+                            <event name="OnEraseBackground"></event>
+                            <event name="OnKeyDown"></event>
+                            <event name="OnKeyUp"></event>
+                            <event name="OnKillFocus"></event>
+                            <event name="OnLeaveWindow"></event>
+                            <event name="OnLeftDClick"></event>
+                            <event name="OnLeftDown"></event>
+                            <event name="OnLeftUp"></event>
+                            <event name="OnMiddleDClick"></event>
+                            <event name="OnMiddleDown"></event>
+                            <event name="OnMiddleUp"></event>
+                            <event name="OnMotion"></event>
+                            <event name="OnMouseEvents"></event>
+                            <event name="OnMouseWheel"></event>
+                            <event name="OnPaint"></event>
+                            <event name="OnRightDClick"></event>
+                            <event name="OnRightDown"></event>
+                            <event name="OnRightUp"></event>
+                            <event name="OnSetFocus"></event>
+                            <event name="OnSize"></event>
+                            <event name="OnUpdateUI"></event>
+                        </object>
+                    </object>
+                    <object class="sizeritem" expanded="0">
+                        <property name="border">5</property>
+                        <property name="flag">wxALL|wxEXPAND</property>
+                        <property name="proportion">0</property>
+                        <object class="wxRadioButton" expanded="0">
+                            <property name="BottomDockable">1</property>
+                            <property name="LeftDockable">1</property>
+                            <property name="RightDockable">1</property>
+                            <property name="TopDockable">1</property>
+                            <property name="aui_layer"></property>
+                            <property name="aui_name"></property>
+                            <property name="aui_position"></property>
+                            <property name="aui_row"></property>
+                            <property name="best_size"></property>
+                            <property name="bg"></property>
+                            <property name="caption"></property>
+                            <property name="caption_visible">1</property>
+                            <property name="center_pane">0</property>
+                            <property name="close_button">1</property>
+                            <property name="context_help"></property>
+                            <property name="context_menu">1</property>
+                            <property name="default_pane">0</property>
+                            <property name="dock">Dock</property>
+                            <property name="dock_fixed">0</property>
+                            <property name="docking">Left</property>
+                            <property name="enabled">1</property>
+                            <property name="fg"></property>
+                            <property name="floatable">1</property>
+                            <property name="font"></property>
+                            <property name="gripper">0</property>
+                            <property name="hidden">0</property>
+                            <property name="id">wxID_ANY</property>
+                            <property name="label">To global library configuration (visible by all projects)</property>
+                            <property name="max_size"></property>
+                            <property name="maximize_button">0</property>
+                            <property name="maximum_size"></property>
+                            <property name="min_size"></property>
+                            <property name="minimize_button">0</property>
+                            <property name="minimum_size"></property>
+                            <property name="moveable">1</property>
+                            <property name="name">m_radioGlobal</property>
+                            <property name="pane_border">1</property>
+                            <property name="pane_position"></property>
+                            <property name="pane_size"></property>
+                            <property name="permission">protected</property>
+                            <property name="pin_button">1</property>
+                            <property name="pos"></property>
+                            <property name="resize">Resizable</property>
+                            <property name="show">1</property>
+                            <property name="size"></property>
+                            <property name="style"></property>
+                            <property name="subclass"></property>
+                            <property name="toolbar_pane">0</property>
+                            <property name="tooltip"></property>
+                            <property name="validator_data_type"></property>
+                            <property name="validator_style">wxFILTER_NONE</property>
+                            <property name="validator_type">wxDefaultValidator</property>
+                            <property name="validator_variable"></property>
+                            <property name="value">0</property>
+                            <property name="window_extra_style"></property>
+                            <property name="window_name"></property>
+                            <property name="window_style"></property>
+                            <event name="OnChar"></event>
+                            <event name="OnEnterWindow"></event>
+                            <event name="OnEraseBackground"></event>
+                            <event name="OnKeyDown"></event>
+                            <event name="OnKeyUp"></event>
+                            <event name="OnKillFocus"></event>
+                            <event name="OnLeaveWindow"></event>
+                            <event name="OnLeftDClick"></event>
+                            <event name="OnLeftDown"></event>
+                            <event name="OnLeftUp"></event>
+                            <event name="OnMiddleDClick"></event>
+                            <event name="OnMiddleDown"></event>
+                            <event name="OnMiddleUp"></event>
+                            <event name="OnMotion"></event>
+                            <event name="OnMouseEvents"></event>
+                            <event name="OnMouseWheel"></event>
+                            <event name="OnPaint"></event>
+                            <event name="OnRadioButton"></event>
+                            <event name="OnRightDClick"></event>
+                            <event name="OnRightDown"></event>
+                            <event name="OnRightUp"></event>
+                            <event name="OnSetFocus"></event>
+                            <event name="OnSize"></event>
+                            <event name="OnUpdateUI"></event>
+                        </object>
+                    </object>
+                    <object class="sizeritem" expanded="0">
+                        <property name="border">5</property>
+                        <property name="flag">wxALL|wxEXPAND</property>
+                        <property name="proportion">0</property>
+                        <object class="wxRadioButton" expanded="0">
+                            <property name="BottomDockable">1</property>
+                            <property name="LeftDockable">1</property>
+                            <property name="RightDockable">1</property>
+                            <property name="TopDockable">1</property>
+                            <property name="aui_layer"></property>
+                            <property name="aui_name"></property>
+                            <property name="aui_position"></property>
+                            <property name="aui_row"></property>
+                            <property name="best_size"></property>
+                            <property name="bg"></property>
+                            <property name="caption"></property>
+                            <property name="caption_visible">1</property>
+                            <property name="center_pane">0</property>
+                            <property name="close_button">1</property>
+                            <property name="context_help"></property>
+                            <property name="context_menu">1</property>
+                            <property name="default_pane">0</property>
+                            <property name="dock">Dock</property>
+                            <property name="dock_fixed">0</property>
+                            <property name="docking">Left</property>
+                            <property name="enabled">1</property>
+                            <property name="fg"></property>
+                            <property name="floatable">1</property>
+                            <property name="font"></property>
+                            <property name="gripper">0</property>
+                            <property name="hidden">0</property>
+                            <property name="id">wxID_ANY</property>
+                            <property name="label">To the current project only</property>
+                            <property name="max_size"></property>
+                            <property name="maximize_button">0</property>
+                            <property name="maximum_size"></property>
+                            <property name="min_size"></property>
+                            <property name="minimize_button">0</property>
+                            <property name="minimum_size"></property>
+                            <property name="moveable">1</property>
+                            <property name="name">m_radioProject</property>
+                            <property name="pane_border">1</property>
+                            <property name="pane_position"></property>
+                            <property name="pane_size"></property>
+                            <property name="permission">protected</property>
+                            <property name="pin_button">1</property>
+                            <property name="pos"></property>
+                            <property name="resize">Resizable</property>
+                            <property name="show">1</property>
+                            <property name="size"></property>
+                            <property name="style"></property>
+                            <property name="subclass"></property>
+                            <property name="toolbar_pane">0</property>
+                            <property name="tooltip"></property>
+                            <property name="validator_data_type"></property>
+                            <property name="validator_style">wxFILTER_NONE</property>
+                            <property name="validator_type">wxDefaultValidator</property>
+                            <property name="validator_variable"></property>
+                            <property name="value">0</property>
+                            <property name="window_extra_style"></property>
+                            <property name="window_name"></property>
+                            <property name="window_style"></property>
+                            <event name="OnChar"></event>
+                            <event name="OnEnterWindow"></event>
+                            <event name="OnEraseBackground"></event>
+                            <event name="OnKeyDown"></event>
+                            <event name="OnKeyUp"></event>
+                            <event name="OnKillFocus"></event>
+                            <event name="OnLeaveWindow"></event>
+                            <event name="OnLeftDClick"></event>
+                            <event name="OnLeftDown"></event>
+                            <event name="OnLeftUp"></event>
+                            <event name="OnMiddleDClick"></event>
+                            <event name="OnMiddleDown"></event>
+                            <event name="OnMiddleUp"></event>
+                            <event name="OnMotion"></event>
+                            <event name="OnMouseEvents"></event>
+                            <event name="OnMouseWheel"></event>
+                            <event name="OnPaint"></event>
+                            <event name="OnRadioButton"></event>
+                            <event name="OnRightDClick"></event>
+                            <event name="OnRightDown"></event>
+                            <event name="OnRightUp"></event>
+                            <event name="OnSetFocus"></event>
+                            <event name="OnSize"></event>
+                            <event name="OnUpdateUI"></event>
+                        </object>
+                    </object>
+                </object>
+            </object>
         </object>
     </object>
 </wxFormBuilder_Project>
diff --git a/pcbnew/dialogs/wizard_add_fplib_base.h b/pcbnew/dialogs/wizard_add_fplib_base.h
index 9edfa11..936c186 100644
--- a/pcbnew/dialogs/wizard_add_fplib_base.h
+++ b/pcbnew/dialogs/wizard_add_fplib_base.h
@@ -1,5 +1,5 @@
 ///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jun  5 2014)
+// C++ code generated with wxFormBuilder (version Mar  9 2015)
 // http://www.wxformbuilder.org/
 //
 // PLEASE DO "NOT" EDIT THIS FILE!
@@ -10,24 +10,24 @@
 
 #include <wx/artprov.h>
 #include <wx/xrc/xmlres.h>
-#include <wx/intl.h>
 #include <wx/string.h>
-#include <wx/radiobox.h>
+#include <wx/stattext.h>
 #include <wx/gdicmn.h>
 #include <wx/font.h>
 #include <wx/colour.h>
 #include <wx/settings.h>
-#include <wx/statline.h>
+#include <wx/radiobut.h>
+#include <wx/textctrl.h>
+#include <wx/sizer.h>
+#include <wx/hyperlink.h>
 #include <wx/bitmap.h>
 #include <wx/image.h>
 #include <wx/icon.h>
-#include <wx/statbmp.h>
-#include <wx/stattext.h>
-#include <wx/textctrl.h>
-#include <wx/sizer.h>
-#include <wx/grid.h>
+#include <wx/dirctrl.h>
+#include <wx/checklst.h>
 #include <wx/button.h>
-#include <wx/statbox.h>
+#include <wx/srchctrl.h>
+#include <wx/dataview.h>
 #include <wx/wizard.h>
 #include <wx/dynarray.h>
 WX_DEFINE_ARRAY_PTR( wxWizardPageSimple*, WizardPages );
@@ -43,45 +43,40 @@ class WIZARD_FPLIB_TABLE_BASE : public wxWizard
 	private:
 	
 	protected:
-		wxRadioBox* m_rbFpLibFormat;
-		wxStaticLine* m_staticline2;
-		wxStaticBitmap* m_bitmapGithubURL;
-		wxStaticText* m_staticText10;
-		wxTextCtrl* m_textCtrlGithubURL;
-		wxRadioBox* m_rbPathManagement;
 		wxStaticText* m_staticText1;
-		wxGrid* m_gridEnvironmentVariablesList;
-		wxButton* m_buttonAddEV;
-		wxButton* m_buttonRemoveEV;
-		wxStaticText* m_textPluginTitle;
-		wxStaticText* m_textPluginType;
-		wxStaticText* m_textOptionTitle;
-		wxStaticText* m_textOption;
-		wxStaticText* m_stPathTitle;
-		wxStaticText* m_textPath;
-		wxStaticText* m_staticText2;
-		wxGrid* m_gridFpListLibs;
-		wxButton* m_buttonGithubLibList;
-		wxButton* m_buttonAddLib;
-		wxButton* m_buttonRemoveLib;
+		wxRadioButton* m_radioAddLocal;
+		wxRadioButton* m_radioAddGithub;
+		wxTextCtrl* m_textCtrlGithubURL;
+		wxStaticText* m_staticText8;
+		wxHyperlinkCtrl* m_hyperlink1;
+		wxStaticText* m_staticText9;
+		wxStaticText* m_staticText7;
+		wxGenericDirCtrl* m_filePicker;
+		wxStaticText* m_staticText112;
+		wxCheckListBox* m_checkListGH;
+		wxButton* m_btnSelectAllGH;
+		wxButton* m_btnUnselectAllGH;
+		wxSearchCtrl* m_searchCtrlGH;
+		wxStaticText* m_staticText1121;
+		wxDataViewListCtrl* m_listCtrlReview;
+		wxDataViewColumn* m_dvLibName;
+		wxDataViewColumn* m_dvLibStatus;
+		wxDataViewColumn* m_dvLibFormat;
+		wxStaticText* m_staticText12;
+		wxRadioButton* m_radioGlobal;
+		wxRadioButton* m_radioProject;
 		
 		// Virtual event handlers, overide them in your derived class
-		virtual void OnFinish( wxWizardEvent& event ) { event.Skip(); }
 		virtual void OnPageChanged( wxWizardEvent& event ) { event.Skip(); }
 		virtual void OnPageChanging( wxWizardEvent& event ) { event.Skip(); }
-		virtual void OnPluginSelection( wxCommandEvent& event ) { event.Skip(); }
-		virtual void OnPathManagementSelection( wxCommandEvent& event ) { event.Skip(); }
-		virtual void OnSelectEnvVarCell( wxGridEvent& event ) { event.Skip(); }
-		virtual void OnAddEVariable( wxCommandEvent& event ) { event.Skip(); }
-		virtual void OnRemoveEVariable( wxCommandEvent& event ) { event.Skip(); }
-		virtual void OnGithubLibsList( wxCommandEvent& event ) { event.Skip(); }
-		virtual void OnAddFpLibs( wxCommandEvent& event ) { event.Skip(); }
-		virtual void OnRemoveFpLibs( wxCommandEvent& event ) { event.Skip(); }
+		virtual void OnSelectAllGH( wxCommandEvent& event ) { event.Skip(); }
+		virtual void OnUnselectAllGH( wxCommandEvent& event ) { event.Skip(); }
+		virtual void OnChangeSearch( wxCommandEvent& event ) { event.Skip(); }
 		
 	
 	public:
 		
-		WIZARD_FPLIB_TABLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = _("Footprint Library Wizard"), const wxBitmap& bitmap = wxArtProvider::GetBitmap( wxART_HELP_BOOK, wxART_FRAME_ICON ), const wxPoint& pos = wxDefaultPosition, long style = wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER );
+		WIZARD_FPLIB_TABLE_BASE( wxWindow* parent, wxWindowID id = wxID_ANY, const wxString& title = wxT("Add Footprint Libraries Wizard"), const wxBitmap& bitmap = wxArtProvider::GetBitmap( wxART_HELP_BOOK, wxART_FRAME_ICON ), const wxPoint& pos = wxDefaultPosition, long style = wxCAPTION|wxCLOSE_BOX|wxDEFAULT_DIALOG_STYLE|wxMAXIMIZE_BOX|wxRESIZE_BORDER );
 		WizardPages m_pages;
 		~WIZARD_FPLIB_TABLE_BASE();
 	
diff --git a/webviewer/CMakeLists.txt b/webviewer/CMakeLists.txt
deleted file mode 100644
index caf653d..0000000
--- a/webviewer/CMakeLists.txt
+++ /dev/null
@@ -1,15 +0,0 @@
-
-include_directories(BEFORE ${INC_BEFORE})
-include_directories(
-    ${INC_AFTER}
-    )
-
-set( WEBVIEW_SRCS
-    html_link_parser.cpp
-    webviewer.cpp
-)
-
-add_library( webviewer STATIC ${WEBVIEW_SRCS})
-
-add_dependencies( webviewer lib-dependencies )
-
diff --git a/webviewer/html_link_parser.cpp b/webviewer/html_link_parser.cpp
deleted file mode 100644
index 22e52eb..0000000
--- a/webviewer/html_link_parser.cpp
+++ /dev/null
@@ -1,70 +0,0 @@
-/**
- * @file html_link_parse.cpp
- */
-
-/*
- * This program source code file is part of KiCad, a free EDA CAD application.
- *
- * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.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
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, you may find one here:
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * or you may search the http://www.gnu.org website for the version 2 license,
- * or you may write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
- */
-
-/*
- * wxWidgets gives very few info about wxwebkit. For more info and more comments:
- * see https://forums.wxwidgets.org/viewtopic.php?f=1&t=1119#
- */
-
-#include <wx/wx.h>
-#include <wx/html/htmlpars.h>
-#include "html_link_parser.h"
-
-bool LINK_TAGHANDLER::HandleTag(const wxHtmlTag& tag)
-{
-    if( tag.HasParam( wxT("HREF") ) )
-    {
-        wxString href( tag.GetParam( wxT("HREF") ) );
-        // Add the first parameter (the link)
-        m_Parser->AddString( href );
-        // Parse other params, but do nothing, becuse the AddText() callback
-        // do nothing
-        ParseInner(tag);
-        return true;
-    }
-    else
-        return false;
-}
-
-HTML_LINK_PARSER::HTML_LINK_PARSER( const wxString& aSrc, wxArrayString& aUrls )
-        : m_src( aSrc ), stringUrls( aUrls )
-{
-    AddTagHandler( new LINK_TAGHANDLER(this) );
-}
-
-
-void HTML_LINK_PARSER::AddString( const wxString& aText )
-{
-    wxString text = aText;
-    text.Trim( true );
-    text.Trim( false );
-
-    if( ! m_filter || m_filter( text ) )
-    {
-        stringUrls.Add( text );
-    }
-}
diff --git a/webviewer/html_link_parser.h b/webviewer/html_link_parser.h
deleted file mode 100644
index d4de3cf..0000000
--- a/webviewer/html_link_parser.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/**
- * @file html_link_parse.h
- */
-
-/*
- * This program source code file is part of KiCad, a free EDA CAD application.
- *
- * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.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
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, you may find one here:
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * or you may search the http://www.gnu.org website for the version 2 license,
- * or you may write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
- */
-
-/*
- * wxWidgets gives very few info about wxwebkit. For more info and more comments:
- * see https://forums.wxwidgets.org/viewtopic.php?f=1&t=1119#
- */
-
-#ifndef HTML_LINK_PARSE_H
-#define HTML_LINK_PARSE_H
-
-
-#include <wx/wx.h>
-#include <wx/html/htmlpars.h>
-
-class HTML_LINK_PARSER ;
-
-/**
- * a Tag parser, to extract tagged data in html text.
- * this tag handler extract a url link, givent by tag "A"
- * like:
- * "<a href="/KiCad/Valves.pretty" itemprop="name codeRepository"> Valves.pretty</a>"
- * the tag is "a"
- * and the link is the parameter given by "href"
- */
-class LINK_TAGHANDLER : public wxHtmlTagHandler
-{
-    HTML_LINK_PARSER* m_Parser;
-
-public:
-    LINK_TAGHANDLER() : m_Parser( NULL )
-    {
-    }
-
-    LINK_TAGHANDLER( HTML_LINK_PARSER* aParser ) : m_Parser( aParser )
-    {
-    }
-
-    wxString GetSupportedTags()
-    {
-        return "A";
-    }
-
-    bool HandleTag(const wxHtmlTag& tag);
-};
-
-/**
- * The engine to parse a html text and extract useful data
- * Here, the useful data are url links
- */
-class HTML_LINK_PARSER : public wxHtmlParser
-{
-    const wxString& m_src;          // the html text to parse
-    wxArrayString& stringUrls;      // the strings extracted from html text
-    bool (*m_filter)( const wxString& aData );  // a callback function to filter strings
-
-public:
-
-    HTML_LINK_PARSER( const wxString& aSrc, wxArrayString& aUrls );
-
-    /**
-     * Parse the html text and store links in stringUrls
-     * Stored links can be filtered if aFilter is non NULL
-     * @param aFilter a filtering function ( bool aFilter( const wxString& aData ) )
-     * which return true if the tex(t aData must be stored.
-     */
-    void ParseLinks( bool (*aFilter)( const wxString& aData ) )
-    {
-        m_filter = aFilter;
-        Parse(m_src);
-    }
-
-    // virtual pure from wxHtmlParser, do nothing here, but needed.
-    void AddText( const wxString& aText ){}
-
-    // Our "AddText" used to store selected text (the url link)
-    void AddString( const wxString& aText );
-
-    wxObject* GetProduct()
-    {
-        return NULL;
-    }
-};
-
-#endif      // ifndef HTML_LINK_PARSE_H
diff --git a/webviewer/webviewer.cpp b/webviewer/webviewer.cpp
deleted file mode 100644
index 2968a60..0000000
--- a/webviewer/webviewer.cpp
+++ /dev/null
@@ -1,970 +0,0 @@
-/*
- * This code comes from wxWebView sample webview.cpp and is modified to be used in Kicad
- * the wxWidgets sample code webview.cpp is under wxWindows licence (author Marianne Gagnon)
- *
- * Webviewer runs in a dialog to allows an user to select a list of URLs which are .pretty library
- * folder accessible from http or https using the Github plugin.
- *
- * The Web viewer just return a list of URLs selected from the context menu (command copy link)
- * when mouse cursor in on a http link.
- * URLs strings are filtered
- * Only URLs starting by "http" and ending by ".pretty" can be currently selected and stored in fp lib list
- */
-
-/*
- * This program source code file is part of KiCad, a free EDA CAD application.
- *
- * Copyright (C) 1992-2014 KiCad Developers, see AUTHORS.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
- * as published by the Free Software Foundation; either version 2
- * of the License, or (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, you may find one here:
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
- * or you may search the http://www.gnu.org website for the version 2 license,
- * or you may write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
- */
-
-/*
- * wxWidgets gives very few info about wxwebkit. For more info and more comments:
- * see https://forums.wxwidgets.org/viewtopic.php?f=1&t=1119#
- */
-
-#include "wx/wx.h"
-
-#if !wxUSE_WEBVIEW_WEBKIT && !wxUSE_WEBVIEW_IE
-#error "wxWidgets must be built with wxWebView support enabled. Please rebuild wxWidgets"
-#endif
-
-#include "wx/artprov.h"
-#include "wx/cmdline.h"
-#include "wx/notifmsg.h"
-#include "wx/settings.h"
-#include "wx/webview.h"
-#include "wx/webviewarchivehandler.h"
-#include "wx/webviewfshandler.h"
-#include "wx/infobar.h"
-#include "wx/filesys.h"
-#include "wx/fs_arc.h"
-#include <wx/clipbrd.h>
-#include <wx/uri.h>
-#if wxUSE_STC
-#include "wx/stc/stc.h"
-#else
-#error "wxWidgets must be built with wxStyledTextControl enabled. Please rebuild wxWidgets"
-#endif
-
-#include <dialog_shim.h>
-#include <bitmaps.h>
-#include "html_link_parser.h"
-
-// We map menu items to their history items
-WX_DECLARE_HASH_MAP( int, wxSharedPtr<wxWebViewHistoryItem>,
-        wxIntegerHash, wxIntegerEqual, wxMenuHistoryMap );
-
-
-class WEB_NAVIGATOR : public DIALOG_SHIM
-{
-    wxArrayString* urlListSelection;
-
-public:
-    WEB_NAVIGATOR( wxWindow* aParent,
-            const wxString& aUrlOnStart,
-            wxArrayString* aUrlListSelection = NULL );
-    virtual ~WEB_NAVIGATOR();
-
-    void InitNavigator( const wxString& aUrlOnStart );
-
-private:
-    void    buildToolBar();
-    void    buildToolMenu();
-    void    CreateFindToolBar( wxWindow* aParent );
-
-    void UpdateState();
-
-    // wxWebViewEvents:
-    /** Callback invoked when a navigation request was accepted
-     */
-    void OnNavigationComplete( wxWebViewEvent& evt )
-    {
-        UpdateState();
-    }
-
-    /** Callback invoked when a page is finished loading
-     */
-    void OnDocumentLoaded( wxWebViewEvent& evt )
-    {
-        UpdateState();
-    }
-
-    /** On new window, we veto to stop extra windows appearing
-     */
-    void OnNewWindow( wxWebViewEvent& evt )
-    {
-        UpdateState();
-    }
-
-    void OnTitleChanged( wxWebViewEvent& evt )
-    {
-        SetTitle( evt.GetString() );
-    }
-
-    // event functions:
-    void    OnIdle( wxIdleEvent& evt );
-    void    OnUrl( wxCommandEvent& evt );
-    void    OnBack( wxCommandEvent& evt );
-    void    OnForward( wxCommandEvent& evt );
-    void    OnStop( wxCommandEvent& evt );
-    void    OnReload( wxCommandEvent& evt );
-    void    OnClearHistory( wxCommandEvent& evt );
-    void    OnNavigationRequest( wxWebViewEvent& evt );
-    void    OnViewSourceRequest( wxCommandEvent& evt );
-    void    OnToolsClicked( wxCommandEvent& evt );
-    void    OnSetZoom( wxCommandEvent& evt );
-    void    OnError( wxWebViewEvent& evt );
-
-    void    OnPrint( wxCommandEvent& evt )
-    {
-        m_browser->Print();
-    }
-
-    void OnZoomLayout( wxCommandEvent& evt );
-
-    void    OnHistory( wxCommandEvent& evt )
-    {
-        m_browser->LoadHistoryItem( m_histMenuItems[evt.GetId()] );
-    }
-
-    void    OnFind( wxCommandEvent& evt );
-    void    OnFindDone( wxCommandEvent& evt );
-    void    OnFindText( wxCommandEvent& evt );
-    void    OnFindOptions( wxCommandEvent& evt );
-
-    // only for fp lib wizard called if there is a non null
-    // aUrlListSelection from idle event, to see if a valid
-    // footprint lib was selected by user, from the context menu
-    // (command copy link)
-    void TestAndStoreFootprintLibLink();
-    // Alternate way to list and select fp libraries:
-    void    OnListPrettyLibURLs( wxCommandEvent& event );
-
-private:
-    wxTextCtrl* m_url;
-    wxWebView*  m_browser;
-
-    wxToolBar* m_toolbar;
-    wxToolBarToolBase*  m_toolbar_back;
-    wxToolBarToolBase*  m_toolbar_forward;
-    wxToolBarToolBase*  m_toolbar_stop;
-    wxToolBarToolBase*  m_toolbar_reload;
-    wxToolBarToolBase*  m_toolbar_tools;
-    wxToolBarToolBase*  m_toolbar_ListLibs;
-
-    wxToolBarToolBase*  m_find_toolbar_done;
-    wxToolBarToolBase*  m_find_toolbar_next;
-    wxToolBarToolBase*  m_find_toolbar_previous;
-    wxToolBarToolBase*  m_find_toolbar_options;
-
-    wxMenuItem* m_find_toolbar_wrap;
-    wxMenuItem* m_find_toolbar_highlight;
-    wxMenuItem* m_find_toolbar_matchcase;
-    wxMenuItem* m_find_toolbar_wholeword;
-
-    wxMenu* m_tools_menu;
-    wxMenuItem* m_tools_viewSource;
-    wxMenuItem* m_tools_print;
-    wxMenu* m_tools_history_menu;
-    wxMenuItem* m_tools_clearhist;
-    wxMenuItem* m_tools_layout;
-    wxMenuItem* m_tools_tiny;
-    wxMenuItem* m_tools_small;
-    wxMenuItem* m_tools_medium;
-    wxMenuItem* m_tools_large;
-    wxMenuItem* m_tools_largest;
-    wxMenuItem* m_find;
-
-    wxInfoBar* m_info;
-    wxStaticText*   m_info_text;
-    wxTextCtrl*     m_find_ctrl;
-    wxToolBar* m_find_toolbar;
-
-    wxMenuHistoryMap m_histMenuItems;
-    wxString m_findText;
-    int m_findFlags, m_findCount;
-};
-
-class SourceViewDialog : public wxDialog
-{
-public:
-    SourceViewDialog( wxWindow* parent, wxString source );
-};
-
-// Helper function to run the web viewer from an other dialog or frame:
-int RunWebViewer( wxWindow* aParent, const wxString& aUrlOnStart, wxArrayString* aUrlListSelection )
-{
-    WEB_NAVIGATOR dlg( aParent, aUrlOnStart, aUrlListSelection );
-    return dlg.ShowModal();
-}
-
-
-WEB_NAVIGATOR::WEB_NAVIGATOR( wxWindow* aParent,
-        const wxString& aUrlOnStart, wxArrayString* aUrlListSelection ) :
-    DIALOG_SHIM( aParent, wxID_ANY, "Web Viewer", wxDefaultPosition, wxDefaultSize,
-            wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
-{
-    urlListSelection = aUrlListSelection;
-    InitNavigator( aUrlOnStart );
-
-    SetMinSize( wxSize( 700, 500 ) );
-
-    GetSizer()->Fit( this );
-    Centre();
-}
-
-
-void WEB_NAVIGATOR::InitNavigator( const wxString& aUrlOnStart )
-{
-    // To collect URLs, the Web Viewer can use the clipboard.
-    // Clear it before running the viewer
-    // For an unknown reason, wxTheClipboard->Clear() does not work,
-    // so use a trick
-    if( wxTheClipboard->Open() )
-    {
-        wxTheClipboard->SetData( new wxTextDataObject( "" ) );
-        wxTheClipboard->Close();
-    }
-
-    wxBoxSizer* topsizer = new wxBoxSizer( wxVERTICAL );
-
-    // Create the main toolbar
-    m_toolbar = new wxToolBar( this, wxID_ANY );
-    buildToolBar();
-    topsizer->Add( m_toolbar );
-
-    // Shows the tool to choose and select fp libs only if a selected URL list
-    // exists
-    if( urlListSelection == NULL )
-        m_toolbar_ListLibs->Enable( false );
-
-    // Set find parameters and create the find toolbar.
-    m_findFlags = wxWEBVIEW_FIND_DEFAULT;
-    m_findCount = 0;
-    CreateFindToolBar( this );
-    topsizer->Add( m_find_toolbar, wxSizerFlags().Expand() );
-    m_find_toolbar->Hide();
-
-    // Create the info panel
-    m_info = new wxInfoBar( this );
-    topsizer->Add( m_info, wxSizerFlags().Expand() );
-
-    // Create the webview engine
-    if( aUrlOnStart.IsEmpty() )     // Start on a blank page:
-        m_browser = wxWebView::New( this, wxID_ANY, wxT( "about:blank")  );
-    else
-        m_browser = wxWebView::New( this, wxID_ANY, aUrlOnStart,
-                                    wxDefaultPosition, wxSize( 900, 600 ) );
-
-    m_browser->EnableHistory( true );
-
-    topsizer->Add( m_browser, wxSizerFlags().Expand().Proportion( 1 ) );
-
-    SetSizer( topsizer );
-
-    // Create the Tools menu
-    buildToolMenu();
-
-    if( !m_browser->CanSetZoomType( wxWEBVIEW_ZOOM_TYPE_LAYOUT ) )
-        m_tools_layout->Enable( false );
-
-    // Connect the toolbar events
-    Connect( m_toolbar_back->GetId(), wxEVT_TOOL,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnBack ), NULL, this );
-    Connect( m_toolbar_forward->GetId(), wxEVT_TOOL,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnForward ), NULL, this );
-    Connect( m_toolbar_stop->GetId(), wxEVT_TOOL,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnStop ), NULL, this );
-    Connect( m_toolbar_reload->GetId(), wxEVT_TOOL,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnReload ), NULL, this );
-    Connect( m_toolbar_tools->GetId(), wxEVT_TOOL,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnToolsClicked ), NULL, this );
-
-    Connect( m_toolbar_ListLibs->GetId(), wxEVT_TOOL,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnListPrettyLibURLs ), NULL, this );
-
-    Connect( m_url->GetId(), wxEVT_TEXT_ENTER,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnUrl ), NULL, this );
-
-    // Connect find toolbar events.
-    Connect( m_find_toolbar_done->GetId(), wxEVT_TOOL,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnFindDone ), NULL, this );
-    Connect( m_find_toolbar_next->GetId(), wxEVT_TOOL,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnFindText ), NULL, this );
-    Connect( m_find_toolbar_previous->GetId(), wxEVT_TOOL,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnFindText ), NULL, this );
-
-    // Connect find control events.
-    Connect( m_find_ctrl->GetId(), wxEVT_TEXT,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnFindText ), NULL, this );
-    Connect( m_find_ctrl->GetId(), wxEVT_TEXT_ENTER,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnFindText ), NULL, this );
-
-    // Connect the webview events
-    Connect( m_browser->GetId(), wxEVT_WEBVIEW_NAVIGATING,
-            wxWebViewEventHandler( WEB_NAVIGATOR::OnNavigationRequest ), NULL, this );
-    Connect( m_browser->GetId(), wxEVT_WEBVIEW_NAVIGATED,
-            wxWebViewEventHandler( WEB_NAVIGATOR::OnNavigationComplete ), NULL, this );
-    Connect( m_browser->GetId(), wxEVT_WEBVIEW_LOADED,
-            wxWebViewEventHandler( WEB_NAVIGATOR::OnDocumentLoaded ), NULL, this );
-    Connect( m_browser->GetId(), wxEVT_WEBVIEW_ERROR,
-            wxWebViewEventHandler( WEB_NAVIGATOR::OnError ), NULL, this );
-    Connect( m_browser->GetId(), wxEVT_WEBVIEW_NEWWINDOW,
-            wxWebViewEventHandler( WEB_NAVIGATOR::OnNewWindow ), NULL, this );
-    Connect( m_browser->GetId(), wxEVT_WEBVIEW_TITLE_CHANGED,
-            wxWebViewEventHandler( WEB_NAVIGATOR::OnTitleChanged ), NULL, this );
-
-    // Connect the menu events
-    Connect( m_tools_viewSource->GetId(), wxEVT_MENU,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnViewSourceRequest ), NULL, this );
-    Connect( m_tools_print->GetId(), wxEVT_MENU,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnPrint ), NULL, this );
-    Connect( m_tools_layout->GetId(), wxEVT_MENU,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnZoomLayout ), NULL, this );
-    Connect( m_tools_tiny->GetId(), wxEVT_MENU,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnSetZoom ), NULL, this );
-    Connect( m_tools_small->GetId(), wxEVT_MENU,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnSetZoom ), NULL, this );
-    Connect( m_tools_medium->GetId(), wxEVT_MENU,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnSetZoom ), NULL, this );
-    Connect( m_tools_large->GetId(), wxEVT_MENU,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnSetZoom ), NULL, this );
-    Connect( m_tools_largest->GetId(), wxEVT_MENU,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnSetZoom ), NULL, this );
-    Connect( m_tools_clearhist->GetId(), wxEVT_MENU,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnClearHistory ), NULL, this );
-    Connect( m_find->GetId(), wxEVT_MENU,
-            wxCommandEventHandler( WEB_NAVIGATOR::OnFind ), NULL, this );
-
-    // Connect the idle events
-    Connect( wxID_ANY, wxEVT_IDLE, wxIdleEventHandler( WEB_NAVIGATOR::OnIdle ), NULL, this );
-}
-
-
-WEB_NAVIGATOR::~WEB_NAVIGATOR()
-{
-    delete m_tools_menu;
-}
-
-
-void WEB_NAVIGATOR::buildToolMenu()
-{
-    m_tools_menu = new wxMenu();
-
-    m_tools_print = m_tools_menu->Append( wxID_ANY, _( "Print" ) );
-    m_tools_viewSource = m_tools_menu->Append( wxID_ANY, _( "View Source" ) );
-    m_tools_menu->AppendSeparator();
-    m_tools_layout = m_tools_menu->AppendCheckItem( wxID_ANY, _( "Use Layout Zoom" ) );
-    m_tools_tiny    = m_tools_menu->AppendCheckItem( wxID_ANY, _( "Tiny" ) );
-    m_tools_small   = m_tools_menu->AppendCheckItem( wxID_ANY, _( "Small" ) );
-    m_tools_medium  = m_tools_menu->AppendCheckItem( wxID_ANY, _( "Medium" ) );
-    m_tools_large   = m_tools_menu->AppendCheckItem( wxID_ANY, _( "Large" ) );
-    m_tools_largest = m_tools_menu->AppendCheckItem( wxID_ANY, _( "Largest" ) );
-    m_tools_menu->AppendSeparator();
-
-    // Find
-    m_find = m_tools_menu->Append( wxID_ANY, _( "Find" ) );
-    m_tools_menu->AppendSeparator();
-
-    // History menu
-    m_tools_history_menu = new wxMenu();
-    m_tools_clearhist = m_tools_history_menu->Append( wxID_ANY, _( "Clear History" ) );
-    m_tools_history_menu->AppendSeparator();
-
-    m_tools_menu->AppendSubMenu( m_tools_history_menu, "History" );
-}
-
-
-void WEB_NAVIGATOR::buildToolBar()
-{
-    // Populate the toolbar
-    m_toolbar->SetToolBitmapSize( wxSize( 26, 26 ) );
-    m_toolbar->SetMargins( 3, 3 );
-
-    // The tool menu (one cannot have a menubar in a dialog, so uise a tool to display a menu
-    m_toolbar_tools = m_toolbar->AddTool( wxID_ANY, _( "Menu" ), KiBitmap( tools_xpm ),
-                                          _("Access to some options") );
-    m_toolbar->AddSeparator();
-
-    // The navigation tools
-    m_toolbar_back = m_toolbar->AddTool( wxID_ANY, _( "Back" ), KiBitmap( left_xpm ) );
-    m_toolbar_forward = m_toolbar->AddTool( wxID_ANY, _( "Forward" ), KiBitmap( right_xpm ) );
-    m_toolbar_stop = m_toolbar->AddTool( wxID_ANY, _( "Stop" ), KiBitmap( red_xpm ) );
-    m_toolbar_reload = m_toolbar->AddTool( wxID_ANY, _( "Reload" ), KiBitmap( reload2_xpm ) );
-
-    m_toolbar->AddSeparator();
-    m_url = new wxTextCtrl( m_toolbar, wxID_ANY, wxT( "" ), wxDefaultPosition, wxSize( 400,
-                    -1 ), wxTE_PROCESS_ENTER );
-    m_toolbar->AddControl( m_url, _( "URL" ) );
-    m_toolbar->AddSeparator();
-
-    // The Kicad footprint libraries extractor/selector tool:
-    m_toolbar_ListLibs =
-        m_toolbar->AddTool( wxID_ANY, _( "KicadLibs" ), KiBitmap( library_browse_xpm ),
-                _("List .pretty kicad footprint libraries and add selected libraries\n"
-                  "to the footprint library table") );
-
-    m_toolbar->Realize();
-}
-
-
-void WEB_NAVIGATOR::CreateFindToolBar( wxWindow* aParent )
-{
-    m_find_toolbar = new wxToolBar( aParent,
-            wxID_ANY, wxDefaultPosition, wxDefaultSize,
-            wxTB_HORIZONTAL | wxTB_TEXT | wxTB_HORZ_LAYOUT );
-
-    // Create find control.
-    m_find_ctrl = new wxTextCtrl( m_find_toolbar,
-            wxID_ANY, wxEmptyString, wxDefaultPosition,
-            wxSize( 140, -1 ), wxTE_PROCESS_ENTER );
-
-    // Find options menu
-    wxMenu* findmenu = new wxMenu;
-    m_find_toolbar_wrap = findmenu->AppendCheckItem( wxID_ANY, "Wrap" );
-    m_find_toolbar_matchcase    = findmenu->AppendCheckItem( wxID_ANY, "Match Case" );
-    m_find_toolbar_wholeword    = findmenu->AppendCheckItem( wxID_ANY, "Entire Word" );
-    m_find_toolbar_highlight    = findmenu->AppendCheckItem( wxID_ANY, "Highlight" );
-    m_find_toolbar_highlight->Check( true );
-
-    // Add find toolbar tools.
-    m_find_toolbar->SetToolSeparation( 7 );
-    m_find_toolbar_done = m_find_toolbar->AddTool( wxID_ANY, "Close",
-            wxArtProvider::GetBitmap( wxART_CROSS_MARK ) );
-    m_find_toolbar->AddSeparator();
-    m_find_toolbar->AddControl( m_find_ctrl, "Find" );
-    m_find_toolbar->AddSeparator();
-    m_find_toolbar_next = m_find_toolbar->AddTool( wxID_ANY, "Next",
-            wxArtProvider::GetBitmap( wxART_GO_DOWN, wxART_TOOLBAR, wxSize( 16, 16 ) ) );
-    m_find_toolbar_previous = m_find_toolbar->AddTool( wxID_ANY, "Previous",
-            wxArtProvider::GetBitmap( wxART_GO_UP, wxART_TOOLBAR, wxSize( 16, 16 ) ) );
-    m_find_toolbar->AddSeparator();
-    m_find_toolbar_options = m_find_toolbar->AddTool( wxID_ANY, "Options",
-            wxArtProvider::GetBitmap( wxART_PLUS, wxART_TOOLBAR, wxSize( 16, 16 ) ),
-            "", wxITEM_DROPDOWN );
-    m_find_toolbar_options->SetDropdownMenu( findmenu );
-    m_find_toolbar->Realize();
-}
-
-
-// A helper function to try to validate urls names
-// read in github repos.
-// a valid .pretty github library name ( on github )
-// is expected ending with .pretty, and to be a path
-// relative github url
-static bool urlFilter( const wxString& aText )
-{
-    if( aText.Length() < 8 ) // unlikely a valid .pretty name
-        return false;
-
-    if( !aText.EndsWith( wxT( ".pretty" ) ) )
-        return false;
-
-    wxURI uri( aText );
-
-    if( !uri.GetQuery().IsEmpty() ) // the link is a request, not good
-        return false;
-
-    return true;
-}
-
-
-void WEB_NAVIGATOR::OnListPrettyLibURLs( wxCommandEvent& event )
-{
-    if( m_browser->IsBusy() ) // a page loading is currently in progress
-        return;
-
-    wxString source = m_browser->GetPageSource();
-    wxArrayString urls;
-
-    HTML_LINK_PARSER parser( source, urls );
-    parser.ParseLinks( urlFilter );
-
-    // Create library list.
-    // From github, the links can be relative to the github server URL
-    // In this case, make url absolute
-    wxString reposUrl( m_browser->GetCurrentURL() );
-    wxURI reposUri( reposUrl );
-    wxString reposName( reposUri.GetScheme() + wxT( "://" ) + reposUri.GetServer() );
-
-    for( unsigned ii = 0; ii < urls.GetCount(); ii++ )
-    {
-        wxString url = urls[ii];
-        wxURI currUri( url );
-
-        if( !currUri.HasServer() )
-        {
-            if( url.StartsWith( wxT( "/" ) ) )  // path relative to the server name
-                url.Prepend( reposName );
-            else                                // path relative to the server currently open path
-                url.Prepend( reposUrl );
-
-            urls[ii] = url;
-        }
-    }
-
-    // Remove duplicates:
-    // A very basic test, not optimized, but usually we have only few urls
-    for( unsigned ii = 0; ii < urls.GetCount(); ii++ )
-    {
-        for( unsigned jj = urls.GetCount() - 1; jj > ii; jj-- )
-        {
-            if( urls[ii] == urls[jj] ) // Duplicate found
-                urls.RemoveAt( jj );
-        }
-    }
-
-    wxArrayInt choices;
-    wxString msg( _( "Urls detected as footprint .pretty libraries.\n"
-                     "Selected urls will be added to the current footprint library list,\n"
-                     "when closing the web viewer") );
-
-    if( wxGetSelectedChoices( choices, msg,
-                _( "Footprint libraries" ), urls, this ) <= 0 )
-        return;
-
-    // Add selected fp list in list
-    for( unsigned ii = 0; ii < choices.GetCount(); ii++ )
-    {
-        wxString& url = urls[choices[ii]];
-        urlListSelection->Add( url );
-    }
-}
-
-
-/**
- * Method that retrieves the current state from the web control and updates the GUI
- * the reflect this current state.
- */
-void WEB_NAVIGATOR::UpdateState()
-{
-    m_toolbar->EnableTool( m_toolbar_back->GetId(), m_browser->CanGoBack() );
-    m_toolbar->EnableTool( m_toolbar_forward->GetId(), m_browser->CanGoForward() );
-
-    if( m_browser->IsBusy() )
-    {
-        m_toolbar->EnableTool( m_toolbar_stop->GetId(), true );
-    }
-    else
-    {
-        m_toolbar->EnableTool( m_toolbar_stop->GetId(), false );
-    }
-
-    SetTitle( m_browser->GetCurrentTitle() );
-    m_url->SetValue( m_browser->GetCurrentURL() );
-}
-
-
-void WEB_NAVIGATOR::OnIdle( wxIdleEvent& WXUNUSED( evt ) )
-{
-    if( m_browser->IsBusy() )
-    {
-        wxSetCursor( wxCURSOR_ARROWWAIT );
-        m_toolbar->EnableTool( m_toolbar_stop->GetId(), true );
-    }
-    else
-    {
-        wxSetCursor( wxNullCursor );
-        m_toolbar->EnableTool( m_toolbar_stop->GetId(), false );
-
-        if( urlListSelection )
-            TestAndStoreFootprintLibLink();
-    }
-}
-
-
-// only for fp lib wizard called if there is a non null
-// aUrlListSelection from idle event, to see if a valid
-// footprint lib was selected by user, from the context menu
-// (command copy link)
-void WEB_NAVIGATOR::TestAndStoreFootprintLibLink()
-{
-    if( !urlListSelection )
-        return;
-
-    if( wxTheClipboard->Open() )
-    {
-        if( wxTheClipboard->IsSupported( wxDF_TEXT ) )
-        {
-            wxTextDataObject data;
-
-            if( wxTheClipboard->GetData( data ) )
-            {
-                // A valid text data is found
-                const wxString& text = data.GetText();
-
-                // Be sure it is a valid data for us, i.e. a valid
-                // kicad url
-                if( urlFilter( text ) && ( text.StartsWith( "http" ) ) )
-                {
-                    urlListSelection->Add( text );
-                    wxTheClipboard->SetData( new wxTextDataObject( wxEmptyString ) );
-                }
-            }
-
-            wxTheClipboard->Close();
-        }
-    }
-}
-
-
-/**
- * Callback invoked when user entered an URL and pressed enter
- */
-void WEB_NAVIGATOR::OnUrl( wxCommandEvent& WXUNUSED( evt ) )
-{
-    m_browser->LoadURL( m_url->GetValue() );
-    m_browser->SetFocus();
-    UpdateState();
-}
-
-
-/**
- * Callback invoked when user pressed the "back" button
- */
-void WEB_NAVIGATOR::OnBack( wxCommandEvent& WXUNUSED( evt ) )
-{
-    m_browser->GoBack();
-    UpdateState();
-}
-
-
-/**
- * Callback invoked when user pressed the "forward" button
- */
-void WEB_NAVIGATOR::OnForward( wxCommandEvent& WXUNUSED( evt ) )
-{
-    m_browser->GoForward();
-    UpdateState();
-}
-
-
-/**
- * Callback invoked when user pressed the "stop" button
- */
-void WEB_NAVIGATOR::OnStop( wxCommandEvent& WXUNUSED( evt ) )
-{
-    m_browser->Stop();
-    UpdateState();
-}
-
-
-/**
- * Callback invoked when user pressed the "reload" button
- */
-void WEB_NAVIGATOR::OnReload( wxCommandEvent& WXUNUSED( evt ) )
-{
-    m_browser->Reload();
-    UpdateState();
-}
-
-
-void WEB_NAVIGATOR::OnClearHistory( wxCommandEvent& WXUNUSED( evt ) )
-{
-    m_browser->ClearHistory();
-    UpdateState();
-}
-
-
-void WEB_NAVIGATOR::OnFind( wxCommandEvent& WXUNUSED( evt ) )
-{
-    wxString value = m_browser->GetSelectedText();
-
-    if( value.Len() > 150 )
-    {
-        value.Truncate( 150 );
-    }
-
-    m_find_ctrl->SetValue( value );
-
-    if( !m_find_toolbar->IsShown() )
-    {
-        m_find_toolbar->Show( true );
-        SendSizeEvent();
-    }
-
-    m_find_ctrl->SelectAll();
-}
-
-
-void WEB_NAVIGATOR::OnFindDone( wxCommandEvent& WXUNUSED( evt ) )
-{
-    m_browser->Find( "" );
-    m_find_toolbar->Show( false );
-    SendSizeEvent();
-}
-
-
-void WEB_NAVIGATOR::OnFindText( wxCommandEvent& evt )
-{
-    int flags = 0;
-
-    if( m_find_toolbar_wrap->IsChecked() )
-        flags |= wxWEBVIEW_FIND_WRAP;
-
-    if( m_find_toolbar_wholeword->IsChecked() )
-        flags |= wxWEBVIEW_FIND_ENTIRE_WORD;
-
-    if( m_find_toolbar_matchcase->IsChecked() )
-        flags |= wxWEBVIEW_FIND_MATCH_CASE;
-
-    if( m_find_toolbar_highlight->IsChecked() )
-        flags |= wxWEBVIEW_FIND_HIGHLIGHT_RESULT;
-
-    if( m_find_toolbar_previous->GetId() == evt.GetId() )
-        flags |= wxWEBVIEW_FIND_BACKWARDS;
-
-    wxString find_text = m_find_ctrl->GetValue();
-
-    long count = wxNOT_FOUND;
-
-    // On windows, for an unknwon reason (bug ?) some texts in some
-    // html pages hang the search.
-    // Waiting for 2 chars before starting a search reduces the risk
-    // (but the risk still exists)
-#ifdef __WINDOWS__
-    #define MIN_CHAR_CNT 2
-    if( find_text.Length() >= MIN_CHAR_CNT )
-        count = m_browser->Find( find_text, flags );
-    else // Reset search
-        m_browser->Find( wxEmptyString, flags );
-#else
-    #define MIN_CHAR_CNT 1
-    count = m_browser->Find( find_text, flags );
-#endif
-
-    if( m_findText != find_text )
-    {
-        m_findCount = count;
-        m_findText  = find_text;
-    }
-
-    if( count != wxNOT_FOUND || find_text.Length() < MIN_CHAR_CNT )
-        m_find_ctrl->SetBackgroundColour( *wxWHITE );
-    else
-        m_find_ctrl->SetBackgroundColour( wxColour( 255, 101, 101 ) );
-
-    m_find_ctrl->Refresh();
-}
-
-
-/**
- * Callback invoked when there is a request to load a new page (for instance
- * when the user clicks a link)
- */
-void WEB_NAVIGATOR::OnNavigationRequest( wxWebViewEvent& evt )
-{
-    if( m_info->IsShown() )
-        m_info->Dismiss();
-
-    wxASSERT( m_browser->IsBusy() );
-
-    UpdateState();
-}
-
-
-/**
- * Invoked when user selects the "View Source" menu item
- */
-void WEB_NAVIGATOR::OnViewSourceRequest( wxCommandEvent& WXUNUSED( evt ) )
-{
-    SourceViewDialog dlg( this, m_browser->GetPageSource() );
-
-    dlg.ShowModal();
-}
-
-
-/**
- * Invoked when user selects the "Menu" item
- */
-void WEB_NAVIGATOR::OnToolsClicked( wxCommandEvent& WXUNUSED( evt ) )
-{
-    if( m_browser->GetCurrentURL() == "" )
-        return;
-
-    m_tools_tiny->Check( false );
-    m_tools_small->Check( false );
-    m_tools_medium->Check( false );
-    m_tools_large->Check( false );
-    m_tools_largest->Check( false );
-
-    wxWebViewZoom zoom = m_browser->GetZoom();
-
-    switch( zoom )
-    {
-    case wxWEBVIEW_ZOOM_TINY:
-        m_tools_tiny->Check();
-        break;
-
-    case wxWEBVIEW_ZOOM_SMALL:
-        m_tools_small->Check();
-        break;
-
-    case wxWEBVIEW_ZOOM_MEDIUM:
-        m_tools_medium->Check();
-        break;
-
-    case wxWEBVIEW_ZOOM_LARGE:
-        m_tools_large->Check();
-        break;
-
-    case wxWEBVIEW_ZOOM_LARGEST:
-        m_tools_largest->Check();
-        break;
-    }
-
-    // Firstly we clear the existing menu items, then we add the current ones
-    wxMenuHistoryMap::const_iterator it;
-
-    for( it = m_histMenuItems.begin(); it != m_histMenuItems.end(); ++it )
-    {
-        m_tools_history_menu->Destroy( it->first );
-    }
-
-    m_histMenuItems.clear();
-
-    wxVector<wxSharedPtr<wxWebViewHistoryItem> >    back = m_browser->GetBackwardHistory();
-    wxVector<wxSharedPtr<wxWebViewHistoryItem> >    forward = m_browser->GetForwardHistory();
-
-    wxMenuItem* item;
-
-    unsigned int i;
-
-    for( i = 0; i < back.size(); i++ )
-    {
-        item = m_tools_history_menu->AppendRadioItem( wxID_ANY, back[i]->GetTitle() );
-        m_histMenuItems[item->GetId()] = back[i];
-        Connect( item->GetId(), wxEVT_MENU,
-                wxCommandEventHandler( WEB_NAVIGATOR::OnHistory ), NULL, this );
-    }
-
-    wxString title = m_browser->GetCurrentTitle();
-
-    if( title.empty() )
-        title = "(untitled)";
-
-    item = m_tools_history_menu->AppendRadioItem( wxID_ANY, title );
-    item->Check();
-
-    // No need to connect the current item
-    m_histMenuItems[item->GetId()] =
-        wxSharedPtr<wxWebViewHistoryItem>( new wxWebViewHistoryItem( m_browser->GetCurrentURL(),
-                        m_browser->GetCurrentTitle() ) );
-
-    for( i = 0; i < forward.size(); i++ )
-    {
-        item = m_tools_history_menu->AppendRadioItem( wxID_ANY, forward[i]->GetTitle() );
-        m_histMenuItems[item->GetId()] = forward[i];
-        Connect( item->GetId(), wxEVT_TOOL,
-                wxCommandEventHandler( WEB_NAVIGATOR::OnHistory ), NULL, this );
-    }
-
-    wxPoint position = ScreenToClient( wxGetMousePosition() );
-    PopupMenu( m_tools_menu, position.x, position.y );
-}
-
-
-/**
- * Invoked when user selects the zoom size in the menu
- */
-void WEB_NAVIGATOR::OnSetZoom( wxCommandEvent& evt )
-{
-    if( evt.GetId() == m_tools_tiny->GetId() )
-        m_browser->SetZoom( wxWEBVIEW_ZOOM_TINY );
-    else if( evt.GetId() == m_tools_small->GetId() )
-        m_browser->SetZoom( wxWEBVIEW_ZOOM_SMALL );
-    else if( evt.GetId() == m_tools_medium->GetId() )
-        m_browser->SetZoom( wxWEBVIEW_ZOOM_MEDIUM );
-    else if( evt.GetId() == m_tools_large->GetId() )
-        m_browser->SetZoom( wxWEBVIEW_ZOOM_LARGE );
-    else if( evt.GetId() == m_tools_largest->GetId() )
-        m_browser->SetZoom( wxWEBVIEW_ZOOM_LARGEST );
-    else
-        wxFAIL;
-}
-
-
-void WEB_NAVIGATOR::OnZoomLayout( wxCommandEvent& WXUNUSED( evt ) )
-{
-    if( m_tools_layout->IsChecked() )
-        m_browser->SetZoomType( wxWEBVIEW_ZOOM_TYPE_LAYOUT );
-    else
-        m_browser->SetZoomType( wxWEBVIEW_ZOOM_TYPE_TEXT );
-}
-
-
-/**
- * Callback invoked when a loading error occurs
- */
-void WEB_NAVIGATOR::OnError( wxWebViewEvent& evt )
-{
-#define WX_ERROR_CASE( type ) case type: \
-    category = # type; break;
-
-    wxString category;
-
-    switch( evt.GetInt() )
-    {
-        WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_CONNECTION );
-        WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_CERTIFICATE );
-        WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_AUTH );
-        WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_SECURITY );
-        WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_NOT_FOUND );
-        WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_REQUEST );
-        WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_USER_CANCELLED );
-        WX_ERROR_CASE( wxWEBVIEW_NAV_ERR_OTHER );
-    }
-
-    // Show the info bar with an error
-    wxString msg;
-    msg.Printf( _( "An error occurred loading %s\n'%s'" ), evt.GetURL().GetData(),
-            category.GetData() );
-    m_info->ShowMessage( msg, wxICON_ERROR );
-
-    UpdateState();
-}
-
-
-SourceViewDialog::SourceViewDialog( wxWindow* parent, wxString source ) :
-    wxDialog( parent, wxID_ANY, "Source Code",
-            wxDefaultPosition, wxSize( 700, 500 ),
-            wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER )
-{
-    wxStyledTextCtrl* text = new wxStyledTextCtrl( this, wxID_ANY );
-
-    text->SetMarginWidth( 1, 30 );
-    text->SetMarginType( 1, wxSTC_MARGIN_NUMBER );
-    text->SetText( source );
-
-    text->StyleClearAll();
-    text->SetLexer( wxSTC_LEX_HTML );
-    text->StyleSetForeground( wxSTC_H_DOUBLESTRING, wxColour( 255, 0, 0 ) );
-    text->StyleSetForeground( wxSTC_H_SINGLESTRING, wxColour( 255, 0, 0 ) );
-    text->StyleSetForeground( wxSTC_H_ENTITY, wxColour( 255, 0, 0 ) );
-    text->StyleSetForeground( wxSTC_H_TAG, wxColour( 0, 150, 0 ) );
-    text->StyleSetForeground( wxSTC_H_TAGUNKNOWN, wxColour( 0, 150, 0 ) );
-    text->StyleSetForeground( wxSTC_H_ATTRIBUTE, wxColour( 0, 0, 150 ) );
-    text->StyleSetForeground( wxSTC_H_ATTRIBUTEUNKNOWN, wxColour( 0, 0, 150 ) );
-    text->StyleSetForeground( wxSTC_H_COMMENT, wxColour( 150, 150, 150 ) );
-
-    wxBoxSizer* sizer = new wxBoxSizer( wxVERTICAL );
-    sizer->Add( text, 1, wxEXPAND );
-    SetSizer( sizer );
-}

Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References