mirror of
https://github.com/reactos/wine.git
synced 2024-11-25 20:59:54 +00:00
shell32: Show a confirmation before deleting files with syscalls.
This commit is contained in:
parent
4485bf0b61
commit
ea0a102d55
@ -164,6 +164,7 @@ STRINGTABLE DISCARDABLE
|
||||
IDS_DELETEFOLDER_CAPTION "Confirm folder deletion"
|
||||
IDS_DELETEITEM_TEXT "Are you sure you want to delete '%1'?"
|
||||
IDS_DELETEMULTIPLE_TEXT "Are you sure you want to delete these %1 items?"
|
||||
IDS_DELETESELECTED_TEXT "Are you sure you want to delete the selected item(s)?"
|
||||
IDS_OVERWRITEFILE_TEXT "OverWrite File %1?"
|
||||
IDS_OVERWRITEFILE_CAPTION "Confirm File OverWrite"
|
||||
|
||||
|
@ -147,6 +147,7 @@ void FreeChangeNotifications(void);
|
||||
#define ASK_DELETE_MULTIPLE_ITEM 3
|
||||
#define ASK_CREATE_FOLDER 4
|
||||
#define ASK_OVERWRITE_FILE 5
|
||||
#define ASK_DELETE_SELECTED 6
|
||||
|
||||
BOOL SHELL_DeleteDirectoryW(HWND hwnd, LPCWSTR pwszDir, BOOL bShowUI);
|
||||
BOOL SHELL_ConfirmDialogW(HWND hWnd, int nKindOfDialog, LPCWSTR szDir);
|
||||
|
@ -1825,8 +1825,12 @@ static HRESULT UNIXFS_delete_with_shfileop(UnixFolder *This, UINT cidl, LPCITEMI
|
||||
static HRESULT UNIXFS_delete_with_syscalls(UnixFolder *This, UINT cidl, LPCITEMIDLIST *apidl)
|
||||
{
|
||||
char szAbsolute[FILENAME_MAX], *pszRelative;
|
||||
static const WCHAR empty[] = {0};
|
||||
int i;
|
||||
|
||||
if (!SHELL_ConfirmDialogW(GetActiveWindow(), ASK_DELETE_SELECTED, empty))
|
||||
return S_OK;
|
||||
|
||||
lstrcpyA(szAbsolute, This->m_pszPath);
|
||||
pszRelative = szAbsolute + lstrlenA(szAbsolute);
|
||||
|
||||
|
@ -91,6 +91,11 @@ static BOOL SHELL_ConfirmIDs(int nKindOfDialog, SHELL_ConfirmIDstruc *ids)
|
||||
ids->caption_resource_id = IDS_DELETEITEM_CAPTION;
|
||||
ids->text_resource_id = IDS_DELETEMULTIPLE_TEXT;
|
||||
return TRUE;
|
||||
case ASK_DELETE_SELECTED:
|
||||
ids->icon_resource_id = IDI_SHELL_CONFIRM_DELETE;
|
||||
ids->caption_resource_id = IDS_DELETEITEM_CAPTION;
|
||||
ids->text_resource_id = IDS_DELETESELECTED_TEXT;
|
||||
return TRUE;
|
||||
case ASK_OVERWRITE_FILE:
|
||||
ids->hIconInstance = NULL;
|
||||
ids->icon_resource_id = IDI_WARNING;
|
||||
|
@ -52,6 +52,7 @@
|
||||
#define IDS_DELETEMULTIPLE_TEXT 35
|
||||
#define IDS_OVERWRITEFILE_CAPTION 36
|
||||
#define IDS_OVERWRITEFILE_TEXT 37
|
||||
#define IDS_DELETESELECTED_TEXT 38
|
||||
|
||||
#define IDS_RESTART_TITLE 40
|
||||
#define IDS_RESTART_PROMPT 41
|
||||
|
Loading…
Reference in New Issue
Block a user