Index: src/ch/MainWnd.cpp =================================================================== diff -u -r09cedb80782a75d4b4896a1f3d2dd535688bf840 -r7eb1f74a4a5228a71a86f522d22056ff8f616050 --- src/ch/MainWnd.cpp (.../MainWnd.cpp) (revision 09cedb80782a75d4b4896a1f3d2dd535688bf840) +++ src/ch/MainWnd.cpp (.../MainWnd.cpp) (revision 7eb1f74a4a5228a71a86f522d22056ff8f616050) @@ -492,6 +492,8 @@ chcore::TString wstrData(pszBuffer); + LOG_DEBUG(m_spLog) << L"Received task definition to process: " << wstrData; + chcore::TTaskDefinition tTaskDefinition; CString strError; try Index: src/chext/TShellExtData.cpp =================================================================== diff -u -r8068e0c351055554340ac9755d1bc846893bf2b8 -r7eb1f74a4a5228a71a86f522d22056ff8f616050 --- src/chext/TShellExtData.cpp (.../TShellExtData.cpp) (revision 8068e0c351055554340ac9755d1bc846893bf2b8) +++ src/chext/TShellExtData.cpp (.../TShellExtData.cpp) (revision 7eb1f74a4a5228a71a86f522d22056ff8f616050) @@ -234,32 +234,50 @@ { case TSourcePathsInfo::eSrcType_Clipboard: { + if(m_dwClipboardDropEffect == 0) + break; + if(m_dwClipboardDropEffect & DROPEFFECT_MOVE && spMenuItem->GetDefaultItemHint() == chcore::eOperation_Move || m_dwClipboardDropEffect & DROPEFFECT_COPY && spMenuItem->GetDefaultItemHint() == chcore::eOperation_Copy) return true; - break; + + return false; } + case TSourcePathsInfo::eSrcType_InitializePidlFolder: - break; // no associated info about drop effect - case TSourcePathsInfo::eSrcType_InitializeIDataObject: { - if(m_dwIDataObjectDropEffect & DROPEFFECT_MOVE && spMenuItem->GetDefaultItemHint() == chcore::eOperation_Move || - m_dwIDataObjectDropEffect & DROPEFFECT_COPY && spMenuItem->GetDefaultItemHint() == chcore::eOperation_Copy) - return true; - break; + break; // no associated info about drop effect } + + case TSourcePathsInfo::eSrcType_InitializeIDataObject: case TSourcePathsInfo::eSrcType_InitializeAuto: { + if(m_dwIDataObjectDropEffect == 0) + break; + if(m_dwIDataObjectDropEffect & DROPEFFECT_MOVE && spMenuItem->GetDefaultItemHint() == chcore::eOperation_Move || m_dwIDataObjectDropEffect & DROPEFFECT_COPY && spMenuItem->GetDefaultItemHint() == chcore::eOperation_Copy) return true; - break; + + return false; } + default: return false; } // step 3 - fallback - if there is no other info available, then assume copying, unless something else comes up from source/destination paths analysis + // check keyboard buttons + if(m_ulKeysState & eKey_Ctrl || m_ulKeysState & eKey_Shift) + { + if(m_ulKeysState & eKey_Ctrl && spMenuItem->GetDefaultItemHint() == chcore::eOperation_Copy) + return true; + if(m_ulKeysState & eKey_Shift && spMenuItem->GetDefaultItemHint() == chcore::eOperation_Move) + return true; + + return false; + } + chcore::TSmartPath pathDestination; if(!GetDestinationPathByItem(spMenuItem, pathDestination)) return false; @@ -271,17 +289,20 @@ { if(!m_vPathsClipboard.IsEmpty()) bIsSameDriveOrServerName = IsSameDrive(pathDestination, m_vPathsClipboard.GetAt(m_vPathsClipboard.GetCount() - 1)); + break; } case TSourcePathsInfo::eSrcType_InitializePidlFolder: { bIsSameDriveOrServerName = IsSameDrive(pathDestination, m_pathPidlFolder); + break; } case TSourcePathsInfo::eSrcType_InitializeIDataObject: { if(!m_vPathsIDataObject.IsEmpty()) bIsSameDriveOrServerName = IsSameDrive(pathDestination, m_vPathsIDataObject.GetAt(m_vPathsIDataObject.GetCount() - 1)); + break; } case TSourcePathsInfo::eSrcType_InitializeAuto: @@ -311,6 +332,7 @@ if(spMenuItem->GetDefaultItemHint() == chcore::eOperation_Copy) return true; } + return false; }