mirror of
https://github.com/reactos/reactos.git
synced 2025-07-03 01:11:23 +00:00
[BROWSEUI] Add status bar view state persistence (#5366)
- Use `HKCU\Software\Microsoft\Internet Explorer\Main\StatusBarOther` registry key for the setting persistence. - Set its value to 1 when the status bar is visible, and to 0 when the status bar is hidden. - Query it when the file browser is initialized to set the correct view state for the status bar. - Set the default state of the status bar to hidden if the registry key does not exist, matching the behavior of Windows Server 2003. CORE-19010
This commit is contained in:
parent
44a312478d
commit
209439a5ae
1 changed files with 13 additions and 3 deletions
|
@ -709,7 +709,10 @@ CShellBrowser::CShellBrowser()
|
||||||
fCurrentShellViewWindow = NULL;
|
fCurrentShellViewWindow = NULL;
|
||||||
fCurrentDirectoryPIDL = NULL;
|
fCurrentDirectoryPIDL = NULL;
|
||||||
fStatusBar = NULL;
|
fStatusBar = NULL;
|
||||||
fStatusBarVisible = true;
|
fStatusBarVisible = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main",
|
||||||
|
L"StatusBarOther",
|
||||||
|
FALSE,
|
||||||
|
FALSE);
|
||||||
fCurrentMenuBar = NULL;
|
fCurrentMenuBar = NULL;
|
||||||
fHistoryObject = NULL;
|
fHistoryObject = NULL;
|
||||||
fHistoryStream = NULL;
|
fHistoryStream = NULL;
|
||||||
|
@ -788,8 +791,6 @@ HRESULT CShellBrowser::Initialize()
|
||||||
fStatusBar = CreateWindow(STATUSCLASSNAMEW, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS |
|
fStatusBar = CreateWindow(STATUSCLASSNAMEW, NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS |
|
||||||
SBT_NOBORDERS | SBT_TOOLTIPS, 0, 0, 500, 20, m_hWnd, (HMENU)0xa001,
|
SBT_NOBORDERS | SBT_TOOLTIPS, 0, 0, 500, 20, m_hWnd, (HMENU)0xa001,
|
||||||
_AtlBaseModule.GetModuleInstance(), 0);
|
_AtlBaseModule.GetModuleInstance(), 0);
|
||||||
fStatusBarVisible = true;
|
|
||||||
|
|
||||||
|
|
||||||
ShowWindow(SW_SHOWNORMAL);
|
ShowWindow(SW_SHOWNORMAL);
|
||||||
UpdateWindow();
|
UpdateWindow();
|
||||||
|
@ -3663,6 +3664,15 @@ LRESULT CShellBrowser::OnToggleStatusBarVisible(WORD wNotifyCode, WORD wID, HWND
|
||||||
::ShowWindow(fStatusBar, fStatusBarVisible ? SW_SHOW : SW_HIDE);
|
::ShowWindow(fStatusBar, fStatusBarVisible ? SW_SHOW : SW_HIDE);
|
||||||
RepositionBars();
|
RepositionBars();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DWORD dwStatusBarVisible = fStatusBarVisible;
|
||||||
|
SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main",
|
||||||
|
L"StatusBarOther",
|
||||||
|
REG_DWORD,
|
||||||
|
&dwStatusBarVisible,
|
||||||
|
sizeof(dwStatusBarVisible),
|
||||||
|
SHREGSET_FORCE_HKCU);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue