From 0ba95a92d0bee65219b22992cc36c6e5c520ee6f Mon Sep 17 00:00:00 2001
From: Jeff Young <jeff@rokeby.ie>
Date: Mon, 19 Feb 2018 19:26:02 +0000
Subject: [PATCH 4/5] New menu structure for ModEdit.
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="------------2.14.3 (Apple Git-98)"

This is a multi-part message in MIME format.
--------------2.14.3 (Apple Git-98)
Content-Type: text/plain; charset=UTF-8; format=fixed
Content-Transfer-Encoding: 8bit


Includes some dialog changes to go with the menu update.
Includes promoting the Pcbnew graphics mode back to main menu.
Includes renaming Graphics modes to Toolsets.
---
 common/widgets/gal_options_panel.cpp              |   2 +-
 cvpcb/display_footprints_frame.cpp                |   2 +-
 eeschema/tool_lib.cpp                             |   2 +-
 eeschema/tool_sch.cpp                             |   2 +-
 gerbview/gerbview_frame.cpp                       |   4 +-
 gerbview/hotkeys.cpp                              |   6 +-
 gerbview/menubar.cpp                              |  30 +-
 gerbview/toolbars_gerber.cpp                      |   2 +-
 pcbnew/dialogs/dialog_modedit_display_options.cpp |  81 +----
 pcbnew/dialogs/dialog_modedit_display_options.h   |  10 -
 pcbnew/footprint_edit_frame.cpp                   |  28 +-
 pcbnew/footprint_edit_frame.h                     |   4 +-
 pcbnew/footprint_editor_onclick.cpp               |   2 +-
 pcbnew/footprint_editor_utils.cpp                 |   2 +-
 pcbnew/hotkeys.cpp                                |   8 +-
 pcbnew/menubar_footprint_editor.cpp               | 368 ++++++++++++++--------
 pcbnew/menubar_pcb_editor.cpp                     |  57 ++--
 pcbnew/onleftclick.cpp                            |   6 +-
 pcbnew/pcb_edit_frame.cpp                         |   4 +-
 pcbnew/tool_footprint_editor.cpp                  |   2 +-
 pcbnew/tool_pcb_editor.cpp                        |   2 +-
 pcbnew/toolbars_update_user_interface.cpp         |   4 +-
 pcbnew/tools/drawing_tool.cpp                     |   3 +-
 23 files changed, 327 insertions(+), 304 deletions(-)


--------------2.14.3 (Apple Git-98)
Content-Type: text/x-patch; name="0004-New-menu-structure-for-ModEdit.patch"
Content-Transfer-Encoding: 8bit
Content-Disposition: attachment; filename="0004-New-menu-structure-for-ModEdit.patch"

