diff --git a/include/pad_shapes.h b/include/pad_shapes.h index 23a491e591..87ac23c2b9 100644 --- a/include/pad_shapes.h +++ b/include/pad_shapes.h @@ -13,33 +13,45 @@ enum PAD_SHAPE_T { PAD_CIRCLE, PAD_ROUND = PAD_CIRCLE, + PAD_SHAPE_CIRCLE = PAD_CIRCLE, PAD_RECT, + PAD_SHAPE_RECT = PAD_RECT, PAD_OVAL, - PAD_TRAPEZOID + PAD_SHAPE_OVAL = PAD_OVAL, + PAD_TRAPEZOID, + PAD_SHAPE_TRAPEZOID = PAD_TRAPEZOID }; /** * Enum PAD_DRILL_SHAPE_T * is the set of pad dtill shapes, used with D_PAD::{Set,Get}DrillShape() + * The double name is for convenience of Python devs */ enum PAD_DRILL_SHAPE_T { PAD_DRILL_CIRCLE, - PAD_DRILL_OBLONG + PAD_DRILL_SHAPE_CIRCLE = PAD_DRILL_CIRCLE, + PAD_DRILL_OBLONG, + PAD_DRILL_SHAPE_OBLONG = PAD_DRILL_OBLONG }; /** * Enum PAD_ATTR_T * is the set of pad shapes, used with D_PAD::{Set,Get}Attribute() + * The double name is for convenience of Python devs */ enum PAD_ATTR_T { PAD_STANDARD, ///< Usual pad + PAD_ATTRIB_STANDARD = PAD_STANDARD, PAD_SMD, ///< Smd pad, appears on the solder paste layer (default) + PAD_ATTRIB_SMD = PAD_SMD, PAD_CONN, ///< Like smd, does not appear on the solder paste layer (default) + PAD_ATTRIB_CONN = PAD_CONN, PAD_HOLE_NOT_PLATED, ///< like PAD_STANDARD, but not plated ///< mechanical use only, no connection allowed + PAD_ATTRIB_HOLE_NOT_PLATED = PAD_HOLE_NOT_PLATED }; diff --git a/kicad/dialogs/dialog_template_selector.cpp b/kicad/dialogs/dialog_template_selector.cpp index 89a942f58d..f36f66d978 100644 --- a/kicad/dialogs/dialog_template_selector.cpp +++ b/kicad/dialogs/dialog_template_selector.cpp @@ -271,3 +271,10 @@ void DIALOG_TEMPLATE_SELECTOR::replaceCurrentPage() m_selectedWidget = NULL; } + + +void DIALOG_TEMPLATE_SELECTOR::OnHtmlLinkActivated( wxHtmlLinkEvent& event ) +{ + wxString url = event.GetLinkInfo().GetHref(); + wxLaunchDefaultBrowser( url); +} diff --git a/kicad/dialogs/dialog_template_selector.fbp b/kicad/dialogs/dialog_template_selector.fbp index a0f7c2efce..4ceefd3b60 100644 --- a/kicad/dialogs/dialog_template_selector.fbp +++ b/kicad/dialogs/dialog_template_selector.fbp @@ -238,7 +238,7 @@ - + OnHtmlLinkActivated diff --git a/kicad/dialogs/dialog_template_selector.h b/kicad/dialogs/dialog_template_selector.h index ae3dc2d3c4..17a7a627bd 100644 --- a/kicad/dialogs/dialog_template_selector.h +++ b/kicad/dialogs/dialog_template_selector.h @@ -122,6 +122,7 @@ private: void OnPageChange( wxNotebookEvent& event ); void onDirectoryBrowseClicked( wxCommandEvent& event ); void onValidatePath( wxCommandEvent& event ); + void OnHtmlLinkActivated( wxHtmlLinkEvent& event ); }; #endif diff --git a/kicad/dialogs/dialog_template_selector_base.cpp b/kicad/dialogs/dialog_template_selector_base.cpp index 0fcec967ec..487e0d3b3e 100644 --- a/kicad/dialogs/dialog_template_selector_base.cpp +++ b/kicad/dialogs/dialog_template_selector_base.cpp @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 5 2014) +// C++ code generated with wxFormBuilder (version Jun 17 2015) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -62,6 +62,7 @@ DIALOG_TEMPLATE_SELECTOR_BASE::DIALOG_TEMPLATE_SELECTOR_BASE( wxWindow* parent, // Connect Events m_notebook->Connect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::OnPageChange ), NULL, this ); + m_htmlWin->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::OnHtmlLinkActivated ), NULL, this ); m_buttonBrowse->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::onDirectoryBrowseClicked ), NULL, this ); m_buttonValidate->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::onValidatePath ), NULL, this ); } @@ -70,6 +71,7 @@ DIALOG_TEMPLATE_SELECTOR_BASE::~DIALOG_TEMPLATE_SELECTOR_BASE() { // Disconnect Events m_notebook->Disconnect( wxEVT_COMMAND_NOTEBOOK_PAGE_CHANGED, wxNotebookEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::OnPageChange ), NULL, this ); + m_htmlWin->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::OnHtmlLinkActivated ), NULL, this ); m_buttonBrowse->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::onDirectoryBrowseClicked ), NULL, this ); m_buttonValidate->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_TEMPLATE_SELECTOR_BASE::onValidatePath ), NULL, this ); diff --git a/kicad/dialogs/dialog_template_selector_base.h b/kicad/dialogs/dialog_template_selector_base.h index 7a5343349b..6bfcbea3a6 100644 --- a/kicad/dialogs/dialog_template_selector_base.h +++ b/kicad/dialogs/dialog_template_selector_base.h @@ -1,5 +1,5 @@ /////////////////////////////////////////////////////////////////////////// -// C++ code generated with wxFormBuilder (version Jun 5 2014) +// C++ code generated with wxFormBuilder (version Jun 17 2015) // http://www.wxformbuilder.org/ // // PLEASE DO "NOT" EDIT THIS FILE! @@ -58,6 +58,7 @@ class DIALOG_TEMPLATE_SELECTOR_BASE : public DIALOG_SHIM // Virtual event handlers, overide them in your derived class virtual void OnPageChange( wxNotebookEvent& event ) { event.Skip(); } + virtual void OnHtmlLinkActivated( wxHtmlLinkEvent& event ) { event.Skip(); } virtual void onDirectoryBrowseClicked( wxCommandEvent& event ) { event.Skip(); } virtual void onValidatePath( wxCommandEvent& event ) { event.Skip(); }