Add Help Menu item to open browser at kicad-pcb.org/contribute

This commit is contained in:
Cirilo Bernardo 2016-09-24 10:44:52 +10:00 committed by Wayne Stambaugh
parent 194bd1d617
commit 48ed9f080e
18 changed files with 79 additions and 1 deletions

View File

@ -40,11 +40,13 @@
#include <wxstruct.h> #include <wxstruct.h>
#include <wx/display.h> #include <wx/display.h>
#include <wx/utils.h>
/// The default auto save interval is 10 minutes. /// The default auto save interval is 10 minutes.
#define DEFAULT_AUTO_SAVE_INTERVAL 600 #define DEFAULT_AUTO_SAVE_INTERVAL 600
#define URL_GET_INVOLVED "http://kicad-pcb.org/contribute/"
const wxChar traceAutoSave[] = wxT( "KicadAutoSave" ); const wxChar traceAutoSave[] = wxT( "KicadAutoSave" );
@ -481,6 +483,17 @@ void EDA_BASE_FRAME::OnSelectPreferredEditor( wxCommandEvent& event )
} }
void EDA_BASE_FRAME::GetKicadContribute( wxCommandEvent& event )
{
if( !wxLaunchDefaultBrowser( URL_GET_INVOLVED ) )
{
wxString msg = _( "Could not launch the default browser. For information on how to help the KiCad project, visit " );
msg.Append( URL_GET_INVOLVED );
wxMessageBox( msg, _( "Get involved with KiCad" ), wxOK, this );
}
}
void EDA_BASE_FRAME::GetKicadAbout( wxCommandEvent& event ) void EDA_BASE_FRAME::GetKicadAbout( wxCommandEvent& event )
{ {
bool ShowAboutDialog(wxWindow * parent); bool ShowAboutDialog(wxWindow * parent);

View File

@ -127,6 +127,7 @@ BEGIN_EVENT_TABLE( LIB_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_MENU( ID_LIBEDIT_GEN_SVG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent ) EVT_MENU( ID_LIBEDIT_GEN_SVG_FILE, LIB_EDIT_FRAME::OnPlotCurrentComponent )
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( ID_HELP_GET_INVOLVED, EDA_DRAW_FRAME::GetKicadContribute )
EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout )
EVT_MENU( wxID_PREFERENCES, LIB_EDIT_FRAME::OnPreferencesOptions ) EVT_MENU( wxID_PREFERENCES, LIB_EDIT_FRAME::OnPreferencesOptions )

View File

@ -523,6 +523,12 @@ void SCH_EDIT_FRAME::ReCreateMenuBar()
_( "Displays the current hotkeys list and corresponding commands" ), _( "Displays the current hotkeys list and corresponding commands" ),
KiBitmap( hotkeys_xpm ) ); KiBitmap( hotkeys_xpm ) );
helpMenu->AppendSeparator();
AddMenuItem( helpMenu, ID_HELP_GET_INVOLVED,
_( "Get &Involved" ),
_( "Contribute to KiCad (opens a web browser)" ),
KiBitmap( info_xpm ) );
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();
AddMenuItem( helpMenu, AddMenuItem( helpMenu,
wxID_ABOUT, wxID_ABOUT,

View File

@ -266,6 +266,12 @@ void LIB_EDIT_FRAME::ReCreateMenuBar()
_( "Displays the current hotkeys list and corresponding commands" ), _( "Displays the current hotkeys list and corresponding commands" ),
KiBitmap( hotkeys_xpm ) ); KiBitmap( hotkeys_xpm ) );
helpMenu->AppendSeparator();
AddMenuItem( helpMenu, ID_HELP_GET_INVOLVED,
_( "Get &Involved" ),
_( "Contribute to KiCad (opens a web browser)" ),
KiBitmap( info_xpm ) );
// About Eeschema // About Eeschema
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();

View File

@ -273,6 +273,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME )
EVT_TOOL( ID_AUTOPLACE_FIELDS, SCH_EDIT_FRAME::OnAutoplaceFields ) EVT_TOOL( ID_AUTOPLACE_FIELDS, SCH_EDIT_FRAME::OnAutoplaceFields )
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( ID_HELP_GET_INVOLVED, EDA_DRAW_FRAME::GetKicadContribute )
EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout )
// Tools and buttons for vertical toolbar. // Tools and buttons for vertical toolbar.

View File