diff --git a/common/widgets/gal_options_panel.cpp b/common/widgets/gal_options_panel.cpp
index 9039b99a0..928a7b2ed 100644
--- a/common/widgets/gal_options_panel.cpp
+++ b/common/widgets/gal_options_panel.cpp
@@ -72,7 +72,7 @@ GAL_OPTIONS_PANEL::GAL_OPTIONS_PANEL( wxWindow* aParent, KIGFX::GAL_DISPLAY_OPTI
     m_mainSizer->Add( sLeftSizer, 1, wxALL | wxEXPAND, 0 );
 
     // @todo LEGACY: not required when legacy is gone
-    const wxString galOnlySuffix = _( " (not supported in Legacy graphics)" );
+    const wxString galOnlySuffix = _( " (not supported in Legacy Toolset)" );
 
     /*
      * Anti-aliasing subpanel
diff --git a/cvpcb/display_footprints_frame.cpp b/cvpcb/display_footprints_frame.cpp
index c7a2bc23d..dd45a7fb0 100644
--- a/cvpcb/display_footprints_frame.cpp
+++ b/cvpcb/display_footprints_frame.cpp
@@ -196,7 +196,7 @@ void DISPLAY_FOOTPRINTS_FRAME::ReCreateOptToolbar()
 #else
     m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
                                KiBitmap( cursor_shape_xpm ),
-                               _( "Change cursor shape (not supported in Legacy graphics)" ),
+                               _( "Change cursor shape (not supported in Legacy Toolset)" ),
                                wxITEM_CHECK  );
 #endif
 
diff --git a/eeschema/tool_lib.cpp b/eeschema/tool_lib.cpp
index e79a69cec..0607c11f0 100644
--- a/eeschema/tool_lib.cpp
+++ b/eeschema/tool_lib.cpp
@@ -244,7 +244,7 @@ void LIB_EDIT_FRAME::ReCreateOptToolbar()
 #else
     m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
                                KiScaledBitmap( cursor_shape_xpm, this ),
-                               _( "Change cursor shape (not supported in Legacy graphics)" ),
+                               _( "Change cursor shape (not supported in Legacy Toolset)" ),
                                wxITEM_CHECK  );
 #endif
 
diff --git a/eeschema/tool_sch.cpp b/eeschema/tool_sch.cpp
index a4e60c9e5..e2cbe228d 100644
--- a/eeschema/tool_sch.cpp
+++ b/eeschema/tool_sch.cpp
@@ -302,7 +302,7 @@ void SCH_EDIT_FRAME::ReCreateOptToolbar()
 #else
     m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
                                KiScaledBitmap( cursor_shape_xpm, this ),
-                               _( "Change cursor shape (not supported in Legacy graphics)" ),
+                               _( "Change cursor shape (not supported in Legacy Toolset)" ),
                                wxITEM_CHECK  );
 #endif
 
diff --git a/gerbview/gerbview_frame.cpp b/gerbview/gerbview_frame.cpp
index edbd8f543..6a4dd1107 100644
--- a/gerbview/gerbview_frame.cpp
+++ b/gerbview/gerbview_frame.cpp
@@ -219,8 +219,8 @@ GERBVIEW_FRAME::GERBVIEW_FRAME( KIWAY* aKiway, wxWindow* aParent ):
                               "and faster experience. This option is turned off by "
                               "default since it is not compatible with all computers.\n\n"
                               "Would you like to try enabling graphics acceleration?\n\n"
-                              "If you'd like to choose later, select the Modern "
-                              "(Accelerated) graphics mode in the View menu." );
+                              "If you'd like to choose later, select Modern Toolset "
+                              "(Accelerated) in the Preferences menu." );
 
             wxMessageDialog dlg( this, msg, _( "Enable Graphics Acceleration" ),
                                  wxYES_NO );
diff --git a/gerbview/hotkeys.cpp b/gerbview/hotkeys.cpp
index 9fc69bfe9..5bb4bcb14 100644
--- a/gerbview/hotkeys.cpp
+++ b/gerbview/hotkeys.cpp
@@ -86,19 +86,19 @@ static EDA_HOTKEY   HkSwitch2NextCopperLayer( _HKI( "Switch to Next Layer" ),
 static EDA_HOTKEY   HkSwitch2PreviousCopperLayer( _HKI( "Switch to Previous Layer" ),
                                               HK_SWITCH_LAYER_TO_PREVIOUS, '-' );
 
-static EDA_HOTKEY HkCanvasDefault( _HKI( "Switch to Legacy Canvas" ),
+static EDA_HOTKEY HkCanvasDefault( _HKI( "Switch to Legacy Toolset" ),
                                    HK_CANVAS_LEGACY,
 #ifdef __WXMAC__
                                    GR_KB_ALT +
 #endif
                                    WXK_F9 );
-static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to Modern Canvas (hardware accelerated)" ),
+static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to Modern Toolset with hardware-accelerated graphics (recommended)" ),
                                   HK_CANVAS_OPENGL,
 #ifdef __WXMAC__
                                   GR_KB_ALT +
 #endif
                                   WXK_F11 );
-static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Modern Canvas (software renderer)" ),
+static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Modern Toolset with software graphics (fall-back)" ),
                                  HK_CANVAS_CAIRO,
 #ifdef __WXMAC__
                                  GR_KB_ALT +
diff --git a/gerbview/menubar.cpp b/gerbview/menubar.cpp
index fec4d4e42..9dae741ab 100644
--- a/gerbview/menubar.cpp
+++ b/gerbview/menubar.cpp
@@ -211,29 +211,23 @@ void GERBVIEW_FRAME::ReCreateMenuBar()
     // Canvas selection
     configMenu->AppendSeparator();
 
-    text = AddHotkeyName( _( "Legacy Graphic&s" ), GerbviewHokeysDescr,
+    text = AddHotkeyName( _( "Legacy Tool&set" ), GerbviewHokeysDescr,
                           HK_CANVAS_LEGACY );
+    AddMenuItem( configMenu, ID_MENU_CANVAS_LEGACY,
+                 text, _( "Use Legacy Toolset (not all features will be available)" ),
+                 KiBitmap( tools_xpm ), wxITEM_RADIO );
 
-    configMenu->Append(
-        new wxMenuItem( configMenu, ID_MENU_CANVAS_LEGACY,
-                        text, _( "Use legacy graphics mode (not all features will be available)" ),
-                        wxITEM_RADIO ) );
-
-    text = AddHotkeyName( _( "Modern (&Accelerated)" ), GerbviewHokeysDescr,
+    text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), GerbviewHokeysDescr,
                           HK_CANVAS_OPENGL );
+    AddMenuItem( configMenu, ID_MENU_CANVAS_OPENGL, text,
+                 _( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
+                 KiBitmap( tools_xpm ), wxITEM_RADIO );
 
-    configMenu->Append(
-        new wxMenuItem( configMenu, ID_MENU_CANVAS_OPENGL,
-                        text, _( "Use modern hardware-accelerated (OpenGL) graphics mode (recommended)" ),
-                        wxITEM_RADIO ) );
-
-    text = AddHotkeyName( _( "Modern (Fallba&ck)" ), GerbviewHokeysDescr,
+    text = AddHotkeyName( _( "Modern Toolset (Fallba&ck)" ), GerbviewHokeysDescr,
                           HK_CANVAS_CAIRO );
-
-    configMenu->Append(
-        new wxMenuItem( configMenu, ID_MENU_CANVAS_CAIRO,
-                        text, _( "Use modern fallback (Cairo) graphics mode" ),
-                        wxITEM_RADIO ) );
+    AddMenuItem( configMenu, ID_MENU_CANVAS_CAIRO, text,
+                 _( "Use Modern Toolset with software graphics (fall-back)" ),
+                 KiBitmap( tools_xpm ), wxITEM_RADIO );
 
     // Menu miscellaneous
     wxMenu* miscellaneousMenu = new wxMenu;
diff --git a/gerbview/toolbars_gerber.cpp b/gerbview/toolbars_gerber.cpp
index ba9220c22..2448d0e6b 100644
--- a/gerbview/toolbars_gerber.cpp
+++ b/gerbview/toolbars_gerber.cpp
@@ -242,7 +242,7 @@ void GERBVIEW_FRAME::ReCreateOptToolbar( void )
 #else
     m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
                                KiScaledBitmap( cursor_shape_xpm, this ),
-                               _( "Change cursor shape (not supported in Legacy graphics)" ),
+                               _( "Change cursor shape (not supported in Legacy Toolset)" ),
                                wxITEM_CHECK  );
 #endif
 
diff --git a/pcbnew/dialogs/dialog_modedit_display_options.cpp b/pcbnew/dialogs/dialog_modedit_display_options.cpp
index b57de67ab..693ddc489 100644
--- a/pcbnew/dialogs/dialog_modedit_display_options.cpp
+++ b/pcbnew/dialogs/dialog_modedit_display_options.cpp
@@ -42,8 +42,7 @@ bool DIALOG_MODEDIT_DISPLAY_OPTIONS::Invoke( FOOTPRINT_EDIT_FRAME& aCaller )
 
 DIALOG_MODEDIT_DISPLAY_OPTIONS::DIALOG_MODEDIT_DISPLAY_OPTIONS( FOOTPRINT_EDIT_FRAME& aParent ) :
     DIALOG_SHIM( &aParent, wxID_ANY, _( "Display Options" ) ),
-    m_parent( aParent ),
-    m_last_scale( -1 )
+    m_parent( aParent )
 {
     auto mainSizer = new wxBoxSizer( wxVERTICAL );
     SetSizer( mainSizer );
@@ -54,28 +53,6 @@ DIALOG_MODEDIT_DISPLAY_OPTIONS::DIALOG_MODEDIT_DISPLAY_OPTIONS( FOOTPRINT_EDIT_F
     m_galOptsPanel = new GAL_OPTIONS_PANEL( this, galOptions );
     mainSizer->Add( m_galOptsPanel, 1, wxEXPAND, 0 );
 
-    auto fgsizer = new wxFlexGridSizer( 3 );
-    fgsizer->AddGrowableCol( 1 );
-    fgsizer->SetFlexibleDirection( wxBOTH );
-    fgsizer->SetNonFlexibleGrowMode( wxFLEX_GROWMODE_SPECIFIED );
-    fgsizer->Add(
-            new wxStaticText( this, wxID_ANY, _( "Icon scale:" ) ),
-            0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 3 );
-    m_scaleSlider = new STEPPED_SLIDER( this, wxID_ANY, 50, 50, 275,
-            wxDefaultPosition, wxDefaultSize,
-            wxSL_AUTOTICKS | wxSL_HORIZONTAL | wxSL_LABELS );
-    m_scaleSlider->SetStep( 25 );
-    fgsizer->Add( m_scaleSlider, 1, wxLEFT | wxRIGHT | wxEXPAND, 3 );
-    fgsizer->Add(
-            new wxStaticText( this, wxID_ANY, "%" ),
-            0, wxALIGN_CENTER_VERTICAL | wxLEFT | wxRIGHT, 3 );
-    fgsizer->AddSpacer( 0 );
-    m_scaleAuto = new wxCheckBox( this, wxID_ANY, _( "Auto" ) );
-    fgsizer->Add( m_scaleAuto, wxLEFT | wxRIGHT | wxEXPAND, 3 );
-    fgsizer->AddSpacer( 0 );
-
-    mainSizer->Add( fgsizer, 0, wxEXPAND | wxBOTTOM | wxLEFT | wxRIGHT, 5 );
-
     auto btnSizer = new wxStdDialogButtonSizer();
     mainSizer->Add( btnSizer, 0, wxEXPAND | wxBOTTOM | wxLEFT | wxRIGHT, 5 );
 
@@ -84,21 +61,6 @@ DIALOG_MODEDIT_DISPLAY_OPTIONS::DIALOG_MODEDIT_DISPLAY_OPTIONS( FOOTPRINT_EDIT_F
 
     btnSizer->Realize();
 
-    std::vector<wxEventTypeTag<wxScrollEvent>> scroll_events = {
-        wxEVT_SCROLL_TOP, wxEVT_SCROLL_BOTTOM, wxEVT_SCROLL_LINEUP, wxEVT_SCROLL_LINEDOWN,
-        wxEVT_SCROLL_PAGEUP, wxEVT_SCROLL_PAGEDOWN, wxEVT_SCROLL_THUMBTRACK,
-        wxEVT_SCROLL_THUMBRELEASE };
-
-    for( auto evt : scroll_events )
-        m_scaleSlider->Connect(
-                evt, wxScrollEventHandler( DIALOG_MODEDIT_DISPLAY_OPTIONS::OnScaleSlider ),
-                NULL, this );
-
-    m_scaleAuto->Connect(
-            wxEVT_COMMAND_CHECKBOX_CLICKED,
-            wxCommandEventHandler( DIALOG_MODEDIT_DISPLAY_OPTIONS::OnScaleAuto ),
-            NULL, this );
-
     GetSizer()->SetSizeHints( this );
     Centre();
 }
@@ -108,20 +70,6 @@ bool DIALOG_MODEDIT_DISPLAY_OPTIONS::TransferDataToWindow()
 {
     // update GAL options
     m_galOptsPanel->TransferDataToWindow();
-
-    const int scale_fourths = m_parent.GetIconScale();
-
-    if( scale_fourths <= 0 )
-    {
-        m_scaleAuto->SetValue( true );
-        m_scaleSlider->SetValue( 25 * KiIconScale( &m_parent ) );
-    }
-    else
-    {
-        m_scaleAuto->SetValue( false );
-        m_scaleSlider->SetValue( scale_fourths * 25 );
-    }
-
     return true;
 }
 
@@ -131,11 +79,6 @@ bool DIALOG_MODEDIT_DISPLAY_OPTIONS::TransferDataFromWindow()
     // update GAL options
     m_galOptsPanel->TransferDataFromWindow();
 
-    const int scale_fourths = m_scaleAuto->GetValue() ? -1 : m_scaleSlider->GetValue() / 25;
-
-    if( m_parent.GetIconScale() != scale_fourths )
-        m_parent.SetIconScale( scale_fourths );
-
     // refresh view
     KIGFX::VIEW* view = m_parent.GetGalCanvas()->GetView();
     view->RecacheAllItems();
@@ -144,25 +87,3 @@ bool DIALOG_MODEDIT_DISPLAY_OPTIONS::TransferDataFromWindow()
 
     return true;
 }
-
-
-void DIALOG_MODEDIT_DISPLAY_OPTIONS::OnScaleSlider( wxScrollEvent& aEvent )
-{
-    m_scaleAuto->SetValue( false );
-    aEvent.Skip();
-}
-
-
-void DIALOG_MODEDIT_DISPLAY_OPTIONS::OnScaleAuto( wxCommandEvent& aEvent )
-{
-    if( m_scaleAuto->GetValue() )
-    {
-        m_last_scale = m_scaleSlider->GetValue();
-        m_scaleSlider->SetValue( 25 * KiIconScale( GetParent() ) );
-    }
-    else
-    {
-        if( m_last_scale >= 0 )
-            m_scaleSlider->SetValue( m_last_scale );
-    }
-}
diff --git a/pcbnew/dialogs/dialog_modedit_display_options.h b/pcbnew/dialogs/dialog_modedit_display_options.h
index 73aca949b..811e49dc8 100644
--- a/pcbnew/dialogs/dialog_modedit_display_options.h
+++ b/pcbnew/dialogs/dialog_modedit_display_options.h
@@ -21,8 +21,6 @@
 
 class GAL_OPTIONS_PANEL;
 class FOOTPRINT_EDIT_FRAME;
-class STEPPED_SLIDER;
-class wxCheckBox;
 
 class DIALOG_MODEDIT_DISPLAY_OPTIONS : public DIALOG_SHIM
 {
@@ -31,10 +29,6 @@ public:
 
     static bool Invoke( FOOTPRINT_EDIT_FRAME& aCaller );
 
-protected:
-    void OnScaleSlider( wxScrollEvent& aEvent );
-    void OnScaleAuto( wxCommandEvent& aEvent );
-
 private:
 
     bool TransferDataToWindow() override;
@@ -44,8 +38,4 @@ private:
 
     // subpanel
     GAL_OPTIONS_PANEL* m_galOptsPanel;
-
-    int m_last_scale;
-    wxCheckBox* m_scaleAuto;
-    STEPPED_SLIDER* m_scaleSlider;
 };
diff --git a/pcbnew/footprint_edit_frame.cpp b/pcbnew/footprint_edit_frame.cpp
index 247025c49..bff1994b0 100644
--- a/pcbnew/footprint_edit_frame.cpp
+++ b/pcbnew/footprint_edit_frame.cpp
@@ -230,6 +230,7 @@ FOOTPRINT_EDIT_FRAME::FOOTPRINT_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
     wxIcon icon;
     icon.CopyFromBitmap( KiBitmap( icon_modedit_xpm ) );
     SetIcon( icon );
+    m_iconScale = -1;
 
     // Show a title (frame title + footprint name):
     updateTitle();
@@ -1028,20 +1029,19 @@ void FOOTPRINT_EDIT_FRAME::UseGalCanvas( bool aEnable )
 
 int FOOTPRINT_EDIT_FRAME::GetIconScale()
 {
-    int scale = 0;
-    Kiface().KifaceSettings()->Read( IconScaleEntry, &scale, 0 );
-    return scale;
-}
+    // All environmental settings will move to app for 6.0, so just inherit from pcbnew
+    // for now.
+    if( m_iconScale == -1 )
+    {
+        bool isBoardEditorRunning = Kiway().Player( FRAME_PCB, false ) != nullptr;
+        PCB_BASE_FRAME* pcbFrame = static_cast<PCB_BASE_FRAME*>( Kiway().Player( FRAME_PCB, true ) );
+        m_iconScale = pcbFrame->GetIconScale();
 
+        if( !isBoardEditorRunning )
+            pcbFrame->Destroy();
+    }
 
-void FOOTPRINT_EDIT_FRAME::SetIconScale( int aScale )
-{
-    Kiface().KifaceSettings()->Write( IconScaleEntry, aScale );
-    ReCreateMenuBar();
-    ReCreateHToolbar();
-    ReCreateAuxiliaryToolbar();
-    ReCreateVToolbar();
-    ReCreateOptToolbar();
-    Layout();
-    SendSizeEvent();
+    return m_iconScale;
 }
+
+
diff --git a/pcbnew/footprint_edit_frame.h b/pcbnew/footprint_edit_frame.h
index 06ac29a96..11e549d4b 100644
--- a/pcbnew/footprint_edit_frame.h
+++ b/pcbnew/footprint_edit_frame.h
@@ -483,7 +483,6 @@ public:
     bool OpenProjectFiles( const std::vector<wxString>& aFileSet, int aCtl = 0 ) override;
 
     int GetIconScale() override;
-    void SetIconScale( int aScale ) override;
 
     DECLARE_EVENT_TABLE()
 
@@ -497,6 +496,9 @@ protected:
     /// List of footprint editor configuration parameters.
     PARAM_CFG_ARRAY   m_configParams;
 
+    /// Pretty much what it says on the tin.
+    int               m_iconScale;
+
     /**
      * Function UpdateTitle
      * updates window title according to getLibNickName().
diff --git a/pcbnew/footprint_editor_onclick.cpp b/pcbnew/footprint_editor_onclick.cpp
index f33886bb7..208a32a71 100644
--- a/pcbnew/footprint_editor_onclick.cpp
+++ b/pcbnew/footprint_editor_onclick.cpp
@@ -202,7 +202,7 @@ void FOOTPRINT_EDIT_FRAME::OnLeftClick( wxDC* DC, const wxPoint& MousePos )
         break;
 
     case ID_MODEDIT_MEASUREMENT_TOOL:
-        DisplayError( this, wxT( "Unsupported tool in legacy canvas" ) );
+        DisplayError( this, wxT( "Measurement Tool not available in Legacy Toolset" ) );
         SetNoToolSelected();
         break;
 
diff --git a/pcbnew/footprint_editor_utils.cpp b/pcbnew/footprint_editor_utils.cpp
index 2dddd8529..f3eefbf75 100644
--- a/pcbnew/footprint_editor_utils.cpp
+++ b/pcbnew/footprint_editor_utils.cpp
@@ -977,7 +977,7 @@ void FOOTPRINT_EDIT_FRAME::OnVerticalToolbar( wxCommandEvent& aEvent )
         break;
 
     case ID_MODEDIT_MEASUREMENT_TOOL:
-        DisplayError( this, wxT( "Unsupported tool in legacy canvas" ) );
+        DisplayError( this, wxT( "Measurement Tool not available in Legacy Toolset" ) );
         SetNoToolSelected();
         break;
 
diff --git a/pcbnew/hotkeys.cpp b/pcbnew/hotkeys.cpp
index 4171d613a..1913c7640 100644
--- a/pcbnew/hotkeys.cpp
+++ b/pcbnew/hotkeys.cpp
@@ -128,19 +128,19 @@ static EDA_HOTKEY HkSwitchHighContrastMode( _HKI( "Toggle High Contrast Mode" ),
 static EDA_HOTKEY HkSetGridOrigin( _HKI( "Set Grid Origin" ), HK_SET_GRID_ORIGIN, 'S' );
 static EDA_HOTKEY HkResetGridOrigin( _HKI( "Reset Grid Origin" ), HK_RESET_GRID_ORIGIN, 'Z' );
 
-static EDA_HOTKEY HkCanvasDefault( _HKI( "Switch to Legacy Canvas" ),
+static EDA_HOTKEY HkCanvasDefault( _HKI( "Switch to Legacy Toolset (not all features will be available" ),
                                    HK_CANVAS_LEGACY,
 #ifdef __WXMAC__
                                    GR_KB_ALT +
 #endif
                                    WXK_F9 );
-static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to Modern Canvas (hardware accelerated)" ),
+static EDA_HOTKEY HkCanvasOpenGL( _HKI( "Switch to Modern Toolset with hardware-accelerated graphics (recommended)" ),
                                   HK_CANVAS_OPENGL,
 #ifdef __WXMAC__
                                   GR_KB_ALT +
 #endif
                                   WXK_F11 );
-static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Modern Canvas (software renderer)" ),
+static EDA_HOTKEY HkCanvasCairo( _HKI( "Switch to Modern Toolset with software graphics (fall-back)" ),
                                  HK_CANVAS_CAIRO,
 #ifdef __WXMAC__
                                  GR_KB_ALT +
@@ -319,7 +319,7 @@ EDA_HOTKEY* board_edit_Hotkey_List[] =
 EDA_HOTKEY* module_edit_Hotkey_List[] = {
     &HkMoveItem,               &HkRotateItem,                &HkEditBoardItem,
     &HkMoveItemExact,          &HkDuplicateItem,             &HkDuplicateItemAndIncrement,
-    &HkCreateArray,            &HkDelete,
+    &HkCreateArray,            &HkDelete,                    &HkSwitchHighContrastMode,
     &HkCanvasDefault,          &HkCanvasCairo,               &HkCanvasOpenGL,
     NULL
  };
diff --git a/pcbnew/menubar_footprint_editor.cpp b/pcbnew/menubar_footprint_editor.cpp
index 0ca2f50be..f53ab8541 100644
--- a/pcbnew/menubar_footprint_editor.cpp
+++ b/pcbnew/menubar_footprint_editor.cpp
@@ -62,90 +62,100 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
     wxMenu* fileMenu = new wxMenu;
 
     // Active library selection
-    AddMenuItem( fileMenu, ID_MODEDIT_SELECT_CURRENT_LIB, _("Set Acti&ve Library..."),
-                           _( "Select active library" ),
-                           KiBitmap( open_library_xpm ) );
+    AddMenuItem( fileMenu, ID_MODEDIT_SELECT_CURRENT_LIB,
+                 _("Set Acti&ve Library..."),
+                 _( "Select active library" ),
+                 KiBitmap( open_library_xpm ) );
+
     fileMenu->AppendSeparator();
 
     // New module
+    text = AddHotkeyName( _( "&New Footprint..." ), m_hotkeysDescrList, HK_NEW );
     AddMenuItem( fileMenu, ID_MODEDIT_NEW_MODULE,
-                 _( "&New Footprint..." ), _( "Create new footprint" ),
+                 text, _( "Create new footprint" ),
                  KiBitmap( new_footprint_xpm ) );
 
-    // Open submenu
-    wxMenu* openSubmenu = new wxMenu;
+    text = AddHotkeyName( _( "&Open Footprint..." ), m_hotkeysDescrList, HK_OPEN );
+    AddMenuItem( fileMenu, ID_MODEDIT_LOAD_MODULE, text,
+                 _( "Open a footprint from a library" ),
+                 KiBitmap( module_xpm ) );
 
-    // from File
-    AddMenuItem( openSubmenu, ID_MODEDIT_IMPORT_PART,
-                 _( "&Import Footprint From File..." ),
-                 _( "Import footprint from an existing file" ),
-                 KiBitmap( import_module_xpm ) );
+    fileMenu->AppendSeparator();
 
-    // from Library
-    AddMenuItem( openSubmenu, ID_MODEDIT_LOAD_MODULE,
-                 _( "Load Footprint From Active Li&brary..." ),
-                 _( "Open footprint from active library" ),
-                 KiBitmap( module_xpm ) );
+    // Save module
+    text = AddHotkeyName( _( "&Save" ), m_hotkeysDescrList, HK_SAVE );
+    AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBMODULE, text,
+                 _( "Save footprint" ),
+                 KiBitmap( save_library_xpm ) );
+
+    fileMenu->AppendSeparator();
+
+
+    wxMenu* importSubMenu = new wxMenu();
 
     // from current Board
-    AddMenuItem( openSubmenu, ID_MODEDIT_LOAD_MODULE_FROM_BOARD,
-                 _( "Load Footprint From &Current Board..." ),
-                 _( "Load footprint from current board" ),
+    AddMenuItem( importSubMenu, ID_MODEDIT_LOAD_MODULE_FROM_BOARD,
+                 _( "Footprint from &Current Board..." ),
+                 _( "Import a footprint from the current board" ),
                  KiBitmap( load_module_board_xpm ) );
 
-    /* Append openSubmenu to fileMenu */
-    AddMenuItem( fileMenu, openSubmenu, -1,
-                 _( "&Load Footprint" ),
-                 _( "Load footprint" ),
-                 KiBitmap( load_module_lib_xpm ) );
-    fileMenu->AppendSeparator();
+    AddMenuItem( importSubMenu, ID_MODEDIT_IMPORT_PART,
+                 _( "Footprint from &KiCad File..." ),
+                 _( "Import a footprint from an existing file" ),
+                 KiBitmap( import_module_xpm ) );
 
-    // Save the currently loaded legacy library as an s-expression library.
-    AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBRARY_AS,
-                 _( "Save A&ctive Library As..." ),
-                 _( "Save entire active library under a new name" ),
-                 KiBitmap( copy_library_xpm ) );
+    AddMenuItem( importSubMenu, ID_GEN_IMPORT_DXF_FILE,
+                 _( "Footprint from &DXF File..." ),
+                 _( "Import 2D Drawing DXF file to Footprint Editor on Drawings layer" ),
+                 KiBitmap( import_xpm ) );
 
