mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
- 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
This commit is contained in:
parent
9d3f29f8f2
commit
d23e936e77
4 changed files with 4 additions and 13 deletions
|
@ -611,8 +611,7 @@ ISF_ControlPanel_fnGetUIObjectOf(IShellFolder2 * iface,
|
||||||
*ppvOut = NULL;
|
*ppvOut = NULL;
|
||||||
|
|
||||||
if (IsEqualIID(riid, &IID_IContextMenu) &&(cidl >= 1)) {
|
if (IsEqualIID(riid, &IID_IContextMenu) &&(cidl >= 1)) {
|
||||||
pObj = (LPUNKNOWN) ISvItemCm_Constructor((IShellFolder *) iface, This->pidlRoot, apidl, cidl);
|
hr = CDefFolderMenu_Create2(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj);
|
||||||
hr = S_OK;
|
|
||||||
} else if (IsEqualIID(riid, &IID_IDataObject) &&(cidl >= 1)) {
|
} else if (IsEqualIID(riid, &IID_IDataObject) &&(cidl >= 1)) {
|
||||||
pObj = (LPUNKNOWN) IDataObject_Constructor(hwndOwner, This->pidlRoot, apidl, cidl);
|
pObj = (LPUNKNOWN) IDataObject_Constructor(hwndOwner, This->pidlRoot, apidl, cidl);
|
||||||
hr = S_OK;
|
hr = S_OK;
|
||||||
|
|
|
@ -487,11 +487,7 @@ static HRESULT WINAPI ISF_Desktop_fnGetUIObjectOf (IShellFolder2 * iface,
|
||||||
|
|
||||||
if (IsEqualIID (riid, &IID_IContextMenu))
|
if (IsEqualIID (riid, &IID_IContextMenu))
|
||||||
{
|
{
|
||||||
if (cidl > 0)
|
hr = CDefFolderMenu_Create2(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj);
|
||||||
pObj = (LPUNKNOWN) ISvItemCm_Constructor( (IShellFolder *) iface, This->pidlRoot, apidl, cidl);
|
|
||||||
else
|
|
||||||
pObj = (LPUNKNOWN) ISvBgCm_Constructor( (IShellFolder *) iface, TRUE);
|
|
||||||
hr = S_OK;
|
|
||||||
}
|
}
|
||||||
else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1))
|
else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1))
|
||||||
{
|
{
|
||||||
|
|
|
@ -652,9 +652,7 @@ IShellFolder_fnGetUIObjectOf (IShellFolder2 * iface,
|
||||||
*ppvOut = NULL;
|
*ppvOut = NULL;
|
||||||
|
|
||||||
if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) {
|
if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1)) {
|
||||||
pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface,
|
hr = CDefFolderMenu_Create2(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj);
|
||||||
This->pidlRoot, apidl, cidl);
|
|
||||||
hr = S_OK;
|
|
||||||
} else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) {
|
} else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1)) {
|
||||||
pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner,
|
pObj = (LPUNKNOWN) IDataObject_Constructor (hwndOwner,
|
||||||
This->pidlRoot, apidl, cidl);
|
This->pidlRoot, apidl, cidl);
|
||||||
|
|
|
@ -519,9 +519,7 @@ static HRESULT WINAPI ISF_MyComputer_fnGetUIObjectOf (IShellFolder2 * iface,
|
||||||
|
|
||||||
if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1))
|
if (IsEqualIID (riid, &IID_IContextMenu) && (cidl >= 1))
|
||||||
{
|
{
|
||||||
pObj = (LPUNKNOWN) ISvItemCm_Constructor ((IShellFolder *) iface,
|
hr = CDefFolderMenu_Create2(This->pidlRoot, hwndOwner, cidl, apidl, (IShellFolder*)iface, NULL, 0, NULL, (IContextMenu**)&pObj);
|
||||||
This->pidlRoot, apidl, cidl);
|
|
||||||
hr = S_OK;
|
|
||||||
}
|
}
|
||||||
else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1))
|
else if (IsEqualIID (riid, &IID_IDataObject) && (cidl >= 1))
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue