https://git.reactos.org/?p=reactos.git;a=commitdiff;h=81ec0569637a2ff78a2adfe35486eb949176b415

commit 81ec0569637a2ff78a2adfe35486eb949176b415
Author:     Katayama Hirofumi MZ <katayama.hirofumi...@gmail.com>
AuthorDate: Sat Aug 10 22:15:23 2024 +0900
Commit:     GitHub <nore...@github.com>
CommitDate: Sat Aug 10 22:15:23 2024 +0900

    [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()

Reply via email to