-    // Save module
-    text = AddHotkeyName( _( "&Save Footprint in Active Library" ),
-                          m_hotkeysDescrList, HK_SAVE );
+    AddMenuItem( fileMenu, importSubMenu, -1,
+                 _( "&Import" ),
+                 _( "Import files" ),
+                 KiBitmap( import_xpm ) );
 
-    AddMenuItem( fileMenu, ID_MODEDIT_SAVE_LIBMODULE, text,
-                 _( "Save footprint in active library" ),
-                 KiBitmap( save_library_xpm ) );
 
-    // Save module in new lib
-    AddMenuItem( fileMenu, ID_MODEDIT_CREATE_NEW_LIB_AND_SAVE_CURRENT_PART,
-                 _( "S&ave Footprint in New Library..." ),
-                 _( "Create new library and save current footprint in it" ),
-                 KiBitmap( new_library_xpm ) );
+    wxMenu* exportSubMenu = new wxMenu();
+
+    AddMenuItem( exportSubMenu, ID_MODEDIT_SAVE_LIBRARY_AS,
+                 _( "&Active Library..." ),
+                 _( "Export active library" ),
+                 KiBitmap( library_archive_xpm ) );
 
-    // Export module
-    AddMenuItem( fileMenu, ID_MODEDIT_EXPORT_PART,
-                 _( "&Export Footprint..." ),
-                 _( "Save currently loaded footprint into file" ),
+    AddMenuItem( exportSubMenu, ID_MODEDIT_EXPORT_PART,
+                 _( "&Footprint..." ),
+                 _( "Export current footprint to a file" ),
                  KiBitmap( export_module_xpm ) );
 
-    // Import DXF File
-    AddMenuItem( fileMenu, ID_GEN_IMPORT_DXF_FILE,
-                 _( "&Import DXF File..." ),
-                 _( "Import 2D Drawing DXF file to Pcbnew on Drawings layer" ),
-                 KiBitmap( import_xpm ) );
+    AddMenuItem( fileMenu, exportSubMenu, -1,
+                 _( "E&xport" ),
+                 _( "Export files" ),
+                 KiBitmap( export_xpm ) );
+
+
 
     fileMenu->AppendSeparator();
 
     // Print
-    AddMenuItem( fileMenu, wxID_PRINT,
-                 _( "&Print..." ),
+    text = AddHotkeyName( _( "&Print..." ), m_hotkeysDescrList, HK_PRINT );
+    AddMenuItem( fileMenu, wxID_PRINT, text,
                  _( "Print current footprint" ),
-                 KiBitmap( plot_xpm ) );
+                 KiBitmap( print_button_xpm ) );
 
     // Separator
     fileMenu->AppendSeparator();
 
+    // Properties
+    AddMenuItem( fileMenu, ID_MODEDIT_EDIT_MODULE_PROPERTIES,
+                 _( "P&roperties..." ),
+                 _( "Edit footprint properties" ),
+                 KiBitmap( module_options_xpm ) );
+
+    fileMenu->AppendSeparator();
+
     // Close editor
     AddMenuItem( fileMenu, wxID_EXIT,
-                 _( "Cl&ose" ),
+                 _( "&Exit" ),
                  _( "Close footprint editor" ),
                  KiBitmap( exit_xpm ) );
 
@@ -164,55 +174,43 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
                  text, _( "Redo last action" ),
                  KiBitmap( redo_xpm ) );
 
