Index: src/chext/TShellExtData.cpp =================================================================== diff -u -r8b7479db2ee71a3d00779c67fe6a1b1d9ec414b8 -r8068e0c351055554340ac9755d1bc846893bf2b8 --- src/chext/TShellExtData.cpp (.../TShellExtData.cpp) (revision 8b7479db2ee71a3d00779c67fe6a1b1d9ec414b8) +++ src/chext/TShellExtData.cpp (.../TShellExtData.cpp) (revision 8068e0c351055554340ac9755d1bc846893bf2b8) @@ -70,7 +70,7 @@ ReadKeyboardState(); // experimentally deduced condition - m_bFolderBackground = (piDataObject == NULL) && (pidlFolder != NULL); + m_bFolderBackground = (piDataObject == nullptr) && (pidlFolder != nullptr); } return hResult; @@ -215,8 +215,20 @@ // check if there was a state defined by reading the current context menu if(m_eDefaultSystemMenuAction != eAction_None) - return m_eDefaultSystemMenuAction == spMenuItem->GetDefaultItemHint(); + { + switch(m_eDefaultSystemMenuAction) + { + case eAction_Copy: + return spMenuItem->GetDefaultItemHint() == chcore::eOperation_Copy; + case eAction_Move: + return spMenuItem->GetDefaultItemHint() == chcore::eOperation_Move; + + default: + return false; + } + } + // check if there is preferred drop effect associated with the source path switch(spMenuItem->GetSourcePathsInfo().GetSrcPathsSource()) { @@ -422,7 +434,7 @@ break; case TSourcePathsInfo::eSrcType_InitializePidlFolder: return false; - break; + default: return false; } @@ -455,7 +467,7 @@ if(!uiPreferredDropEffect) return E_FAIL; - FORMATETC fe = { (CLIPFORMAT)uiPreferredDropEffect, NULL, DVASPECT_CONTENT, -1, TYMED_HGLOBAL}; + FORMATETC fe = { (CLIPFORMAT)uiPreferredDropEffect, nullptr, DVASPECT_CONTENT, -1, TYMED_HGLOBAL}; // if the drop effect does not exist - just report it m_dwIDataObjectDropEffect = 0; @@ -492,7 +504,7 @@ if(IsClipboardFormatAvailable(CF_HDROP)) { // read paths from clipboard - if(!OpenClipboard(NULL)) + if(!OpenClipboard(nullptr)) return E_FAIL; HANDLE hClipboardData = GetClipboardData(CF_HDROP); @@ -543,7 +555,7 @@ // it's none by default m_eDefaultSystemMenuAction = eAction_None; - BOOST_ASSERT(hMenu != NULL); + BOOST_ASSERT(hMenu != nullptr); if(hMenu) { MENUITEMINFO mii;