Rebase against 975d0632a19efd41338cb73a97f1b0bdbe7bc0cc.

This commit is contained in:
Alistair Leslie-Hughes
2021-09-21 09:08:59 +10:00
parent 2771ab8cee
commit a1db1dfc16
31 changed files with 313 additions and 327 deletions

View File

@@ -1,15 +1,15 @@
From c95a146e0925be225cd71f23062de266b82b28d4 Mon Sep 17 00:00:00 2001
From bf2a4d41fff53ff3ffccca694b22c051043dde62 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 | 46 ++++++++++++++++++++++++++++++++----
2 files changed, 42 insertions(+), 5 deletions(-)
dlls/shell32/shlview_cmenu.c | 45 ++++++++++++++++++++++++++++++++----
2 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc
index ff859381593..e7324c9af5e 100644
index c6280edac6b..09b90a9805b 100644
--- a/dlls/shell32/shell32.rc
+++ b/dlls/shell32/shell32.rc
@@ -99,6 +99,7 @@ BEGIN
@@ -21,10 +21,10 @@ 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 634e3b07176..fe943179cb1 100644
index 43cbea2ec87..047fe00e39d 100644
--- a/dlls/shell32/shlview_cmenu.c
+++ b/dlls/shell32/shlview_cmenu.c
@@ -66,6 +66,8 @@ typedef struct
@@ -185,6 +185,8 @@ typedef struct
BOOL desktop;
} ContextMenu;
@@ -33,7 +33,7 @@ index 634e3b07176..fe943179cb1 100644
static inline ContextMenu *impl_from_IContextMenu3(IContextMenu3 *iface)
{
return CONTAINING_RECORD(iface, ContextMenu, IContextMenu3_iface);
@@ -175,6 +177,30 @@ static UINT max_menu_id(HMENU hmenu, UINT offset, UINT last)
@@ -294,6 +296,30 @@ static UINT max_menu_id(HMENU hmenu, UINT offset, UINT last)
return max_id;
}
@@ -64,7 +64,7 @@ index 634e3b07176..fe943179cb1 100644
static HRESULT WINAPI ItemMenu_QueryContextMenu(
IContextMenu3 *iface,
HMENU hmenu,
@@ -185,6 +211,7 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
@@ -304,6 +330,7 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
{
ContextMenu *This = impl_from_IContextMenu3(iface);
INT uIDMax;
@@ -72,7 +72,7 @@ index 634e3b07176..fe943179cb1 100644
TRACE("(%p)->(%p %d 0x%x 0x%x 0x%x )\n", This, hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
@@ -222,6 +249,9 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
@@ -341,6 +368,9 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
SetMenuDefaultItem(hmenu, 0, MF_BYPOSITION);
@@ -82,7 +82,7 @@ index 634e3b07176..fe943179cb1 100644
if(uFlags & ~CMF_CANRENAME)
RemoveMenu(hmenu, FCIDM_SHVIEW_RENAME - FCIDM_BASE + idCmdFirst, MF_BYCOMMAND);
else
@@ -232,16 +262,14 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
@@ -351,16 +381,14 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
if (!This->apidl || This->cidl > 1)
enable |= MFS_DISABLED;
else
@@ -102,7 +102,7 @@ index 634e3b07176..fe943179cb1 100644
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, uIDMax-idCmdFirst);
}
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 0);
@@ -814,6 +842,10 @@ static HRESULT WINAPI ItemMenu_InvokeCommand(
@@ -1183,6 +1211,10 @@ static HRESULT WINAPI ItemMenu_InvokeCommand(
TRACE("Verb FCIDM_SHVIEW_CUT\n");
DoCopyOrCut(This, lpcmi->hwnd, TRUE);
break;
@@ -113,24 +113,16 @@ index 634e3b07176..fe943179cb1 100644
case FCIDM_SHVIEW_PROPERTIES:
TRACE("Verb FCIDM_SHVIEW_PROPERTIES\n");
DoOpenProperties(This, lpcmi->hwnd);
@@ -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};
+ static const WCHAR pasteW[] = {'p','a','s','t','e',0};
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};
@@ -882,6 +915,9 @@ static HRESULT WINAPI ItemMenu_GetCommandString(IContextMenu3 *iface, UINT_PTR c
@@ -1243,6 +1275,9 @@ static HRESULT WINAPI ItemMenu_GetCommandString(IContextMenu3 *iface, UINT_PTR c
case FCIDM_SHVIEW_COPY:
cmdW = copyW;
cmdW = L"copy";
break;
+ case FCIDM_SHVIEW_INSERT:
+ cmdW = pasteW;
+ cmdW = L"paste";
+ break;
case FCIDM_SHVIEW_CREATELINK:
cmdW = linkW;
cmdW = L"link";
break;
--
2.30.2
2.33.0