diff --git a/common/dialogs/wx_html_report_panel_base.cpp b/common/dialogs/wx_html_report_panel_base.cpp
index 6da1064d55..07ebff4a89 100644
--- a/common/dialogs/wx_html_report_panel_base.cpp
+++ b/common/dialogs/wx_html_report_panel_base.cpp
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Dec 21 2016)
+// C++ code generated with wxFormBuilder (version Jul 2 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -59,7 +59,7 @@ WX_HTML_REPORT_PANEL_BASE::WX_HTML_REPORT_PANEL_BASE( wxWindow* parent, wxWindow
fgSizer3->Add( m_checkBoxShowActions, 0, wxTOP|wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 5 );
- m_btnSaveReportToFile = new wxButton( m_box->GetStaticBox(), wxID_ANY, _("Save Output"), wxDefaultPosition, wxDefaultSize, 0 );
+ m_btnSaveReportToFile = new wxButton( m_box->GetStaticBox(), wxID_ANY, _("Save Report File"), wxDefaultPosition, wxDefaultSize, 0 );
fgSizer3->Add( m_btnSaveReportToFile, 0, wxALIGN_CENTER_VERTICAL|wxALIGN_RIGHT|wxTOP|wxLEFT, 5 );
diff --git a/common/dialogs/wx_html_report_panel_base.fbp b/common/dialogs/wx_html_report_panel_base.fbp
index dd50bd85b8..71ab1edd79 100644
--- a/common/dialogs/wx_html_report_panel_base.fbp
+++ b/common/dialogs/wx_html_report_panel_base.fbp
@@ -759,7 +759,7 @@
0
0
wxID_ANY
- Save Output
+ Save Report File
0
-1,-1
diff --git a/common/dialogs/wx_html_report_panel_base.h b/common/dialogs/wx_html_report_panel_base.h
index b142655201..4ebf8afa67 100644
--- a/common/dialogs/wx_html_report_panel_base.h
+++ b/common/dialogs/wx_html_report_panel_base.h
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Dec 21 2016)
+// C++ code generated with wxFormBuilder (version Jul 2 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
diff --git a/pcbnew/dialogs/dialog_exchange_modules.cpp b/pcbnew/dialogs/dialog_exchange_modules.cpp
index b82a3ccd97..8c51dcf900 100644
--- a/pcbnew/dialogs/dialog_exchange_modules.cpp
+++ b/pcbnew/dialogs/dialog_exchange_modules.cpp
@@ -36,6 +36,8 @@
#include
#include
#include
+#include
+//#include
#include
#include
@@ -102,6 +104,9 @@ void DIALOG_EXCHANGE_MODULE::OnOkClick( wxCommandEvent& event )
m_selectionMode = m_Selection->GetSelection();
bool result = false;
+ m_MessageWindow->Clear();
+ m_MessageWindow->Flush();
+
switch( m_Selection->GetSelection() )
{
case 0:
@@ -156,25 +161,26 @@ void DIALOG_EXCHANGE_MODULE::OnSelectionClicked( wxCommandEvent& event )
void DIALOG_EXCHANGE_MODULE::RebuildCmpList( wxCommandEvent& event )
{
- wxFileName fn;
wxString msg;
+ REPORTER& reporter = m_MessageWindow->Reporter();
+ m_MessageWindow->Clear();
+ m_MessageWindow->Flush();
// Build the .cmp file name from the board name
- fn = m_parent->GetBoard()->GetFileName();
+ wxFileName fn = m_parent->GetBoard()->GetFileName();
fn.SetExt( ComponentFileExtension );
if( RecreateCmpFile( m_parent->GetBoard(), fn.GetFullPath() ) )
{
- msg.Printf( _( "File '%s' created\n" ),
- GetChars( fn.GetFullPath() ) );
+ msg.Printf( _( "File '%s' created\n" ), GetChars( fn.GetFullPath() ) );
+ reporter.Report( msg, REPORTER::RPT_INFO );
}
else
{
msg.Printf( _( "** Could not create file '%s' ***\n" ),
GetChars( fn.GetFullPath() ) );
+ reporter.Report( msg, REPORTER::RPT_ERROR );
}
-
- m_WinMessages->AppendText( msg );
}
@@ -298,28 +304,29 @@ bool DIALOG_EXCHANGE_MODULE::change_1_Module( MODULE* aModule,
bool aShowError )
{
MODULE* newModule;
- wxString line;
+ wxString msg;
if( aModule == NULL )
return false;
wxBusyCursor dummy;
+ REPORTER& reporter = m_MessageWindow->Reporter();
- // Copy parameters from the old module.
+ // Copy parameters from the old footprint.
LIB_ID oldFootprintFPID = aModule->GetFPID();
// Load module.
- line.Printf( _( "Change footprint '%s' (from '%s') to '%s'" ),
+ msg.Printf( _( "Change footprint '%s' (from '%s') to '%s'" ),
GetChars( aModule->GetReference() ),
oldFootprintFPID.Format().c_str(),
aNewFootprintFPID.Format().c_str() );
- m_WinMessages->AppendText( line );
newModule = m_parent->LoadFootprint( aNewFootprintFPID );
- if( newModule == NULL ) // New module not found, redraw the old one.
+ if( newModule == NULL ) // New module not found.
{
- m_WinMessages->AppendText( wxT( ": footprint not found\n" ) );
+ msg << ": " << _( "footprint not found" );
+ reporter.Report( msg, REPORTER::RPT_ERROR );
return false;
}
@@ -328,7 +335,8 @@ bool DIALOG_EXCHANGE_MODULE::change_1_Module( MODULE* aModule,
if( aModule == m_currentModule )
m_currentModule = newModule;
- m_WinMessages->AppendText( wxT( ": OK\n" ) );
+ msg += ": OK";
+ reporter.Report( msg, REPORTER::RPT_ACTION );
return true;
}
diff --git a/pcbnew/dialogs/dialog_exchange_modules_base.cpp b/pcbnew/dialogs/dialog_exchange_modules_base.cpp
index c20ff83fdd..f6380ab240 100644
--- a/pcbnew/dialogs/dialog_exchange_modules_base.cpp
+++ b/pcbnew/dialogs/dialog_exchange_modules_base.cpp
@@ -1,10 +1,12 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jun 17 2015)
+// C++ code generated with wxFormBuilder (version Aug 4 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
///////////////////////////////////////////////////////////////////////////
+#include "wx_html_report_panel.h"
+
#include "dialog_exchange_modules_base.h"
///////////////////////////////////////////////////////////////////////////
@@ -27,7 +29,6 @@ DIALOG_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWi
bLeftSizer->Add( m_staticTextCmpVal, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_CmpValue = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
- m_CmpValue->SetMaxLength( 0 );
bLeftSizer->Add( m_CmpValue, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
m_staticTexCmpRef = new wxStaticText( this, wxID_ANY, _("Component reference"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -75,7 +76,6 @@ DIALOG_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWi
bMainSizer->Add( m_staticTextCurrFPID, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_CurrentFootprintFPID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_READONLY );
- m_CurrentFootprintFPID->SetMaxLength( 0 );
bMainSizer->Add( m_CurrentFootprintFPID, 0, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
m_staticTextNewFPID = new wxStaticText( this, wxID_ANY, _("New footprint name (FPID)"), wxDefaultPosition, wxDefaultSize, 0 );
@@ -83,17 +83,12 @@ DIALOG_EXCHANGE_MODULE_BASE::DIALOG_EXCHANGE_MODULE_BASE( wxWindow* parent, wxWi
bMainSizer->Add( m_staticTextNewFPID, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
m_NewFootprintFPID = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, 0 );
- m_NewFootprintFPID->SetMaxLength( 0 );
bMainSizer->Add( m_NewFootprintFPID, 0, wxBOTTOM|wxRIGHT|wxLEFT|wxEXPAND, 5 );
- m_staticTextMsg = new wxStaticText( this, wxID_ANY, _("Messages:"), wxDefaultPosition, wxDefaultSize, 0 );
- m_staticTextMsg->Wrap( -1 );
- bMainSizer->Add( m_staticTextMsg, 0, wxTOP|wxRIGHT|wxLEFT, 5 );
+ m_MessageWindow = new WX_HTML_REPORT_PANEL( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
+ m_MessageWindow->SetMinSize( wxSize( 300,300 ) );
- m_WinMessages = new wxTextCtrl( this, wxID_ANY, wxEmptyString, wxDefaultPosition, wxDefaultSize, wxTE_MULTILINE|wxTE_READONLY );
- m_WinMessages->SetMinSize( wxSize( -1,150 ) );
-
- bMainSizer->Add( m_WinMessages, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
+ bMainSizer->Add( m_MessageWindow, 1, wxEXPAND | wxALL, 5 );
m_staticline1 = new wxStaticLine( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLI_HORIZONTAL );
bMainSizer->Add( m_staticline1, 0, wxEXPAND | wxALL, 5 );
diff --git a/pcbnew/dialogs/dialog_exchange_modules_base.fbp b/pcbnew/dialogs/dialog_exchange_modules_base.fbp
index a624bd592b..e5ce533943 100644
--- a/pcbnew/dialogs/dialog_exchange_modules_base.fbp
+++ b/pcbnew/dialogs/dialog_exchange_modules_base.fbp
@@ -403,7 +403,7 @@
0
-
+ 0
0
@@ -1189,92 +1189,9 @@
-
- 5
- wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT
+ wxEXPAND | wxALL
1
-
+
1
1
1
@@ -1305,12 +1222,11 @@
0
-
0
- -1,150
+ 300,300
1
- m_WinMessages
+ m_MessageWindow
1
@@ -1320,18 +1236,12 @@
Resizable
1
- wxTE_MULTILINE|wxTE_READONLY
-
+ WX_HTML_REPORT_PANEL; wx_html_report_panel.h
0
-
- wxFILTER_NONE
- wxDefaultValidator
-
-
-
+ wxTAB_TRAVERSAL
@@ -1354,10 +1264,6 @@
-
-
-
-
diff --git a/pcbnew/dialogs/dialog_exchange_modules_base.h b/pcbnew/dialogs/dialog_exchange_modules_base.h
index ee1075e88c..907463f037 100644
--- a/pcbnew/dialogs/dialog_exchange_modules_base.h
+++ b/pcbnew/dialogs/dialog_exchange_modules_base.h
@@ -1,5 +1,5 @@
///////////////////////////////////////////////////////////////////////////
-// C++ code generated with wxFormBuilder (version Jun 17 2015)
+// C++ code generated with wxFormBuilder (version Aug 4 2017)
// http://www.wxformbuilder.org/
//
// PLEASE DO "NOT" EDIT THIS FILE!
@@ -12,6 +12,7 @@
#include
#include
class DIALOG_SHIM;
+class WX_HTML_REPORT_PANEL;
#include "dialog_shim.h"
#include
@@ -24,6 +25,7 @@ class DIALOG_SHIM;
#include
#include
#include
+#include
#include
#include
@@ -51,8 +53,7 @@ class DIALOG_EXCHANGE_MODULE_BASE : public DIALOG_SHIM
wxTextCtrl* m_CurrentFootprintFPID;
wxStaticText* m_staticTextNewFPID;
wxTextCtrl* m_NewFootprintFPID;
- wxStaticText* m_staticTextMsg;
- wxTextCtrl* m_WinMessages;
+ WX_HTML_REPORT_PANEL* m_MessageWindow;
wxStaticLine* m_staticline1;
wxButton* m_Applybutton;
wxButton* m_Quitbutton;