-    // Delete items
-    AddMenuItem( editMenu, ID_MODEDIT_DELETE_TOOL,
-                 _( "&Delete" ), _( "Delete objects with eraser" ),
-                 KiBitmap( delete_xpm ) );
-
     // Separator
     editMenu->AppendSeparator();
 
     if( IsGalCanvasActive() )
     {
-        text = AddHotkeyName( _( "&Cut" ), g_Module_Viewer_Hotkeys_Descr, HK_EDIT_CUT );
+        text = AddHotkeyName( _( "Cu&t" ), m_hotkeysDescrList, HK_EDIT_CUT );
         AddMenuItem( editMenu, ID_EDIT_CUT, text, _(
                         "Cuts the selected item(s) to the Clipboard" ), KiBitmap( cut_xpm ) );
-        text = AddHotkeyName( _( "&Copy" ), g_Module_Viewer_Hotkeys_Descr, HK_EDIT_COPY );
+        text = AddHotkeyName( _( "&Copy" ), m_hotkeysDescrList, HK_EDIT_COPY );
         AddMenuItem( editMenu, ID_EDIT_COPY, text, _(
                         "Copies the selected item(s) to the Clipboard" ), KiBitmap( copy_xpm ) );
-        text = AddHotkeyName( _( "&Paste" ), g_Module_Viewer_Hotkeys_Descr, HK_EDIT_PASTE );
+        text = AddHotkeyName( _( "&Paste" ), m_hotkeysDescrList, HK_EDIT_PASTE );
         AddMenuItem( editMenu, ID_EDIT_PASTE, text, _(
                         "Pastes item(s) from the Clipboard" ), KiBitmap( paste_xpm ) );
-        editMenu->AppendSeparator();
     }
 
