Add Help Menu item to open browser at kicad-pcb.org/contribute
This commit is contained in:
parent
194bd1d617
commit
48ed9f080e
|
@ -40,11 +40,13 @@
|
|||
#include <wxstruct.h>
|
||||
|
||||
#include <wx/display.h>
|
||||
#include <wx/utils.h>
|
||||
|
||||
|
||||
/// 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);
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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.
|
||||
|
|
|
@ -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" ),
|
||||
|
|
|
@ -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()
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -217,6 +217,8 @@ public:
|
|||
|
||||
void GetKicadHelp( wxCommandEvent& event );
|
||||
|
||||
void GetKicadContribute( wxCommandEvent& event );
|
||||
|
||||
void GetKicadAbout( wxCommandEvent& event );
|
||||
|
||||
void PrintMsg( const wxString& text );
|
||||
|
|
|
@ -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" ),
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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();
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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" ),
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue