Rebase against 16e73be10d940c9c04101a47687a6f8a385c2b0f.

This commit is contained in:
Zebediah Figura
2021-09-17 17:45:25 -05:00
parent 3a06c15dd2
commit fdcc8bec48
9 changed files with 105 additions and 105 deletions

View File

@@ -1,4 +1,4 @@
From 0cc42072f1b4585c2c0b11faf5a33282ce603853 Mon Sep 17 00:00:00 2001
From 10a17211f70192614d6e799ed76fe811b120dcc2 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Fri, 27 Feb 2015 01:04:33 +0100
Subject: [PATCH] shell32: Implement file operation progress dialog.
@@ -11,10 +11,10 @@ Based on a patch by Huw Campbell.
3 files changed, 285 insertions(+), 7 deletions(-)
diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc
index f19b09f8c21..f9b75df1f05 100644
index f7f8eea2da5..eb03982f6a9 100644
--- a/dlls/shell32/shell32.rc
+++ b/dlls/shell32/shell32.rc
@@ -184,6 +184,13 @@ If the files in the destination folder have the same names as files in the\n\
@@ -182,6 +182,13 @@ If the files in the destination folder have the same names as files in the\n\
selected folder they will be replaced. Do you still want to move or copy\n\
the folder?"
@@ -29,10 +29,10 @@ index f19b09f8c21..f9b75df1f05 100644
IDS_RESTART_TITLE "Restart"
IDS_RESTART_PROMPT "Do you want to simulate a Windows reboot?"
diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c
index 91354d4c2ad..2263b20de8a 100644
index 50ee0486a23..4c8dcb00ac6 100644
--- a/dlls/shell32/shlfileop.c
+++ b/dlls/shell32/shlfileop.c
@@ -67,6 +67,10 @@ typedef struct
@@ -65,6 +65,10 @@ typedef struct
DWORD dwYesToAllMask;
BOOL bManyItems;
BOOL bCancelled;
@@ -43,7 +43,7 @@ index 91354d4c2ad..2263b20de8a 100644
} FILE_OPERATION;
typedef struct
@@ -105,6 +109,12 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly);
@@ -103,6 +107,12 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly);
static int copy_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFrom, FILE_LIST *flTo);
static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFrom, const FILE_LIST *flTo);
@@ -56,7 +56,7 @@ index 91354d4c2ad..2263b20de8a 100644
/* Confirm dialogs with an optional "Yes To All" as used in file operations confirmations
*/
static const WCHAR CONFIRM_MSG_PROP[] = {'W','I','N','E','_','C','O','N','F','I','R','M',0};
@@ -393,6 +403,13 @@ static DWORD SHELL_DeleteDirectoryW(FILE_OPERATION *op, LPCWSTR pszDir, BOOL bSh
@@ -391,6 +401,13 @@ static DWORD SHELL_DeleteDirectoryW(FILE_OPERATION *op, LPCWSTR pszDir, BOOL bSh
ret = SHELL_DeleteDirectoryW(op, szTemp, FALSE);
else
ret = SHNotifyDeleteFileW(op, szTemp);
@@ -70,7 +70,7 @@ index 91354d4c2ad..2263b20de8a 100644
} while (!ret && FindNextFileW(hFind, &wfd));
}
FindClose(hFind);
@@ -546,10 +563,22 @@ static DWORD SHNotifyDeleteFileA(FILE_OPERATION *op, LPCSTR path)
@@ -544,10 +561,22 @@ static DWORD SHNotifyDeleteFileA(FILE_OPERATION *op, LPCSTR path)
static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
{
BOOL ret;
@@ -94,7 +94,7 @@ index 91354d4c2ad..2263b20de8a 100644
ret = DeleteFileW(path);
if (!ret)
@@ -562,6 +591,14 @@ static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
@@ -560,6 +589,14 @@ static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
}
if (ret)
{
@@ -109,7 +109,7 @@ index 91354d4c2ad..2263b20de8a 100644
SHChangeNotify(SHCNE_DELETE, SHCNF_PATHW, path, NULL);
return ERROR_SUCCESS;
}
@@ -596,9 +633,10 @@ static DWORD SHNotifyMoveFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest)
@@ -594,9 +631,10 @@ static DWORD SHNotifyMoveFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest)
TRACE("(%s %s)\n", debugstr_w(src), debugstr_w(dest));
@@ -122,7 +122,7 @@ index 91354d4c2ad..2263b20de8a 100644
/* MOVEFILE_REPLACE_EXISTING fails with dirs, so try MoveFile */
if (!ret)
@@ -648,14 +686,15 @@ static DWORD SHNotifyCopyFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest, BO
@@ -646,14 +684,15 @@ static DWORD SHNotifyCopyFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest, BO
TRACE("(%s %s %s)\n", debugstr_w(src), debugstr_w(dest), bFailIfExists ? "failIfExists" : "");
@@ -140,7 +140,7 @@ index 91354d4c2ad..2263b20de8a 100644
if (ret)
{
SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, dest, NULL);
@@ -1297,6 +1336,8 @@ static int copy_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
@@ -1295,6 +1334,8 @@ static int copy_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
}
/* Vista return code. XP would return e.g. ERROR_FILE_NOT_FOUND, ERROR_ALREADY_EXISTS */
@@ -149,7 +149,7 @@ index 91354d4c2ad..2263b20de8a 100644
if (op->bCancelled)
return ERROR_CANCELLED;
}
@@ -1379,13 +1420,17 @@ static int delete_files(FILE_OPERATION *op, const FILE_LIST *flFrom)
@@ -1376,13 +1417,17 @@ static int delete_files(FILE_OPERATION *op, const FILE_LIST *flFrom)
/* delete the file or directory */
if (IsAttribFile(fileEntry->attributes))
@@ -169,7 +169,7 @@ index 91354d4c2ad..2263b20de8a 100644
}
return ERROR_SUCCESS;
@@ -1460,6 +1505,11 @@ static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
@@ -1457,6 +1502,11 @@ static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
move_to_dir(op, entryToMove, fileDest);
else
SHNotifyMoveFileW(op, entryToMove->szFullPath, fileDest->szFullPath);
@@ -181,7 +181,7 @@ index 91354d4c2ad..2263b20de8a 100644
}
if (mismatched > 0)
@@ -1519,6 +1569,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
@@ -1516,6 +1566,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
{
FILE_OPERATION op;
FILE_LIST flFrom, flTo;
@@ -189,7 +189,7 @@ index 91354d4c2ad..2263b20de8a 100644
int ret = 0;
if (!lpFileOp)
@@ -1537,9 +1588,31 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
@@ -1534,9 +1585,31 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
ZeroMemory(&op, sizeof(op));
op.req = lpFileOp;
@@ -221,7 +221,7 @@ index 91354d4c2ad..2263b20de8a 100644
switch (lpFileOp->wFunc)
{
case FO_COPY:
@@ -1559,6 +1632,12 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
@@ -1556,6 +1629,12 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
break;
}
@@ -234,7 +234,7 @@ index 91354d4c2ad..2263b20de8a 100644
destroy_file_list(&flFrom);
if (lpFileOp->wFunc != FO_DELETE)
@@ -1567,6 +1646,9 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
@@ -1564,6 +1643,9 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
if (ret == ERROR_CANCELLED)
lpFileOp->fAnyOperationsAborted = TRUE;
@@ -244,7 +244,7 @@ index 91354d4c2ad..2263b20de8a 100644
SetLastError(ERROR_SUCCESS);
return ret;
}
@@ -2055,3 +2137,184 @@ HRESULT WINAPI IFileOperation_Constructor(IUnknown *outer, REFIID riid, void **o
@@ -2052,3 +2134,184 @@ HRESULT WINAPI IFileOperation_Constructor(IUnknown *outer, REFIID riid, void **o
return hr;
}
@@ -253,7 +253,7 @@ index 91354d4c2ad..2263b20de8a 100644
+{
+ WIN32_FIND_DATAW wfd;
+ HANDLE find;
+ UINT i = strlenW(buf);
+ UINT i = wcslen(buf);
+ WCHAR *file = buf + i;
+ size_t size = MAX_PATH - i;
+
@@ -430,10 +430,10 @@ index 91354d4c2ad..2263b20de8a 100644
+ return op->bCancelled ? PROGRESS_CANCEL : PROGRESS_CONTINUE;
+}
diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h
index 92185d637e7..33edb584c1b 100644
index af8eb46a09f..210046e729d 100644
--- a/dlls/shell32/shresdef.h
+++ b/dlls/shell32/shresdef.h
@@ -149,6 +149,14 @@
@@ -147,6 +147,14 @@
#define IDM_RECYCLEBIN_RESTORE 301
#define IDM_RECYCLEBIN_ERASE 302
@@ -449,5 +449,5 @@ index 92185d637e7..33edb584c1b 100644
#define IDS_RECYCLEBIN_FOLDER_NAME 8964
--
2.20.1
2.33.0