mirror of
https://github.com/reactos/reactos.git
synced 2026-06-03 09:51:03 +08:00
[SHELL32][BROWSEUI] Implement ShellBrowser Apply/Reset default folder settings (#6912)
This commit is contained in:
@@ -2451,9 +2451,7 @@ SelectExtOnRename(void)
|
||||
LONG error;
|
||||
DWORD dwValue = FALSE, cbValue;
|
||||
|
||||
error = RegOpenKeyExW(HKEY_CURRENT_USER,
|
||||
L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Explorer",
|
||||
0, KEY_READ, &hKey);
|
||||
error = RegOpenKeyExW(HKEY_CURRENT_USER, REGSTR_PATH_EXPLORER, 0, KEY_READ, &hKey);
|
||||
if (error)
|
||||
return dwValue;
|
||||
|
||||
@@ -3792,6 +3790,23 @@ HRESULT WINAPI CDefView::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCm
|
||||
(nCmdexecopt == 0))
|
||||
return 1;
|
||||
|
||||
if (IsEqualIID(*pguidCmdGroup, CGID_DefView))
|
||||
{
|
||||
WCHAR SubKey[MAX_PATH];
|
||||
switch (nCmdID)
|
||||
{
|
||||
case DVCMDID_SET_DEFAULTFOLDER_SETTINGS:
|
||||
SHDeleteKey(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\ShellNoRoam\\Bags");
|
||||
FIXME("Save current as default\n");
|
||||
break;
|
||||
case DVCMDID_RESET_DEFAULTFOLDER_SETTINGS:
|
||||
wsprintfW(SubKey, L"%s\\%s", REGSTR_PATH_EXPLORER, L"Streams\\Default");
|
||||
SHDeleteKey(HKEY_CURRENT_USER, SubKey);
|
||||
SHDeleteKey(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\ShellNoRoam\\Bags");
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
return OLECMDERR_E_UNKNOWNGROUP;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user