From d23e936e770dec1297ca9dc667a06eb62ea8a5fd Mon Sep 17 00:00:00 2001 From: Johannes Anderwald Date: Tue, 13 Nov 2007 19:30:27 +0000 Subject: [PATCH] - call CDefFolderMenu_Create2 to create the context menus - should ignore cidl account as the implementation should handle this automatically - will be enabled for the background context menus later svn path=/trunk/; revision=30426 --- reactos/dll/win32/shell32/cpanelfolder.c | 3 +-- reactos/dll/win32/shell32/shfldr_desktop.c | 6 +----- reactos/dll/win32/shell32/shfldr_fs.c | 4 +--- reactos/dll/win32/shell32/shfldr_mycomp.c | 4 +--- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/reactos/dll/win32/shell32/cpanelfolder.c b/reactos/dll/win32/shell32/cpanelfolder.c index aa09edf62c2..1bb91121032 100644 --- a/reactos/dll/win32/shell32/cpanelfolder.c +++ b/reactos/dll/win32/shell32/cpanelfolder.c @@ -611,8 +611,7 @@ ISF_ControlPanel_fnGetUIObjectOf(IShellFolder2 * iface, *ppvOut = NULL; if (IsEqualIID(riid, &IID_IContextMenu) &&(cidl >= 1)) { - pObj = (LPUNKNOWN) ISvItemCm_Constructor((IShellFolder *) iface, This->pidlRoot, apidl, cidl); - hr = S_OK; + hr = CDefFolderMenu_Create2(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); } else if (IsEqualIID(riid, &IID_IDataObject) &&(cidl >= 1)) { pObj = (LPUNKNOWN) IDataObject_Constructor(hwndOwner, This->pidlRoot, apidl, cidl); hr = S_OK; diff --git a/reactos/dll/win32/shell32/shfldr_desktop.c b/reactos/dll/win32/shell32/shfldr_desktop.c index 4ccf0f61608..5a948d548b5 100644 --- a/reactos/dll/win32/shell32/shfldr_desktop.c +++ b/reactos/dll/win32/shell32/shfldr_desktop.c @@ -487,11 +487,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetUIObjectOf (IShellFolder2 * iface, if (IsEqualIID (riid, &IID_IContextMenu)) { - if (cidl > 0) - pObj = (LPUNKNOWN) ISvItemCm_Constructor( (IShellFolder *) iface, This->pidlRoot, apidl, cidl); - else - pObj = (LPUNKNOWN) ISvBgCm_Constructor( (IShellFolder *) iface, TRUE); - hr = S_OK; + hr = CDefFolderMenu_Create2(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) { diff --git a/reactos/dll/win32/shell32/shfldr_fs.c b/reactos/dll/win32/shell32/shfldr_fs.c index 9b15cab0fd9..309344bbbc4 100644 --- a/reactos/dll/win32/shell32/shfldr_fs.c +++ b/reactos/dll/win32/shell32/shfldr_fs.c @@ -652,9 +652,7 @@ IShellFolder_fnGetUIObjectOf (IShellFolder2 * iface, *ppvOut = NULL; if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) { - pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, - This->pidlRoot, apidl, cidl); - hr = S_OK; + hr = CDefFolderMenu_Create2(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) { pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner, This->pidlRoot, apidl, cidl); diff --git a/reactos/dll/win32/shell32/shfldr_mycomp.c b/reactos/dll/win32/shell32/shfldr_mycomp.c index 8b2679ea8b6..b2b10eb7955 100644 --- a/reactos/dll/win32/shell32/shfldr_mycomp.c +++ b/reactos/dll/win32/shell32/shfldr_mycomp.c @@ -519,9 +519,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetUIObjectOf (IShellFolder2 * iface, if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) { - pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface, - This->pidlRoot, apidl, cidl); - hr = S_OK; + hr = CDefFolderMenu_Create2(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj); } else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) {