Index: src/ch/ClipboardMonitor.cpp =================================================================== diff -u -rb55cf150df571c279536a2b4e33bcecedef17305 -r722397d70c60d1699fd70024ffdfcee539fe45db --- src/ch/ClipboardMonitor.cpp (.../ClipboardMonitor.cpp) (revision b55cf150df571c279536a2b4e33bcecedef17305) +++ src/ch/ClipboardMonitor.cpp (.../ClipboardMonitor.cpp) (revision 722397d70c60d1699fd70024ffdfcee539fe45db) @@ -237,9 +237,9 @@ // get the relationship between src and dst paths for (size_t stIndex = 0; stIndex < spTask->GetClipboard()->GetSize(); ++stIndex) - { - spTask->GetClipboard()->GetAt(stIndex)->CalcBufferIndex(spTask->GetDestPath()); - } + { + spTask->GetClipboard()->GetAt(stIndex)->CalcBufferIndex(spTask->GetDestPath()); + } // add task to a list of tasks and start pData->m_pTasks->Add(spTask); Index: src/ch/task.cpp =================================================================== diff -u -r1402c0dd569ff5f381835966227f5b2836a755d6 -r722397d70c60d1699fd70024ffdfcee539fe45db --- src/ch/task.cpp (.../task.cpp) (revision 1402c0dd569ff5f381835966227f5b2836a755d6) +++ src/ch/task.cpp (.../task.cpp) (revision 722397d70c60d1699fd70024ffdfcee539fe45db) @@ -348,8 +348,7 @@ m_bSaved(false), m_lOsError(0), m_stSessionUniqueID(stSessionUniqueID), - m_localStats(), - m_bRegisteredAsRunning(false) + m_localStats() { BOOST_ASSERT(piFeedbackHandler); Index: src/ch/task.h =================================================================== diff -u -r1402c0dd569ff5f381835966227f5b2836a755d6 -r722397d70c60d1699fd70024ffdfcee539fe45db --- src/ch/task.h (.../task.h) (revision 1402c0dd569ff5f381835966227f5b2836a755d6) +++ src/ch/task.h (.../task.h) (revision 722397d70c60d1699fd70024ffdfcee539fe45db) @@ -297,10 +297,6 @@ CTask(chcore::IFeedbackHandler* piFeedbackHandler, size_t stSessionUniqueID); ~CTask(); - // methods are called when task is being added or removed from the global task array - void OnRegisterTask(TTasksGlobalStats& rtGlobalStats); - void OnUnregisterTask(); - // m_clipboard void AddClipboardData(const CClipboardEntryPtr& spEntry); CClipboardEntryPtr GetClipboardData(size_t stIndex); @@ -315,11 +311,6 @@ void FilesRemoveAll(); size_t FilesGetSize(); - // m_stCurrentIndex - void IncreaseCurrentIndex(); - size_t GetCurrentIndex(); - void SetCurrentIndex(size_t stIndex); - // m_strDestPath void SetDestPath(LPCTSTR lpszPath); const CDestPath& GetDestPath(); @@ -339,11 +330,6 @@ int GetPriority(); void SetPriority(int nPriority); - void CalculateTotalSize(); - - void KillThread(); - void CleanupAfterKill(); - // m_strUniqueName CString GetUniqueName(); @@ -361,15 +347,6 @@ void GetSnapshot(TASK_DISPLAY_DATA *pData); void GetMiniSnapshot(TASK_MINI_DISPLAY_DATA *pData); - void DeleteProgress(LPCTSTR lpszDirectory); - - void SetOsErrorCode(DWORD dwError, LPCTSTR lpszErrDesc); - void CalculateProcessedSize(); - - bool CanBegin(); - - void UpdateTime(); - void SetFilters(const CFiltersArray* pFilters); void SetCopies(unsigned char ucCopies); @@ -379,26 +356,26 @@ CClipboardArray* GetClipboard() { return &m_clipboard; }; - bool GetRequiredFreeSpace(ull_t *pi64Needed, ull_t *pi64Available); - void SetTaskPath(const tchar_t* pszDir); const tchar_t* GetTaskPath() const; chcore::IFeedbackHandler* GetFeedbackHandler() const { return m_piFeedbackHandler; } void SetForceFlag(bool bFlag = true); bool GetForceFlag(); - void SetContinueFlag(bool bFlag = true); - bool GetContinueFlag(); size_t GetSessionUniqueID() const { return m_stSessionUniqueID; } protected: static DWORD WINAPI ThrdProc(LPVOID pParam); - void OnBeginOperation(); - void OnEndOperation(); + // methods are called when task is being added or removed from the global task array + void OnRegisterTask(TTasksGlobalStats& rtGlobalStats); + void OnUnregisterTask(); + void OnBeginOperation(); + void OnEndOperation(); + void CheckForWaitState(); void ProcessFiles(); void CustomCopyFile(CUSTOM_COPY_PARAMS* pData); @@ -421,6 +398,11 @@ void RecurseDirectories(); static bool SetFileDirectoryTime(LPCTSTR lpszName, const CFileInfoPtr& spFileInfo); + // m_stCurrentIndex + void IncreaseCurrentIndex(); + size_t GetCurrentIndex(); + void SetCurrentIndex(size_t stIndex); + void IncreaseCurrentIndexNL(); size_t GetCurrentIndexNL(); void SetCurrentIndexNL(size_t stIndex); @@ -444,24 +426,36 @@ int GetPriorityNL(); void SetPriorityNL(int nPriority); + void CalculateTotalSize(); void CalculateTotalSizeNL(); - void SetKillFlagNL(bool bKill = true); - bool GetKillFlagNL(); + void DeleteProgress(LPCTSTR lpszDirectory); - void SetKilledFlagNL(bool bKilled = true); - bool GetKilledFlagNL(); + void SetOsErrorCode(DWORD dwError, LPCTSTR lpszErrDesc); + void CalculateProcessedSize(); + void KillThread(); + + void CleanupAfterKill(); void CleanupAfterKillNL(); + + void UpdateTime(); void UpdateTimeNL(); CString GetUniqueNameNL(); void SetForceFlagNL(bool bFlag = true); bool GetForceFlagNL(); + + void SetContinueFlag(bool bFlag = true); + bool GetContinueFlag(); void SetContinueFlagNL(bool bFlag = true); bool GetContinueFlagNL(); + bool GetRequiredFreeSpace(ull_t *pi64Needed, ull_t *pi64Available); + + bool CanBegin(); + void RequestStopThread(); private: @@ -516,7 +510,6 @@ size_t m_stSessionUniqueID; - bool m_bRegisteredAsRunning; TTaskLocalStats m_localStats; friend class CTaskArray;