diff --git a/GViewCore/src/App/Instance.cpp b/GViewCore/src/App/Instance.cpp index c41ffd3c..c929da1d 100644 --- a/GViewCore/src/App/Instance.cpp +++ b/GViewCore/src/App/Instance.cpp @@ -26,6 +26,8 @@ constexpr _MenuCommand_ menuFileList[] = { { "", 0, Key::None }, { "E&xit", MenuCommands::EXIT_GVIEW, Key::Shift | Key::Escape }, }; +constexpr ItemHandle menuFileDisabledCommandsList[] = { 3, 4 }; + constexpr _MenuCommand_ menuWindowList[] = { { "Arrange &Vertically", MenuCommands::ARRANGE_VERTICALLY, Key::None }, { "Arrange &Horizontally", MenuCommands::ARRANGE_HORIZONTALLY, Key::None }, @@ -129,6 +131,9 @@ bool Instance::BuildMainMenus() { CHECK(mnuFile = AppCUI::Application::AddMenu("File"), false, "Unable to create 'File' menu"); CHECK(AddMenuCommands(mnuFile, menuFileList, ARRAY_LEN(menuFileList)), false, ""); + for (auto itemHandle : menuFileDisabledCommandsList) { + CHECK(mnuFile->SetEnable(itemHandle, false), false, "Fail to disable menu item"); + } CHECK(mnuWindow = AppCUI::Application::AddMenu("&Windows"), false, "Unable to create 'Windows' menu"); CHECK(AddMenuCommands(mnuWindow, menuWindowList, ARRAY_LEN(menuWindowList)), false, ""); CHECK(mnuHelp = AppCUI::Application::AddMenu("&Help"), false, "Unable to create 'Help' menu");