xref: /reactos/dll/win32/browseui/settings.cpp (revision 2ea03b5b)
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 BOOL ShellSettings::Save()
11 {
12     SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"StatusBarOther",
13                      REG_DWORD, &fStatusBarVisible, sizeof(fStatusBarVisible), SHREGSET_FORCE_HKCU);
14 
15     SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton",
16                      REG_DWORD, &fShowGoButton, sizeof(fShowGoButton), SHREGSET_FORCE_HKCU);
17 
18     SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Toolbar", L"Locked",
19                      REG_DWORD, &fLocked, sizeof(fLocked), SHREGSET_FORCE_HKCU);
20 
21     return TRUE;
22 }
23 
24 BOOL ShellSettings::Load()
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     return TRUE;
36 }
37