-    // Properties
-    AddMenuItem( editMenu, ID_MODEDIT_EDIT_MODULE_PROPERTIES,
-                 _( "Footprint &Properties..." ),
-                 _( "Edit footprint properties" ),
-                 KiBitmap( module_options_xpm ) );
+    // Delete items
+    AddMenuItem( editMenu, ID_MODEDIT_DELETE_TOOL,
+                 _( "&Delete" ), _( "Delete items" ),
+                 KiBitmap( delete_xpm ) );
 
-    // Dimensions submenu
-    wxMenu* dimensions_Submenu = new wxMenu;
+    editMenu->AppendSeparator();
 
-    // User grid size
-    AddMenuItem( dimensions_Submenu, ID_PCB_USER_GRID_SETUP,
-                 _( "Set Custom &User Grid..." ), _( "Set custom user grid size" ),
-                 KiBitmap( grid_xpm ) );
+    //--------- View menu ----------------
+    wxMenu* viewMenu = new wxMenu;
 
-    // Sizes and Widths
-    AddMenuItem( dimensions_Submenu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
-                 _( "Text &Size and Width..." ),
-                 _( "Adjust width for text and drawing" ),
-                 KiBitmap( text_xpm ) );
+    AddMenuItem( viewMenu, ID_OPEN_MODULE_VIEWER,
+                 _( "&Library Browser" ),
+                 _( "Open the Library Browser" ),
+                 KiBitmap( modview_icon_xpm ) );
 
-    // Pad settings
-    AddMenuItem( dimensions_Submenu, ID_MODEDIT_PAD_SETTINGS,
-                 _( "Default &Pad Properties..." ), _( "Edit settings for new pads" ),
-                 KiBitmap( pad_dimensions_xpm ) );
+    text = AddHotkeyName( _( "&3D Viewer" ), m_hotkeysDescrList, HK_3D_VIEWER );
+    AddMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME,
+                 text, _( "Show footprint in 3D viewer" ),
+                 KiBitmap( three_d_xpm ) );
 
