[0.4.10][SHELL32] Improve Right-click copy/move/link menu

by porting back:
0.4.15-dev-5588-g e89675768b [SHELL32] Add 3 accelerators for IDM_DRAGFILE MENU de-DE.rc (#5001)
pick a single line only of 0.4.15-dev-984-g a5a30fc249 [SHELL32] CFSDropTarget.cpp ERR->TRACE to mute logspam
0.4.11-dev-858-g 1d55f459d6 [SHELL32] CFSDropTarget: Fix right click menu when shown over the tree view CORE-11240

and strip some EOL-whitespaces in the 3 related source-files.

CORE-11240
This commit is contained in:
Joachim Henze 2023-01-18 22:56:00 +01:00
parent f89d2f745f
commit 0ecf9115e8
4 changed files with 54 additions and 37 deletions

View file

@ -75,7 +75,7 @@ HRESULT CFSDropTarget::_CopyItems(IShellFolder * pSFFrom, UINT cidl,
return hr;
pszSrcList = BuildPathsList(strretFrom.pOleStr, cidl, apidl);
ERR("Source file (just the first) = %s, target path = %s, bCopy: %d\n", debugstr_w(pszSrcList), debugstr_w(m_sPathTarget), bCopy);
TRACE("Source file (just the first) = %s, target path = %s, bCopy: %d\n", debugstr_w(pszSrcList), debugstr_w(m_sPathTarget), bCopy);
CoTaskMemFree(strretFrom.pOleStr);
if (!pszSrcList)
return E_OUTOFMEMORY;
@ -206,9 +206,26 @@ HRESULT CFSDropTarget::_GetEffectFromMenu(IDataObject *pDataObject, POINTL pt, D
/* FIXME: We need to support shell extensions here */
/* We shouldn't use the site window here because the menu should work even when we don't have a site */
HWND hwndDummy = CreateWindowEx(0,
WC_STATIC,
NULL,
WS_OVERLAPPED | WS_DISABLED | WS_CLIPSIBLINGS | WS_BORDER | SS_LEFT,
pt.x,
pt.y,
1,
1,
NULL,
NULL,
NULL,
NULL);
UINT uCommand = TrackPopupMenu(hpopupmenu,
TPM_LEFTALIGN | TPM_RETURNCMD | TPM_LEFTBUTTON | TPM_RIGHTBUTTON | TPM_NONOTIFY,
pt.x, pt.y, 0, m_hwndSite, NULL);
pt.x, pt.y, 0, hwndDummy, NULL);
DestroyWindow(hwndDummy);
if (uCommand == 0)
return S_FALSE;
else if (uCommand == IDM_COPYHERE)

View file

@ -77,9 +77,9 @@ IDM_DRAGFILE MENU
BEGIN
POPUP ""
BEGIN
MENUITEM "Hierher kopieren", IDM_COPYHERE
MENUITEM "Hierher verschieben", IDM_MOVEHERE
MENUITEM "Verknüpfung hier erstellen", IDM_LINKHERE
MENUITEM "Hierher &kopieren", IDM_COPYHERE
MENUITEM "Hierher &verschieben", IDM_MOVEHERE
MENUITEM "Verknüpfung hier &erstellen", IDM_LINKHERE
MENUITEM SEPARATOR
MENUITEM "Abbrechen", 0
END