@ -253,7 +253,12 @@ void LIB_VIEW_FRAME::ReCreateMenuBar( void )
_( "Open the \"Getting Started in KiCad\" guide for beginners" ), _( "Open the \"Getting Started in KiCad\" guide for beginners" ),
KiBitmap( help_xpm ) ); KiBitmap( help_xpm ) );
// About Pcbnew helpMenu->AppendSeparator();
AddMenuItem( helpMenu, ID_HELP_GET_INVOLVED,
_( "Get &Involved" ),
_( "Contribute to KiCad (opens a web browser)" ),
KiBitmap( info_xpm ) );
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();
AddMenuItem( helpMenu, wxID_ABOUT, AddMenuItem( helpMenu, wxID_ABOUT,
_( "&About Eeschema" ), _( "&About Eeschema" ),

View File

@ -71,6 +71,7 @@ BEGIN_EVENT_TABLE( LIB_VIEW_FRAME, EDA_DRAW_FRAME )
// Menu (and/or hotkey) events // Menu (and/or hotkey) events
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_EXIT, LIB_VIEW_FRAME::CloseLibraryViewer ) EVT_MENU( wxID_EXIT, LIB_VIEW_FRAME::CloseLibraryViewer )
EVT_MENU( ID_HELP_GET_INVOLVED, EDA_DRAW_FRAME::GetKicadContribute )
EVT_MENU( ID_SET_RELATIVE_OFFSET, LIB_VIEW_FRAME::OnSetRelativeOffset ) EVT_MENU( ID_SET_RELATIVE_OFFSET, LIB_VIEW_FRAME::OnSetRelativeOffset )
END_EVENT_TABLE() END_EVENT_TABLE()

View File

@ -87,6 +87,7 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME )
// Menu Help // Menu Help
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( ID_HELP_GET_INVOLVED, EDA_DRAW_FRAME::GetKicadContribute )
EVT_MENU( wxID_ABOUT, EDA_DRAW_FRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, EDA_DRAW_FRAME::GetKicadAbout )
EVT_TOOL( wxID_UNDO, GERBVIEW_FRAME::Process_Special_Functions ) EVT_TOOL( wxID_UNDO, GERBVIEW_FRAME::Process_Special_Functions )

View File

@ -230,6 +230,14 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
// Separator // Separator
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();
// Get involved with KiCad
AddMenuItem( helpMenu, ID_HELP_GET_INVOLVED,
_( "Get &Involved" ),
_( "Contribute to KiCad (opens a web browser)" ),
KiBitmap( info_xpm ) );
helpMenu->AppendSeparator();
// About Kicad // About Kicad
AddMenuItem( helpMenu, AddMenuItem( helpMenu,
wxID_ABOUT, wxID_ABOUT,

View File

@ -260,6 +260,7 @@ enum main_id
ID_TB_OPTIONS_SELECT_CURSOR, ID_TB_OPTIONS_SELECT_CURSOR,
ID_TB_OPTIONS_SHOW_POLAR_COORD, ID_TB_OPTIONS_SHOW_POLAR_COORD,
ID_TB_OPTIONS_SHOW_GRID, ID_TB_OPTIONS_SHOW_GRID,
ID_HELP_GET_INVOLVED,
// Common to Pcbnew and CvPcb // Common to Pcbnew and CvPcb
ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH,

View File

@ -217,6 +217,8 @@ public:
void GetKicadHelp( wxCommandEvent& event ); void GetKicadHelp( wxCommandEvent& event );
void GetKicadContribute( wxCommandEvent& event );
void GetKicadAbout( wxCommandEvent& event ); void GetKicadAbout( wxCommandEvent& event );
void PrintMsg( const wxString& text ); void PrintMsg( const wxString& text );

View File

@ -64,6 +64,7 @@ BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME )
EVT_MENU( ID_PROJECT_TREE_REFRESH, KICAD_MANAGER_FRAME::OnRefresh ) EVT_MENU( ID_PROJECT_TREE_REFRESH, KICAD_MANAGER_FRAME::OnRefresh )
EVT_MENU( wxID_HELP, KICAD_MANAGER_FRAME::GetKicadHelp ) EVT_MENU( wxID_HELP, KICAD_MANAGER_FRAME::GetKicadHelp )
EVT_MENU( wxID_INDEX, KICAD_MANAGER_FRAME::GetKicadHelp ) EVT_MENU( wxID_INDEX, KICAD_MANAGER_FRAME::GetKicadHelp )
EVT_MENU( ID_HELP_GET_INVOLVED, KICAD_MANAGER_FRAME::GetKicadContribute )
EVT_MENU( wxID_ABOUT, KICAD_MANAGER_FRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, KICAD_MANAGER_FRAME::GetKicadAbout )
// Range menu events // Range menu events
@ -422,6 +423,14 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
// Separator // Separator
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();
// Get involved with KiCad
AddMenuItem( helpMenu, ID_HELP_GET_INVOLVED,
_( "Get &Involved" ),
_( "Contribute to KiCad (opens a web browser)" ),
KiBitmap( info_xpm ) );
helpMenu->AppendSeparator();
// About // About
AddMenuItem( helpMenu, wxID_ABOUT, AddMenuItem( helpMenu, wxID_ABOUT,
_( "&About KiCad" ), _( "&About KiCad" ),

View File

@ -81,6 +81,7 @@ BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME )
// Menu Help // Menu Help
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( ID_HELP_GET_INVOLVED, EDA_DRAW_FRAME::GetKicadContribute )
EVT_MENU( wxID_ABOUT, EDA_DRAW_FRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, EDA_DRAW_FRAME::GetKicadAbout )
EVT_TOOL( wxID_CUT, PL_EDITOR_FRAME::Process_Special_Functions ) EVT_TOOL( wxID_CUT, PL_EDITOR_FRAME::Process_Special_Functions )

View File

@ -161,6 +161,12 @@ void PL_EDITOR_FRAME::ReCreateMenuBar()
_( "Displays the current hotkeys list and corresponding commands" ), _( "Displays the current hotkeys list and corresponding commands" ),
KiBitmap( hotkeys_xpm ) ); KiBitmap( hotkeys_xpm ) );
helpMenu->AppendSeparator();
AddMenuItem( helpMenu, ID_HELP_GET_INVOLVED,
_( "Get &Involved" ),
_( "Contribute to KiCad (opens a web browser)" ),
KiBitmap( info_xpm ) );
// Separator // Separator
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();

