mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[ZIPFLDR] Add 'Extract All' menu item to the folder context menu.
This commit is contained in:
parent
09719d25c4
commit
875e58d781
1 changed files with 20 additions and 8 deletions
|
@ -301,10 +301,15 @@ public:
|
|||
|
||||
return hr;
|
||||
}
|
||||
if (riid == IID_IExplorerCommandProvider)
|
||||
else if (riid == IID_IExplorerCommandProvider)
|
||||
{
|
||||
return _CExplorerCommandProvider_CreateInstance(this, riid, ppvOut);
|
||||
}
|
||||
else if (riid == IID_IContextMenu)
|
||||
{
|
||||
// Folder context menu
|
||||
return QueryInterface(riid, ppvOut);
|
||||
}
|
||||
if (UnknownIID != riid)
|
||||
DbgPrint("%s(%S) UNHANDLED\n", __FUNCTION__, guid2string(riid));
|
||||
return E_NOTIMPL;
|
||||
|
@ -379,6 +384,7 @@ public:
|
|||
}
|
||||
else if (riid == IID_IContextMenu && cidl >= 0)
|
||||
{
|
||||
// Context menu of an object inside the zip
|
||||
const ZipPidlEntry* zipEntry = _ZipFromIL(*apidl);
|
||||
if (zipEntry)
|
||||
{
|
||||
|
@ -473,9 +479,9 @@ public:
|
|||
}
|
||||
STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO pici)
|
||||
{
|
||||
if (!pici || pici->cbSize != sizeof(*pici))
|
||||
if (!pici || (pici->cbSize != sizeof(CMINVOKECOMMANDINFO) && pici->cbSize != sizeof(CMINVOKECOMMANDINFOEX)))
|
||||
return E_INVALIDARG;
|
||||
|
||||
|
||||
if (pici->lpVerb == MAKEINTRESOURCEA(0) || (HIWORD(pici->lpVerb) && !strcmp(pici->lpVerb, EXTRACT_VERBA)))
|
||||
{
|
||||
BSTR ZipFile = m_ZipFile.AllocSysString();
|
||||
|
@ -495,12 +501,18 @@ public:
|
|||
{
|
||||
int Entries = 0;
|
||||
|
||||
CStringW menuText(MAKEINTRESOURCEW(IDS_MENUITEM));
|
||||
if (!(uFlags & CMF_DEFAULTONLY))
|
||||
{
|
||||
CStringW menuText(MAKEINTRESOURCEW(IDS_MENUITEM));
|
||||
|
||||
InsertMenuW(hmenu, indexMenu++, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
|
||||
Entries++;
|
||||
InsertMenuW(hmenu, indexMenu++, MF_BYPOSITION | MF_STRING, idCmdFirst++, menuText);
|
||||
Entries++;
|
||||
if (indexMenu)
|
||||
{
|
||||
InsertMenuW(hmenu, indexMenu++, MF_BYPOSITION | MF_SEPARATOR, 0, NULL);
|
||||
Entries++;
|
||||
}
|
||||
InsertMenuW(hmenu, indexMenu++, MF_BYPOSITION | MF_STRING, idCmdFirst++, menuText);
|
||||
Entries++;
|
||||
}
|
||||
|
||||
return MAKE_HRESULT(SEVERITY_SUCCESS, 0, Entries);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue