Browse Source

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

pull/3/merge
Cirilo Bernardo 9 years ago
committed by Wayne Stambaugh
parent
commit
48ed9f080e
  1. 13
      common/basicframe.cpp
  2. 1
      eeschema/libeditframe.cpp
  3. 6
      eeschema/menubar.cpp
  4. 6
      eeschema/menubar_libedit.cpp
  5. 1
      eeschema/schframe.cpp
  6. 7
      eeschema/tool_viewlib.cpp
  7. 1
      eeschema/viewlib_frame.cpp
  8. 1
      gerbview/events_called_functions.cpp
  9. 8
      gerbview/menubar.cpp
  10. 1
      include/id.h
  11. 2
      include/wxstruct.h
  12. 9
      kicad/menubar.cpp
  13. 1
      pagelayout_editor/events_functions.cpp
  14. 6
      pagelayout_editor/menubar.cpp
  15. 7
      pcbnew/menubar_modedit.cpp
  16. 8
      pcbnew/menubar_pcbframe.cpp
  17. 1
      pcbnew/moduleframe.cpp
  18. 1
      pcbnew/pcbframe.cpp

13
common/basicframe.cpp

@ -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);

1
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 )

6
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,

6
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();

1
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.

7
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" ),

1
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()

1
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 )

8
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,

1
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,

2
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 );

9
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" ),

1
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 )

6
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();

7
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,

8
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" ),

1
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

1
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

Loading…
Cancel
Save