From d77f617dc4bc9c5d3b457e9dc165a096232e3cbd Mon Sep 17 00:00:00 2001 From: whitequark Date: Mon, 6 Feb 2017 15:11:50 +0000 Subject: [PATCH] Remove the "show menu bar" option. Hiding the menu bar was only supported on macOS, and it is inherently troublesome to port because keyboard accelerators on Win32 and GTK are inherently dependent on the menu bar being visible. On top of that, it's not clear how to bring it back if it's hidden by accident. --- src/graphicswin.cpp | 12 ------------ src/ui.h | 1 - 2 files changed, 13 deletions(-) diff --git a/src/graphicswin.cpp b/src/graphicswin.cpp index 7f229c71..7f15bd88 100644 --- a/src/graphicswin.cpp +++ b/src/graphicswin.cpp @@ -76,9 +76,6 @@ const GraphicsWindow::MenuEntry GraphicsWindow::menu[] = { { 1, N_("Show Snap &Grid"), Command::SHOW_GRID, '>', TC, mView }, { 1, N_("Use &Perspective Projection"), Command::PERSPECTIVE_PROJ, '`', TC, mView }, { 1, NULL, Command::NONE, 0, TN, NULL }, -#if defined(__APPLE__) -{ 1, N_("Show Menu &Bar"), Command::SHOW_MENU_BAR, C|F(12), TC, mView }, -#endif { 1, N_("Show &Toolbar"), Command::SHOW_TOOLBAR, 0, TC, mView }, { 1, N_("Show Property Bro&wser"), Command::SHOW_TEXT_WND, '\t', TC, mView }, { 1, NULL, Command::NONE, 0, TN, NULL }, @@ -585,12 +582,6 @@ void GraphicsWindow::MenuView(Command id) { } break; - case Command::SHOW_MENU_BAR: - ToggleMenuBar(); - SS.GW.EnsureValidActives(); - InvalidateGraphics(); - break; - case Command::SHOW_TOOLBAR: SS.showToolbar = !SS.showToolbar; SS.GW.EnsureValidActives(); @@ -691,9 +682,6 @@ void GraphicsWindow::EnsureValidActives() { ShowTextWindow(SS.GW.showTextWindow); CheckMenuByCmd(Command::SHOW_TEXT_WND, /*checked=*/SS.GW.showTextWindow); -#if defined(__APPLE__) - CheckMenuByCmd(Command::SHOW_MENU_BAR, /*checked=*/MenuBarIsVisible()); -#endif CheckMenuByCmd(Command::SHOW_TOOLBAR, /*checked=*/SS.showToolbar); CheckMenuByCmd(Command::PERSPECTIVE_PROJ, /*checked=*/SS.usePerspectiveProj); CheckMenuByCmd(Command::SHOW_GRID,/*checked=*/SS.GW.showSnapGrid); diff --git a/src/ui.h b/src/ui.h index 93dd7a94..bcf1d237 100644 --- a/src/ui.h +++ b/src/ui.h @@ -142,7 +142,6 @@ enum class Command : uint32_t { NEAREST_ORTHO, NEAREST_ISO, CENTER_VIEW, - SHOW_MENU_BAR, SHOW_TOOLBAR, SHOW_TEXT_WND, UNITS_INCHES,