From 52211afbf054f370f7a964bcd64bb8bb2c181831 Mon Sep 17 00:00:00 2001 From: Jerry Jacobs Date: Sat, 2 Jul 2011 14:48:45 +0200 Subject: [PATCH] Add some toolbar entries in a new menu called Tools, update OS X build documentation --- Documentation/compiling/mac-osx.txt | 10 ++++ eeschema/menubar.cpp | 77 ++++++++++++++++++++++++++--- pcbnew/menubar_pcbframe.cpp | 40 +++++++++++++++ pcbnew/tool_pcb.cpp | 2 +- 4 files changed, 122 insertions(+), 7 deletions(-) diff --git a/Documentation/compiling/mac-osx.txt b/Documentation/compiling/mac-osx.txt index 1b24c6c5b5..678e8bfb4e 100644 --- a/Documentation/compiling/mac-osx.txt +++ b/Documentation/compiling/mac-osx.txt @@ -12,6 +12,7 @@ Requirements * CMake (http://www.cmake.org) * wxWidgets 2.9 (http://www.wxwidgets.org/downloads) * Doxygen (http://www.doxygen.nl) + * ccache (http://www.macports.org) Building wxWidgets 2.9 Universal @@ -111,6 +112,15 @@ CMAKE_CXX_FLAGS = -D__ASSERTMACROS__ Then we invoke make: user@mac-osx$ make +Optional compiler cache +~~~~~~~~~~~~~~~~~~~~~~~ +If you (re)compile often, you would love to use cache. The best is to install it using macports and set the libexec symlink +directory of ccache in your PATH variable. + +Then start with a clean directory and invoke cmake, make sure that the C++ compiler points to /opt/local/libexec/ccache/g++ + +Further reading at http://trac.macports.org/wiki/howto/ccache + Known Problems ~~~~~~~~~~~~~~ In file included from diff --git a/eeschema/menubar.cpp b/eeschema/menubar.cpp index 0c2f2b7eff..cb43b46041 100644 --- a/eeschema/menubar.cpp +++ b/eeschema/menubar.cpp @@ -99,6 +99,13 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Separator fileMenu->AppendSeparator(); + // Page settings + ADD_MENUITEM_WITH_HELP( fileMenu, + ID_SHEET_SET, + _( "P&age settings" ), + _( "Settigns for page size and information" ), + sheetset_xpm ); + // Print ADD_MENUITEM_WITH_HELP( fileMenu, wxID_PRINT, @@ -195,13 +202,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Separator editMenu->AppendSeparator(); - // Backannotate - ADD_MENUITEM_WITH_HELP( editMenu, - ID_BACKANNO_ITEMS, - _( "Backannotate" ), - _( "Back annotated footprint fields" ), - backanno_xpm ); // Menu View: wxMenu* viewMenu = new wxMenu; @@ -242,6 +243,13 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() // Separator viewMenu->AppendSeparator(); + // Hierarchy + ADD_MENUITEM_WITH_HELP( viewMenu, + ID_HIERARCHY, + _( "H&ierarchy" ), + _( "Navigate schematic hierarchy" ), + hierarchy_nav_xpm ); + // Redraw text = AddHotkeyName( _( "Redraw" ), s_Schematic_Hokeys_Descr, HK_ZOOM_REDRAW ); ADD_MENUITEM_WITH_HELP( viewMenu, ID_ZOOM_REDRAW, text, HELP_ZOOM_REDRAW, @@ -423,6 +431,62 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() _( "Read application preferences" ), read_setup_xpm ); + // Menu Tools: + wxMenu* toolsMenu = new wxMenu; + + // Library viewer + ADD_MENUITEM_WITH_HELP( toolsMenu, + ID_TO_LIBRARY, + _( "Library &browser" ), + _( "Library browser" ), + library_browse_xpm ); + + + // Library editor + ADD_MENUITEM_WITH_HELP( toolsMenu, + ID_TO_LIBRARY, + _( "Library &editor" ), + _( "Library editor" ), + libedit_xpm ); + + // Separator + toolsMenu->AppendSeparator(); + + // Annotate + ADD_MENUITEM_WITH_HELP( toolsMenu, + ID_GET_ANNOTATE, + _( "&Annotate" ), + _( "Annotate the components in the schematic" ), + annotate_xpm ); + + // Backannotate + ADD_MENUITEM_WITH_HELP( editMenu, + ID_BACKANNO_ITEMS, + _( "&Backannotate" ), + _( "Back annotate the footprint fields" ), + backanno_xpm ); + + // ERC + ADD_MENUITEM_WITH_HELP( toolsMenu, + ID_GET_ERC, + _( "ER&C" ), + _( "Perform electrical rule check" ), + erc_xpm ); + + // Generate netlist + ADD_MENUITEM_WITH_HELP( toolsMenu, + ID_GET_NETLIST, + _( "Generate &netlist" ), + _( "Generate the component netlist" ), + netlist_xpm ); + + // Generate bill of materials + ADD_MENUITEM_WITH_HELP( toolsMenu, + ID_GET_TOOLS, + _( "Generate bill of materials" ), + _( "Generate bill of materials" ), + tools_xpm ); + // Help Menu: wxMenu* helpMenu = new wxMenu; @@ -449,6 +513,7 @@ void SCH_EDIT_FRAME::ReCreateMenuBar() menuBar->Append( viewMenu, _( "&View" ) ); menuBar->Append( placeMenu, _( "&Place" ) ); menuBar->Append( preferencesMenu, _( "&Preferences" ) ); + menuBar->Append( toolsMenu, _( "&Tools" ) ); menuBar->Append( helpMenu, _( "&Help" ) ); menuBar->Thaw(); diff --git a/pcbnew/menubar_pcbframe.cpp b/pcbnew/menubar_pcbframe.cpp index 6708b8e0a9..12187e09c2 100644 --- a/pcbnew/menubar_pcbframe.cpp +++ b/pcbnew/menubar_pcbframe.cpp @@ -195,6 +195,13 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() filesMenu->AppendSeparator(); + // Page settings + item = new wxMenuItem( filesMenu, ID_SHEET_SET, + _( "&Page settings" ), + _( "Page settings for paper size and texts" ) ); + SET_BITMAP( sheetset_xpm ); + filesMenu->Append( item ); + // Print item = new wxMenuItem( filesMenu, wxID_PRINT, _( "&Print\tCtrl+P" ), @@ -576,6 +583,38 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() SET_BITMAP( read_setup_xpm ); configmenu->Append( item ); + /** + * Tools menu + */ + wxMenu* toolsMenu = new wxMenu; + + /* Netlist */ + item = new wxMenuItem( toolsMenu, ID_GET_NETLIST, + _( "Netlist" ), + _( "Read or update the netlist" ) ); + SET_BITMAP( netlist_xpm ); + toolsMenu->Append( item ); + + /* Layer pair */ + item = new wxMenuItem( toolsMenu, ID_AUX_TOOLBAR_PCB_SELECT_LAYER_PAIR, + _( "Layer Pair" ), + _( "Change the active layer pair" ) ); + SET_BITMAP( web_support_xpm ); + toolsMenu->Append( item ); + + /* DRC */ + item = new wxMenuItem( toolsMenu, ID_DRC_CONTROL, + _( "DRC" ), + _( "Perform design rules check" ) ); + SET_BITMAP( erc_xpm ); + toolsMenu->Append( item ); + + /* FreeRoute */ + item = new wxMenuItem( toolsMenu, ID_TOOLBARH_PCB_FREEROUTE_ACCESS, + _( "FreeRoute" ), + _( "Fast access to the Web Based FreeROUTE advanced router" ) ); + SET_BITMAP( web_support_xpm ); + toolsMenu->Append( item ); /** * Design Rules menu @@ -627,6 +666,7 @@ void PCB_EDIT_FRAME::ReCreateMenuBar() menuBar->Append( viewMenu, _( "&View" ) ); menuBar->Append( placeMenu, _( "&Place" ) ); menuBar->Append( configmenu, _( "&Preferences" ) ); + menuBar->Append( toolsMenu, _( "&Tools" ) ); menuBar->Append( designRulesMenu, _( "&Design Rules" ) ); menuBar->Append( helpMenu, _( "&Help" ) ); diff --git a/pcbnew/tool_pcb.cpp b/pcbnew/tool_pcb.cpp index cba9b165a7..39950c9437 100644 --- a/pcbnew/tool_pcb.cpp +++ b/pcbnew/tool_pcb.cpp @@ -200,7 +200,7 @@ void PCB_EDIT_FRAME::ReCreateHToolbar() m_HToolBar->AddSeparator(); m_HToolBar->AddTool( ID_SHEET_SET, wxEmptyString, wxBitmap( sheetset_xpm ), - _( "Page settings (size, texts)" ) ); + _( "Page settings for paper size and texts" ) ); m_HToolBar->AddSeparator(); m_HToolBar->AddTool( ID_OPEN_MODULE_EDITOR, wxEmptyString, wxBitmap( modedit_xpm ),