https://git.reactos.org/?p=reactos.git;a=commitdiff;h=6d37456542a71f64b58ab5a16833aa9e048fcb1b

commit 6d37456542a71f64b58ab5a16833aa9e048fcb1b
Author:     Carl J. Bialorucki <[email protected]>
AuthorDate: Sat Jul 22 08:50:39 2023 -0600
Commit:     GitHub <[email protected]>
CommitDate: Sat Jul 22 17:50:39 2023 +0300

    [BROWSEUI] Add an option to use full folder path in the window title (#5468)
    
    - Set 
`HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CabinetState\FullPath` 
to 0 by default.
      Adding this registry value also enables the "Display the full path in the 
title bar" option in our folder options window.
    - Query the same registry key when the file explorer is started to 
determine whether to use the full path or the display name in the window title.
    
    CORE-19046 CORE-18904
---
 boot/bootdata/hivedef.inf           |  2 ++
 dll/win32/browseui/shellbrowser.cpp | 19 +++++++++++++++----
 2 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/boot/bootdata/hivedef.inf b/boot/bootdata/hivedef.inf
index 2b7a2c53c47..6394246fad9 100644
--- a/boot/bootdata/hivedef.inf
+++ b/boot/bootdata/hivedef.inf
@@ -1899,6 +1899,8 @@ 
HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced","StartMenuLog
 ; "Hidden" to be changed to 2 if we later want to have "Hide hidden files by 
default"
 
HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced","Hidden",0x00010003,1
 
HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Advanced","ShowSuperHidden",0x00010003,0
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CabinetState",,0x00000012
+HKCU,"SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CabinetState","FullPath",0x00010003,0
 HKCU,"SOFTWARE\Microsoft\Internet Explorer\Main","StatusBarOther",0x00010003,1
 
 ; ComDlg32
diff --git a/dll/win32/browseui/shellbrowser.cpp 
b/dll/win32/browseui/shellbrowser.cpp
index 71068d22ef4..fb4c1ccc59b 100644
--- a/dll/win32/browseui/shellbrowser.cpp
+++ b/dll/win32/browseui/shellbrowser.cpp
@@ -350,6 +350,7 @@ public:
     HRESULT UpdateUpState();
     void UpdateGotoMenu(HMENU theMenu);
     void UpdateViewMenu(HMENU theMenu);
+    void LoadSettings();
 
 /*    // *** IDockingWindowFrame methods ***
     virtual HRESULT STDMETHODCALLTYPE AddToolbar(IUnknown *punkSrc, LPCWSTR 
pwszItem, DWORD dwAddFlags);
@@ -709,10 +710,6 @@ CShellBrowser::CShellBrowser()
     fCurrentShellViewWindow = NULL;
     fCurrentDirectoryPIDL = NULL;
     fStatusBar = NULL;
-    fStatusBarVisible = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet 
Explorer\\Main",
-                                             L"StatusBarOther",
-                                             FALSE,
-                                             FALSE);
     fCurrentMenuBar = NULL;
     fHistoryObject = NULL;
     fHistoryStream = NULL;
@@ -786,6 +783,7 @@ HRESULT CShellBrowser::Initialize()
 
     fToolbarProxy.Initialize(m_hWnd, clientBar);
 
+    LoadSettings();
 
     // create status bar
     DWORD dwStatusStyle = WS_CHILD | WS_CLIPSIBLINGS | SBARS_SIZEGRIP | 
SBARS_TOOLTIPS;
@@ -1510,6 +1508,19 @@ void CShellBrowser::RepositionBars()
                         clientRect.bottom - clientRect.top, SWP_NOOWNERZORDER 
| SWP_NOZORDER);
 }
 
+void CShellBrowser::LoadSettings()
+{
+    fStatusBarVisible = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet 
Explorer\\Main",
+                                             L"StatusBarOther",
+                                             FALSE,
+                                             FALSE);
+
+    fCabinetState.fFullPathTitle = 
SHRegGetBoolUSValueW(L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CabinetState",
+                                                        L"FullPath",
+                                                        FALSE,
+                                                        FALSE);
+}
+
 HRESULT CShellBrowser::FireEvent(DISPID dispIdMember, int argCount, VARIANT 
*arguments)
 {
     DISPPARAMS                          params;

Reply via email to