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 2deb8c2825afcb88a9f106b73aa1f4da9253fb87.
This commit is contained in:
@@ -1,15 +1,15 @@
|
||||
From 103583fcc07412ede80a00edc1f07a9d0ada28e3 Mon Sep 17 00:00:00 2001
|
||||
From 9272578ec7000b28be8e1454f4e2dd2ee7017146 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 3/7] shell32: Implement insert/paste for item context menus.
|
||||
Subject: [PATCH] shell32: Implement insert/paste for item context menus.
|
||||
|
||||
---
|
||||
dlls/shell32/shell32.rc | 1 +
|
||||
dlls/shell32/shlview_cmenu.c | 64 +++++++++++++++++++++++++++++++++++++++-----
|
||||
dlls/shell32/shlview_cmenu.c | 64 ++++++++++++++++++++++++++++++++----
|
||||
2 files changed, 58 insertions(+), 7 deletions(-)
|
||||
|
||||
diff --git a/dlls/shell32/shell32.rc b/dlls/shell32/shell32.rc
|
||||
index 6585416..0c75786 100644
|
||||
index ff859381593..e7324c9af5e 100644
|
||||
--- a/dlls/shell32/shell32.rc
|
||||
+++ b/dlls/shell32/shell32.rc
|
||||
@@ -99,6 +99,7 @@ BEGIN
|
||||
@@ -21,10 +21,10 @@ index 6585416..0c75786 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 677bb3f..0394da3 100644
|
||||
index f8b6a8572de..0e72e13c80f 100644
|
||||
--- a/dlls/shell32/shlview_cmenu.c
|
||||
+++ b/dlls/shell32/shlview_cmenu.c
|
||||
@@ -59,6 +59,8 @@ typedef struct
|
||||
@@ -66,6 +66,8 @@ typedef struct
|
||||
BOOL desktop;
|
||||
} ContextMenu;
|
||||
|
||||
@@ -33,8 +33,8 @@ index 677bb3f..0394da3 100644
|
||||
static inline ContextMenu *impl_from_IContextMenu3(IContextMenu3 *iface)
|
||||
{
|
||||
return CONTAINING_RECORD(iface, ContextMenu, IContextMenu3_iface);
|
||||
@@ -123,6 +125,30 @@ static ULONG WINAPI ContextMenu_Release(IContextMenu3 *iface)
|
||||
return ref;
|
||||
@@ -175,6 +177,30 @@ static UINT max_menu_id(HMENU hmenu, UINT offset, UINT last)
|
||||
return max_id;
|
||||
}
|
||||
|
||||
+static BOOL CheckClipboard(void)
|
||||
@@ -64,7 +64,7 @@ index 677bb3f..0394da3 100644
|
||||
static HRESULT WINAPI ItemMenu_QueryContextMenu(
|
||||
IContextMenu3 *iface,
|
||||
HMENU hmenu,
|
||||
@@ -133,6 +159,7 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
|
||||
@@ -185,6 +211,7 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
|
||||
{
|
||||
ContextMenu *This = impl_from_IContextMenu3(iface);
|
||||
INT uIDMax;
|
||||
@@ -72,7 +72,7 @@ index 677bb3f..0394da3 100644
|
||||
|
||||
TRACE("(%p)->(%p %d 0x%x 0x%x 0x%x )\n", This, hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
|
||||
|
||||
@@ -169,6 +196,9 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
|
||||
@@ -222,6 +249,9 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
|
||||
|
||||
SetMenuDefaultItem(hmenu, 0, MF_BYPOSITION);
|
||||
|
||||
@@ -80,9 +80,9 @@ index 677bb3f..0394da3 100644
|
||||
+ IShellFolder_GetAttributesOf(This->parent, 1, (LPCITEMIDLIST*)This->apidl, &attr);
|
||||
+
|
||||
if(uFlags & ~CMF_CANRENAME)
|
||||
RemoveMenu(hmenu, FCIDM_SHVIEW_RENAME, MF_BYCOMMAND);
|
||||
RemoveMenu(hmenu, FCIDM_SHVIEW_RENAME - FCIDM_BASE + idCmdFirst, MF_BYCOMMAND);
|
||||
else
|
||||
@@ -179,16 +209,14 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
|
||||
@@ -232,16 +262,14 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
|
||||
if (!This->apidl || This->cidl > 1)
|
||||
enable |= MFS_DISABLED;
|
||||
else
|
||||
@@ -93,16 +93,16 @@ index 677bb3f..0394da3 100644
|
||||
enable |= (attr & SFGAO_CANRENAME) ? MFS_ENABLED : MFS_DISABLED;
|
||||
- }
|
||||
|
||||
EnableMenuItem(hmenu, FCIDM_SHVIEW_RENAME, enable);
|
||||
EnableMenuItem(hmenu, FCIDM_SHVIEW_RENAME - FCIDM_BASE + idCmdFirst, enable);
|
||||
}
|
||||
|
||||
+ if ((attr & (SFGAO_FILESYSTEM|SFGAO_FOLDER)) != (SFGAO_FILESYSTEM|SFGAO_FOLDER) || !CheckClipboard())
|
||||
+ RemoveMenu(hmenu, FCIDM_SHVIEW_INSERT + idCmdFirst, MF_BYCOMMAND);
|
||||
+ RemoveMenu(hmenu, FCIDM_SHVIEW_INSERT - FCIDM_BASE + idCmdFirst, MF_BYCOMMAND);
|
||||
+
|
||||
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, uIDMax-idCmdFirst);
|
||||
}
|
||||
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, 0);
|
||||
@@ -447,6 +475,10 @@ static HRESULT WINAPI ItemMenu_InvokeCommand(
|
||||
@@ -814,6 +842,10 @@ static HRESULT WINAPI ItemMenu_InvokeCommand(
|
||||
TRACE("Verb FCIDM_SHVIEW_CUT\n");
|
||||
DoCopyOrCut(This, lpcmi->hwnd, TRUE);
|
||||
break;
|
||||
@@ -113,7 +113,7 @@ index 677bb3f..0394da3 100644
|
||||
case FCIDM_SHVIEW_PROPERTIES:
|
||||
TRACE("Verb FCIDM_SHVIEW_PROPERTIES\n");
|
||||
DoOpenProperties(This, lpcmi->hwnd);
|
||||
@@ -478,6 +510,7 @@ static HRESULT WINAPI ItemMenu_GetCommandString(IContextMenu3 *iface, UINT_PTR c
|
||||
@@ -845,6 +877,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 677bb3f..0394da3 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};
|
||||
@@ -511,6 +544,9 @@ static HRESULT WINAPI ItemMenu_GetCommandString(IContextMenu3 *iface, UINT_PTR c
|
||||
@@ -878,6 +911,9 @@ static HRESULT WINAPI ItemMenu_GetCommandString(IContextMenu3 *iface, UINT_PTR c
|
||||
case FCIDM_SHVIEW_COPY:
|
||||
cmdW = copyW;
|
||||
break;
|
||||
@@ -131,7 +131,7 @@ index 677bb3f..0394da3 100644
|
||||
case FCIDM_SHVIEW_CREATELINK:
|
||||
cmdW = linkW;
|
||||
break;
|
||||
@@ -726,8 +762,22 @@ static BOOL DoPaste(ContextMenu *This)
|
||||
@@ -1177,8 +1213,22 @@ static BOOL DoPaste(ContextMenu *This)
|
||||
if (psfFrom)
|
||||
{
|
||||
/* get source and destination shellfolder */
|
||||
@@ -157,5 +157,5 @@ index 677bb3f..0394da3 100644
|
||||
|
||||
/* do the copy/move */
|
||||
--
|
||||
2.7.4
|
||||
2.30.2
|
||||
|
||||
|
Reference in New Issue
Block a user