ReactOS 0.4.16-dev-197-g92996da
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, 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
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}
#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:1801
#define SHREGSET_FORCE_HKCU
Definition: shlwapi.h:312
WORD cLength
Definition: shlobj.h:2385
BOOL fFullPathTitle
Definition: shlobj.h:2387
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