diff --git a/common/basicframe.cpp b/common/basicframe.cpp index 3e772aab7f..53aea6a176 100644 --- a/common/basicframe.cpp +++ b/common/basicframe.cpp @@ -40,11 +40,13 @@ #include #include +#include /// The default auto save interval is 10 minutes. #define DEFAULT_AUTO_SAVE_INTERVAL 600 +#define URL_GET_INVOLVED "http://kicad-pcb.org/contribute/" 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 ) { bool ShowAboutDialog(wxWindow * parent); diff --git a/eeschema/libeditframe.cpp b/eeschema/libeditframe.cpp index ddd599ce8e..cd1c8fb21a 100644 --- a/eeschema/libeditframe.cpp +++ b/eeschema/libeditframe.cpp @@ -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( wxID_HELP, 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_PREFERENCES, LIB_EDIT_FRAME::OnPreferencesOptions ) diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index 0a4f207ecc..72a3241b33 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -523,6 +523,12 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() _( "Displays the current hotkeys list and corresponding commands" ), 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(); AddMenuItem( helpMenu, wxID_ABOUT, diff --git a/eeschema/menubar_libedit.cpp b/eeschema/menubar_libedit.cpp index 0688558f3f..ddba7c916f 100644 --- a/eeschema/menubar_libedit.cpp +++ b/eeschema/menubar_libedit.cpp @@ -266,6 +266,12 @@ void LIB_EDIT_FRAME::ReCreateMenuBar() _( "Displays the current hotkeys list and corresponding commands" ), 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 helpMenu->AppendSeparator(); diff --git a/eeschema/schframe.cpp b/eeschema/schframe.cpp index 0a056848e9..ee6d031ea2 100644 --- a/eeschema/schframe.cpp +++ b/eeschema/schframe.cpp @@ -273,6 +273,7 @@ BEGIN_EVENT_TABLE( SCH_EDIT_FRAME, EDA_DRAW_FRAME ) EVT_TOOL( ID_AUTOPLACE_FIELDS, SCH_EDIT_FRAME::OnAutoplaceFields ) EVT_MENU( wxID_HELP, 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 ) // Tools and buttons for vertical toolbar. diff --git a/eeschema/tool_viewlib.cpp b/eeschema/tool_viewlib.cpp index 2f7ca04ad8..60353b5ad0 100644 --- a/eeschema/tool_viewlib.cpp +++ b/eeschema/tool_viewlib.cpp @@ -253,7 +253,12 @@ void LIB_VIEW_FRAME::ReCreateMenuBar( void ) _( "Open the \"Getting Started in KiCad\" guide for beginners" ), 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(); AddMenuItem( helpMenu, wxID_ABOUT, _( "&About Eeschema" ), diff --git a/eeschema/viewlib_frame.cpp b/eeschema/viewlib_frame.cpp index c3a48868c9..d2f4039c8f 100644 --- a/eeschema/viewlib_frame.cpp +++ b/eeschema/viewlib_frame.cpp @@ -71,6 +71,7 @@ BEGIN_EVENT_TABLE( LIB_VIEW_FRAME, EDA_DRAW_FRAME ) // Menu (and/or hotkey) events EVT_MENU( wxID_HELP, EDA_DRAW_FRAME::GetKicadHelp ) 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 ) END_EVENT_TABLE() diff --git a/gerbview/events_called_functions.cpp b/gerbview/events_called_functions.cpp index 55511261a8..8096fb60ef 100644 --- a/gerbview/events_called_functions.cpp +++ b/gerbview/events_called_functions.cpp @@ -87,6 +87,7 @@ BEGIN_EVENT_TABLE( GERBVIEW_FRAME, EDA_DRAW_FRAME ) // Menu Help EVT_MENU( wxID_HELP, 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_TOOL( wxID_UNDO, GERBVIEW_FRAME::Process_Special_Functions ) diff --git a/gerbview/menubar.cpp b/gerbview/menubar.cpp index 5e63ec0666..18280c7af0 100644 --- a/gerbview/menubar.cpp +++ b/gerbview/menubar.cpp @@ -230,6 +230,14 @@ void GERBVIEW_FRAME::ReCreateMenuBar() // Separator 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 AddMenuItem( helpMenu, wxID_ABOUT, diff --git a/include/id.h b/include/id.h index 66b9858aad..1b7ddddd4f 100644 --- a/include/id.h +++ b/include/id.h @@ -260,6 +260,7 @@ enum main_id ID_TB_OPTIONS_SELECT_CURSOR, ID_TB_OPTIONS_SHOW_POLAR_COORD, ID_TB_OPTIONS_SHOW_GRID, + ID_HELP_GET_INVOLVED, // Common to Pcbnew and CvPcb ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH, diff --git a/include/wxstruct.h b/include/wxstruct.h index ac49ab76af..0cc9c5b550 100644 --- a/include/wxstruct.h +++ b/include/wxstruct.h @@ -217,6 +217,8 @@ public: void GetKicadHelp( wxCommandEvent& event ); + void GetKicadContribute( wxCommandEvent& event ); + void GetKicadAbout( wxCommandEvent& event ); void PrintMsg( const wxString& text ); diff --git a/kicad/menubar.cpp b/kicad/menubar.cpp index f8ae92102a..c57f68d64a 100644 --- a/kicad/menubar.cpp +++ b/kicad/menubar.cpp @@ -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( wxID_HELP, 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 ) // Range menu events @@ -422,6 +423,14 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar() // Separator 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 AddMenuItem( helpMenu, wxID_ABOUT, _( "&About KiCad" ), diff --git a/pagelayout_editor/events_functions.cpp b/pagelayout_editor/events_functions.cpp index 674f95d8c7..44a7df4bac 100644 --- a/pagelayout_editor/events_functions.cpp +++ b/pagelayout_editor/events_functions.cpp @@ -81,6 +81,7 @@ BEGIN_EVENT_TABLE( PL_EDITOR_FRAME, EDA_DRAW_FRAME ) // Menu Help EVT_MENU( wxID_HELP, 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_TOOL( wxID_CUT, PL_EDITOR_FRAME::Process_Special_Functions ) diff --git a/pagelayout_editor/menubar.cpp b/pagelayout_editor/menubar.cpp index ceadfee71f..8de9e1f1fd 100644 --- a/pagelayout_editor/menubar.cpp +++ b/pagelayout_editor/menubar.cpp @@ -161,6 +161,12 @@ void PL_EDITOR_FRAME::ReCreateMenuBar() _( "Displays the current hotkeys list and corresponding commands" ), KiBitmap( hotkeys_xpm ) ); + helpMenu->AppendSeparator(); + AddMenuItem( helpMenu, ID_HELP_GET_INVOLVED, + _( "Get &Involved" ), + _( "Contribute to KiCad (opens a web browser)" ), + KiBitmap( info_xpm ) ); + // Separator helpMenu->AppendSeparator(); diff --git a/pcbnew/menubar_modedit.cpp b/pcbnew/menubar_modedit.cpp index 53d202f031..33da6308c0 100644 --- a/pcbnew/menubar_modedit.cpp +++ b/pcbnew/menubar_modedit.cpp @@ -348,6 +348,13 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar() _( "Displays the current hotkeys list and corresponding commands" ), 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 helpMenu->AppendSeparator(); AddMenuItem( helpMenu, wxID_ABOUT, diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index a30154cbb2..00c7d95d35 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -656,6 +656,14 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() 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(); + AddMenuItem( helpMenu, wxID_ABOUT, _( "&About KiCad" ), _( "Display the KiCad About dialog" ), diff --git a/pcbnew/moduleframe.cpp b/pcbnew/moduleframe.cpp index e94deedb4b..17762fb869 100644 --- a/pcbnew/moduleframe.cpp +++ b/pcbnew/moduleframe.cpp @@ -163,6 +163,7 @@ BEGIN_EVENT_TABLE( FOOTPRINT_EDIT_FRAME, PCB_BASE_FRAME ) // Menu Help EVT_MENU( wxID_HELP, 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 ) // Menu 3D Frame diff --git a/pcbnew/pcbframe.cpp b/pcbnew/pcbframe.cpp index 5c0175f41c..866f3c7373 100644 --- a/pcbnew/pcbframe.cpp +++ b/pcbnew/pcbframe.cpp @@ -179,6 +179,7 @@ BEGIN_EVENT_TABLE( PCB_EDIT_FRAME, PCB_BASE_FRAME ) // Menu Help EVT_MENU( wxID_HELP, 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 ) // Menu 3D Frame