Author: dquintana
Date: Wed Mar 5 09:48:32 2014
New Revision: 62421
URL:
http://svn.reactos.org/svn/reactos?rev=62421&view=rev
Log:
[SHLWAPI]
* Fix the right thing.
Modified:
branches/shell-experiments/dll/win32/shlwapi/ordinal.c
Modified: branches/shell-experiments/dll/win32/shlwapi/ordinal.c
URL:
http://svn.reactos.org/svn/reactos/branches/shell-experiments/dll/win32/shl…
==============================================================================
--- branches/shell-experiments/dll/win32/shlwapi/ordinal.c [iso-8859-1] (original)
+++ branches/shell-experiments/dll/win32/shlwapi/ordinal.c [iso-8859-1] Wed Mar 5
09:48:32 2014
@@ -2911,7 +2911,7 @@
HRESULT WINAPI SHInvokeDefaultCommand(HWND hWnd, IShellFolder* lpFolder, LPCITEMIDLIST
lpApidl)
{
TRACE("%p %p %p\n", hWnd, lpFolder, lpApidl);
- return SHInvokeCommand(hWnd, lpFolder, lpApidl, TRUE);
+ return SHInvokeCommand(hWnd, lpFolder, lpApidl, FALSE);
}
/*************************************************************************
@@ -3466,12 +3466,12 @@
* executed.
* Failure: An HRESULT error code indicating the error.
*/
-HRESULT WINAPI SHInvokeCommand(HWND hWnd, IShellFolder* lpFolder, LPCITEMIDLIST lpApidl,
BOOL bInvokeDefault)
+HRESULT WINAPI SHInvokeCommand(HWND hWnd, IShellFolder* lpFolder, LPCITEMIDLIST lpApidl,
BOOL bQueryAllCommands)
{
IContextMenu *iContext;
HRESULT hRet;
- TRACE("(%p, %p, %p, %d)\n", hWnd, lpFolder, lpApidl, bInvokeDefault);
+ TRACE("(%p, %p, %p, %d)\n", hWnd, lpFolder, lpApidl, bQueryAllCommands);
if (!lpFolder)
return E_FAIL;
@@ -3489,11 +3489,11 @@
/* Add the context menu entries to the popup */
hQuery = IContextMenu_QueryContextMenu(iContext, hMenu, 0, 1, 0x7FFF,
- bInvokeDefault ? CMF_NORMAL :
CMF_DEFAULTONLY);
+ bQueryAllCommands ? CMF_NORMAL :
CMF_DEFAULTONLY);
if (SUCCEEDED(hQuery))
{
- if (bInvokeDefault &&
+ if (!bQueryAllCommands &&
(dwDefaultId = GetMenuDefaultItem(hMenu, 0, 0)) != (UINT)-1)
{
CMINVOKECOMMANDINFO cmIci;