-    //--------- View menu ----------------
-    wxMenu* viewMenu = new wxMenu;
+    viewMenu->AppendSeparator();
 
     /* Important Note for ZOOM IN and ZOOM OUT commands from menubar:
      * we cannot add hotkey info here, because the hotkey HK_ZOOM_IN and HK_ZOOM_OUT
@@ -244,37 +242,92 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
 
     viewMenu->AppendSeparator();
 
-    // 3D view
-    text = AddHotkeyName( _( "&3D Viewer" ), m_hotkeysDescrList, HK_3D_VIEWER );
-    AddMenuItem( viewMenu, ID_MENU_PCB_SHOW_3D_FRAME, text, _( "Show footprint in 3D viewer" ),
-                 KiBitmap( three_d_xpm ) );
+    AddMenuItem( viewMenu, ID_TB_OPTIONS_SHOW_GRID,
+                 _( "Show &Grid" ), wxEmptyString,
+                 KiBitmap( grid_xpm ), wxITEM_CHECK );
+
+    AddMenuItem( viewMenu, ID_PCB_USER_GRID_SETUP,
+                 _( "Grid &Settings..." ),_( "Adjust custom user-defined grid dimensions" ),
+                 KiBitmap( grid_xpm ) );
+
+    AddMenuItem( viewMenu, ID_TB_OPTIONS_SHOW_POLAR_COORD,
+                 _( "Display &Polar Coordinates" ), wxEmptyString,
+                 KiBitmap( polar_coord_xpm ), wxITEM_CHECK );
+
+    // Units submenu
+    wxMenu* unitsSubMenu = new wxMenu;
+    AddMenuItem( unitsSubMenu, ID_TB_OPTIONS_SELECT_UNIT_INCH,
+                 _( "&Imperial" ), _( "Use imperial units" ),
+                 KiBitmap( unit_inch_xpm ), wxITEM_RADIO );
+
+    AddMenuItem( unitsSubMenu, ID_TB_OPTIONS_SELECT_UNIT_MM,
+                 _( "&Metric" ), _( "Use metric units" ),
+                 KiBitmap( unit_mm_xpm ), wxITEM_RADIO );
+
+    AddMenuItem( viewMenu, unitsSubMenu,
+                 -1, _( "&Units" ),
+                 _( "Select which units are displayed" ),
+                 KiBitmap( unit_mm_xpm ) );
+
+#ifndef __APPLE__
+    AddMenuItem( viewMenu, ID_TB_OPTIONS_SELECT_CURSOR,
+                 _( "Full Window Crosshair" ),
+                 _( "Change cursor shape" ),
+                 KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
+#else
+    AddMenuItem( viewMenu, ID_TB_OPTIONS_SELECT_CURSOR,
+                 _( "Full Window Crosshair" ),
+                 _( "Change cursor shape (not supported in Legacy Toolset)" ),
+                 KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
+#endif
 
-    // Add canvas selection
     viewMenu->AppendSeparator();
 
-    text = AddHotkeyName( _( "Legacy Graphic&s" ), m_hotkeysDescrList,
-                          HK_CANVAS_LEGACY );
+    // Drawing Mode Submenu
+    wxMenu* drawingModeSubMenu = new wxMenu;
+
+    AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_PADS_SKETCH,
+                 _( "Sketch &Pads" ), _( "Show pads in outline mode" ),
+                 KiBitmap( pad_sketch_xpm ), wxITEM_CHECK );
 
-    viewMenu->Append(
-        new wxMenuItem( viewMenu, ID_MENU_CANVAS_LEGACY,
-                        text, _( "Use legacy graphics mode (not all features will be available)" ),
-                        wxITEM_RADIO ) );
+    AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_MODULE_EDGE_SKETCH,
+                 _( "Sketch Footprint &Edges" ), _( "Show footprint edges in outline mode" ),
+                 KiBitmap( show_mod_edge_xpm ), wxITEM_CHECK );
+    AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_MODULE_TEXT_SKETCH,
+                 _( "Sketch Footprint Te&xt" ), _( "Show footprint text in outline mode" ),
+                 KiBitmap( text_sketch_xpm ), wxITEM_CHECK );
 
-    text = AddHotkeyName( _( "Modern (&Accelerated)" ), m_hotkeysDescrList,
-                          HK_CANVAS_OPENGL );
+    AddMenuItem( viewMenu, drawingModeSubMenu,
+                 -1, _( "&Drawing Mode" ),
+                 _( "Select how items are displayed" ),
+                 KiBitmap( add_zone_xpm ) );
 
-    viewMenu->Append(
-        new wxMenuItem( viewMenu, ID_MENU_CANVAS_OPENGL,
-                        text, _( "Use modern hardware-accelerated (OpenGL) graphics mode (recommended)" ),
-                        wxITEM_RADIO ) );
 
-    text = AddHotkeyName( _( "Modern (Fallba&ck)" ), m_hotkeysDescrList,
-                          HK_CANVAS_CAIRO );
+    text = AddHotkeyName( _( "&High Contrast Mode" ), m_hotkeysDescrList,
+                          HK_SWITCH_HIGHCONTRAST_MODE );
+    AddMenuItem( viewMenu, ID_TB_OPTIONS_SHOW_HIGH_CONTRAST_MODE, text,
+                 _( "Use high contrast display mode" ),
+                 KiBitmap( contrast_mode_xpm ), wxITEM_CHECK );
+
+#ifdef __APPLE__
+    viewMenu->AppendSeparator();
+#endif
+
+
+    //-------- Setup menu --------------------
+    wxMenu* setupMenu = new wxMenu;
+
+    // Sizes and Widths
+    AddMenuItem( setupMenu, ID_PCB_DRAWINGS_WIDTHS_SETUP,
+                 _( "Te&xts and Drawings..." ),
+                 _( "Adjust dimensions for texts and drawings" ),
+                 KiBitmap( text_xpm ) );
 
-    viewMenu->Append(
-        new wxMenuItem( viewMenu, ID_MENU_CANVAS_CAIRO,
-                        text, _( "Use modern fallback (Cairo) graphics mode" ),
-                        wxITEM_RADIO ) );
+    // Pad settings
+    AddMenuItem( setupMenu, ID_MODEDIT_PAD_SETTINGS,
+                 _( "Default &Pad Properties..." ),
+                 _( "Edit settings for new pads" ),
+                 KiBitmap( pad_dimensions_xpm ) );
 
     //-------- Place menu --------------------
     wxMenu* placeMenu = new wxMenu;
@@ -286,26 +339,30 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
 
     placeMenu->AppendSeparator();
 
+    // Text
+    AddMenuItem( placeMenu, ID_MODEDIT_TEXT_TOOL,
+                 _( "&Text" ), _( "Add graphic text" ),
+                 KiBitmap( text_xpm ) );
+
+    // Arc
+    AddMenuItem( placeMenu, ID_MODEDIT_ARC_TOOL,
+                 _( "&Arc" ), _( "Add graphic arc" ),
+                 KiBitmap( add_arc_xpm ) );
+
     // Circle
     AddMenuItem( placeMenu, ID_MODEDIT_CIRCLE_TOOL,
                  _( "&Circle" ), _( "Add graphic circle" ),
                  KiBitmap( add_circle_xpm ) );
 
-    // Line or Polygon
+    // Line
     AddMenuItem( placeMenu, ID_MODEDIT_LINE_TOOL,
-                 _( "&Line or Polygon" ),
-                 _( "Add graphic line or polygon" ),
-                 KiBitmap( add_polygon_xpm ) );
+                 _( "&Lines" ), _( "Add graphic line" ),
+                 KiBitmap( add_graphical_segments_xpm ) );
 
-    // Arc
-    AddMenuItem( placeMenu, ID_MODEDIT_ARC_TOOL,
-                 _( "&Arc" ), _( "Add graphic arc" ),
-                 KiBitmap( add_arc_xpm ) );
-
-    // Text
-    AddMenuItem( placeMenu, ID_MODEDIT_TEXT_TOOL,
-                 _( "&Text" ), _( "Add graphic text" ),
-                 KiBitmap( text_xpm ) );
+    // Polygon
+    AddMenuItem( placeMenu, ID_MODEDIT_POLYGON_TOOL,
+                 _( "&Polygon" ), _( "Add graphic polygon" ),
+                 KiBitmap( add_graphical_polygon_xpm ) );
 
     placeMenu->AppendSeparator();
 
@@ -315,6 +372,41 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
                  _( "Place footprint reference anchor" ),
                  KiBitmap( anchor_xpm ) );
 
+    // Origin
+    AddMenuItem( placeMenu, ID_MODEDIT_PLACE_GRID_COORD,
+                 _( "&Grid Origin" ),
+                 _( "Set grid origin point" ),
+                 KiBitmap( grid_select_axis_xpm ) );
+
+
+    //----- Inspect menu ---------------------
+    wxMenu* inspectMenu = new wxMenu;
+
+    AddMenuItem( inspectMenu, ID_MODEDIT_MEASUREMENT_TOOL,
+                 _( "&Measure" ),
+                 _( "Measure distance" ),
+                 KiBitmap( measurement_xpm ) );
+
+    //----- Tools menu ---------------------
+    wxMenu* toolsMenu = new wxMenu;
+
+    AddMenuItem( toolsMenu, ID_MODEDIT_UPDATE_MODULE_IN_BOARD,
+                 _( "&Update Footprint on PCB" ),
+                 _( "Push updated footprint through to current board" ),
+                 KiBitmap( update_module_board_xpm ) );
+
+    AddMenuItem( toolsMenu, ID_MODEDIT_INSERT_MODULE_IN_BOARD,
+                 _( "&Insert Footprint on PCB" ),
+                 _( "Insert footprint onto current board" ),
+                 KiBitmap( insert_module_board_xpm ) );
+
+    toolsMenu->AppendSeparator();
+
+    AddMenuItem( toolsMenu, ID_MODEDIT_DELETE_PART,
+                 _( "&Delete a Footprint in Active Library" ),
+                 _( "Choose and delete a footprint from the active library" ),
+                 KiBitmap( delete_xpm ) );
+
 
     //----- Preferences menu -----------------
     wxMenu* prefs_menu = new wxMenu;
@@ -339,10 +431,32 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
                  _( "General &Settings..." ), _( "Change footprint editor settings." ),
                  KiBitmap( preference_xpm ) );
 
+    prefs_menu->AppendSeparator();
+
     AddMenuItem( prefs_menu, ID_PCB_DISPLAY_OPTIONS_SETUP,
-                 _( "&Display Settings..." ),
-                 _( "Change footprint editor display settings" ),
-                 KiBitmap( display_options_xpm ) );
+              _( "&Display Options..." ),
+              _( "Graphics acceleration, grid and cursor settings." ),
+              KiBitmap( display_options_xpm ) );
+
+    text = AddHotkeyName( _( "Legacy Tool&set" ), m_hotkeysDescrList,
+                          HK_CANVAS_LEGACY );
+    AddMenuItem( prefs_menu, ID_MENU_CANVAS_LEGACY, text,
+                 _( "Use Legacy Toolset (not all features will be available)" ),
+                 KiBitmap( tools_xpm ), wxITEM_RADIO );
+
+    text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ),
+                          m_hotkeysDescrList, HK_CANVAS_OPENGL );
+    AddMenuItem( prefs_menu, ID_MENU_CANVAS_OPENGL, text,
+                 _( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
+                 KiBitmap( tools_xpm ), wxITEM_RADIO );
+
+    text = AddHotkeyName( _( "Modern Toolset (&Fallback)" ),
+                          m_hotkeysDescrList, HK_CANVAS_CAIRO );
+    AddMenuItem( prefs_menu, ID_MENU_CANVAS_CAIRO, text,
+                 _( "Use Modern Toolset with software graphics (fallback)" ),
+                 KiBitmap( tools_xpm ), wxITEM_RADIO );
+
+    prefs_menu->AppendSeparator();
 
     // Language submenu
     Pgm().AddMenuLanguageList( prefs_menu );
@@ -364,7 +478,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
                  _( "Open the \"Getting Started in KiCad\" guide for beginners" ),
                  KiBitmap( help_xpm ) );
 
-    text = AddHotkeyName( _( "&List Hotkeys..." ), g_Pcbnew_Editor_Hotkeys_Descr, HK_HELP );
+    text = AddHotkeyName( _( "&List Hotkeys..." ), m_hotkeysDescrList, HK_HELP );
     AddMenuItem( helpMenu, ID_PREFERENCES_HOTKEY_SHOW_CURRENT_LIST,
                  text,
                  _( "Displays current hotkeys table and corresponding commands" ),
@@ -388,9 +502,11 @@ void FOOTPRINT_EDIT_FRAME::ReCreateMenuBar()
     menuBar->Append( fileMenu, _( "&File" ) );
     menuBar->Append( editMenu, _( "&Edit" ) );
     menuBar->Append( viewMenu, _( "&View" ) );
+    menuBar->Append( setupMenu, _( "&Setup" ) );
     menuBar->Append( placeMenu, _( "&Place" ) );
+    menuBar->Append( inspectMenu, _( "&Inspect" ) );
+    menuBar->Append( toolsMenu, _( "&Tools" ) );
     menuBar->Append( prefs_menu, _( "P&references" ) );
-    menuBar->Append( dimensions_Submenu, _( "Di&mensions" ) );
     menuBar->Append( helpMenu, _( "&Help" ) );
 
     menuBar->Thaw();
diff --git a/pcbnew/menubar_pcb_editor.cpp b/pcbnew/menubar_pcb_editor.cpp
index a95736ad4..3e91c7903 100644
--- a/pcbnew/menubar_pcb_editor.cpp
+++ b/pcbnew/menubar_pcb_editor.cpp
@@ -178,7 +178,8 @@ void prepareSetupMenu( wxMenu* aParentMenu )
 
     AddMenuItem( aParentMenu, ID_MENU_PCB_SHOW_DESIGN_RULES_DIALOG,
                  _( "&Design Rules..." ),
-                 _( "Open design rules editor" ), KiBitmap( config_xpm ) );
+                 _( "Open design rules editor" ),
+                 KiBitmap( config_xpm ) );
 
     aParentMenu->AppendSeparator();
 
@@ -218,42 +219,29 @@ void preparePreferencesMenu( PCB_EDIT_FRAME* aFrame, wxMenu* aParentMenu )
                  KiBitmap( preference_xpm ) );
 #endif
 
-    // Display Settings submenu
-    wxMenu* displaySettingsSubMenu = new wxMenu;
-
-    AddMenuItem( displaySettingsSubMenu, ID_PCB_DISPLAY_OPTIONS_SETUP,
+    // Display Settings
+    AddMenuItem( aParentMenu, ID_PCB_DISPLAY_OPTIONS_SETUP,
                  _( "&Display Options..." ),
                  _( "Graphics acceleration, grid, cursor, annotation and clearance outline settings." ),
                  KiBitmap( display_options_xpm ) );
 
-    displaySettingsSubMenu->AppendSeparator();
-
-    text = AddHotkeyName( _( "Legacy Graphic&s" ), g_Pcbnew_Editor_Hotkeys_Descr,
+    text = AddHotkeyName( _( "Legacy Tool&set" ), g_Pcbnew_Editor_Hotkeys_Descr,
                           HK_CANVAS_LEGACY );
-    displaySettingsSubMenu->Append(
-        new wxMenuItem( displaySettingsSubMenu, ID_MENU_CANVAS_LEGACY,
-                        text, _( "Use legacy graphics mode (not all features will be available)" ),
-                        wxITEM_RADIO ) );
+    AddMenuItem( aParentMenu, ID_MENU_CANVAS_LEGACY, text,
+                 _( "Use Legacy Toolset (not all features will be available)" ),
+                 KiBitmap( tools_xpm ), wxITEM_RADIO );
 
-    text = AddHotkeyName( _( "Modern (&Accelerated)" ), g_Pcbnew_Editor_Hotkeys_Descr,
+    text = AddHotkeyName( _( "Modern Toolset (&Accelerated)" ), g_Pcbnew_Editor_Hotkeys_Descr,
                           HK_CANVAS_OPENGL );
-    displaySettingsSubMenu->Append(
-        new wxMenuItem( displaySettingsSubMenu, ID_MENU_CANVAS_OPENGL,
-                        text, _( "Use modern hardware-accelerated (OpenGL) graphics mode (recommended)" ),
-                        wxITEM_RADIO ) );
+    AddMenuItem( aParentMenu, ID_MENU_CANVAS_OPENGL, text,
+                 _( "Use Modern Toolset with hardware-accelerated graphics (recommended)" ),
+                 KiBitmap( tools_xpm ), wxITEM_RADIO );
 
-    text = AddHotkeyName( _( "Modern (Fallba&ck)" ), g_Pcbnew_Editor_Hotkeys_Descr,
+    text = AddHotkeyName( _( "Modern Toolset (Fallba&ck)" ), g_Pcbnew_Editor_Hotkeys_Descr,
                           HK_CANVAS_CAIRO );
-    displaySettingsSubMenu->Append(
-        new wxMenuItem( displaySettingsSubMenu, ID_MENU_CANVAS_CAIRO,
-                        text, _( "Use modern fallback (Cairo) graphics mode" ),
-                        wxITEM_RADIO ) );
-
-    AddMenuItem( aParentMenu, displaySettingsSubMenu, -1,
-                 _( "&Display Settings" ),
-                 _( "Select toolset and other display options" ),
-                 KiBitmap( display_options_xpm ) );
-
+    AddMenuItem( aParentMenu, ID_MENU_CANVAS_CAIRO, text,
+                 _( "Use Modern Toolset with software graphics (fall-back)" ),
+                 KiBitmap( tools_xpm ), wxITEM_RADIO );
 
     // Language submenu
     aParentMenu->AppendSeparator();
@@ -616,6 +604,11 @@ void prepareViewMenu( wxMenu* aParentMenu, bool aUseGal )
                  HELP_SHOW_HIDE_MICROWAVE_TOOLS,
                  KiBitmap( mw_toolbar_xpm ), wxITEM_CHECK );
 
+    AddMenuItem( aParentMenu, ID_OPEN_MODULE_VIEWER,
+                 _( "&Library Browser" ),
+                 _( "Open the Library Browser" ),
+                 KiBitmap( modview_icon_xpm ) );
+
     text = AddHotkeyName( _( "&3D Viewer" ), g_Pcbnew_Editor_Hotkeys_Descr, HK_3D_VIEWER );
     AddMenuItem( aParentMenu, ID_MENU_PCB_SHOW_3D_FRAME,
                  text, _( "Show board in 3D viewer" ),
@@ -689,7 +682,7 @@ void prepareViewMenu( wxMenu* aParentMenu, bool aUseGal )
 #else
     AddMenuItem( aParentMenu, ID_TB_OPTIONS_SELECT_CURSOR,
                  _( "Full Window Crosshair" ),
-                 _( "Change cursor shape (not supported in Legacy graphics)" ),
+                 _( "Change cursor shape (not supported in Legacy Toolset)" ),
                  KiBitmap( cursor_shape_xpm ), wxITEM_CHECK );
 #endif
 
@@ -727,8 +720,10 @@ void prepareViewMenu( wxMenu* aParentMenu, bool aUseGal )
                  _( "Sketch &Vias" ), _( "Show vias in outline mode" ),
                  KiBitmap( via_sketch_xpm ), wxITEM_CHECK );
 
-    AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_TRACKS_SKETCH,
-                 _( "Sketch &Tracks" ), _( "Show tracks in outline mode" ),
+    text = AddHotkeyName( _( "Sketch &Tracks" ), g_Pcbnew_Editor_Hotkeys_Descr,
+                          HK_SWITCH_TRACK_DISPLAY_MODE );
+    AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_TRACKS_SKETCH, text,
+                 _( "Show tracks in outline mode" ),
                  KiBitmap( showtrack_xpm ), wxITEM_CHECK );
                  
     AddMenuItem( drawingModeSubMenu, ID_TB_OPTIONS_SHOW_GRAPHIC_SKETCH,
diff --git a/pcbnew/onleftclick.cpp b/pcbnew/onleftclick.cpp
index 1be3fc381..78d0676a3 100644
--- a/pcbnew/onleftclick.cpp
+++ b/pcbnew/onleftclick.cpp
@@ -444,8 +444,12 @@ void PCB_EDIT_FRAME::OnLeftClick( wxDC* aDC, const wxPoint& aPosition )
         break;
 
     case ID_PCB_DRAW_VIA_BUTT:
+        DisplayError( this, _( "Via Tool not available in Legacy Toolset" ) );
+        SetNoToolSelected();
+        break;
+
     case ID_PCB_MEASUREMENT_TOOL:
-        DisplayError( this, _( "This tool is not available in the legacy canvas" ) );
+        DisplayError( this, _( "Measurement Tool not available in Legacy Toolset" ) );
         SetNoToolSelected();
         break;
 
diff --git a/pcbnew/pcb_edit_frame.cpp b/pcbnew/pcb_edit_frame.cpp
index e9d50adbe..2a397040f 100644
--- a/pcbnew/pcb_edit_frame.cpp
+++ b/pcbnew/pcb_edit_frame.cpp
@@ -477,8 +477,8 @@ PCB_EDIT_FRAME::PCB_EDIT_FRAME( KIWAY* aKiway, wxWindow* aParent ) :
                               "and faster experience. This option is turned off by "
                               "default since it is not compatible with all computers.\n\n"
                               "Would you like to try enabling graphics acceleration?\n\n"
-                              "If you'd like to choose later, select the Modern "
-                              "(Accelerated) graphics mode in the View menu." );
+                              "If you'd like to choose later, select Modern Toolset "
+                              "(Accelerated) in the Preferences menu." );
 
             wxMessageDialog dlg( this, msg, _( "Enable Graphics Acceleration" ),
                                  wxYES_NO );
diff --git a/pcbnew/tool_footprint_editor.cpp b/pcbnew/tool_footprint_editor.cpp
index dd9ffe868..eeb7e1764 100644
--- a/pcbnew/tool_footprint_editor.cpp
+++ b/pcbnew/tool_footprint_editor.cpp
@@ -233,7 +233,7 @@ void FOOTPRINT_EDIT_FRAME::ReCreateOptToolbar()
 #else
     m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
                                KiScaledBitmap( cursor_shape_xpm, this ),
-                               _( "Change cursor shape (not supported in Legacy graphics)" ),
+                               _( "Change cursor shape (not supported in Legacy Toolset)" ),
                                wxITEM_CHECK  );
 #endif
 
diff --git a/pcbnew/tool_pcb_editor.cpp b/pcbnew/tool_pcb_editor.cpp
index c12d2d54d..061ca3e90 100644
--- a/pcbnew/tool_pcb_editor.cpp
+++ b/pcbnew/tool_pcb_editor.cpp
@@ -381,7 +381,7 @@ void PCB_EDIT_FRAME::ReCreateOptToolbar()
 #else
     m_optionsToolBar->AddTool( ID_TB_OPTIONS_SELECT_CURSOR, wxEmptyString,
                                KiScaledBitmap( cursor_shape_xpm, this ),
-                               _( "Change cursor shape (not supported in Legacy graphics)" ),
+                               _( "Change cursor shape (not supported in Legacy Toolset)" ),
                                wxITEM_CHECK  );
 #endif
 
diff --git a/pcbnew/toolbars_update_user_interface.cpp b/pcbnew/toolbars_update_user_interface.cpp
index 047cfa384..79002a20e 100644
--- a/pcbnew/toolbars_update_user_interface.cpp
+++ b/pcbnew/toolbars_update_user_interface.cpp
@@ -135,8 +135,8 @@ void PCB_EDIT_FRAME::OnUpdateDrcEnable( wxUpdateUIEvent& aEvent )
     aEvent.Check( state );
     m_optionsToolBar->SetToolShortHelp( ID_TB_OPTIONS_DRC_OFF,
                                         Settings().m_legacyDrcOn ?
-                                        _( "Disable design rule checking while routing/editing tracks using Legacy Graphics.\nUse Preferences > Interactive Routing... for Modern Canvas." ) :
-                                        _( "Enable design rule checking while routing/editing tracks using Legacy Graphics.\nUse Preferences > Interactive Routing... for Modern Canvas." ) );
+                                        _( "Disable design rule checking while routing/editing tracks using Legacy Toolset.\nUse Route > Interactive Router Settings... for Modern Toolset." ) :
+                                        _( "Enable design rule checking while routing/editing tracks using Legacy Toolset.\nUse Route > Interactive Router Settings... for Modern Toolset." ) );
 }
 
 void PCB_EDIT_FRAME::OnUpdateShowBoardRatsnest( wxUpdateUIEvent& aEvent )
diff --git a/pcbnew/tools/drawing_tool.cpp b/pcbnew/tools/drawing_tool.cpp
index 5e1495c80..33a01c5fb 100644
--- a/pcbnew/tools/drawing_tool.cpp
+++ b/pcbnew/tools/drawing_tool.cpp
@@ -662,7 +662,8 @@ int DRAWING_TOOL::DrawGraphicPolygon( const TOOL_EVENT& aEvent )
 {
     SCOPED_DRAW_MODE scopedDrawMode( m_mode, MODE::GRAPHIC_POLYGON );
 
-    m_frame->SetToolID( ID_PCB_ADD_POLYGON_BUTT, wxCURSOR_PENCIL, _( "Add graphic polygon" ) );
+    m_frame->SetToolID( m_editModules ? ID_MODEDIT_POLYGON_TOOL : ID_PCB_ADD_POLYGON_BUTT,
+                        wxCURSOR_PENCIL, _( "Add graphic polygon" ) );
 
     return drawZone( false, ZONE_MODE::GRAPHIC_POLYGON );
 }

--------------2.14.3 (Apple Git-98)--


