mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 23:32:58 +00:00
[SHELL32] Use FS compatible PIDL format for Recycle Bin items (#7532)
* [SHELL32] Use FS compatible PIDL format for Recycle Bin items This allows SHChangeNotify to handle these items and DefView will correctly update the recycle folder. CORE-18005 CORE-19239 CORE-13950 CORE-18435 CORE-18436 CORE-18437
This commit is contained in:
parent
a18424267b
commit
28399a216b
27 changed files with 1151 additions and 951 deletions
|
@ -1318,6 +1318,7 @@ int CDefView::LV_FindItemByPidl(PCUITEMID_CHILD pidl)
|
|||
{
|
||||
for (i = 0; i < cItems; i++)
|
||||
{
|
||||
//FIXME: ILIsEqual needs absolute pidls!
|
||||
currentpidl = _PidlByItem(i);
|
||||
if (ILIsEqual(pidl, currentpidl))
|
||||
return i;
|
||||
|
@ -2848,29 +2849,35 @@ LRESULT CDefView::OnChangeNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &
|
|||
TRACE("(%p)(%p,%p,%p)\n", this, Pidls[0], Pidls[1], lParam);
|
||||
|
||||
if (_DoFolderViewCB(SFVM_FSNOTIFY, (WPARAM)Pidls, lEvent) == S_FALSE)
|
||||
{
|
||||
SHChangeNotification_Unlock(hLock);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
// Translate child IDLs.
|
||||
// SHSimpleIDListFromPathW creates fake PIDLs (lacking some attributes)
|
||||
lEvent &= ~SHCNE_INTERRUPT;
|
||||
HRESULT hr;
|
||||
PITEMID_CHILD child0 = NULL, child1 = NULL;
|
||||
CComHeapPtr<ITEMIDLIST_RELATIVE> pidl0Temp, pidl1Temp;
|
||||
if (_ILIsSpecialFolder(Pidls[0]) || ILIsParentOrSpecialParent(m_pidlParent, Pidls[0]))
|
||||
if (lEvent != SHCNE_UPDATEIMAGE && lEvent < SHCNE_EXTENDED_EVENT)
|
||||
{
|
||||
child0 = ILFindLastID(Pidls[0]);
|
||||
hr = SHGetRealIDL(m_pSFParent, child0, &pidl0Temp);
|
||||
if (SUCCEEDED(hr))
|
||||
child0 = pidl0Temp;
|
||||
}
|
||||
if (_ILIsSpecialFolder(Pidls[1]) || ILIsParentOrSpecialParent(m_pidlParent, Pidls[1]))
|
||||
{
|
||||
child1 = ILFindLastID(Pidls[1]);
|
||||
hr = SHGetRealIDL(m_pSFParent, child1, &pidl1Temp);
|
||||
if (SUCCEEDED(hr))
|
||||
child1 = pidl1Temp;
|
||||
if (_ILIsSpecialFolder(Pidls[0]) || ILIsParentOrSpecialParent(m_pidlParent, Pidls[0]))
|
||||
{
|
||||
child0 = ILFindLastID(Pidls[0]);
|
||||
hr = SHGetRealIDL(m_pSFParent, child0, &pidl0Temp);
|
||||
if (SUCCEEDED(hr))
|
||||
child0 = pidl0Temp;
|
||||
}
|
||||
if (_ILIsSpecialFolder(Pidls[1]) || ILIsParentOrSpecialParent(m_pidlParent, Pidls[1]))
|
||||
{
|
||||
child1 = ILFindLastID(Pidls[1]);
|
||||
hr = SHGetRealIDL(m_pSFParent, child1, &pidl1Temp);
|
||||
if (SUCCEEDED(hr))
|
||||
child1 = pidl1Temp;
|
||||
}
|
||||
}
|
||||
|
||||
lEvent &= ~SHCNE_INTERRUPT;
|
||||
switch (lEvent)
|
||||
{
|
||||
case SHCNE_MKDIR:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue