@ -24,7 +24,7 @@
# include <config.h>
// kicad_curl.h must be included before wx headers, to avoid
// conflicts for some defines, at least on Windows
# ifdef BUILD_GITHUB_PLUGIN
@ -53,12 +53,12 @@
# include "dialog_about.h"
///////////////////////////////////////////////////////////////////////////////
/// Class dialog_about methods
///////////////////////////////////////////////////////////////////////////////
/*
* Class dialog_about methods
*/
dialog_about : : dialog_about ( wxWindow * p arent, AboutAppInfo & appInfo )
: dialog_about_base ( p arent) , info ( appInfo )
dialog_about : : dialog_about ( wxWindow * aP arent, AboutAppInfo & appInfo )
: dialog_about_base ( aP arent) , info ( appInfo )
{
picInformation = KiBitmap ( info_xpm ) ;
picDevelopers = KiBitmap ( preference_xpm ) ;
@ -83,7 +83,8 @@ dialog_about::dialog_about(wxWindow *parent, AboutAppInfo& appInfo)
SetFocus ( ) ;
Centre ( ) ;
Connect ( wxID_COPY , wxEVT_COMMAND_BUTTON_CLICKED , wxCommandEventHandler ( dialog_about : : OnCopyVersionInfo ) ) ;
Connect ( wxID_COPY , wxEVT_COMMAND_BUTTON_CLICKED ,
wxCommandEventHandler ( dialog_about : : OnCopyVersionInfo ) ) ;
}
@ -127,12 +128,12 @@ void dialog_about::CreateNotebooks()
CreateNotebookHtmlPage ( m_auiNotebook , _ ( " License " ) , picLicense , info . GetLicense ( ) ) ;
}
void dialog_about : : CreateNotebookPage ( wxAuiNotebook * p arent, const wxString & c aption,
const wxBitmap & i con, const Contributors & c ontributors )
void dialog_about : : CreateNotebookPage ( wxAuiNotebook * aP arent, const wxString & aC aption,
const wxBitmap & aI con, const Contributors & aC ontributors )
{
wxBoxSizer * bSizer = new wxBoxSizer ( wxHORIZONTAL ) ;
wxScrolledWindow * m_scrolledWindow1 = new wxScrolledWindow ( p arent, wxID_ANY ,
wxScrolledWindow * m_scrolledWindow1 = new wxScrolledWindow ( aP arent, wxID_ANY ,
wxDefaultPosition ,
wxDefaultSize ,
wxHSCROLL | wxVSCROLL ) ;
@ -145,9 +146,9 @@ void dialog_about::CreateNotebookPage( wxAuiNotebook* parent, const wxString& ca
wxFlexGridSizer * fgSizer1 = CreateFlexGridSizer ( ) ;
for ( size_t i = 0 ; i < c ontributors. GetCount ( ) ; + + i )
for ( size_t i = 0 ; i < aC ontributors. GetCount ( ) ; + + i )
{
Contributor * contributor = & c ontributors. Item ( i ) ;
Contributor * contributor = & aC ontributors. Item ( i ) ;
// Icon at first column
wxStaticBitmap * m_bitmap1 = CreateStaticBitmap ( m_scrolledWindow1 , contributor - > GetIcon ( ) ) ;
@ -185,17 +186,17 @@ void dialog_about::CreateNotebookPage( wxAuiNotebook* parent, const wxString& ca
m_scrolledWindow1 - > SetSizer ( bSizer ) ;
m_scrolledWindow1 - > Layout ( ) ;
bSizer - > Fit ( m_scrolledWindow1 ) ;
p arent- > AddPage ( m_scrolledWindow1 , c aption, false , i con ) ;
aP arent- > AddPage ( m_scrolledWindow1 , aC aption, false , aI con ) ;
}
void dialog_about : : CreateNotebookPageByCategory ( wxAuiNotebook * p arent, const wxString & c aption,
const wxBitmap & i con,
const Contributors & c ontributors)
void dialog_about : : CreateNotebookPageByCategory ( wxAuiNotebook * aP arent, const wxString & aC aption,
const wxBitmap & aI con,
const Contributors & aC ontributors)
{
wxBoxSizer * bSizer = new wxBoxSizer ( wxHORIZONTAL ) ;
wxScrolledWindow * m_scrolledWindow1 = new wxScrolledWindow ( p arent, wxID_ANY ,
wxScrolledWindow * m_scrolledWindow1 = new wxScrolledWindow ( aP arent, wxID_ANY ,
wxDefaultPosition ,
wxDefaultSize ,
wxHSCROLL | wxVSCROLL ) ;
@ -208,9 +209,9 @@ void dialog_about::CreateNotebookPageByCategory(wxAuiNotebook* parent, const wxS
wxFlexGridSizer * fgSizer1 = CreateFlexGridSizer ( ) ;
for ( size_t i = 0 ; i < c ontributors. GetCount ( ) ; + + i )
for ( size_t i = 0 ; i < aC ontributors . GetCount ( ) ; + + i )
{
Contributor * contributor = & c ontributors. Item ( i ) ;
Contributor * contributor = & aC ontributors. Item ( i ) ;
wxBitmap * icon = contributor - > GetIcon ( ) ;
wxString category = contributor - > GetCategory ( ) ;
@ -237,28 +238,28 @@ void dialog_about::CreateNotebookPageByCategory(wxAuiNotebook* parent, const wxS
fgSizer1 - > AddSpacer ( 5 ) ;
// Now, all contributors of the same category will follow
for ( size_t j = 0 ; j < c ontributors. GetCount ( ) ; + + j )
for ( size_t j = 0 ; j < aC ontributors . GetCount ( ) ; + + j )
{
Contributor * contributor = & c ontributors. Item ( j ) ;
Contributor * sub_ contributor = & aC ontributors. Item ( j ) ;
if ( contributor - > GetCategory ( ) = = category )
if ( sub_ contributor- > GetCategory ( ) = = category )
{
// First column is empty
fgSizer1 - > AddSpacer ( 5 ) ;
// Name of contributor at second column
wxStaticText * m_staticText2 = new wxStaticText ( m_scrolledWindow1 , wxID_ANY ,
wxT ( " • " ) + contributor - > GetName ( ) ,
wxT ( " • " ) + sub_ contributor- > GetName ( ) ,
wxDefaultPosition ,
wxDefaultSize , 0 ) ;
m_staticText1 - > Wrap ( - 1 ) ;
fgSizer1 - > Add ( m_staticText2 , 0 , wxALIGN_LEFT | wxBOTTOM , 2 ) ;
// Email address of contributor at third column
if ( contributor - > GetEMail ( ) ! = wxEmptyString )
if ( sub_ contributor- > GetEMail ( ) ! = wxEmptyString )
{
wxHyperlinkCtrl * hyperlink = CreateHyperlink ( m_scrolledWindow1 ,
contributor - > GetEMail ( ) ) ;
sub_ contributor- > GetEMail ( ) ) ;
fgSizer1 - > Add ( hyperlink , 0 , wxALIGN_LEFT | wxBOTTOM , 2 ) ;
}
else
@ -269,7 +270,7 @@ void dialog_about::CreateNotebookPageByCategory(wxAuiNotebook* parent, const wxS
/* this contributor was added to the GUI,
* thus can be ignored next time
*/
contributor - > SetChecked ( true ) ;
sub_ contributor- > SetChecked ( true ) ;
}
}
}
@ -282,9 +283,9 @@ void dialog_about::CreateNotebookPageByCategory(wxAuiNotebook* parent, const wxS
/* Now, lets list the remaining contributors that have not been considered
* because they were not assigned to any category .
*/
for ( size_t k = 0 ; k < c ontributors. GetCount ( ) ; + + k )
for ( size_t k = 0 ; k < aC ontributors . GetCount ( ) ; + + k )
{
Contributor * contributor = & c ontributors. Item ( k ) ;
Contributor * contributor = & aC ontributors. Item ( k ) ;
if ( contributor - > IsChecked ( ) )
continue ;
@ -325,14 +326,14 @@ void dialog_about::CreateNotebookPageByCategory(wxAuiNotebook* parent, const wxS
m_scrolledWindow1 - > SetSizer ( bSizer ) ;
m_scrolledWindow1 - > Layout ( ) ;
bSizer - > Fit ( m_scrolledWindow1 ) ;
p arent- > AddPage ( m_scrolledWindow1 , c aption, false , i con ) ;
aP arent- > AddPage ( m_scrolledWindow1 , aC aption, false , aI con ) ;
}
void dialog_about : : CreateNotebookHtmlPage ( wxAuiNotebook * p arent, const wxString & c aption,
const wxBitmap & i con, const wxString & html )
void dialog_about : : CreateNotebookHtmlPage ( wxAuiNotebook * aP arent, const wxString & aC aption,
const wxBitmap & aI con, const wxString & html )
{
wxPanel * panel = new wxPanel ( p arent, wxID_ANY , wxDefaultPosition , wxDefaultSize ,
wxPanel * panel = new wxPanel ( aP arent, wxID_ANY , wxDefaultPosition , wxDefaultSize ,
wxTAB_TRAVERSAL ) ;
wxBoxSizer * bSizer = new wxBoxSizer ( wxVERTICAL ) ;
@ -371,14 +372,14 @@ void dialog_about::CreateNotebookHtmlPage( wxAuiNotebook* parent, const wxString
panel - > SetSizer ( bSizer ) ;
panel - > Layout ( ) ;
bSizer - > Fit ( panel ) ;
p arent- > AddPage ( panel , c aption, false , i con ) ;
aP arent- > AddPage ( panel , aC aption, false , aI con ) ;
}
wxHyperlinkCtrl * dialog_about : : CreateHyperlink ( wxScrolledWindow * p arent, const wxString & email )
wxHyperlinkCtrl * dialog_about : : CreateHyperlink ( wxScrolledWindow * aP arent, const wxString & email )
{
wxHyperlinkCtrl * hyperlink = new wxHyperlinkCtrl (
p arent, wxID_ANY ,
aP arent, wxID_ANY ,
wxT ( " < " ) + email + wxT ( " > " ) , /* the label */
wxT ( " mailto: " ) + email
+ wxT ( " ?subject=KiCad - " )
@ -390,14 +391,14 @@ wxHyperlinkCtrl* dialog_about::CreateHyperlink(wxScrolledWindow* parent, const w
}
wxStaticBitmap * dialog_about : : CreateStaticBitmap ( wxScrolledWindow * p arent, wxBitmap * i con)
wxStaticBitmap * dialog_about : : CreateStaticBitmap ( wxScrolledWindow * aP arent, wxBitmap * aI con)
{
wxStaticBitmap * bitmap = new wxStaticBitmap ( p arent, wxID_ANY , wxNullBitmap ,
wxStaticBitmap * bitmap = new wxStaticBitmap ( aP arent, wxID_ANY , wxNullBitmap ,
wxDefaultPosition , wxDefaultSize , 0 ) ;
if ( i con )
if ( aI con )
{
bitmap - > SetBitmap ( * i con ) ;
bitmap - > SetBitmap ( * aI con ) ;
}
else
{