View File

@ -348,6 +348,13 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
_( "Displays the current hotkeys list and corresponding commands" ), _( "Displays the current hotkeys list and corresponding commands" ),
KiBitmap( hotkeys_xpm ) ); KiBitmap( hotkeys_xpm ) );
helpMenu->AppendSeparator();
AddMenuItem( helpMenu, ID_HELP_GET_INVOLVED,
_( "Get &Involved" ),
_( "Contribute to KiCad (opens a web browser)" ),
KiBitmap( info_xpm ) );
// About Pcbnew // About Pcbnew
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();
AddMenuItem( helpMenu, wxID_ABOUT, AddMenuItem( helpMenu, wxID_ABOUT,

View File

@ -656,6 +656,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar()
KiBitmap( hotkeys_xpm ) ); KiBitmap( hotkeys_xpm ) );
helpMenu->AppendSeparator(); helpMenu->AppendSeparator();
AddMenuItem( helpMenu, ID_HELP_GET_INVOLVED,
_( "Get &Involved" ),
_( "Contribute to KiCad (opens a web browser)" ),
KiBitmap( info_xpm ) );
helpMenu->AppendSeparator();
AddMenuItem( helpMenu, wxID_ABOUT, AddMenuItem( helpMenu, wxID_ABOUT,
_( "&About KiCad" ), _( "&About KiCad" ),
_( "Display the KiCad About dialog" ), _( "Display the KiCad About dialog" ),

View File

@ -163,6 +163,7 @@ BEGIN_EVENT_TABLE( FOOTPRINT_EDIT_FRAME, PCB_BASE_FRAME )
// Menu Help // Menu Help
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( ID_HELP_GET_INVOLVED, EDA_DRAW_FRAME::GetKicadContribute )
EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout )
// Menu 3D Frame // Menu 3D Frame

View File

@ -179,6 +179,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME )
// Menu Help // Menu Help
EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp ) EVT_MENU( wxID_INDEX, EDA_DRAW_FRAME::GetKicadHelp )
EVT_MENU( ID_HELP_GET_INVOLVED, EDA_DRAW_FRAME::GetKicadContribute )
EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout ) EVT_MENU( wxID_ABOUT, EDA_BASE_FRAME::GetKicadAbout )
// Menu 3D Frame // Menu 3D Frame