mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 10:04:49 +00:00
674136bcd0
Save/Restore the state of the ShellBrowser toolbar/addressbar/statusbar. Windows shares the state of the Go button and the locked state between Explorer and Internet Explorer but the bar states are not shared. Notes: - Seems to fix CORE-17236. - The stream layout does not match Windows so it uses a different name. The toolbar customize dialog needs to be fixed before it makes sense trying to save the toolbar state and the layout of other bands. CORE-17236
47 lines
1.9 KiB
C++
47 lines
1.9 KiB
C++
/*
|
|
* PROJECT: ReactOS browseui
|
|
* LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
|
|
* PURPOSE: Stores settings for the file explorer UI.
|
|
* COPYRIGHT: Copyright 2023 Carl Bialorucki <cbialo2@outlook.com>
|
|
*/
|
|
|
|
#include "precomp.h"
|
|
|
|
CabinetStateSettings gCabinetState;
|
|
|
|
void ShellSettings::Save()
|
|
{
|
|
SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"StatusBarOther",
|
|
REG_DWORD, &fStatusBarVisible, sizeof(fStatusBarVisible), SHREGSET_FORCE_HKCU);
|
|
|
|
SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton",
|
|
REG_DWORD, &fShowGoButton, sizeof(fShowGoButton), SHREGSET_FORCE_HKCU);
|
|
|
|
SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Toolbar", L"Locked",
|
|
REG_DWORD, &fLocked, sizeof(fLocked), SHREGSET_FORCE_HKCU);
|
|
}
|
|
|
|
void ShellSettings::Load()
|
|
{
|
|
fStatusBarVisible = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main",
|
|
L"StatusBarOther", FALSE, TRUE);
|
|
|
|
fShowGoButton = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main",
|
|
L"ShowGoButton", FALSE, TRUE);
|
|
|
|
fLocked = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Toolbar",
|
|
L"Locked", FALSE, TRUE);
|
|
}
|
|
|
|
void CabinetStateSettings::Load()
|
|
{
|
|
this->cLength = sizeof(CABINETSTATE);
|
|
ReadCabinetState(this, this->cLength);
|
|
|
|
/* Overrides */
|
|
fFullPathTitle = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CabinetState",
|
|
L"FullPath", FALSE, FALSE);
|
|
|
|
fFullPathAddress = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CabinetState",
|
|
L"FullPathAddress", FALSE, TRUE);
|
|
}
|