Improvements to pcbnew action plugins settings panel
1. Add open plugins directory button (same as in tools menu) 2. Add show plugin errors button to help debug issues
This commit is contained in:
parent
74aa081b8a
commit
07d4a28024
|
@ -106,6 +106,7 @@ set( BMAPS_SMALL
|
|||
small_refresh
|
||||
small_trash
|
||||
small_up
|
||||
small_warning
|
||||
tree_nosel
|
||||
tree_sel
|
||||
triangle_down
|
||||
|
@ -603,7 +604,7 @@ function( svg2png inputFile outFile pngWidth pngHeight )
|
|||
add_custom_command(
|
||||
OUTPUT ${outFile}
|
||||
# this Inkscape command line is for old Inkscape version < 1.0
|
||||
# COMMAND ${Inkscape_EXECUTABLE} --without-gui --export-area-snap -f ${inputFile} --export-png ${outFile}
|
||||
# COMMAND ${Inkscape_EXECUTABLE} --without-gui --export-area-snap -f ${inputFile} --export-png ${outFile} -w ${pngWidth} -h ${pngHeight} > ${logfile}
|
||||
|
||||
# this Inkscape command line is for Inkscape >= 1.0
|
||||
COMMAND ${Inkscape_EXECUTABLE} --export-area-snap --export-type="png" ${inputFile} --export-filename ${outFile}
|
||||
|
|
|
@ -0,0 +1,38 @@
|
|||
|
||||
/* Do not modify this file, it was automatically generated by the
|
||||
* PNG2cpp CMake script, using a *.png file as input.
|
||||
*/
|
||||
|
||||
#include <bitmaps_png/bitmaps_list.h>
|
||||
|
||||
static const unsigned char png[] = {
|
||||
0x89, 0x50, 0x4e, 0x47, 0x0d, 0x0a, 0x1a, 0x0a, 0x00, 0x00, 0x00, 0x0d, 0x49, 0x48, 0x44, 0x52,
|
||||
0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x10, 0x08, 0x06, 0x00, 0x00, 0x00, 0x1f, 0xf3, 0xff,
|
||||
0x61, 0x00, 0x00, 0x01, 0x49, 0x49, 0x44, 0x41, 0x54, 0x38, 0xcb, 0xb5, 0x93, 0xbd, 0x4a, 0xc4,
|
||||
0x40, 0x14, 0x85, 0x03, 0x82, 0x36, 0x2a, 0x5a, 0x58, 0x6b, 0x91, 0xcc, 0x18, 0x54, 0x14, 0xb4,
|
||||
0x14, 0x2c, 0x44, 0xb0, 0x13, 0xf4, 0x11, 0xac, 0x7c, 0x01, 0xdf, 0xc0, 0xc6, 0xc6, 0x4e, 0x2c,
|
||||
0xac, 0x2d, 0xac, 0xec, 0xec, 0x65, 0x0b, 0x75, 0x26, 0xb3, 0xb2, 0x92, 0x42, 0xf6, 0x01, 0x74,
|
||||
0x8d, 0x90, 0x25, 0xd9, 0x3b, 0x13, 0x15, 0xbc, 0x4e, 0xfe, 0x96, 0xcd, 0xee, 0x46, 0x77, 0x05,
|
||||
0x03, 0x07, 0x02, 0xf7, 0x9c, 0x6f, 0xe6, 0x90, 0x1b, 0xc3, 0xf8, 0xaf, 0x47, 0xdd, 0x9b, 0x1b,
|
||||
0x92, 0x93, 0x17, 0xad, 0x1b, 0xbf, 0x3a, 0x37, 0x35, 0x54, 0x18, 0xdd, 0x85, 0x51, 0x1d, 0xac,
|
||||
0x4b, 0x77, 0x0f, 0xa1, 0xb6, 0x8d, 0x92, 0x59, 0x27, 0x43, 0x01, 0x24, 0xa3, 0x87, 0x52, 0xac,
|
||||
0x20, 0xb4, 0x02, 0x04, 0xff, 0x09, 0x35, 0xec, 0x23, 0xba, 0x9b, 0x27, 0x03, 0x85, 0x43, 0x61,
|
||||
0xce, 0x28, 0x4e, 0x9a, 0xb2, 0xba, 0x86, 0x00, 0x80, 0x10, 0x3c, 0xc7, 0x80, 0x58, 0x57, 0x83,
|
||||
0x75, 0xe7, 0xd6, 0x69, 0x12, 0x10, 0xab, 0x29, 0x20, 0x6c, 0xe4, 0x00, 0x8c, 0x98, 0xb5, 0xf5,
|
||||
0x63, 0xf8, 0xdd, 0xb1, 0x6c, 0x6d, 0xfc, 0x8c, 0xcd, 0x10, 0x57, 0x48, 0x00, 0x5e, 0x1b, 0xa0,
|
||||
0xf5, 0x80, 0x97, 0xc6, 0x48, 0xf9, 0xe9, 0x8c, 0x5c, 0xb7, 0xcd, 0x62, 0x39, 0x03, 0xbc, 0x75,
|
||||
0x02, 0x50, 0x31, 0xba, 0xdf, 0x3f, 0x2c, 0xc8, 0x66, 0xa7, 0x51, 0x3a, 0x8b, 0x29, 0xa0, 0xe5,
|
||||
0x17, 0x00, 0x5a, 0x0d, 0xbc, 0x35, 0x27, 0x8b, 0x9f, 0x4d, 0x5f, 0x4b, 0x77, 0x7f, 0x2c, 0x02,
|
||||
0xec, 0x0c, 0x10, 0x74, 0x03, 0x10, 0x18, 0x39, 0x2a, 0x00, 0x80, 0xd3, 0x83, 0x6e, 0x93, 0xe4,
|
||||
0x34, 0xed, 0x1f, 0xbe, 0x62, 0xef, 0x8c, 0x28, 0x25, 0xec, 0xd9, 0xf4, 0xf4, 0x0a, 0x9d, 0xc8,
|
||||
0x36, 0xae, 0xd7, 0xa8, 0x17, 0x49, 0xba, 0xbb, 0xd8, 0x77, 0xc6, 0xc9, 0x45, 0xbe, 0x34, 0xc7,
|
||||
0x25, 0x06, 0x04, 0xaf, 0x92, 0xa8, 0x64, 0xfe, 0xa5, 0xf7, 0x65, 0xdd, 0xd0, 0x2f, 0xde, 0x1f,
|
||||
0x01, 0xa8, 0x1c, 0x7a, 0xa6, 0xfb, 0x93, 0xf3, 0x32, 0xc3, 0x2f, 0x8a, 0x80, 0xd1, 0x9d, 0xfc,
|
||||
0xe7, 0x19, 0x6f, 0xd6, 0x96, 0xa6, 0x87, 0x11, 0xd6, 0xcd, 0xb1, 0x38, 0xfb, 0x0d, 0xe0, 0xc8,
|
||||
0xd4, 0x7c, 0x8b, 0xdd, 0x33, 0x7a, 0x00, 0x00, 0x00, 0x00, 0x49, 0x45, 0x4e, 0x44, 0xae, 0x42,
|
||||
0x60, 0x82,
|
||||
};
|
||||
|
||||
const BITMAP_OPAQUE small_warning_xpm[1] = {{ png, sizeof( png ), "small_warning_xpm" }};
|
||||
|
||||
//EOF
|
|
@ -478,6 +478,7 @@ EXTERN_BITMAP( small_plus_xpm )
|
|||
EXTERN_BITMAP( small_refresh_xpm )
|
||||
EXTERN_BITMAP( small_trash_xpm )
|
||||
EXTERN_BITMAP( small_up_xpm )
|
||||
EXTERN_BITMAP( small_warning_xpm )
|
||||
EXTERN_BITMAP( special_tools_xpm )
|
||||
EXTERN_BITMAP( spreadsheet_xpm )
|
||||
EXTERN_BITMAP( stroke_dash_xpm )
|
||||
|
|
|
@ -0,0 +1,103 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<svg
|
||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||
xmlns:cc="http://creativecommons.org/ns#"
|
||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
||||
xmlns:svg="http://www.w3.org/2000/svg"
|
||||
xmlns="http://www.w3.org/2000/svg"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
id="Слой_1"
|
||||
data-name="Слой 1"
|
||||
viewBox="0 0 16 16"
|
||||
version="1.1"
|
||||
sodipodi:docname="small_warning.svg"
|
||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)"
|
||||
width="16"
|
||||
height="16">
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="1609"
|
||||
inkscape:window-height="1286"
|
||||
id="namedview30"
|
||||
showgrid="true"
|
||||
inkscape:zoom="29.1875"
|
||||
inkscape:cx="10.051646"
|
||||
inkscape:cy="11.41049"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="37"
|
||||
inkscape:window-maximized="0"
|
||||
inkscape:document-rotation="0"
|
||||
inkscape:current-layer="Слой_1">
|
||||
<inkscape:grid
|
||||
type="xygrid"
|
||||
id="grid_kicad"
|
||||
spacingx="0.5"
|
||||
spacingy="0.5"
|
||||
color="#9999ff"
|
||||
opacity="0.13"
|
||||
empspacing="2" />
|
||||
</sodipodi:namedview>
|
||||
<metadata
|
||||
id="metadata43">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
<cc:license
|
||||
rdf:resource="http://creativecommons.org/licenses/by-sa/4.0/" />
|
||||
<dc:format>image/svg+xml</dc:format>
|
||||
<dc:type
|
||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
||||
<dc:title>dialog_warning</dc:title>
|
||||
</cc:Work>
|
||||
<cc:License
|
||||
rdf:about="http://creativecommons.org/licenses/by-sa/4.0/">
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Reproduction" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#Distribution" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Notice" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#Attribution" />
|
||||
<cc:permits
|
||||
rdf:resource="http://creativecommons.org/ns#DerivativeWorks" />
|
||||
<cc:requires
|
||||
rdf:resource="http://creativecommons.org/ns#ShareAlike" />
|
||||
</cc:License>
|
||||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs1003">
|
||||
<style
|
||||
id="style1001">.cls-1{fill:#bf2641;}.cls-2{fill:none;stroke:#f5f5f5;stroke-linecap:round;stroke-linejoin:round;stroke-width:2px;}</style>
|
||||
</defs>
|
||||
<title
|
||||
id="title1005">dialog_warning</title>
|
||||
<path
|
||||
class="cls-1"
|
||||
d="M 15.5,13 9.1288263,1.7394599 A 1.4910507,1.4615622 0 0 0 6.535865,1.7406123 L 0.17866845,13.001216 A 1.4415428,1.4130334 0 0 0 1.4756063,15.08501 H 14.203715 A 1.4416081,1.4130974 0 0 0 15.5,13 Z"
|
||||
id="path1007"
|
||||
style="fill:#f6cc26;fill-opacity:1;stroke-width:0.646648" />
|
||||
<line
|
||||
class="cls-2"
|
||||
x1="8"
|
||||
y1="13"
|
||||
x2="8.0016918"
|
||||
y2="13"
|
||||
id="line1009" />
|
||||
<line
|
||||
class="cls-2"
|
||||
x1="7.9165001"
|
||||
y1="3.6161013"
|
||||
x2="7.9950166"
|
||||
y2="10.399599"
|
||||
id="line1011" />
|
||||
</svg>
|
After Width: | Height: | Size: 3.2 KiB |
|
@ -186,28 +186,6 @@ void DIALOG_FOOTPRINT_WIZARD_LIST::onShowTrace( wxCommandEvent& event )
|
|||
wxString trace;
|
||||
pcbnewGetWizardsBackTrace( trace );
|
||||
|
||||
// Filter message before displaying them
|
||||
// a trace starts by "Traceback" and is followed by 2 useless lines
|
||||
// for our purpose
|
||||
wxArrayString traces;
|
||||
wxStringSplit( trace, traces, '\n' );
|
||||
|
||||
// Build the filtered message (remove useless lines)
|
||||
trace.Clear();
|
||||
|
||||
for( unsigned ii = 0; ii < traces.Count(); ++ii )
|
||||
{
|
||||
if( traces[ii].Contains( "Traceback" ) )
|
||||
{
|
||||
ii += 2; // Skip this line and next lines which are related to pcbnew.py module
|
||||
|
||||
if( !trace.IsEmpty() ) // Add separator for the next trace block
|
||||
trace << "\n**********************************\n";
|
||||
}
|
||||
else
|
||||
trace += traces[ii] + "\n";
|
||||
}
|
||||
|
||||
// Now display the filtered trace in our dialog
|
||||
// (a simple wxMessageBox is really not suitable for long messages)
|
||||
DIALOG_FOOTPRINT_WIZARD_LOG logWindow( this );
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#include <pcb_edit_frame.h>
|
||||
#include <pcbnew_settings.h>
|
||||
#include <panel_pcbnew_action_plugins.h>
|
||||
#include <dialog_footprint_wizard_list.h>
|
||||
#include <widgets/paged_dialog.h>
|
||||
#include <widgets/grid_icon_text_helpers.h>
|
||||
#include <bitmaps.h>
|
||||
|
@ -29,6 +30,13 @@
|
|||
#include <grid_tricks.h>
|
||||
#include <widgets/wx_grid.h>
|
||||
|
||||
#if defined( KICAD_SCRIPTING ) || defined( KICAD_SCRIPTING_WXPYTHON )
|
||||
#include <python_scripting.h>
|
||||
#else
|
||||
// Dummy functions, actually defined in python_scripting.h when KICAD_SCRIPTING is enabled
|
||||
static void pcbnewGetWizardsBackTrace( wxString& aText ) {}
|
||||
#endif
|
||||
|
||||
#define GRID_CELL_MARGIN 4
|
||||
|
||||
PANEL_PCBNEW_ACTION_PLUGINS::PANEL_PCBNEW_ACTION_PLUGINS( PCB_EDIT_FRAME* aFrame,
|
||||
|
@ -41,7 +49,9 @@ PANEL_PCBNEW_ACTION_PLUGINS::PANEL_PCBNEW_ACTION_PLUGINS( PCB_EDIT_FRAME* aFrame
|
|||
|
||||
m_moveUpButton->SetBitmap( KiBitmap( small_up_xpm ) );
|
||||
m_moveDownButton->SetBitmap( KiBitmap( small_down_xpm ) );
|
||||
m_openDirectoryButton->SetBitmap( KiBitmap( small_folder_xpm ) );
|
||||
m_reloadButton->SetBitmap( KiBitmap( small_refresh_xpm ) );
|
||||
m_showErrorsButton->SetBitmap( KiBitmap( small_warning_xpm ) );
|
||||
}
|
||||
|
||||
|
||||
|
@ -207,5 +217,36 @@ bool PANEL_PCBNEW_ACTION_PLUGINS::TransferDataToWindow()
|
|||
|
||||
m_grid->Thaw();
|
||||
|
||||
// Show errors button should be disabled if there are no errors.
|
||||
wxString trace;
|
||||
pcbnewGetWizardsBackTrace( trace );
|
||||
if( trace.empty() )
|
||||
{
|
||||
m_showErrorsButton->Disable();
|
||||
m_showErrorsButton->Hide();
|
||||
}
|
||||
else
|
||||
{
|
||||
m_showErrorsButton->Enable();
|
||||
m_showErrorsButton->Show();
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void PANEL_PCBNEW_ACTION_PLUGINS::OnOpenDirectoryButtonClick( wxCommandEvent& event )
|
||||
{
|
||||
m_frame->PythonPluginsShowFolder();
|
||||
}
|
||||
|
||||
void PANEL_PCBNEW_ACTION_PLUGINS::OnShowErrorsButtonClick( wxCommandEvent& event )
|
||||
{
|
||||
wxString trace;
|
||||
pcbnewGetWizardsBackTrace( trace );
|
||||
|
||||
// Now display the filtered trace in our dialog
|
||||
// (a simple wxMessageBox is really not suitable for long messages)
|
||||
DIALOG_FOOTPRINT_WIZARD_LOG logWindow( this );
|
||||
logWindow.m_Message->SetValue( trace );
|
||||
logWindow.ShowModal();
|
||||
}
|
||||
|
|
|
@ -44,11 +44,21 @@ public:
|
|||
*/
|
||||
void OnMoveDownButtonClick( wxCommandEvent& event ) override;
|
||||
|
||||
/**
|
||||
* Opens user's action plugin directory
|
||||
*/
|
||||
void OnOpenDirectoryButtonClick( wxCommandEvent& event ) override;
|
||||
|
||||
/**
|
||||
* Reloads plugins and updates grid
|
||||
*/
|
||||
void OnReloadButtonClick( wxCommandEvent& event ) override;
|
||||
|
||||
/**
|
||||
* Shows plugin import errors
|
||||
*/
|
||||
void OnShowErrorsButtonClick( wxCommandEvent& event ) override;
|
||||
|
||||
private:
|
||||
|
||||
enum GRID_COLUMNS
|
||||
|
|
|
@ -59,16 +59,32 @@ PANEL_PCBNEW_ACTION_PLUGINS_BASE::PANEL_PCBNEW_ACTION_PLUGINS_BASE( wxWindow* pa
|
|||
bButtonsSizer = new wxBoxSizer( wxHORIZONTAL );
|
||||
|
||||
m_moveUpButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
m_moveUpButton->SetToolTip( _("Move Up") );
|
||||
|
||||
bButtonsSizer->Add( m_moveUpButton, 0, wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_moveDownButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
m_moveDownButton->SetToolTip( _("Move Down") );
|
||||
|
||||
bButtonsSizer->Add( m_moveDownButton, 0, wxRIGHT, 5 );
|
||||
|
||||
|
||||
bButtonsSizer->Add( 20, 0, 0, wxEXPAND, 5 );
|
||||
|
||||
m_openDirectoryButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
m_openDirectoryButton->SetToolTip( _("Open Plugin Directory") );
|
||||
|
||||
bButtonsSizer->Add( m_openDirectoryButton, 0, wxLEFT|wxRIGHT, 5 );
|
||||
|
||||
m_reloadButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
bButtonsSizer->Add( m_reloadButton, 0, wxLEFT|wxRIGHT, 5 );
|
||||
m_reloadButton->SetToolTip( _("Reload Plugins") );
|
||||
|
||||
bButtonsSizer->Add( m_reloadButton, 0, wxRIGHT, 5 );
|
||||
|
||||
m_showErrorsButton = new wxBitmapButton( this, wxID_ANY, wxNullBitmap, wxDefaultPosition, wxDefaultSize, wxBU_AUTODRAW|0 );
|
||||
m_showErrorsButton->SetToolTip( _("Show Plugin Errors") );
|
||||
|
||||
bButtonsSizer->Add( m_showErrorsButton, 0, wxRIGHT, 5 );
|
||||
|
||||
|
||||
bPanelSizer->Add( bButtonsSizer, 0, wxEXPAND, 0 );
|
||||
|
@ -82,7 +98,9 @@ PANEL_PCBNEW_ACTION_PLUGINS_BASE::PANEL_PCBNEW_ACTION_PLUGINS_BASE( wxWindow* pa
|
|||
m_grid->Connect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ), NULL, this );
|
||||
m_moveUpButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ), NULL, this );
|
||||
m_moveDownButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ), NULL, this );
|
||||
m_openDirectoryButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnOpenDirectoryButtonClick ), NULL, this );
|
||||
m_reloadButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ), NULL, this );
|
||||
m_showErrorsButton->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnShowErrorsButtonClick ), NULL, this );
|
||||
}
|
||||
|
||||
PANEL_PCBNEW_ACTION_PLUGINS_BASE::~PANEL_PCBNEW_ACTION_PLUGINS_BASE()
|
||||
|
@ -91,6 +109,8 @@ PANEL_PCBNEW_ACTION_PLUGINS_BASE::~PANEL_PCBNEW_ACTION_PLUGINS_BASE()
|
|||
m_grid->Disconnect( wxEVT_GRID_CELL_LEFT_CLICK, wxGridEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnGridCellClick ), NULL, this );
|
||||
m_moveUpButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveUpButtonClick ), NULL, this );
|
||||
m_moveDownButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnMoveDownButtonClick ), NULL, this );
|
||||
m_openDirectoryButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnOpenDirectoryButtonClick ), NULL, this );
|
||||
m_reloadButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnReloadButtonClick ), NULL, this );
|
||||
m_showErrorsButton->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( PANEL_PCBNEW_ACTION_PLUGINS_BASE::OnShowErrorsButtonClick ), NULL, this );
|
||||
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="tooltip">Move Up</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
|
@ -298,7 +298,7 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="tooltip">Move Down</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
|
@ -319,10 +319,83 @@
|
|||
<property name="width">20</property>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxLEFT|wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" 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"></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="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></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="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Open Plugin Directory</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">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_openDirectoryButton</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="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Open Plugin Directory</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">OnOpenDirectoryButtonClick</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="0">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" expanded="0">
|
||||
<property name="BottomDockable">1</property>
|
||||
<property name="LeftDockable">1</property>
|
||||
|
@ -381,7 +454,7 @@
|
|||
<property name="style"></property>
|
||||
<property name="subclass">; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip"></property>
|
||||
<property name="tooltip">Reload Plugins</property>
|
||||
<property name="validator_data_type"></property>
|
||||
<property name="validator_style">wxFILTER_NONE</property>
|
||||
<property name="validator_type">wxDefaultValidator</property>
|
||||
|
@ -392,6 +465,79 @@
|
|||
<event name="OnButtonClick">OnReloadButtonClick</event>
|
||||
</object>
|
||||
</object>
|
||||
<object class="sizeritem" expanded="1">
|
||||
<property name="border">5</property>
|
||||
<property name="flag">wxRIGHT</property>
|
||||
<property name="proportion">0</property>
|
||||
<object class="wxBitmapButton" 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"></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="current"></property>
|
||||
<property name="default">0</property>
|
||||
<property name="default_pane">0</property>
|
||||
<property name="disabled"></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="focus"></property>
|
||||
<property name="font"></property>
|
||||
<property name="gripper">0</property>
|
||||
<property name="hidden">0</property>
|
||||
<property name="id">wxID_ANY</property>
|
||||
<property name="label">Show Plugin Errors</property>
|
||||
<property name="margins"></property>
|
||||
<property name="markup">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_showErrorsButton</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="position"></property>
|
||||
<property name="pressed"></property>
|
||||
<property name="resize">Resizable</property>
|
||||
<property name="show">1</property>
|
||||
<property name="size"></property>
|
||||
<property name="style"></property>
|
||||
<property name="subclass">; ; forward_declare</property>
|
||||
<property name="toolbar_pane">0</property>
|
||||
<property name="tooltip">Show Plugin Errors</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">OnShowErrorsButtonClick</event>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
|
|
|
@ -39,13 +39,17 @@ class PANEL_PCBNEW_ACTION_PLUGINS_BASE : public wxPanel
|
|||
WX_GRID* m_grid;
|
||||
wxBitmapButton* m_moveUpButton;
|
||||
wxBitmapButton* m_moveDownButton;
|
||||
wxBitmapButton* m_openDirectoryButton;
|
||||
wxBitmapButton* m_reloadButton;
|
||||
wxBitmapButton* m_showErrorsButton;
|
||||
|
||||
// Virtual event handlers, overide them in your derived class
|
||||
virtual void OnGridCellClick( wxGridEvent& event ) { event.Skip(); }
|
||||
virtual void OnMoveUpButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnMoveDownButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnOpenDirectoryButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnReloadButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
virtual void OnShowErrorsButtonClick( wxCommandEvent& event ) { event.Skip(); }
|
||||
|
||||
|
||||
public:
|
||||
|
|
|
@ -423,8 +423,8 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
|
|||
#endif
|
||||
// Populate the Action Plugin sub-menu: Must be done before Add
|
||||
// Since the object is cloned by Add
|
||||
buildActionPluginMenus( submenuActionPlugins );
|
||||
submenuActionPlugins->AppendSeparator();
|
||||
buildActionPluginMenus( submenuActionPlugins );
|
||||
|
||||
toolsMenu->AppendSeparator();
|
||||
toolsMenu->Add( submenuActionPlugins );
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
#include <eda_base_frame.h>
|
||||
#include <gal/color4d.h>
|
||||
#include <trace_helpers.h>
|
||||
#include <kicad_string.h>
|
||||
|
||||
#include <pgm_base.h>
|
||||
#include <settings/settings_manager.h>
|
||||
|
@ -328,9 +329,31 @@ void pcbnewGetScriptsSearchPaths( wxString& aNames )
|
|||
}
|
||||
|
||||
|
||||
void pcbnewGetWizardsBackTrace( wxString& aNames )
|
||||
void pcbnewGetWizardsBackTrace( wxString& aTrace )
|
||||
{
|
||||
pcbnewRunPythonMethodWithReturnedString( "pcbnew.GetWizardsBackTrace", aNames );
|
||||
pcbnewRunPythonMethodWithReturnedString( "pcbnew.GetWizardsBackTrace", aTrace );
|
||||
|
||||
// Filter message before displaying them
|
||||
// a trace starts by "Traceback" and is followed by 2 useless lines
|
||||
// for our purpose
|
||||
wxArrayString traces;
|
||||
wxStringSplit( aTrace, traces, '\n' );
|
||||
|
||||
// Build the filtered message (remove useless lines)
|
||||
aTrace.Clear();
|
||||
|
||||
for( unsigned ii = 0; ii < traces.Count(); ++ii )
|
||||
{
|
||||
if( traces[ii].Contains( "Traceback" ) )
|
||||
{
|
||||
ii += 2; // Skip this line and next lines which are related to pcbnew.py module
|
||||
|
||||
if( !aTrace.IsEmpty() ) // Add separator for the next trace block
|
||||
aTrace << "\n**********************************\n";
|
||||
}
|
||||
else
|
||||
aTrace += traces[ii] + "\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue