Rebase against 1b0d8428dfc13b0fa5ea7d576dfef7aaf8a8c927.

This commit is contained in:
Zebediah Figura
2024-02-19 16:23:40 -06:00
parent 5a1530d636
commit 96503e8822
6 changed files with 40 additions and 150 deletions

View File

@@ -1,4 +1,4 @@
From bf2a4d41fff53ff3ffccca694b22c051043dde62 Mon Sep 17 00:00:00 2001
From cb562a6cf3aefe59d6173838e03030d0d882cf75 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.
@@ -9,11 +9,11 @@ Subject: [PATCH] shell32: Implement insert/paste for item context menus.
2 files changed, 41 insertions(+), 5 deletions(-)
diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc
index c6280edac6b..09b90a9805b 100644
index a50fab6815d..dc418069100 100644
--- a/dlls/shell32/shell32.rc
+++ b/dlls/shell32/shell32.rc
@@ -99,6 +99,7 @@ BEGIN
MENUITEM SEPARATOR
@@ -95,6 +95,7 @@ BEGIN
BEGIN
MENUITEM "C&ut", FCIDM_SHVIEW_CUT
MENUITEM "&Copy", FCIDM_SHVIEW_COPY
+ MENUITEM "&Paste", FCIDM_SHVIEW_INSERT
@@ -21,10 +21,10 @@ index c6280edac6b..09b90a9805b 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 43cbea2ec87..047fe00e39d 100644
index 9057d7c0175..aaa726ec14a 100644
--- a/dlls/shell32/shlview_cmenu.c
+++ b/dlls/shell32/shlview_cmenu.c
@@ -185,6 +185,8 @@ typedef struct
@@ -73,6 +73,8 @@ typedef struct
BOOL desktop;
} ContextMenu;
@@ -33,7 +33,7 @@ index 43cbea2ec87..047fe00e39d 100644
static inline ContextMenu *impl_from_IContextMenu3(IContextMenu3 *iface)
{
return CONTAINING_RECORD(iface, ContextMenu, IContextMenu3_iface);
@@ -294,6 +296,30 @@ static UINT max_menu_id(HMENU hmenu, UINT offset, UINT last)
@@ -188,6 +190,30 @@ static UINT max_menu_id(HMENU hmenu, UINT offset, UINT last)
return max_id;
}
@@ -64,15 +64,15 @@ index 43cbea2ec87..047fe00e39d 100644
static HRESULT WINAPI ItemMenu_QueryContextMenu(
IContextMenu3 *iface,
HMENU hmenu,
@@ -304,6 +330,7 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
{
@@ -199,6 +225,7 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
ContextMenu *This = impl_from_IContextMenu3(iface);
MENUITEMINFOW mi;
INT uIDMax;
+ DWORD attr = SFGAO_CANRENAME;
TRACE("(%p)->(%p %d 0x%x 0x%x 0x%x )\n", This, hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
@@ -341,6 +368,9 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
@@ -232,6 +259,9 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
SetMenuDefaultItem(hmenu, 0, MF_BYPOSITION);
@@ -82,7 +82,7 @@ index 43cbea2ec87..047fe00e39d 100644
if(uFlags & ~CMF_CANRENAME)
RemoveMenu(hmenu, FCIDM_SHVIEW_RENAME - FCIDM_BASE + idCmdFirst, MF_BYCOMMAND);
else
@@ -351,16 +381,14 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
@@ -242,16 +272,14 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
if (!This->apidl || This->cidl > 1)
enable |= MFS_DISABLED;
else
@@ -102,7 +102,7 @@ index 43cbea2ec87..047fe00e39d 100644
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, uIDMax-idCmdFirst);
}
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 0);
@@ -1183,6 +1211,10 @@ static HRESULT WINAPI ItemMenu_InvokeCommand(
@@ -791,6 +819,10 @@ static HRESULT WINAPI ItemMenu_InvokeCommand(
TRACE("Verb FCIDM_SHVIEW_CUT\n");
DoCopyOrCut(This, lpcmi->hwnd, TRUE);
break;
@@ -113,7 +113,7 @@ index 43cbea2ec87..047fe00e39d 100644
case FCIDM_SHVIEW_PROPERTIES:
TRACE("Verb FCIDM_SHVIEW_PROPERTIES\n");
DoOpenProperties(This, lpcmi->hwnd);
@@ -1243,6 +1275,9 @@ static HRESULT WINAPI ItemMenu_GetCommandString(IContextMenu3 *iface, UINT_PTR c
@@ -845,6 +877,9 @@ static HRESULT WINAPI ItemMenu_GetCommandString(IContextMenu3 *iface, UINT_PTR c
case FCIDM_SHVIEW_COPY:
cmdW = L"copy";
break;
@@ -124,5 +124,5 @@ index 43cbea2ec87..047fe00e39d 100644
cmdW = L"link";
break;
--
2.33.0
2.43.0