diff --git a/patches/shell32-Progress_Dialog/0002-shell32-Pass-FILE_INFORMATION-into-SHNotify-function.patch b/patches/shell32-Progress_Dialog/0002-shell32-Pass-FILE_INFORMATION-into-SHNotify-function.patch index b2e9ed07..033fb3bd 100644 --- a/patches/shell32-Progress_Dialog/0002-shell32-Pass-FILE_INFORMATION-into-SHNotify-function.patch +++ b/patches/shell32-Progress_Dialog/0002-shell32-Pass-FILE_INFORMATION-into-SHNotify-function.patch @@ -1,15 +1,15 @@ -From 72e0335ca16cd47b520db1fec02b5961d6da8da7 Mon Sep 17 00:00:00 2001 +From 578afa6089ac629fca4aec814cba2b534aabbf28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= Date: Thu, 26 Feb 2015 23:21:26 +0100 Subject: [PATCH] shell32: Pass FILE_INFORMATION into SHNotify* functions. Preparation of the progressbar work. Based on a patch by Huw Campbell. --- - dlls/shell32/shlfileop.c | 201 +++++++++++++++++++-------------------- - 1 file changed, 98 insertions(+), 103 deletions(-) + dlls/shell32/shlfileop.c | 214 +++++++++++++++++++-------------------- + 1 file changed, 104 insertions(+), 110 deletions(-) diff --git a/dlls/shell32/shlfileop.c b/dlls/shell32/shlfileop.c -index 40d2c1d8a3c..07ab3f805aa 100644 +index 9d2d4dc3f82..4bd486a7426 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c @@ -55,16 +55,6 @@ WINE_DEFAULT_DEBUG_CHANNEL(shell); @@ -379,18 +379,58 @@ index 40d2c1d8a3c..07ab3f805aa 100644 if (ret) return ret; -@@ -1381,16 +1378,16 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom) +@@ -1381,12 +1378,12 @@ static int delete_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom) } - /* moves a file or directory to another directory */ --static void move_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo) -+static void move_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo) + /* move a directory to another directory */ +-static void move_dir_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo) ++static void move_dir_to_dir(FILE_OPERATION *op, BOOL multidest, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo) { - WCHAR szDestPath[MAX_PATH]; + WCHAR from[MAX_PATH], to[MAX_PATH]; - PathCombineW(szDestPath, feTo->szFullPath, feFrom->szFilename); -- SHNotifyMoveFileW(feFrom->szFullPath, szDestPath); -+ SHNotifyMoveFileW(op, feFrom->szFullPath, szDestPath); + /* Windows doesn't combine path when FOF_MULTIDESTFILES is set */ +- if (lpFileOp->fFlags & FOF_MULTIDESTFILES) ++ if (op->req->fFlags & FOF_MULTIDESTFILES) + lstrcpyW(to, feTo->szFullPath); + else + PathCombineW(to, feTo->szFullPath, feFrom->szFilename); +@@ -1397,15 +1394,14 @@ static void move_dir_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom + with wildcard and restart SHFileOperationW */ + if (PathFileExistsW(to)) + { +- SHFILEOPSTRUCTW fileOp; ++ SHFILEOPSTRUCTW fileOp = {0}; + + PathCombineW(from, feFrom->szFullPath, L"*.*"); + from[lstrlenW(from) + 1] = '\0'; + +- fileOp = *lpFileOp; + fileOp.pFrom = from; + fileOp.pTo = to; +- fileOp.fFlags &= ~FOF_MULTIDESTFILES; /* we know we're moving to one dir */ ++ fileOp.fFlags = op->req->fFlags & ~FOF_MULTIDESTFILES; /* we know we're moving to one dir */ + + /* Don't ask the user about overwriting files when he accepted to overwrite the + folder. FIXME: this is not exactly what Windows does - e.g. there would be +@@ -1418,22 +1414,22 @@ static void move_dir_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom + } + else + { +- SHNotifyMoveFileW(feFrom->szFullPath, to); ++ SHNotifyMoveFileW(op, feFrom->szFullPath, to); + } + } + + /* move a file to another directory */ +-static void move_file_to_dir(LPSHFILEOPSTRUCTW lpFileOp, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo) ++static void move_file_to_dir(FILE_OPERATION *op, const FILE_ENTRY *feFrom, const FILE_ENTRY *feTo) + { + WCHAR to[MAX_PATH]; + + PathCombineW(to, feTo->szFullPath, feFrom->szFilename); + to[lstrlenW(to) + 1] = '\0'; +- SHNotifyMoveFileW(feFrom->szFullPath, to); ++ SHNotifyMoveFileW(op, feFrom->szFullPath, to); } /* the FO_MOVE operation */ @@ -399,7 +439,7 @@ index 40d2c1d8a3c..07ab3f805aa 100644 { DWORD i; INT mismatched = 0; -@@ -1404,14 +1401,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const +@@ -1447,14 +1443,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const if (!flTo->dwNumFiles) return ERROR_FILE_NOT_FOUND; @@ -416,7 +456,7 @@ index 40d2c1d8a3c..07ab3f805aa 100644 flFrom->dwNumFiles > flTo->dwNumFiles) { return ERROR_CANCELLED; -@@ -1421,7 +1416,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const +@@ -1464,7 +1458,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const if (ret && ret != ERROR_ALREADY_EXISTS) return ret; @@ -425,7 +465,7 @@ index 40d2c1d8a3c..07ab3f805aa 100644 mismatched = flFrom->dwNumFiles - flTo->dwNumFiles; fileDest = &flTo->feFiles[0]; -@@ -1432,7 +1427,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const +@@ -1475,7 +1469,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const if (!PathFileExistsW(fileDest->szDirectory)) return ERROR_CANCELLED; @@ -434,19 +474,23 @@ index 40d2c1d8a3c..07ab3f805aa 100644 { if (i >= flTo->dwNumFiles) break; -@@ -1446,9 +1441,9 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const - } - +@@ -1491,12 +1485,12 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const if (fileDest->bExists && IsAttribDir(fileDest->attributes)) -- move_to_dir(lpFileOp, entryToMove, fileDest); -+ move_to_dir(op, entryToMove, fileDest); + { + if (IsAttribDir(entryToMove->attributes)) +- move_dir_to_dir(lpFileOp, entryToMove, fileDest); ++ move_dir_to_dir(op, multidest, entryToMove, fileDest); + else +- move_file_to_dir(lpFileOp, entryToMove, fileDest); ++ move_file_to_dir(op, entryToMove, fileDest); + } else - SHNotifyMoveFileW(entryToMove->szFullPath, fileDest->szFullPath); + SHNotifyMoveFileW(op, entryToMove->szFullPath, fileDest->szFullPath); } if (mismatched > 0) -@@ -1463,7 +1458,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const +@@ -1511,7 +1505,7 @@ static int move_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, const } /* the FO_RENAME files */ @@ -455,7 +499,7 @@ index 40d2c1d8a3c..07ab3f805aa 100644 { const FILE_ENTRY *feFrom; const FILE_ENTRY *feTo; -@@ -1485,7 +1480,7 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con +@@ -1533,7 +1527,7 @@ static int rename_files(LPSHFILEOPSTRUCTW lpFileOp, const FILE_LIST *flFrom, con if (feTo->bExists) return ERROR_ALREADY_EXISTS; @@ -464,7 +508,7 @@ index 40d2c1d8a3c..07ab3f805aa 100644 } /* alert the user if an unsupported flag is used */ -@@ -1532,16 +1527,16 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) +@@ -1580,16 +1574,16 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) switch (lpFileOp->wFunc) { case FO_COPY: diff --git a/patches/shell32-Progress_Dialog/0003-shell32-Implement-file-operation-progress-dialog.patch b/patches/shell32-Progress_Dialog/0003-shell32-Implement-file-operation-progress-dialog.patch index 6656bed1..b614f2bf 100644 --- a/patches/shell32-Progress_Dialog/0003-shell32-Implement-file-operation-progress-dialog.patch +++ b/patches/shell32-Progress_Dialog/0003-shell32-Implement-file-operation-progress-dialog.patch @@ -1,4 +1,4 @@ -From cf8475eaf811ff2a51703697b0c5f114eb570e1f Mon Sep 17 00:00:00 2001 +From 51a2f87c887ca4ff669780f8bfc6c188a4e87813 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20M=C3=BCller?= 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 f899a27f12c..264947d337d 100644 +index b054f55ba9d..58363d0c942 100644 --- a/dlls/shell32/shell32.rc +++ b/dlls/shell32/shell32.rc -@@ -182,6 +182,13 @@ If the files in the destination folder have the same names as files in the\n\ +@@ -184,6 +184,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 f899a27f12c..264947d337d 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 6ed3d0a84d7..c743b9e6948 100644 +index 4bd486a7426..e8b4b67f413 100644 --- a/dlls/shell32/shlfileop.c +++ b/dlls/shell32/shlfileop.c -@@ -62,6 +62,10 @@ typedef struct +@@ -61,6 +61,10 @@ typedef struct DWORD dwYesToAllMask; BOOL bManyItems; BOOL bCancelled; @@ -43,7 +43,7 @@ index 6ed3d0a84d7..c743b9e6948 100644 } FILE_OPERATION; typedef struct -@@ -100,6 +104,12 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly); +@@ -99,6 +103,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 6ed3d0a84d7..c743b9e6948 100644 /* Confirm dialogs with an optional "Yes To All" as used in file operations confirmations */ struct confirm_msg_info -@@ -385,6 +395,13 @@ static DWORD SHELL_DeleteDirectoryW(FILE_OPERATION *op, LPCWSTR pszDir, BOOL bSh +@@ -384,6 +394,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 6ed3d0a84d7..c743b9e6948 100644 } while (!ret && FindNextFileW(hFind, &wfd)); } FindClose(hFind); -@@ -538,10 +555,22 @@ static DWORD SHNotifyDeleteFileA(FILE_OPERATION *op, LPCSTR path) +@@ -537,10 +554,22 @@ static DWORD SHNotifyDeleteFileA(FILE_OPERATION *op, LPCSTR path) static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path) { BOOL ret; @@ -94,7 +94,7 @@ index 6ed3d0a84d7..c743b9e6948 100644 ret = DeleteFileW(path); if (!ret) -@@ -554,6 +583,14 @@ static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path) +@@ -553,6 +582,14 @@ static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path) } if (ret) { @@ -109,7 +109,7 @@ index 6ed3d0a84d7..c743b9e6948 100644 SHChangeNotify(SHCNE_DELETE, SHCNF_PATHW, path, NULL); return ERROR_SUCCESS; } -@@ -588,9 +625,10 @@ static DWORD SHNotifyMoveFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest) +@@ -587,9 +624,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 6ed3d0a84d7..c743b9e6948 100644 /* MOVEFILE_REPLACE_EXISTING fails with dirs, so try MoveFile */ if (!ret) -@@ -640,14 +678,15 @@ static DWORD SHNotifyCopyFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest, BO +@@ -639,14 +677,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 6ed3d0a84d7..c743b9e6948 100644 if (ret) { SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, dest, NULL); -@@ -1287,6 +1326,8 @@ static int copy_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro +@@ -1285,6 +1324,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 6ed3d0a84d7..c743b9e6948 100644 if (op->bCancelled) return ERROR_CANCELLED; } -@@ -1367,13 +1408,17 @@ static int delete_files(FILE_OPERATION *op, const FILE_LIST *flFrom) +@@ -1365,13 +1406,17 @@ static int delete_files(FILE_OPERATION *op, const FILE_LIST *flFrom) /* delete the file or directory */ if (IsAttribFile(fileEntry->attributes)) @@ -169,8 +169,8 @@ index 6ed3d0a84d7..c743b9e6948 100644 } return ERROR_SUCCESS; -@@ -1448,6 +1493,11 @@ static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro - move_to_dir(op, entryToMove, fileDest); +@@ -1491,6 +1536,11 @@ static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro + } else SHNotifyMoveFileW(op, entryToMove->szFullPath, fileDest->szFullPath); + @@ -181,7 +181,7 @@ index 6ed3d0a84d7..c743b9e6948 100644 } if (mismatched > 0) -@@ -1507,6 +1557,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) +@@ -1550,6 +1600,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) { FILE_OPERATION op; FILE_LIST flFrom, flTo; @@ -189,7 +189,7 @@ index 6ed3d0a84d7..c743b9e6948 100644 int ret = 0; if (!lpFileOp) -@@ -1525,9 +1576,31 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) +@@ -1568,9 +1619,31 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) ZeroMemory(&op, sizeof(op)); op.req = lpFileOp; @@ -221,7 +221,7 @@ index 6ed3d0a84d7..c743b9e6948 100644 switch (lpFileOp->wFunc) { case FO_COPY: -@@ -1547,6 +1620,12 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) +@@ -1590,6 +1663,12 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) break; } @@ -234,7 +234,7 @@ index 6ed3d0a84d7..c743b9e6948 100644 destroy_file_list(&flFrom); if (lpFileOp->wFunc != FO_DELETE) -@@ -1555,6 +1634,9 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) +@@ -1598,6 +1677,9 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp) if (ret == ERROR_CANCELLED) lpFileOp->fAnyOperationsAborted = TRUE; @@ -244,7 +244,7 @@ index 6ed3d0a84d7..c743b9e6948 100644 SetLastError(ERROR_SUCCESS); return ret; } -@@ -2043,3 +2125,184 @@ HRESULT WINAPI IFileOperation_Constructor(IUnknown *outer, REFIID riid, void **o +@@ -2086,3 +2168,184 @@ HRESULT WINAPI IFileOperation_Constructor(IUnknown *outer, REFIID riid, void **o return hr; } @@ -430,10 +430,10 @@ index 6ed3d0a84d7..c743b9e6948 100644 + return op->bCancelled ? PROGRESS_CANCEL : PROGRESS_CONTINUE; +} diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h -index af8eb46a09f..210046e729d 100644 +index cee1069142c..607015909cc 100644 --- a/dlls/shell32/shresdef.h +++ b/dlls/shell32/shresdef.h -@@ -147,6 +147,14 @@ +@@ -153,6 +153,14 @@ #define IDM_RECYCLEBIN_RESTORE 301 #define IDM_RECYCLEBIN_ERASE 302 @@ -449,5 +449,5 @@ index af8eb46a09f..210046e729d 100644 #define IDS_RECYCLEBIN_FOLDER_NAME 8964 -- -2.33.0 +2.43.0 diff --git a/staging/upstream-commit b/staging/upstream-commit index dfa87f64..850da950 100644 --- a/staging/upstream-commit +++ b/staging/upstream-commit @@ -1 +1 @@ -dcd1eeb256c2258bf7610a32f0c676979dd71f35 +1dfac2a252d0036c3bae08bf47f00582343a80fb