mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[SHELL32] Implement SSF_NOCONFIRMRECYCLE recycler setting (#7434)
CORE-12309
This commit is contained in:
parent
8ff9781eae
commit
52265ae007
2 changed files with 9 additions and 1 deletions
|
@ -290,6 +290,7 @@ RecycleBinDlg(
|
|||
case WM_INITDIALOG:
|
||||
page = (PROPSHEETPAGE*)lParam;
|
||||
InitializeRecycleBinDlg(hwndDlg, (WCHAR)page->lParam);
|
||||
SendDlgItemMessage(hwndDlg, 14004, BM_SETCHECK, !SHELL_GetSetting(SSF_NOCONFIRMRECYCLE, fNoConfirmRecycle), 0);
|
||||
dwStyle = (DWORD) SendDlgItemMessage(hwndDlg, 14000, LVM_GETEXTENDEDLISTVIEWSTYLE, 0, 0);
|
||||
dwStyle = dwStyle | LVS_EX_FULLROWSELECT;
|
||||
SendDlgItemMessage(hwndDlg, 14000, LVM_SETEXTENDEDLISTVIEWSTYLE, 0, dwStyle);
|
||||
|
@ -324,6 +325,10 @@ RecycleBinDlg(
|
|||
lppl = (LPNMLISTVIEW) lParam;
|
||||
if (lppsn->hdr.code == PSN_APPLY)
|
||||
{
|
||||
SHELLSTATE ss;
|
||||
ss.fNoConfirmRecycle = SendDlgItemMessage(hwndDlg, 14004, BM_GETCHECK, 0, 0) == BST_UNCHECKED;
|
||||
SHGetSetSettings(&ss, SSF_NOCONFIRMRECYCLE, TRUE);
|
||||
|
||||
if (GetDefaultItem(hwndDlg, &li) > -1)
|
||||
{
|
||||
pItem = (PDRIVE_ITEM_CONTEXT)li.lParam;
|
||||
|
|
|
@ -1596,7 +1596,10 @@ static HRESULT delete_files(FILE_OPERATION *op, const FILE_LIST *flFrom)
|
|||
bTrash = (op->req->fFlags & FOF_ALLOWUNDO)
|
||||
&& TRASH_CanTrashFile(flFrom->feFiles[0].szFullPath);
|
||||
|
||||
if (!(op->req->fFlags & FOF_NOCONFIRMATION) || (!bTrash && op->req->fFlags & FOF_WANTNUKEWARNING))
|
||||
BOOL confirm = !(op->req->fFlags & FOF_NOCONFIRMATION);
|
||||
if (bTrash && SHELL_GetSetting(SSF_NOCONFIRMRECYCLE, fNoConfirmRecycle))
|
||||
confirm = FALSE;
|
||||
if (confirm || (!bTrash && op->req->fFlags & FOF_WANTNUKEWARNING))
|
||||
if (!confirm_delete_list(op->req->hwnd, op->req->fFlags, bTrash, flFrom))
|
||||
{
|
||||
op->req->fAnyOperationsAborted = TRUE;
|
||||
|
|
Loading…
Reference in a new issue