Daniel Jelinski : shell32: Context menu offset is handled by client.
Alexandre Julliard
julliard at winehq.org
Thu Aug 15 13:12:47 CDT 2013
Module: wine
Branch: master
Commit: 6509499fc91d8aa453f9f81299c47699f8afabe4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=6509499fc91d8aa453f9f81299c47699f8afabe4
Author: Daniel Jelinski <djelinski1 at gmail.com>
Date: Sat Aug 10 19:06:33 2013 +0200
shell32: Context menu offset is handled by client.
---
dlls/shell32/shlview_cmenu.c | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/dlls/shell32/shlview_cmenu.c b/dlls/shell32/shlview_cmenu.c
index 07c33d0..b7dc994 100644
--- a/dlls/shell32/shlview_cmenu.c
+++ b/dlls/shell32/shlview_cmenu.c
@@ -49,7 +49,6 @@ typedef struct
LONG ref;
IShellFolder* parent;
- UINT verb_offset;
/* item menu data */
LPITEMIDLIST pidl; /* root pidl */
@@ -138,8 +137,6 @@ static HRESULT WINAPI ItemMenu_QueryContextMenu(
TRACE("(%p)->(%p %d 0x%x 0x%x 0x%x )\n", This, hmenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
- This->verb_offset = idCmdFirst;
-
if(!(CMF_DEFAULTONLY & uFlags) && This->cidl > 0)
{
HMENU hmenures = LoadMenuW(shell32_hInstance, MAKEINTRESOURCEW(MENU_SHV_FILE));
@@ -419,7 +416,7 @@ static HRESULT WINAPI ItemMenu_InvokeCommand(
if (HIWORD(lpcmi->lpVerb) == 0)
{
- switch(LOWORD(lpcmi->lpVerb - This->verb_offset))
+ switch(LOWORD(lpcmi->lpVerb))
{
case FCIDM_SHVIEW_EXPLORE:
TRACE("Verb FCIDM_SHVIEW_EXPLORE\n");
@@ -466,7 +463,7 @@ static HRESULT WINAPI ItemMenu_InvokeCommand(
DoOpenProperties(This, lpcmi->hwnd);
break;
default:
- FIXME("Unhandled Verb %xl\n",LOWORD(lpcmi->lpVerb)-This->verb_offset);
+ FIXME("Unhandled Verb %xl\n",LOWORD(lpcmi->lpVerb));
return E_INVALIDARG;
}
}
@@ -506,7 +503,7 @@ static HRESULT WINAPI ItemMenu_GetCommandString(
break;
case GCS_VERBA:
- switch(idCommand-This->verb_offset)
+ switch(idCommand)
{
case FCIDM_SHVIEW_RENAME:
strcpy(lpszName, "rename");
@@ -518,7 +515,7 @@ static HRESULT WINAPI ItemMenu_GetCommandString(
/* NT 4.0 with IE 3.0x or no IE will always call This with GCS_VERBW. In This
case, you need to do the lstrcpyW to the pointer passed.*/
case GCS_VERBW:
- switch(idCommand-This->verb_offset)
+ switch(idCommand)
{
case FCIDM_SHVIEW_RENAME:
MultiByteToWideChar( CP_ACP, 0, "rename", -1, (LPWSTR)lpszName, uMaxNameLen );
@@ -581,7 +578,6 @@ HRESULT ItemMenu_Constructor(IShellFolder *parent, LPCITEMIDLIST pidl, const LPC
This->IContextMenu3_iface.lpVtbl = &ItemContextMenuVtbl;
This->ref = 1;
- This->verb_offset = 0;
This->parent = parent;
if (parent) IShellFolder_AddRef(parent);
@@ -618,8 +614,6 @@ static HRESULT WINAPI BackgroundMenu_QueryContextMenu(
TRACE("(%p)->(hmenu=%p indexmenu=%x cmdfirst=%x cmdlast=%x flags=%x )\n",
This, hMenu, indexMenu, idCmdFirst, idCmdLast, uFlags);
- This->verb_offset = idCmdFirst;
-
hMyMenu = LoadMenuA(shell32_hInstance, "MENU_002");
if (uFlags & CMF_DEFAULTONLY)
{
@@ -804,7 +798,7 @@ static HRESULT WINAPI BackgroundMenu_InvokeCommand(
}
else
{
- switch (LOWORD(lpcmi->lpVerb) - This->verb_offset)
+ switch (LOWORD(lpcmi->lpVerb))
{
case FCIDM_SHVIEW_REFRESH:
if (view) IShellView_Refresh(view);
@@ -893,7 +887,6 @@ HRESULT BackgroundMenu_Constructor(IShellFolder *parent, BOOL desktop, REFIID ri
This->IContextMenu3_iface.lpVtbl = &BackgroundContextMenuVtbl;
This->ref = 1;
This->parent = parent;
- This->verb_offset = 0;
This->pidl = NULL;
This->apidl = NULL;
More information about the wine-cvs
mailing list