1 /*
2 * PROJECT: ReactOS browseui
3 * LICENSE: LGPL-2.1-or-later (https://spdx.org/licenses/LGPL-2.1-or-later)
4 * PURPOSE: Stores settings for the file explorer UI.
5 * COPYRIGHT: Copyright 2023 Carl Bialorucki <cbialo2@outlook.com>
6 */
7
8 #include "precomp.h"
9
10 CabinetStateSettings gCabinetState;
11
Save()12 void ShellSettings::Save()
13 {
14 SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"StatusBarOther",
15 REG_DWORD, &fStatusBarVisible, sizeof(fStatusBarVisible), SHREGSET_FORCE_HKCU);
16
17 SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton",
18 REG_DWORD, &fShowGoButton, sizeof(fShowGoButton), SHREGSET_FORCE_HKCU);
19
20 SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Toolbar", L"Locked",
21 REG_DWORD, &fLocked, sizeof(fLocked), SHREGSET_FORCE_HKCU);
22 }
23
Load()24 void ShellSettings::Load()
25 {
26 fStatusBarVisible = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main",
27 L"StatusBarOther", FALSE, TRUE);
28
29 fShowGoButton = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main",
30 L"ShowGoButton", FALSE, TRUE);
31
32 fLocked = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Toolbar",
33 L"Locked", FALSE, TRUE);
34 }
35
Load()36 void CabinetStateSettings::Load()
37 {
38 this->cLength = sizeof(CABINETSTATE);
39 ReadCabinetState(this, this->cLength);
40
41 /* Overrides */
42 fFullPathTitle = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CabinetState",
43 L"FullPath", FALSE, FALSE);
44
45 fFullPathAddress = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CabinetState",
46 L"FullPathAddress", FALSE, TRUE);
47 }
48