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 2d6b0b67d91b6433744ec859b10b8ee8eb4a37b3.
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
From 4120d27b52861617c27c668c73d334ed4d32c302 Mon Sep 17 00:00:00 2001
|
||||
From 0cc42072f1b4585c2c0b11faf5a33282ce603853 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,7 +11,7 @@ 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 46f0b6f12dd..8739718f715 100644
|
||||
index f19b09f8c21..f9b75df1f05 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,10 +29,10 @@ index 46f0b6f12dd..8739718f715 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 23c1f41f907..1f29c484458 100644
|
||||
index 91354d4c2ad..2263b20de8a 100644
|
||||
--- a/dlls/shell32/shlfileop.c
|
||||
+++ b/dlls/shell32/shlfileop.c
|
||||
@@ -65,6 +65,10 @@ typedef struct
|
||||
@@ -67,6 +67,10 @@ typedef struct
|
||||
DWORD dwYesToAllMask;
|
||||
BOOL bManyItems;
|
||||
BOOL bCancelled;
|
||||
@@ -43,7 +43,7 @@ index 23c1f41f907..1f29c484458 100644
|
||||
} FILE_OPERATION;
|
||||
|
||||
typedef struct
|
||||
@@ -103,6 +107,12 @@ static DWORD SHFindAttrW(LPCWSTR pName, BOOL fileOnly);
|
||||
@@ -105,6 +109,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 23c1f41f907..1f29c484458 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};
|
||||
@@ -391,6 +401,13 @@ static DWORD SHELL_DeleteDirectoryW(FILE_OPERATION *op, LPCWSTR pszDir, BOOL bSh
|
||||
@@ -393,6 +403,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 23c1f41f907..1f29c484458 100644
|
||||
} while (!ret && FindNextFileW(hFind, &wfd));
|
||||
}
|
||||
FindClose(hFind);
|
||||
@@ -544,10 +561,22 @@ static DWORD SHNotifyDeleteFileA(FILE_OPERATION *op, LPCSTR path)
|
||||
@@ -546,10 +563,22 @@ static DWORD SHNotifyDeleteFileA(FILE_OPERATION *op, LPCSTR path)
|
||||
static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
|
||||
{
|
||||
BOOL ret;
|
||||
@@ -94,7 +94,7 @@ index 23c1f41f907..1f29c484458 100644
|
||||
|
||||
ret = DeleteFileW(path);
|
||||
if (!ret)
|
||||
@@ -560,6 +589,14 @@ static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
|
||||
@@ -562,6 +591,14 @@ static DWORD SHNotifyDeleteFileW(FILE_OPERATION *op, LPCWSTR path)
|
||||
}
|
||||
if (ret)
|
||||
{
|
||||
@@ -109,7 +109,7 @@ index 23c1f41f907..1f29c484458 100644
|
||||
SHChangeNotify(SHCNE_DELETE, SHCNF_PATHW, path, NULL);
|
||||
return ERROR_SUCCESS;
|
||||
}
|
||||
@@ -594,9 +631,10 @@ static DWORD SHNotifyMoveFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest)
|
||||
@@ -596,9 +633,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 23c1f41f907..1f29c484458 100644
|
||||
|
||||
/* MOVEFILE_REPLACE_EXISTING fails with dirs, so try MoveFile */
|
||||
if (!ret)
|
||||
@@ -646,14 +684,15 @@ static DWORD SHNotifyCopyFileW(FILE_OPERATION *op, LPCWSTR src, LPCWSTR dest, BO
|
||||
@@ -648,14 +686,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 23c1f41f907..1f29c484458 100644
|
||||
if (ret)
|
||||
{
|
||||
SHChangeNotify(SHCNE_CREATE, SHCNF_PATHW, dest, NULL);
|
||||
@@ -1295,6 +1334,8 @@ static int copy_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
|
||||
@@ -1297,6 +1336,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 23c1f41f907..1f29c484458 100644
|
||||
if (op->bCancelled)
|
||||
return ERROR_CANCELLED;
|
||||
}
|
||||
@@ -1377,13 +1418,17 @@ static int delete_files(FILE_OPERATION *op, const FILE_LIST *flFrom)
|
||||
@@ -1379,13 +1420,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 23c1f41f907..1f29c484458 100644
|
||||
}
|
||||
|
||||
return ERROR_SUCCESS;
|
||||
@@ -1458,6 +1503,11 @@ static int move_files(FILE_OPERATION *op, BOOL multidest, const FILE_LIST *flFro
|
||||
@@ -1460,6 +1505,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 23c1f41f907..1f29c484458 100644
|
||||
}
|
||||
|
||||
if (mismatched > 0)
|
||||
@@ -1517,6 +1567,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1519,6 +1569,7 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
{
|
||||
FILE_OPERATION op;
|
||||
FILE_LIST flFrom, flTo;
|
||||
@@ -189,7 +189,7 @@ index 23c1f41f907..1f29c484458 100644
|
||||
int ret = 0;
|
||||
|
||||
if (!lpFileOp)
|
||||
@@ -1535,9 +1586,31 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1537,9 +1588,31 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
|
||||
ZeroMemory(&op, sizeof(op));
|
||||
op.req = lpFileOp;
|
||||
@@ -221,7 +221,7 @@ index 23c1f41f907..1f29c484458 100644
|
||||
switch (lpFileOp->wFunc)
|
||||
{
|
||||
case FO_COPY:
|
||||
@@ -1557,6 +1630,12 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1559,6 +1632,12 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -234,7 +234,7 @@ index 23c1f41f907..1f29c484458 100644
|
||||
destroy_file_list(&flFrom);
|
||||
|
||||
if (lpFileOp->wFunc != FO_DELETE)
|
||||
@@ -1565,6 +1644,9 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
@@ -1567,6 +1646,9 @@ int WINAPI SHFileOperationW(LPSHFILEOPSTRUCTW lpFileOp)
|
||||
if (ret == ERROR_CANCELLED)
|
||||
lpFileOp->fAnyOperationsAborted = TRUE;
|
||||
|
||||
@@ -244,9 +244,9 @@ index 23c1f41f907..1f29c484458 100644
|
||||
SetLastError(ERROR_SUCCESS);
|
||||
return ret;
|
||||
}
|
||||
@@ -1806,3 +1888,184 @@ HRESULT WINAPI SHMultiFileProperties(IDataObject *pdtobj, DWORD flags)
|
||||
FIXME("stub: %p %u\n", pdtobj, flags);
|
||||
return E_NOTIMPL;
|
||||
@@ -2055,3 +2137,184 @@ HRESULT WINAPI IFileOperation_Constructor(IUnknown *outer, REFIID riid, void **o
|
||||
|
||||
return hr;
|
||||
}
|
||||
+
|
||||
+static BOOL progressbar_calc_size(FILE_OPERATION *op, LPWSTR buf, BOOL is_folder, DWORD *ticks)
|
||||
@@ -449,5 +449,5 @@ index 92185d637e7..33edb584c1b 100644
|
||||
#define IDS_RECYCLEBIN_FOLDER_NAME 8964
|
||||
|
||||
--
|
||||
2.17.1
|
||||
2.20.1
|
||||
|
||||
|
Reference in New Issue
Block a user