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 3ba4412be60dafee310b5d3c71aa762aa8846564.
This commit is contained in:
@@ -1,17 +1,17 @@
|
||||
From 9175a389d86cc231e7e8158360402feb7c5b269e Mon Sep 17 00:00:00 2001
|
||||
From 0442ed8d597eb250b7ebc41261073f71d9368f98 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 2 Apr 2016 00:22:30 +0200
|
||||
Subject: shell32: Fix copying of files when using a context menu.
|
||||
Subject: [PATCH] shell32: Fix copying of files when using a context menu.
|
||||
|
||||
---
|
||||
dlls/shell32/shlview_cmenu.c | 7 +++++++
|
||||
1 file changed, 7 insertions(+)
|
||||
|
||||
diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c
|
||||
index 099f5bc..552b809 100644
|
||||
index 67f5ac80d84..634e3b07176 100644
|
||||
--- a/dlls/shell32/shlview_cmenu.c
|
||||
+++ b/dlls/shell32/shlview_cmenu.c
|
||||
@@ -739,6 +739,13 @@ static BOOL DoPaste(ContextMenu *This)
|
||||
@@ -1164,6 +1164,13 @@ static BOOL DoPaste(ContextMenu *This)
|
||||
|
||||
apidl = _ILCopyCidaToaPidl(&pidl, lpcida);
|
||||
|
||||
@@ -22,9 +22,9 @@ index 099f5bc..552b809 100644
|
||||
+ if (_ILIsValue(pidl))
|
||||
+ ILRemoveLastID(pidl);
|
||||
+
|
||||
/* bind to the source shellfolder */
|
||||
SHGetDesktopFolder(&psfDesktop);
|
||||
if(psfDesktop)
|
||||
for (i = 0; bSuccess && i < lpcida->cidl; i++) {
|
||||
ITEMIDLIST *apidl_dir = NULL;
|
||||
ITEMIDLIST *apidl_item;
|
||||
--
|
||||
2.7.1
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,26 +0,0 @@
|
||||
From 7f13fd37d55efe4cc20c4c3eb1c79d3c8ef0040d Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 2 Apr 2016 01:21:34 +0200
|
||||
Subject: shell32: Set return value correctly in DoPaste.
|
||||
|
||||
---
|
||||
dlls/shell32/shlview_cmenu.c | 3 ++-
|
||||
1 file changed, 2 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c
|
||||
index 552b809..7ce6cd9 100644
|
||||
--- a/dlls/shell32/shlview_cmenu.c
|
||||
+++ b/dlls/shell32/shlview_cmenu.c
|
||||
@@ -764,7 +764,8 @@ static BOOL DoPaste(ContextMenu *This)
|
||||
/* do the copy/move */
|
||||
if (psfhlpdst && psfhlpsrc)
|
||||
{
|
||||
- ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, (LPCITEMIDLIST*)apidl);
|
||||
+ if (SUCCEEDED(ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, (LPCITEMIDLIST*)apidl)))
|
||||
+ bSuccess = TRUE;
|
||||
/* FIXME handle move
|
||||
ISFHelper_DeleteItems(psfhlpsrc, lpcida->cidl, apidl);
|
||||
*/
|
||||
--
|
||||
2.7.1
|
||||
|
@@ -1,12 +1,12 @@
|
||||
From 9272578ec7000b28be8e1454f4e2dd2ee7017146 Mon Sep 17 00:00:00 2001
|
||||
From c95a146e0925be225cd71f23062de266b82b28d4 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 2 Apr 2016 01:39:40 +0200
|
||||
Subject: [PATCH] shell32: Implement insert/paste for item context menus.
|
||||
|
||||
---
|
||||
dlls/shell32/shell32.rc | 1 +
|
||||
dlls/shell32/shlview_cmenu.c | 64 ++++++++++++++++++++++++++++++++----
|
||||
2 files changed, 58 insertions(+), 7 deletions(-)
|
||||
dlls/shell32/shlview_cmenu.c | 46 ++++++++++++++++++++++++++++++++----
|
||||
2 files changed, 42 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc
|
||||
index ff859381593..e7324c9af5e 100644
|
||||
@@ -21,7 +21,7 @@ index ff859381593..e7324c9af5e 100644
|
||||
MENUITEM "Create &Link", FCIDM_SHVIEW_CREATELINK
|
||||
MENUITEM "&Delete", FCIDM_SHVIEW_DELETE
|
||||
diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c
|
||||
index f8b6a8572de..0e72e13c80f 100644
|
||||
index 634e3b07176..fe943179cb1 100644
|
||||
--- a/dlls/shell32/shlview_cmenu.c
|
||||
+++ b/dlls/shell32/shlview_cmenu.c
|
||||
@@ -66,6 +66,8 @@ typedef struct
|
||||
@@ -113,7 +113,7 @@ index f8b6a8572de..0e72e13c80f 100644
|
||||
case FCIDM_SHVIEW_PROPERTIES:
|
||||
TRACE("Verb FCIDM_SHVIEW_PROPERTIES\n");
|
||||
DoOpenProperties(This, lpcmi->hwnd);
|
||||
@@ -845,6 +877,7 @@ static HRESULT WINAPI ItemMenu_GetCommandString(IContextMenu3 *iface, UINT_PTR c
|
||||
@@ -849,6 +881,7 @@ static HRESULT WINAPI ItemMenu_GetCommandString(IContextMenu3 *iface, UINT_PTR c
|
||||
static const WCHAR exploreW[] = {'e','x','p','l','o','r','e',0};
|
||||
static const WCHAR cutW[] = {'c','u','t',0};
|
||||
static const WCHAR copyW[] = {'c','o','p','y',0};
|
||||
@@ -121,7 +121,7 @@ index f8b6a8572de..0e72e13c80f 100644
|
||||
static const WCHAR linkW[] = {'l','i','n','k',0};
|
||||
static const WCHAR deleteW[] = {'d','e','l','e','t','e',0};
|
||||
static const WCHAR propertiesW[] = {'p','r','o','p','e','r','t','i','e','s',0};
|
||||
@@ -878,6 +911,9 @@ static HRESULT WINAPI ItemMenu_GetCommandString(IContextMenu3 *iface, UINT_PTR c
|
||||
@@ -882,6 +915,9 @@ static HRESULT WINAPI ItemMenu_GetCommandString(IContextMenu3 *iface, UINT_PTR c
|
||||
case FCIDM_SHVIEW_COPY:
|
||||
cmdW = copyW;
|
||||
break;
|
||||
@@ -131,31 +131,6 @@ index f8b6a8572de..0e72e13c80f 100644
|
||||
case FCIDM_SHVIEW_CREATELINK:
|
||||
cmdW = linkW;
|
||||
break;
|
||||
@@ -1177,8 +1213,22 @@ static BOOL DoPaste(ContextMenu *This)
|
||||
if (psfFrom)
|
||||
{
|
||||
/* get source and destination shellfolder */
|
||||
- ISFHelper *psfhlpdst, *psfhlpsrc;
|
||||
- IShellFolder_QueryInterface(This->parent, &IID_ISFHelper, (void**)&psfhlpdst);
|
||||
+ ISFHelper *psfhlpdst = NULL, *psfhlpsrc = NULL;
|
||||
+
|
||||
+ /* when using an item context menu we first need to bind to the selected folder */
|
||||
+ if (This->apidl)
|
||||
+ {
|
||||
+ IShellFolder *folder;
|
||||
+
|
||||
+ if (SUCCEEDED(IShellFolder_BindToObject(This->parent, This->apidl[0], NULL, &IID_IShellFolder, (LPVOID*)&folder)))
|
||||
+ {
|
||||
+ IShellFolder_QueryInterface(folder, &IID_ISFHelper, (void**)&psfhlpdst);
|
||||
+ IShellFolder_Release(folder);
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
+ IShellFolder_QueryInterface(This->parent, &IID_ISFHelper, (void**)&psfhlpdst);
|
||||
+
|
||||
IShellFolder_QueryInterface(psfFrom, &IID_ISFHelper, (void**)&psfhlpsrc);
|
||||
|
||||
/* do the copy/move */
|
||||
--
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,20 +1,22 @@
|
||||
From c6df9e2fd8f92597a728935e67a6ac6c3bc1223c Mon Sep 17 00:00:00 2001
|
||||
From bc86221443f957b105efda2276e92204a1f0308e 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:22:07 +0200
|
||||
Subject: shell32: Remove source files when using cut in the context menu.
|
||||
Subject: [PATCH] shell32: Remove source files when using cut in the context
|
||||
menu.
|
||||
|
||||
---
|
||||
dlls/shell32/shlview_cmenu.c | 75 +++++++++++++++++++++++++++++++++++++++++---
|
||||
dlls/shell32/shlview_cmenu.c | 75 ++++++++++++++++++++++++++++++++++--
|
||||
1 file changed, 71 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c
|
||||
index 494d95b..c32a4e8 100644
|
||||
index d15a144870d..3dce4a1fbac 100644
|
||||
--- a/dlls/shell32/shlview_cmenu.c
|
||||
+++ b/dlls/shell32/shlview_cmenu.c
|
||||
@@ -281,6 +281,64 @@ static void DoDelete(ContextMenu *This)
|
||||
@@ -333,6 +333,64 @@ static void DoDelete(ContextMenu *This)
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************
|
||||
+/**************************************************************************
|
||||
+ * SetDropEffect
|
||||
+ *
|
||||
+ * Set the drop effect in a IDataObject object
|
||||
@@ -72,11 +74,10 @@ index 494d95b..c32a4e8 100644
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+/**************************************************************************
|
||||
/**************************************************************************
|
||||
* DoCopyOrCut
|
||||
*
|
||||
* copies the currently selected items into the clipboard
|
||||
@@ -293,6 +351,7 @@ static void DoCopyOrCut(ContextMenu *This, HWND hwnd, BOOL cut)
|
||||
@@ -346,6 +404,7 @@ static void DoCopyOrCut(ContextMenu *This, HWND hwnd, BOOL cut)
|
||||
|
||||
if (SUCCEEDED(IShellFolder_GetUIObjectOf(This->parent, hwnd, This->cidl, (LPCITEMIDLIST*)This->apidl, &IID_IDataObject, 0, (void**)&dataobject)))
|
||||
{
|
||||
@@ -84,30 +85,31 @@ index 494d95b..c32a4e8 100644
|
||||
OleSetClipboard(dataobject);
|
||||
IDataObject_Release(dataobject);
|
||||
}
|
||||
@@ -818,11 +877,19 @@ static BOOL DoPaste(ContextMenu *This)
|
||||
/* do the copy/move */
|
||||
if (psfhlpdst && psfhlpsrc)
|
||||
{
|
||||
+ DWORD dropEffect;
|
||||
+ GetDropEffect(pda, &dropEffect);
|
||||
@@ -1233,12 +1292,20 @@ static BOOL DoPaste(ContextMenu *This)
|
||||
/* do the copy/move */
|
||||
if (psfhlpdst && psfhlpsrc)
|
||||
{
|
||||
+ DWORD dropEffect;
|
||||
+ GetDropEffect(pda, &dropEffect);
|
||||
+
|
||||
if (SUCCEEDED(ISFHelper_CopyItems(psfhlpdst, psfFrom, lpcida->cidl, (LPCITEMIDLIST*)apidl)))
|
||||
- bSuccess = TRUE;
|
||||
- /* FIXME handle move
|
||||
- ISFHelper_DeleteItems(psfhlpsrc, lpcida->cidl, apidl);
|
||||
- */
|
||||
+ {
|
||||
+ if (dropEffect == DROPEFFECT_MOVE)
|
||||
+ {
|
||||
+ if (SUCCEEDED(ISFHelper_DeleteItems(psfhlpsrc, lpcida->cidl, (LPCITEMIDLIST*)apidl, FALSE)))
|
||||
+ bSuccess = TRUE;
|
||||
+ }
|
||||
+ else
|
||||
+ bSuccess = TRUE;
|
||||
+ }
|
||||
}
|
||||
if(psfhlpdst) ISFHelper_Release(psfhlpdst);
|
||||
if(psfhlpsrc) ISFHelper_Release(psfhlpsrc);
|
||||
HRESULT hr = ISFHelper_CopyItems(psfhlpdst, psfFrom, 1, (LPCITEMIDLIST*)&apidl_item);
|
||||
- if (FAILED(hr))
|
||||
+ if (SUCCEEDED(hr))
|
||||
+ {
|
||||
+ if (dropEffect == DROPEFFECT_MOVE)
|
||||
+ {
|
||||
+ if (FAILED(ISFHelper_DeleteItems(psfhlpsrc, lpcida->cidl, (LPCITEMIDLIST*)apidl, FALSE)))
|
||||
+ bSuccess = FALSE;
|
||||
+ }
|
||||
+ }
|
||||
+ else
|
||||
bSuccess = FALSE;
|
||||
- /* FIXME handle move
|
||||
- ISFHelper_DeleteItems(psfhlpsrc, 1, &apidl_item);
|
||||
- */
|
||||
}
|
||||
if(psfhlpdst) ISFHelper_Release(psfhlpdst);
|
||||
if(psfhlpsrc) ISFHelper_Release(psfhlpsrc);
|
||||
--
|
||||
2.7.1
|
||||
2.30.2
|
||||
|
||||
|
@@ -1,19 +1,19 @@
|
||||
From 47c24300c6530de5dfe32f352ef839e62ebbd520 Mon Sep 17 00:00:00 2001
|
||||
From 295de3efbdb815a703e77c391ee1f3038987495b 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:41:56 +0200
|
||||
Subject: shell32: Recognize cut/copy/paste string verbs in item menu context
|
||||
menu.
|
||||
Subject: [PATCH] shell32: Recognize cut/copy/paste string verbs in item menu
|
||||
context menu.
|
||||
|
||||
---
|
||||
dlls/shell32/shlview_cmenu.c | 6 ++++++
|
||||
1 file changed, 6 insertions(+)
|
||||
|
||||
diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c
|
||||
index c32a4e8..cfe88d5 100644
|
||||
index 3dce4a1fbac..8265993385f 100644
|
||||
--- a/dlls/shell32/shlview_cmenu.c
|
||||
+++ b/dlls/shell32/shlview_cmenu.c
|
||||
@@ -554,6 +554,12 @@ static HRESULT WINAPI ItemMenu_InvokeCommand(
|
||||
DoDelete(This);
|
||||
@@ -925,6 +925,12 @@ static HRESULT WINAPI ItemMenu_InvokeCommand(
|
||||
DoCopyOrCut(This, lpcmi->hwnd, TRUE);
|
||||
else if (strcmp(lpcmi->lpVerb,"properties")==0)
|
||||
DoOpenProperties(This, lpcmi->hwnd);
|
||||
+ else if (strcmp(lpcmi->lpVerb,"cut")==0)
|
||||
@@ -26,5 +26,5 @@ index c32a4e8..cfe88d5 100644
|
||||
FIXME("Unhandled string verb %s\n",debugstr_a(lpcmi->lpVerb));
|
||||
return E_FAIL;
|
||||
--
|
||||
2.7.1
|
||||
2.30.2
|
||||
|
||||
|
Reference in New Issue
Block a user