mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 19:26:33 +00:00
Display again the 'New' context menu, which was broken in r30366
See issue #3183 for more details. svn path=/trunk/; revision=33592
This commit is contained in:
@@ -170,6 +170,8 @@ static ULONG WINAPI ISVBgCm_fnRelease(IContextMenu2 *iface)
|
||||
* ISVBgCm_fnQueryContextMenu()
|
||||
*/
|
||||
|
||||
VOID INewItem_SetParent(LPSHELLFOLDER pSFParent); /* FIXME: remove that, shouldn't be needed */
|
||||
|
||||
static HRESULT WINAPI ISVBgCm_fnQueryContextMenu(
|
||||
IContextMenu2 *iface,
|
||||
HMENU hMenu,
|
||||
@@ -225,8 +227,7 @@ static HRESULT WINAPI ISVBgCm_fnQueryContextMenu(
|
||||
* FIXME
|
||||
* load other shell extensions
|
||||
*/
|
||||
#if 0
|
||||
if (SUCCEEDED(INewItem_Constructor(This->pSFParent, &IID_IContextMenu2, (LPVOID*)&icm)))
|
||||
if (SUCCEEDED(INewItem_Constructor(NULL, &IID_IContextMenu2, (LPVOID*)&icm)))
|
||||
{
|
||||
if (SUCCEEDED(IContextMenu_QueryContextMenu(icm, hMenu, 10, idCmdFirst, idCmdLast, uFlags)))
|
||||
{
|
||||
@@ -238,7 +239,10 @@ static HRESULT WINAPI ISVBgCm_fnQueryContextMenu(
|
||||
This->icm_new = NULL;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Prepare 'New item' shell extension */
|
||||
/* FIXME: shouldn't be needed... */
|
||||
INewItem_SetParent(This->pSFParent);
|
||||
|
||||
if (This->bDesktop)
|
||||
{
|
||||
|
||||
@@ -756,8 +756,8 @@ INewItem_IContextMenu_fnHandleMenuMsg(IContextMenu2 *iface,
|
||||
LPARAM lParam)
|
||||
{
|
||||
INewMenuImpl *This = impl_from_IContextMenu(iface);
|
||||
DRAWITEMSTRUCT * lpids = (DRAWITEMSTRUCT*) lParam;
|
||||
MEASUREITEMSTRUCT *lpmis = (MEASUREITEMSTRUCT*) lParam;
|
||||
//DRAWITEMSTRUCT * lpids = (DRAWITEMSTRUCT*) lParam;
|
||||
//MEASUREITEMSTRUCT *lpmis = (MEASUREITEMSTRUCT*) lParam;
|
||||
|
||||
TRACE("INewItem_IContextMenu_fnHandleMenuMsg (%p)->(msg=%x wp=%lx lp=%lx)\n",This, uMsg, wParam, lParam);
|
||||
|
||||
@@ -789,11 +789,11 @@ static const IContextMenu2Vtbl cmvt =
|
||||
INewItem_IContextMenu_fnHandleMenuMsg
|
||||
};
|
||||
|
||||
static INewMenuImpl *cached_ow;
|
||||
HRESULT WINAPI INewItem_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *ppv)
|
||||
{
|
||||
INewMenuImpl * ow;
|
||||
HRESULT res;
|
||||
static INewMenuImpl *cached_ow;
|
||||
|
||||
if (!cached_ow)
|
||||
{
|
||||
@@ -814,13 +814,17 @@ HRESULT WINAPI INewItem_Constructor(IUnknown * pUnkOuter, REFIID riid, LPVOID *p
|
||||
}
|
||||
|
||||
TRACE("(%p)->()\n",cached_ow);
|
||||
if (cached_ow->pSFParent)
|
||||
{
|
||||
IShellFolder_Release(cached_ow->pSFParent);
|
||||
}
|
||||
// cached_ow->pSFParent = pSFParent;
|
||||
// IShellFolder_AddRef(pSFParent);
|
||||
|
||||
res = INewItem_fnQueryInterface( cached_ow, riid, ppv );
|
||||
return res;
|
||||
}
|
||||
|
||||
VOID INewItem_SetParent(LPSHELLFOLDER pSFParent)
|
||||
{
|
||||
if (cached_ow->pSFParent)
|
||||
{
|
||||
IShellFolder_Release(cached_ow->pSFParent);
|
||||
}
|
||||
cached_ow->pSFParent = pSFParent;
|
||||
IShellFolder_AddRef(pSFParent);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user