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 fdf8d7176f59043999b34ff4facdcbee14a7d6aa
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
From 3c2e5967acbc177bf43c2cb6012bdc22c7a59fb2 Mon Sep 17 00:00:00 2001
|
||||
From 4120d27b52861617c27c668c73d334ed4d32c302 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: shell32: Implement file operation progress dialog.
|
||||
Subject: [PATCH] shell32: Implement file operation progress dialog.
|
||||
|
||||
Based on a patch by Huw Campbell.
|
||||
---
|
||||
dlls/shell32/shell32.rc | 7 ++
|
||||
dlls/shell32/shlfileop.c | 277 +++++++++++++++++++++++++++++++++++++++++++++--
|
||||
dlls/shell32/shell32.rc | 7 +
|
||||
dlls/shell32/shlfileop.c | 277 ++++++++++++++++++++++++++++++++++++++-
|
||||
dlls/shell32/shresdef.h | 8 ++
|
||||
3 files changed, 285 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc
|
||||
index bfba962..277b23a 100644
|
||||
index 46f0b6f12dd..8739718f715 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\
|
||||
@@ -29,7 +29,7 @@ index bfba962..277b23a 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 5f0189b..5ad241c 100644
|
||||
index 23c1f41f907..1f29c484458 100644
|
||||
--- a/dlls/shell32/shlfileop.c
|
||||
+++ b/dlls/shell32/shlfileop.c
|
||||
@@ -65,6 +65,10 @@ typedef struct
|
||||
@@ -56,7 +56,7 @@ index 5f0189b..5ad241c 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};
|
||||
@@ -395,6 +405,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 5f0189b..5ad241c 100644
|
||||
} while (!ret && FindNextFileW(hFind, &wfd));
|
||||
}
|
||||
FindClose(hFind);
|
||||
@@ -548,10 +565,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 5f0189b..5ad241c 100644
|
||||
|
||||
ret = DeleteFileW(path);
|
||||
if (!ret)
|
||||
@@ -564,6 +593,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 5f0189b..5ad241c 100644
|
||||
SHChangeNotify(SHCNE_DELETE, SHCNF_PATHW, path, NULL);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
@@ -598,9 +635,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 5f0189b..5ad241c 100644
|
||||
|
||||
/* MOVEFILE_REPLACE_EXISTING fails with dirs, so try MoveFile */
|
||||
if (!ret)
|
||||
@@ -650,14 +688,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 5f0189b..5ad241c 100644
|
||||
if (ret)
|
||||
{
|
||||
SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, dest, NULL);
|
||||
@@ -1292,6 +1331,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 5f0189b..5ad241c 100644
|
||||
if (op->bCancelled)
|
||||
return ERROR_CANCELLED;
|
||||
}
|
||||
@@ -1374,13 +1415,17 @@ static int delete_files(FILE_OPERATION *op, const FILE_LIST *flFrom)
|
||||
@@ -1377,13 +1418,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 5f0189b..5ad241c 100644
|
||||
}
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
@@ -1455,6 +1500,11 @@ static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
|
||||
@@ -1458,6 +1503,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 5f0189b..5ad241c 100644
|
||||
}
|
||||
|
||||
if (mismatched > 0)
|
||||
@@ -1514,6 +1564,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1517,6 +1567,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
{
|
||||
FILE_OPERATION op;
|
||||
FILE_LIST flFrom, flTo;
|
||||
@@ -189,7 +189,7 @@ index 5f0189b..5ad241c 100644
|
||||
int ret = 0;
|
||||
|
||||
if (!lpFileOp)
|
||||
@@ -1532,9 +1583,31 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1535,9 +1586,31 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
|
||||
ZeroMemory(&op, sizeof(op));
|
||||
op.req = lpFileOp;
|
||||
@@ -221,7 +221,7 @@ index 5f0189b..5ad241c 100644
|
||||
switch (lpFileOp->wFunc)
|
||||
{
|
||||
case FO_COPY:
|
||||
@@ -1554,6 +1627,12 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1557,6 +1630,12 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ index 5f0189b..5ad241c 100644
|
||||
destroy_file_list(&flFrom);
|
||||
|
||||
if (lpFileOp->wFunc != FO_DELETE)
|
||||
@@ -1562,6 +1641,9 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1565,6 +1644,9 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
if (ret == ERROR_CANCELLED)
|
||||
lpFileOp->fAnyOperationsAborted = TRUE;
|
||||
|
||||
@@ -244,9 +244,9 @@ index 5f0189b..5ad241c 100644
|
||||
SetLastError(ERROR_SUCCESS);
|
||||
return ret;
|
||||
}
|
||||
@@ -1793,3 +1875,184 @@ HRESULT WINAPI SHPathPrepareForWriteW(HWND hwnd, IUnknown *modless, LPCWSTR path
|
||||
else
|
||||
return HRESULT_FROM_WIN32(ERROR_DIRECTORY);
|
||||
@@ -1806,3 +1888,184 @@ HRESULT WINAPI SHMultiFileProperties(IDataObject *pdtobj, DWORD flags)
|
||||
FIXME("stub: %p %u\n", pdtobj, flags);
|
||||
return E_NOTIMPL;
|
||||
}
|
||||
+
|
||||
+static BOOL progressbar_calc_size(FILE_OPERATION *op, LPWSTR buf, BOOL is_folder, DWORD *ticks)
|
||||
@@ -430,7 +430,7 @@ index 5f0189b..5ad241c 100644
|
||||
+ return op->bCancelled ? PROGRESS_CANCEL : PROGRESS_CONTINUE;
|
||||
+}
|
||||
diff --git a/dlls/shell32/shresdef.h b/dlls/shell32/shresdef.h
|
||||
index 183a75e..8ee525a 100644
|
||||
index 92185d637e7..33edb584c1b 100644
|
||||
--- a/dlls/shell32/shresdef.h
|
||||
+++ b/dlls/shell32/shresdef.h
|
||||
@@ -149,6 +149,14 @@
|
||||
@@ -449,5 +449,5 @@ index 183a75e..8ee525a 100644
|
||||
#define IDS_RECYCLEBIN_FOLDER_NAME 8964
|
||||
|
||||
--
|
||||
2.8.0
|
||||
2.17.1
|
||||
|
||||
|
Reference in New Issue
Block a user