ReactOS 0.4.15-dev-7968-g24a56f8
settings.cpp
Go to the documentation of this file.
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
11
13{
14 SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"StatusBarOther",
16
17 SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton",
19
20 SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Toolbar", L"Locked",
22}
23
25{
26 fStatusBarVisible = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main",
27 L"StatusBarOther", FALSE, FALSE);
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
37{
38 ReadCabinetState(this, this->cLength);
39
40 /* Overrides */
41 fFullPathTitle = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CabinetState",
42 L"FullPath", FALSE, FALSE);
43
44 fFullPathAddress = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\CabinetState",
45 L"FullPathAddress", FALSE, TRUE);
46}
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
CabinetStateSettings gCabinetState
Definition: settings.cpp:10
LONG WINAPI SHRegSetUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwType, LPVOID pvData, DWORD cbData, DWORD dwFlags)
Definition: reg.c:673
BOOL WINAPI SHRegGetBoolUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, BOOL fIgnoreHKCU, BOOL fDefault)
Definition: reg.c:770
#define L(x)
Definition: ntvdm.h:50
#define REG_DWORD
Definition: sdbapi.c:596
BOOL WINAPI ReadCabinetState(CABINETSTATE *cs, int length)
Definition: shellord.c:1609
#define SHREGSET_FORCE_HKCU
Definition: shlwapi.h:312
WORD cLength
Definition: shlobj.h:2370
BOOL fFullPathTitle
Definition: shlobj.h:2372
void Save()
Definition: settings.cpp:12
void Load()
Definition: settings.cpp:24
BOOL fStatusBarVisible
Definition: settings.h:17
BOOL fLocked
Definition: settings.h:15
BOOL fShowGoButton
Definition: settings.h:16