diff --git a/dlls/shell32/shell32_En.rc b/dlls/shell32/shell32_En.rc index 689858da14..2cf804722e 100644 --- a/dlls/shell32/shell32_En.rc +++ b/dlls/shell32/shell32_En.rc @@ -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" diff --git a/dlls/shell32/shell32_main.h b/dlls/shell32/shell32_main.h index cc021d1480..1ba0126cd1 100644 --- a/dlls/shell32/shell32_main.h +++ b/dlls/shell32/shell32_main.h @@ -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); diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c index 2fd7de5d0b..7d458b7dfa 100644 --- a/dlls/shell32/shfldr_unixfs.c +++ b/dlls/shell32/shfldr_unixfs.c @@ -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); diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c index 977e301bd3..e1d7ba96ff 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -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; diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h index aa95d33860..7acd382909 100644 --- a/dlls/shell32/shresdef.h +++ b/dlls/shell32/shresdef.h @@ -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