From 81ec0569637a2ff78a2adfe35486eb949176b415 Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Sat, 10 Aug 2024 22:15:23 +0900 Subject: [PATCH] [BROWSEUI] Add checkmark for Explorer bar menu items (#7229) Improve UI/UX. JIRA issue: CORE-19689 - In the CShellBrowser::OnInitMenuPopup method, check/uncheck menu items depending on fCurrentVertBar. --- dll/win32/browseui/shellbrowser.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/dll/win32/browseui/shellbrowser.cpp b/dll/win32/browseui/shellbrowser.cpp index c86ef25bc5f..00fbb06e07b 100644 --- a/dll/win32/browseui/shellbrowser.cpp +++ b/dll/win32/browseui/shellbrowser.cpp @@ -1823,6 +1823,19 @@ void CShellBrowser::UpdateViewMenu(HMENU theMenu) SetMenuItemInfo(theMenu, IDM_VIEW_TOOLBARS, FALSE, &menuItemInfo); } SHCheckMenuItem(theMenu, IDM_VIEW_STATUSBAR, m_settings.fStatusBarVisible ? TRUE : FALSE); + + // Check the menu items for Explorer bar + BOOL bSearchBand = (IsEqualCLSID(CLSID_SH_SearchBand, fCurrentVertBar) || + IsEqualCLSID(CLSID_SearchBand, fCurrentVertBar) || + IsEqualCLSID(CLSID_IE_SearchBand, fCurrentVertBar) || + IsEqualCLSID(CLSID_FileSearchBand, fCurrentVertBar)); + BOOL bHistory = IsEqualCLSID(CLSID_SH_HistBand, fCurrentVertBar); + BOOL bFavorites = IsEqualCLSID(CLSID_SH_FavBand, fCurrentVertBar); + BOOL bFolders = IsEqualCLSID(CLSID_ExplorerBand, fCurrentVertBar); + SHCheckMenuItem(theMenu, IDM_EXPLORERBAR_SEARCH, bSearchBand); + SHCheckMenuItem(theMenu, IDM_EXPLORERBAR_HISTORY, bHistory); + SHCheckMenuItem(theMenu, IDM_EXPLORERBAR_FAVORITES, bFavorites); + SHCheckMenuItem(theMenu, IDM_EXPLORERBAR_FOLDERS, bFolders); } HRESULT CShellBrowser::BuildExplorerBandMenu()