You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Rebase against f232252951fec637758f6b2c4eeda1c0e0650310.
This commit is contained in:
@@ -1,24 +1,23 @@
|
||||
From c785e3546c79d3247a0bc3abb5deee8b36d65951 Mon Sep 17 00:00:00 2001
|
||||
From 912755a07e996e6178a749f8b344c71a9401d6d8 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 2 Apr 2016 04:17:19 +0200
|
||||
Subject: shell32: Add parameter to ISFHelper::DeleteItems to allow deleting
|
||||
files without confirmation.
|
||||
Subject: [PATCH] shell32: Add parameter to ISFHelper::DeleteItems to allow
|
||||
deleting files without confirmation.
|
||||
|
||||
---
|
||||
dlls/shell32/brsfolder.c | 2 +-
|
||||
dlls/shell32/recyclebin.c | 6 +++---
|
||||
dlls/shell32/shellfolder.h | 4 ++--
|
||||
dlls/shell32/shfldr_fs.c | 3 ++-
|
||||
dlls/shell32/shfldr_unixfs.c | 7 ++++---
|
||||
dlls/shell32/shlview.c | 2 +-
|
||||
dlls/shell32/shlview_cmenu.c | 2 +-
|
||||
7 files changed, 14 insertions(+), 12 deletions(-)
|
||||
6 files changed, 10 insertions(+), 9 deletions(-)
|
||||
|
||||
diff --git a/dlls/shell32/brsfolder.c b/dlls/shell32/brsfolder.c
|
||||
index d771d0b..d8926e3 100644
|
||||
index 188524d6a99..d33d3f01009 100644
|
||||
--- a/dlls/shell32/brsfolder.c
|
||||
+++ b/dlls/shell32/brsfolder.c
|
||||
@@ -658,7 +658,7 @@ static LRESULT BrsFolder_Treeview_Keydown(browse_info *info, LPNMTVKEYDOWN keydo
|
||||
@@ -657,7 +657,7 @@ static LRESULT BrsFolder_Treeview_Keydown(browse_info *info, LPNMTVKEYDOWN keydo
|
||||
return 0;
|
||||
|
||||
/* perform the item deletion - tree view gets updated over shell notification */
|
||||
@@ -28,10 +27,10 @@ index d771d0b..d8926e3 100644
|
||||
}
|
||||
break;
|
||||
diff --git a/dlls/shell32/recyclebin.c b/dlls/shell32/recyclebin.c
|
||||
index 0d80e63..66c5cc2 100644
|
||||
index 807cae3d81d..60462f9358f 100644
|
||||
--- a/dlls/shell32/recyclebin.c
|
||||
+++ b/dlls/shell32/recyclebin.c
|
||||
@@ -182,7 +182,7 @@ static void DoErase(RecycleBinMenu *This)
|
||||
@@ -173,7 +173,7 @@ static void DoErase(RecycleBinMenu *This)
|
||||
ISFHelper *helper;
|
||||
IShellFolder2_QueryInterface(This->folder,&IID_ISFHelper,(void**)&helper);
|
||||
if(helper)
|
||||
@@ -40,7 +39,7 @@ index 0d80e63..66c5cc2 100644
|
||||
}
|
||||
|
||||
static void DoRestore(RecycleBinMenu *This)
|
||||
@@ -815,10 +815,10 @@ static HRESULT erase_items(HWND parent,const LPCITEMIDLIST * apidl, UINT cidl, B
|
||||
@@ -800,10 +800,10 @@ static HRESULT erase_items(HWND parent,const LPCITEMIDLIST * apidl, UINT cidl, B
|
||||
}
|
||||
|
||||
static HRESULT WINAPI RecycleBin_DeleteItems(ISFHelper * iface, UINT cidl,
|
||||
@@ -54,7 +53,7 @@ index 0d80e63..66c5cc2 100644
|
||||
|
||||
static HRESULT WINAPI RecycleBin_CopyItems(ISFHelper * iface,
|
||||
diff --git a/dlls/shell32/shellfolder.h b/dlls/shell32/shellfolder.h
|
||||
index 942e0e7..b8083a2 100644
|
||||
index 942e0e7ea28..b8083a2625a 100644
|
||||
--- a/dlls/shell32/shellfolder.h
|
||||
+++ b/dlls/shell32/shellfolder.h
|
||||
@@ -48,7 +48,7 @@ DECLARE_INTERFACE_(ISFHelper,IUnknown)
|
||||
@@ -76,10 +75,10 @@ index 942e0e7..b8083a2 100644
|
||||
#endif
|
||||
|
||||
diff --git a/dlls/shell32/shfldr_fs.c b/dlls/shell32/shfldr_fs.c
|
||||
index 66150f4..32178be 100644
|
||||
index 2fa17dee1dc..8d5e016596f 100644
|
||||
--- a/dlls/shell32/shfldr_fs.c
|
||||
+++ b/dlls/shell32/shfldr_fs.c
|
||||
@@ -1225,7 +1225,7 @@ static WCHAR *build_paths_list(LPCWSTR wszBasePath, int cidl, const LPCITEMIDLIS
|
||||
@@ -1285,7 +1285,7 @@ static WCHAR *build_paths_list(LPCWSTR wszBasePath, int cidl, const LPCITEMIDLIS
|
||||
* deletes items in folder
|
||||
*/
|
||||
static HRESULT WINAPI
|
||||
@@ -88,7 +87,7 @@ index 66150f4..32178be 100644
|
||||
{
|
||||
IGenericSFImpl *This = impl_from_ISFHelper(iface);
|
||||
UINT i;
|
||||
@@ -1250,6 +1250,7 @@ ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPCITEMIDLIST * apidl)
|
||||
@@ -1310,6 +1310,7 @@ ISFHelper_fnDeleteItems (ISFHelper * iface, UINT cidl, LPCITEMIDLIST * apidl)
|
||||
op.wFunc = FO_DELETE;
|
||||
op.pFrom = wszPathsList;
|
||||
op.fFlags = FOF_ALLOWUNDO;
|
||||
@@ -96,50 +95,11 @@ index 66150f4..32178be 100644
|
||||
if (SHFileOperationW(&op))
|
||||
{
|
||||
WARN("SHFileOperation failed\n");
|
||||
diff --git a/dlls/shell32/shfldr_unixfs.c b/dlls/shell32/shfldr_unixfs.c
|
||||
index 732a103..a2ca852 100644
|
||||
--- a/dlls/shell32/shfldr_unixfs.c
|
||||
+++ b/dlls/shell32/shfldr_unixfs.c
|
||||
@@ -1942,7 +1942,7 @@ static HRESULT WINAPI SFHelper_AddFolder(ISFHelper* iface, HWND hwnd, LPCWSTR pw
|
||||
* be converted, S_FALSE is returned. In such situation DeleteItems will try to delete
|
||||
* the files using syscalls
|
||||
*/
|
||||
-static HRESULT UNIXFS_delete_with_shfileop(UnixFolder *This, UINT cidl, const LPCITEMIDLIST *apidl)
|
||||
+static HRESULT UNIXFS_delete_with_shfileop(UnixFolder *This, UINT cidl, const LPCITEMIDLIST *apidl, BOOL confirm)
|
||||
{
|
||||
char szAbsolute[FILENAME_MAX], *pszRelative;
|
||||
LPWSTR wszPathsList, wszListPos;
|
||||
@@ -1984,6 +1984,7 @@ static HRESULT UNIXFS_delete_with_shfileop(UnixFolder *This, UINT cidl, const LP
|
||||
op.wFunc = FO_DELETE;
|
||||
op.pFrom = wszPathsList;
|
||||
op.fFlags = FOF_ALLOWUNDO;
|
||||
+ if (!confirm) op.fFlags |= FOF_NOCONFIRMATION;
|
||||
if (SHFileOperationW(&op))
|
||||
{
|
||||
WARN("SHFileOperationW failed\n");
|
||||
@@ -2022,7 +2023,7 @@ static HRESULT UNIXFS_delete_with_syscalls(UnixFolder *This, UINT cidl, const LP
|
||||
return S_OK;
|
||||
}
|
||||
|
||||
-static HRESULT WINAPI SFHelper_DeleteItems(ISFHelper* iface, UINT cidl, LPCITEMIDLIST* apidl)
|
||||
+static HRESULT WINAPI SFHelper_DeleteItems(ISFHelper *iface, UINT cidl, LPCITEMIDLIST *apidl, BOOL confirm)
|
||||
{
|
||||
UnixFolder *This = impl_from_ISFHelper(iface);
|
||||
char szAbsolute[FILENAME_MAX], *pszRelative;
|
||||
@@ -2033,7 +2034,7 @@ static HRESULT WINAPI SFHelper_DeleteItems(ISFHelper* iface, UINT cidl, LPCITEMI
|
||||
|
||||
TRACE("(%p)->(%d %p)\n", This, cidl, apidl);
|
||||
|
||||
- hr = UNIXFS_delete_with_shfileop(This, cidl, apidl);
|
||||
+ hr = UNIXFS_delete_with_shfileop(This, cidl, apidl, confirm);
|
||||
if (hr == S_FALSE)
|
||||
hr = UNIXFS_delete_with_syscalls(This, cidl, apidl);
|
||||
|
||||
diff --git a/dlls/shell32/shlview.c b/dlls/shell32/shlview.c
|
||||
index c0c027f..9f23bfe 100644
|
||||
index 63512deb4b2..59376fb905f 100644
|
||||
--- a/dlls/shell32/shlview.c
|
||||
+++ b/dlls/shell32/shlview.c
|
||||
@@ -1577,7 +1577,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
|
||||
@@ -1573,7 +1573,7 @@ static LRESULT ShellView_OnNotify(IShellViewImpl * This, UINT CtlID, LPNMHDR lpn
|
||||
}
|
||||
|
||||
/* perform the item deletion */
|
||||
@@ -149,10 +109,10 @@ index c0c027f..9f23bfe 100644
|
||||
|
||||
/* free pidl array memory */
|
||||
diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c
|
||||
index 0daa5ef..0d380a8 100644
|
||||
index 7ebdaff588b..8ea828942e0 100644
|
||||
--- a/dlls/shell32/shlview_cmenu.c
|
||||
+++ b/dlls/shell32/shlview_cmenu.c
|
||||
@@ -294,7 +294,7 @@ static void DoDelete(ContextMenu *This)
|
||||
@@ -447,7 +447,7 @@ static void DoDelete(ContextMenu *This)
|
||||
IShellFolder_QueryInterface(This->parent, &IID_ISFHelper, (void**)&helper);
|
||||
if (helper)
|
||||
{
|
||||
@@ -162,5 +122,5 @@ index 0daa5ef..0d380a8 100644
|
||||
}
|
||||
}
|
||||
--
|
||||
2.7.4
|
||||
2.33.0
|
||||
|
||||
|
Reference in New Issue
Block a user