Add identifying info per request

We don't use e-mail addresses for contributors in the about box these
days.  The field is re-purposed as an optional additional field to allow
for disambiguation of contributors, should they request it.
This commit is contained in:
Seth Hillbrand 2021-02-09 17:25:11 -08:00
parent 9ce255dc77
commit 430310bb75
4 changed files with 19 additions and 19 deletions

View File

@ -633,7 +633,7 @@ static void buildKicadAboutBanner( EDA_BASE_FRAME* aParent, ABOUT_APP_INFO& aInf
#define MODELS_3D_CONTRIBUTION _( "3D models by" )
aInfo.AddLibrarian( new CONTRIBUTOR( "Scripts by Maui",
wxEmptyString,
"https://github.com/easyw",
"https://gitlab.com/kicad/libraries/kicad-packages3D-generator",
MODELS_3D_CONTRIBUTION,
aInfo.CreateKiBitmap( three_d_xpm ) ) );

View File

@ -153,7 +153,7 @@ private:
* - Name
*
* Each contributor can have optional information assigned like:
* - EMail address
* - Extra identifying information
* - A category
* - A category specific icon
*/
@ -161,7 +161,7 @@ class CONTRIBUTOR
{
public:
CONTRIBUTOR( const wxString& aName,
const wxString& aEmail = wxEmptyString,
const wxString& aExtra = wxEmptyString,
const wxString& aUrl = wxEmptyString,
const wxString& aCategory = wxEmptyString,
wxBitmap* aIcon = NULL )
@ -169,7 +169,7 @@ public:
m_checked = false;
m_name = aName;
m_url = aUrl,
m_email = aEmail;
m_extra = aExtra;
m_category = aCategory;
m_icon = aIcon;
}
@ -181,7 +181,7 @@ public:
m_checked = false;
m_name = aName;
m_url = wxEmptyString,
m_email = wxEmptyString;
m_extra = wxEmptyString;
m_category = aCategory;
m_icon = aIcon;
}
@ -189,7 +189,7 @@ public:
virtual ~CONTRIBUTOR() {}
wxString& GetName() { return m_name; }
wxString& GetEMail() { return m_email; }
wxString& GetExtra() { return m_extra; }
wxString& GetUrl() { return m_url; }
wxString& GetCategory() { return m_category; }
wxBitmap* GetIcon() { return m_icon; }
@ -198,7 +198,7 @@ public:
private:
wxString m_name;
wxString m_email;
wxString m_extra;
wxString m_url;
wxString m_category;
wxBitmap* m_icon;

View File

@ -184,10 +184,10 @@ void DIALOG_ABOUT::createNotebookPage( wxNotebook* aParent, const wxString& aCap
}
// Email address of contributor at third column
if ( contributor->GetEMail() != wxEmptyString )
if ( contributor->GetExtra() != wxEmptyString )
{
wxStaticText* hyperlink = wxStaticTextMail( m_scrolledWindow1,
contributor->GetEMail() );
wxStaticText* hyperlink = wxStaticTextRef( m_scrolledWindow1,
contributor->GetExtra() );
fgSizer1->Add( hyperlink, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
}
else
@ -307,10 +307,10 @@ void DIALOG_ABOUT::createNotebookPageByCategory( wxNotebook* aParent, const wxSt
fgSizer1->Add( ctrl, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
// Email address of contributor at third column
if( sub_contributor->GetEMail() != wxEmptyString )
if( sub_contributor->GetExtra() != wxEmptyString )
{
wxStaticText* mail = wxStaticTextMail( m_scrolledWindow1,
sub_contributor->GetEMail() );
wxStaticText* mail = wxStaticTextRef( m_scrolledWindow1,
sub_contributor->GetExtra() );
fgSizer1->Add( mail, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
}
else
@ -360,10 +360,10 @@ void DIALOG_ABOUT::createNotebookPageByCategory( wxNotebook* aParent, const wxSt
}
// Email address of contributor at third column
if ( contributor->GetEMail() != wxEmptyString )
if ( contributor->GetExtra() != wxEmptyString )
{
wxStaticText* mail = wxStaticTextMail( m_scrolledWindow1,
contributor->GetEMail() );
wxStaticText* mail = wxStaticTextRef( m_scrolledWindow1,
contributor->GetExtra() );
fgSizer1->Add( mail, 0, wxALIGN_LEFT|wxBOTTOM, 2 );
}
else
@ -436,10 +436,10 @@ void DIALOG_ABOUT::createNotebookHtmlPage( wxNotebook* aParent, const wxString&
}
wxStaticText* DIALOG_ABOUT::wxStaticTextMail( wxScrolledWindow* aParent, const wxString& aEmail )
wxStaticText* DIALOG_ABOUT::wxStaticTextRef( wxScrolledWindow* aParent, const wxString& aReference )
{
wxStaticText* text = new wxStaticText( aParent, wxID_ANY,
wxT( "<" ) + aEmail + wxT( ">" ) );
wxT( "(" ) + aReference + wxT( ")" ) );
return text;
}

View File

@ -89,7 +89,7 @@ private:
const wxString& aHtmlMessage,
bool aSelection = false );
wxStaticText* wxStaticTextMail( wxScrolledWindow* aParent, const wxString& email );
wxStaticText* wxStaticTextRef( wxScrolledWindow* aParent, const wxString& aReference );
wxStaticBitmap* createStaticBitmap( wxScrolledWindow* aParent, wxBitmap* icon );
};