Index: src/ch/CustomCopyDlg.cpp =================================================================== diff -u -N -rc435ab507c8b8280264188b49e9ada56d46c0261 -rbd08c279240bac9e7902f8da6a9251e0252ec324 --- src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision c435ab507c8b8280264188b49e9ada56d46c0261) +++ src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision bd08c279240bac9e7902f8da6a9251e0252ec324) @@ -41,7 +41,6 @@ CCustomCopyDlg::CCustomCopyDlg() :ictranslate::CLanguageDialog(CCustomCopyDlg::IDD) { //{{AFX_DATA_INIT(CCustomCopyDlg) - m_ucCount = 1; m_bOnlyCreate = FALSE; m_bIgnoreFolders = FALSE; m_bFilters = FALSE; @@ -54,7 +53,6 @@ m_ccData.m_iOperation=0; m_ccData.m_iPriority=THREAD_PRIORITY_NORMAL; - m_ccData.m_ucCount=1; // m_ccData.m_bsSizes stays uninitialized // m_ccData.m_afFilters - this too @@ -71,14 +69,11 @@ CLanguageDialog::DoDataExchange(pDX); //{{AFX_DATA_MAP(CCustomCopyDlg) DDX_Control(pDX, IDC_DESTPATH_COMBOBOXEX, m_ctlDstPath); - DDX_Control(pDX, IDC_COUNT_SPIN, m_ctlCountSpin); DDX_Control(pDX, IDC_FILTERS_LIST, m_ctlFilters); DDX_Control(pDX, IDC_BUFFERSIZES_LIST, m_ctlBufferSizes); DDX_Control(pDX, IDC_OPERATION_COMBO, m_ctlOperation); DDX_Control(pDX, IDC_PRIORITY_COMBO, m_ctlPriority); DDX_Control(pDX, IDC_FILES_LIST, m_ctlFiles); - DDX_Text(pDX, IDC_COUNT_EDIT, m_ucCount); - DDV_MinMaxByte(pDX, m_ucCount, 1, 255); DDX_Check(pDX, IDC_ONLYSTRUCTURE_CHECK, m_bOnlyCreate); DDX_Check(pDX, IDC_IGNOREFOLDERS_CHECK, m_bIgnoreFolders); DDX_Check(pDX, IDC_FORCEDIRECTORIES_CHECK, m_bForceDirectories); @@ -131,14 +126,11 @@ AddResizableControl(IDC_007_STATIC, 0.5, 0.5, 0.0, 0.0); AddResizableControl(IDC_BAR2_STATIC, 0.5, 0.5, 0.5, 0.0); - AddResizableControl(IDC_003_STATIC, 0.0, 0.5, 0.33, 0.0); - AddResizableControl(IDC_004_STATIC, 0.33, 0.5, 0.33, 0.0); - AddResizableControl(IDC_005_STATIC, 0.66, 0.5, 0.33, 0.0); + AddResizableControl(IDC_003_STATIC, 0.0, 0.5, 0.5, 0.0); + AddResizableControl(IDC_004_STATIC, 0.5, 0.5, 0.5, 0.0); - AddResizableControl(IDC_OPERATION_COMBO, 0.0, 0.5, 0.33, 0.0); - AddResizableControl(IDC_PRIORITY_COMBO, 0.33, 0.5, 0.33, 0.0); - AddResizableControl(IDC_COUNT_SPIN, 1.0, 0.5, 0.0, 0.0); - AddResizableControl(IDC_COUNT_EDIT, 0.66, 0.5, 0.33, 0.0); + AddResizableControl(IDC_OPERATION_COMBO, 0.0, 0.5, 0.5, 0.0); + AddResizableControl(IDC_PRIORITY_COMBO, 0.5, 0.5, 0.5, 0.0); AddResizableControl(IDC_006_STATIC, 0.0, 0.5, 1.0, 0.0); AddResizableControl(IDC_BUFFERSIZES_LIST, 0.0, 0.5, 1.0, 0.0); @@ -235,10 +227,6 @@ m_ctlPriority.SetCurSel(PriorityToIndex(m_ccData.m_iPriority)); - // count of copies - m_ucCount=m_ccData.m_ucCount; - m_ctlCountSpin.SetRange(1, 255); - // fill buffer sizes listbox SetBuffersizesString(); @@ -490,9 +478,6 @@ // priority m_ccData.m_iPriority=IndexToPriority(m_ctlPriority.GetCurSel()); - // count of copies - m_ccData.m_ucCount=m_ucCount; - // buffersize is being changed realtime // so as filter Index: src/ch/CustomCopyDlg.h =================================================================== diff -u -N -rd5c3edd0d167db9b5d47d04248820fda49499a5e -rbd08c279240bac9e7902f8da6a9251e0252ec324 --- src/ch/CustomCopyDlg.h (.../CustomCopyDlg.h) (revision d5c3edd0d167db9b5d47d04248820fda49499a5e) +++ src/ch/CustomCopyDlg.h (.../CustomCopyDlg.h) (revision bd08c279240bac9e7902f8da6a9251e0252ec324) @@ -41,7 +41,6 @@ char_vector m_vRecent; // recently selected paths int m_iOperation; // copy || move int m_iPriority; // operation priority - BYTE m_ucCount; // count of copys BUFFERSIZES m_bsSizes; // buffer sizes selected for this task CFiltersArray m_afFilters; // list of filters to select from combos @@ -56,13 +55,11 @@ //{{AFX_DATA(CCustomCopyDlg) enum { IDD = IDD_CUSTOM_COPY_DIALOG }; CComboBoxEx m_ctlDstPath; - CSpinButtonCtrl m_ctlCountSpin; CListCtrl m_ctlFilters; CListBox m_ctlBufferSizes; CComboBox m_ctlOperation; CComboBox m_ctlPriority; CListCtrl m_ctlFiles; - BYTE m_ucCount; BOOL m_bOnlyCreate; BOOL m_bIgnoreFolders; BOOL m_bForceDirectories; Index: src/ch/FileInfo.cpp =================================================================== diff -u -N -rc435ab507c8b8280264188b49e9ada56d46c0261 -rbd08c279240bac9e7902f8da6a9251e0252ec324 --- src/ch/FileInfo.cpp (.../FileInfo.cpp) (revision c435ab507c8b8280264188b49e9ada56d46c0261) +++ src/ch/FileInfo.cpp (.../FileInfo.cpp) (revision bd08c279240bac9e7902f8da6a9251e0252ec324) @@ -56,7 +56,7 @@ m_bMove(rEntry.m_bMove), m_iDriveNumber(rEntry.m_iDriveNumber), m_uiDriveType(rEntry.m_uiDriveType), - m_vDstPaths(rEntry.m_vDstPaths) + m_strDstPath(rEntry.m_strDstPath) { } @@ -96,21 +96,16 @@ return CString(szName) + szExt; } -void CClipboardEntry::AddDestinationPath(const CString& strPath) +void CClipboardEntry::SetDestinationPath(const CString& strPath) { - m_vDstPaths.push_back(strPath); + m_strDstPath = strPath; } -size_t CClipboardEntry::GetDestinationPathsCount() const +CString CClipboardEntry::GetDestinationPath() { - return m_vDstPaths.size(); + return m_strDstPath; } -CString CClipboardEntry::GetDestinationPath(size_t stIndex) -{ - return m_vDstPaths.at(stIndex); -} - ////////////////////////////////////////////////////////////////////////////// // CClipboardArray @@ -455,7 +450,7 @@ && rInfo.m_ftLastWrite.dwHighDateTime == m_ftLastWrite.dwHighDateTime && rInfo.m_ftLastWrite.dwLowDateTime == m_ftLastWrite.dwLowDateTime && rInfo.m_uhFileSize == m_uhFileSize); } -CString CFileInfo::GetDestinationPath(CString strPath, unsigned char ucCopyNumber, int iFlags) +CString CFileInfo::GetDestinationPath(CString strPath, int iFlags) { // add '\\' if (strPath.Right(1) != _T("\\")) @@ -472,26 +467,24 @@ str.TrimLeft(_T("\\")); // force create directory -// AfxMessageBox("Created multiple level of paths for %s"+strPath+str); SHCreateDirectoryEx(NULL, strPath+str, NULL); -// MakeSureDirectoryPathExists(strPath+str); -// AfxMessageBox(strPath+str+fname+CString(ext)); return strPath+str+fname+CString(ext); } else { if (!(iFlags & 0x01) && m_stSrcIndex != std::numeric_limits::max()) { // generate new dest name - while (ucCopyNumber >= m_pClipboard->GetAt(m_stSrcIndex)->GetDestinationPathsCount()) + if(!m_pClipboard->GetAt(m_stSrcIndex)->IsDestinationPathSet()) { CString strNewPath; FindFreeSubstituteName(GetFullFilePath(), strPath, &strNewPath); - m_pClipboard->GetAt(m_stSrcIndex)->AddDestinationPath(strNewPath); + m_pClipboard->GetAt(m_stSrcIndex)->SetDestinationPath(strNewPath); } - return strPath+m_pClipboard->GetAt(m_stSrcIndex)->GetDestinationPath(ucCopyNumber)+m_strFilePath; + CString strResultPath = strPath+m_pClipboard->GetAt(m_stSrcIndex)->GetDestinationPath(ucCopyNumber)+m_strFilePath; + return strResultPath; } else return strPath+GetFileName(); Index: src/ch/FileInfo.h =================================================================== diff -u -N -r22573f5fa8bfbf68a19deb7631962e026f028045 -rbd08c279240bac9e7902f8da6a9251e0252ec324 --- src/ch/FileInfo.h (.../FileInfo.h) (revision 22573f5fa8bfbf68a19deb7631962e026f028045) +++ src/ch/FileInfo.h (.../FileInfo.h) (revision bd08c279240bac9e7902f8da6a9251e0252ec324) @@ -67,12 +67,12 @@ ar & m_iBufferIndex; } else - ar & m_vDstPaths; + ar & m_strDstPath; } - void AddDestinationPath(const CString& strPath); - size_t GetDestinationPathsCount() const; - CString GetDestinationPath(size_t stIndex); + void SetDestinationPath(const CString& strPath); + CString GetDestinationPath(); + bool IsDestinationPathSet() const { return !m_strDstPath.IsEmpty(); } private: CString m_strPath; // path (ie. c:\\windows\\) - always with ending '\\' @@ -83,7 +83,7 @@ int m_iBufferIndex; // buffer number, with which we'll copy this data - std::vector m_vDstPaths; // dest paths table for this group of paths + CString m_strDstPath; // dest path }; typedef boost::shared_ptr CClipboardEntryPtr; @@ -208,7 +208,7 @@ // operations void SetClipboard(CClipboardArray *pClipboard) { m_pClipboard=pClipboard; }; - CString GetDestinationPath(CString strPath, unsigned char ucCopyNumber, int iFlags); + CString GetDestinationPath(CString strPath, int iFlags); void SetSrcIndex(size_t stIndex) { m_stSrcIndex = stIndex; }; size_t GetSrcIndex() const { return m_stSrcIndex; }; Index: src/ch/MainWnd.cpp =================================================================== diff -u -N -rc435ab507c8b8280264188b49e9ada56d46c0261 -rbd08c279240bac9e7902f8da6a9251e0252ec324 --- src/ch/MainWnd.cpp (.../MainWnd.cpp) (revision c435ab507c8b8280264188b49e9ada56d46c0261) +++ src/ch/MainWnd.cpp (.../MainWnd.cpp) (revision bd08c279240bac9e7902f8da6a9251e0252ec324) @@ -473,7 +473,6 @@ BOOL bOnlyCreate=FALSE; BOOL bIgnoreDirs=FALSE; BOOL bForceDirectories=FALSE; - unsigned char ucCopies=1; switch(pCopyDataStruct->dwData & CSharedConfigStruct::OPERATION_MASK) { case CSharedConfigStruct::DD_COPYMOVESPECIAL_FLAG: @@ -488,7 +487,6 @@ dlg.m_ccData.m_bIgnoreFolders=(bIgnoreDirs != 0); dlg.m_ccData.m_bForceDirectories=(bForceDirectories != 0); dlg.m_ccData.m_bCreateStructure=(bOnlyCreate != 0); - dlg.m_ccData.m_ucCount=ucCopies; dlg.m_ccData.m_vRecent.clear(true); const tchar_t* pszPath = NULL; @@ -515,7 +513,6 @@ bIgnoreDirs=dlg.m_ccData.m_bIgnoreFolders; bForceDirectories=dlg.m_ccData.m_bForceDirectories; bOnlyCreate=dlg.m_ccData.m_bCreateStructure; - ucCopies=dlg.m_ccData.m_ucCount; dlg.m_ccData.m_vRecent.insert(dlg.m_ccData.m_vRecent.begin(), (const PTSTR)(LPCTSTR)strDstPath, true); rConfig.clear_array_values(PP_RECENTPATHS); @@ -548,7 +545,6 @@ spTask->SetBufferSizes(&bsSizes); spTask->SetPriority(iPriority); spTask->SetFilters(&ffFilters); - spTask->SetCopies(ucCopies); m_tasks.Add(spTask); @@ -587,7 +583,6 @@ dlg.m_ccData.m_bCreateStructure=false; dlg.m_ccData.m_bForceDirectories=false; dlg.m_ccData.m_bIgnoreFolders=false; - dlg.m_ccData.m_ucCount=1; dlg.m_ccData.m_vRecent.clear(true); const tchar_t* pszPath = NULL; Index: src/ch/StatusDlg.cpp =================================================================== diff -u -N -rc435ab507c8b8280264188b49e9ada56d46c0261 -rbd08c279240bac9e7902f8da6a9251e0252ec324 --- src/ch/StatusDlg.cpp (.../StatusDlg.cpp) (revision c435ab507c8b8280264188b49e9ada56d46c0261) +++ src/ch/StatusDlg.cpp (.../StatusDlg.cpp) (revision bd08c279240bac9e7902f8da6a9251e0252ec324) @@ -280,8 +280,6 @@ m_strTemp=CString(m_szData); m_strTemp+=GetSizeString(td.m_ullProcessedSize, m_szData, _MAX_PATH)+CString(_T("/")); m_strTemp+=GetSizeString(td.m_ullSizeAll, m_szData, _MAX_PATH)+CString(_T(")")); - _sntprintf(m_szData, _MAX_PATH, _T(" (%s%d/%d)"), GetResManager().LoadString(IDS_CURRENTPASS_STRING), td.m_ucCurrentCopy, td.m_ucCopies); - m_strTemp+=m_szData; GetDlgItem(IDC_PROGRESS_STATIC)->SetWindowText(m_strTemp); // transfer @@ -993,7 +991,7 @@ AddResizableControl(IDC_013_STATIC, 0.5, 0.0, 0.0, 0); AddResizableControl(IDC_020_STATIC, 0.5, 0.0, 0.0, 0); AddResizableControl(IDC_021_STATIC, 0.5, 0.0, 0.0, 0); - AddResizableControl(IDC_SHOW_LOG_BUTTON, 0.5, 0.0, 0.0, 0); + AddResizableControl(IDC_SHOW_LOG_BUTTON, 0.5, 0.0, 0.5, 0); AddResizableControl(IDC_SHOW_LOG_BUTTON, 0.5, 0.0, 0.0, 0.0); // full length right column Index: src/ch/ch.rc =================================================================== diff -u -N -ref313208b7c4a113907f2f72ee0b73406081501d -rbd08c279240bac9e7902f8da6a9251e0252ec324 --- src/ch/ch.rc (.../ch.rc) (revision ef313208b7c4a113907f2f72ee0b73406081501d) +++ src/ch/ch.rc (.../ch.rc) (revision bd08c279240bac9e7902f8da6a9251e0252ec324) @@ -223,19 +223,19 @@ PUSHBUTTON "&<<",IDC_ROLL_UNROLL_BUTTON,212,7,19,12,NOT WS_VISIBLE,0,HIDC_ROLL_UNROLL_BUTTON PUSHBUTTON "...",IDC_SET_BUFFERSIZE_BUTTON,459,72,13,14,0,0,HIDC_SET_BUFFERSIZE_BUTTON PUSHBUTTON ">",IDC_SET_PRIORITY_BUTTON,459,88,13,14,0,0,HIDC_SET_PRIORITY_BUTTON - PUSHBUTTON "View log",IDC_SHOW_LOG_BUTTON,249,116,60,14,0,0,HIDC_SHOW_LOG_BUTTON + PUSHBUTTON "View log",IDC_SHOW_LOG_BUTTON,249,167,223,14,0,0,HIDC_SHOW_LOG_BUTTON LTEXT "Operations list:",IDC_001_STATIC,7,7,197,8 CONTROL "Progress1",IDC_ALL_PROGRESS,"msctls_progress32",PBS_SMOOTH,313,234,159,9 LTEXT "Progress:",IDC_002_STATIC,249,235,62,8 - CONTROL "Progress2",IDC_TASK_PROGRESS,"msctls_progress32",0x0,313,181,159,6 - LTEXT "Progress:",IDC_003_STATIC,249,179,62,8 + CONTROL "Progress2",IDC_TASK_PROGRESS,"msctls_progress32",0x0,313,150,159,6 + LTEXT "Progress:",IDC_003_STATIC,249,148,62,8 LTEXT "Destination object:",IDC_004_STATIC,249,59,62,8 LTEXT "Source object:",IDC_005_STATIC,249,47,62,8 LTEXT "Buffer size:",IDC_006_STATIC,249,75,62,8 LTEXT "Thread priority:",IDC_007_STATIC,249,90,62,8 LTEXT "Operation:",IDC_009_STATIC,249,34,62,8 - LTEXT "Transfer:",IDC_010_STATIC,249,167,62,8 - LTEXT "Processed:",IDC_011_STATIC,249,137,62,8 + LTEXT "Transfer:",IDC_010_STATIC,249,136,62,8 + LTEXT "Processed:",IDC_011_STATIC,249,106,62,8 LTEXT "Transfer:",IDC_012_STATIC,249,220,62,8 LTEXT "Processed:",IDC_013_STATIC,249,205,62,8 CTEXT "Global statistics",IDC_014_STATIC,293,191,84,8 @@ -244,16 +244,16 @@ CONTROL "",IDC_017_STATIC,"Static",SS_ETCHEDHORZ,411,10,61,1 CONTROL "",IDC_018_STATIC,"Static",SS_ETCHEDHORZ,249,194,37,1 CONTROL "",IDC_019_STATIC,"Static",SS_ETCHEDHORZ,249,10,38,1 - LTEXT "Time:",IDC_020_STATIC,249,152,62,8 + LTEXT "Time:",IDC_020_STATIC,249,121,62,8 PUSHBUTTON "&Resume",IDC_RESUME_BUTTON,52,196,44,14,0,0,HIDC_RESUME_BUTTON LTEXT "Associated file:",IDC_021_STATIC,249,19,62,8 CONTROL "",IDC_ASSOCIATEDFILES__STATIC,"STATICEX",0x4,313,17,159,12,WS_EX_STATICEDGE,HIDC_ASSOCIATEDFILES__STATIC CONTROL "",IDC_OPERATION_STATIC,"STATICEX",0x4,313,32,159,12,WS_EX_STATICEDGE,HIDC_OPERATION_STATIC CONTROL "",IDC_SOURCE_STATIC,"STATICEX",0x4,313,45,159,12,WS_EX_STATICEDGE,HIDC_SOURCE_STATIC CONTROL "",IDC_DESTINATION_STATIC,"STATICEX",0x4,313,58,159,12,WS_EX_STATICEDGE,HIDC_DESTINATION_STATIC - CONTROL "",IDC_PROGRESS_STATIC,"STATICEX",0x4,313,135,159,12,WS_EX_STATICEDGE,HIDC_PROGRESS_STATIC - CONTROL "",IDC_TIME_STATIC,"STATICEX",0x4,313,150,159,12,WS_EX_STATICEDGE,HIDC_TIME_STATIC - CONTROL "",IDC_TRANSFER_STATIC,"STATICEX",0x4,313,165,159,12,WS_EX_STATICEDGE,HIDC_TRANSFER_STATIC + CONTROL "",IDC_PROGRESS_STATIC,"STATICEX",0x4,313,104,159,12,WS_EX_STATICEDGE,HIDC_PROGRESS_STATIC + CONTROL "",IDC_TIME_STATIC,"STATICEX",0x4,313,119,159,12,WS_EX_STATICEDGE,HIDC_TIME_STATIC + CONTROL "",IDC_TRANSFER_STATIC,"STATICEX",0x4,313,134,159,12,WS_EX_STATICEDGE,HIDC_TRANSFER_STATIC CONTROL "",IDC_OVERALL_PROGRESS_STATIC,"STATICEX",0x4,313,203,159,12,WS_EX_STATICEDGE,HIDC_OVERALL_PROGRESS_STATIC CONTROL "",IDC_OVERALL_TRANSFER_STATIC,"STATICEX",0x4,313,218,159,12,WS_EX_STATICEDGE,HIDC_OVERALL_TRANSFER_STATIC CONTROL "",IDC_BUFFERSIZE_STATIC,"STATICEX",0x4,313,74,143,12,WS_EX_STATICEDGE,HIDC_BUFFERSIZE_STATIC @@ -303,10 +303,8 @@ PUSHBUTTON "&Import...",IDC_IMPORT_BUTTON,291,60,53,14,0,0,HIDC_IMPORT_BUTTON CONTROL "",IDC_DESTPATH_COMBOBOXEX,"ComboBoxEx32",CBS_DROPDOWN | CBS_AUTOHSCROLL | CBS_SORT | WS_VSCROLL | WS_TABSTOP,7,86,314,136,0,HIDC_DESTPATH_COMBOBOXEX PUSHBUTTON "...",IDC_DESTBROWSE_BUTTON,326,85,18,14,0,0,HIDC_DESTBROWSE_BUTTON - COMBOBOX IDC_OPERATION_COMBO,13,124,117,143,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP,0,HIDC_OPERATION_COMBO - COMBOBOX IDC_PRIORITY_COMBO,137,124,122,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP,0,HIDC_PRIORITY_COMBO - EDITTEXT IDC_COUNT_EDIT,264,124,80,14,ES_AUTOHSCROLL,0,HIDC_COUNT_EDIT - CONTROL "Spin1",IDC_COUNT_SPIN,"msctls_updown32",UDS_SETBUDDYINT | UDS_ALIGNRIGHT | UDS_AUTOBUDDY | UDS_ARROWKEYS,333,124,11,14 + COMBOBOX IDC_OPERATION_COMBO,13,124,159,143,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP,0,HIDC_OPERATION_COMBO + COMBOBOX IDC_PRIORITY_COMBO,181,124,159,75,CBS_DROPDOWNLIST | WS_VSCROLL | WS_TABSTOP,0,HIDC_PRIORITY_COMBO LISTBOX IDC_BUFFERSIZES_LIST,13,152,275,20,LBS_NOINTEGRALHEIGHT | LBS_MULTICOLUMN | LBS_NOSEL | WS_VSCROLL | WS_TABSTOP,0,HIDC_BUFFERSIZES_LIST PUSHBUTTON "&Change...",IDC_BUFFERSIZES_BUTTON,294,152,50,14,0,0,HIDC_BUFFERSIZES_BUTTON CONTROL "Filtering",IDC_FILTERS_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,177,61,10,0,HIDC_FILTERS_CHECK @@ -323,8 +321,7 @@ LTEXT "Source files/folders:",IDC_001_STATIC,7,7,337,8 LTEXT "Destination folder:",IDC_002_STATIC,7,76,337,8 LTEXT "Operation type:",IDC_003_STATIC,13,115,117,8 - LTEXT "Priority:",IDC_004_STATIC,137,115,120,8 - LTEXT "Count of copies:",IDC_005_STATIC,264,115,80,8 + LTEXT "Priority:",IDC_004_STATIC,181,115,120,8 LTEXT "Buffer sizes:",IDC_006_STATIC,13,142,244,8 CONTROL "",IDC_BAR3_STATIC,"Static",SS_ETCHEDHORZ,76,181,268,1 CONTROL "",IDC_BAR4_STATIC,"Static",SS_ETCHEDHORZ,98,247,246,1 @@ -766,10 +763,11 @@ BEGIN IDS_CFGINTERCEPTCONTEXTMENU_STRING "Intercept standard Windows operations (experimental/not recommended)" - IDS_CFG_CHECK_FOR_UPDATES_FREQUENCY - "Check for program updates" + IDS_CFG_CHECK_FOR_UPDATES_FREQUENCY "Check for program updates" IDS_CFG_UPDATE_CHECK_FOR_BETA "Check for updates - include beta versions" - IDS_UPDATE_FREQUENCIES "Never!Every startup!Daily!Weekly!Once every 2 weeks!Monthly!Quarterly" + IDS_CFGLOGLEVEL "Log level" + IDS_CFGLOGLEVEL_VALUES "Debug!Info!Warning!Error" + IDS_UPDATE_FREQUENCIES "Never!Every startup!Daily!Weekly!Once every 2 weeks!Monthly!Quarterly" END STRINGTABLE @@ -839,7 +837,7 @@ IDS_EMPTYPRIORITYTEXT_STRING "unknown" IDS_EMPTYPROCESSEDTEXT_STRING "empty" IDS_EMPTYTRANSFERTEXT_STRING "unknown" - IDS_EMPTYTIMETEXT_STRING "00:00 / 00:00 (00:00)" + IDS_EMPTYTIMETEXT_STRING "00:00 / 00:00 (00:00)" IDS_CURRENTPASS_STRING "pass: " IDS_AVERAGEWORD_STRING "avg: " IDS_STATUSTITLE_STRING "Status" @@ -866,8 +864,6 @@ STRINGTABLE BEGIN - IDS_COPYWORDLESSFIVE_STRING " copies" - IDS_COPYWORDMOREFOUR_STRING " copies" IDS_STATUS0_STRING "Searching" IDS_STATUS1_STRING "Copying" IDS_STATUS2_STRING "Moving" @@ -966,11 +962,15 @@ IDS_EMPTYFILTER_STRING "None of filtering options were selected" IDS_FLTALLFILTER_STRING "All files (*.*)|*.*||" IDS_IMPORTREPORT_STRING "Imported %count path(s)" - IDS_IMPORTERROR_STRING "Cannot import paths from the specified file" END STRINGTABLE BEGIN + IDS_IMPORTERROR_STRING "Cannot import paths from the specified file" +END + +STRINGTABLE +BEGIN IDS_DATECREATED_STRING "Date of creation" IDS_DATELASTWRITE_STRING "Date of last write" IDS_DATEACCESSED_STRING "Date of last access" @@ -1018,8 +1018,6 @@ IDS_LANGSFOLDERCHOOSE_STRING "!Choose folder with language files" IDS_ABOUT_LANGUAGE_STRING "Current language: %langname, Author(s): %authors" - IDS_CFGLOGLEVEL "Log level" - IDS_CFGLOGLEVEL_VALUES "Debug!Info!Warning!Error" END STRINGTABLE Index: src/ch/resource.h =================================================================== diff -u -N -ref313208b7c4a113907f2f72ee0b73406081501d -rbd08c279240bac9e7902f8da6a9251e0252ec324 --- src/ch/resource.h (.../resource.h) (revision ef313208b7c4a113907f2f72ee0b73406081501d) +++ src/ch/resource.h (.../resource.h) (revision bd08c279240bac9e7902f8da6a9251e0252ec324) @@ -132,7 +132,6 @@ #define IDC_IGNORE_BUTTON 1097 #define IDC_RETRY_BUTTON 1100 #define IDC_COPY_REST_BUTTON 1103 -#define IDC_COUNT_EDIT 1119 #define IDC_SHOW_LOG_BUTTON 1120 #define IDC_STICK_BUTTON 1122 #define IDC_FREESPACE_STATIC 1123 @@ -185,7 +184,6 @@ #define IDC_DIRECTORY_CHECK 1175 #define IDC_FILTEREXCLUDE_COMBO 1176 #define IDC_EXCLUDEMASK_CHECK 1177 -#define IDC_COUNT_SPIN 1178 #define IDC_DESTPATH_COMBOBOXEX 1179 #define IDC_SHORTCUT_LIST 1180 #define IDC_NAME_EDIT 1181 @@ -543,8 +541,6 @@ #define IDS_TASKNOTPAUSED_STRING 21517 #define IDS_TASKNOTSELECTED_STRING 21518 #define IDS_NONEINPUTFILE_STRING 21519 -#define IDS_COPYWORDLESSFIVE_STRING 21520 -#define IDS_COPYWORDMOREFOUR_STRING 21521 #define IDS_STATUS0_STRING 21522 #define IDS_STATUS1_STRING 21523 #define IDS_STATUS2_STRING 21524 Index: src/ch/task.cpp =================================================================== diff -u -N -rc435ab507c8b8280264188b49e9ada56d46c0261 -rbd08c279240bac9e7902f8da6a9251e0252ec324 --- src/ch/task.cpp (.../task.cpp) (revision c435ab507c8b8280264188b49e9ada56d46c0261) +++ src/ch/task.cpp (.../task.cpp) (revision bd08c279240bac9e7902f8da6a9251e0252ec324) @@ -389,8 +389,6 @@ m_stCurrentIndex(0), m_nStatus(ST_NULL_STATUS), m_nPriority(THREAD_PRIORITY_NORMAL), - m_ucCopies(1), - m_ucCurrentCopy(0), m_uiResumeInterval(0), m_bForce(false), m_bContinue(false), @@ -643,8 +641,6 @@ ullTotalSize += m_files.GetAt(i)->GetLength64(); } - ullTotalSize *= m_ucCopies; - m_localStats.SetTotalSize(ullTotalSize); } @@ -654,10 +650,6 @@ // count all from previous passes boost::shared_lock lock(m_lock); - if(m_ucCopies) - ullProcessedSize += m_ucCurrentCopy * (m_localStats.GetTotalSize() / m_ucCopies); - else - ullProcessedSize += m_ucCurrentCopy * m_localStats.GetTotalSize(); for(size_t stIndex = 0; stIndex < m_stCurrentIndex; ++stIndex) { @@ -691,7 +683,6 @@ ar >> m_strUniqueName; ar >> m_afFilters; - ar >> m_ucCopies; } else { @@ -720,8 +711,6 @@ ar >> ullProcessedSize; m_localStats.SetProcessedSize(ullProcessedSize); - ar >> m_ucCurrentCopy; - m_clipboard.Load(ar, 0, bData); m_files.Load(ar, 0, true); @@ -765,7 +754,6 @@ ar << m_dpDestPath; ar << m_strUniqueName; ar << m_afFilters; - ar << m_ucCopies; } else { @@ -786,8 +774,6 @@ unsigned long long ullProcessedSize = m_localStats.GetProcessedSize(); ar << ullProcessedSize; - ar << m_ucCurrentCopy; - m_clipboard.Store(ar, 0, bData); if(GetStatusNL(ST_STEP_MASK) > ST_SEARCHING) m_files.Store(ar, 0, true); @@ -855,7 +841,6 @@ SetStatus(ST_NULL_STATUS, ST_STEP_MASK); m_localStats.SetTimeElapsed(0); SetCurrentIndex(0); - SetCurrentCopy(0); BeginProcessing(); } @@ -941,12 +926,10 @@ pData->m_pdpDestPath=&m_dpDestPath; pData->m_pafFilters=&m_afFilters; pData->m_uiStatus=m_nStatus; - pData->m_stIndex=m_stCurrentIndex+m_ucCurrentCopy*m_files.GetSize(); + pData->m_stIndex=m_stCurrentIndex; pData->m_ullProcessedSize = m_localStats.GetProcessedSize(); - pData->m_stSize=m_files.GetSize()*m_ucCopies; + pData->m_stSize=m_files.GetSize(); pData->m_ullSizeAll = m_localStats.GetTotalSize(); - pData->m_ucCurrentCopy=static_cast(m_ucCurrentCopy+1); // visual aspect - pData->m_ucCopies=m_ucCopies; pData->m_pstrUniqueName=&m_strUniqueName; if(m_files.GetSize() > 0 && m_stCurrentIndex != std::numeric_limits::max()) @@ -1019,18 +1002,6 @@ _tcscat(pData->m_szStatusText, GetResManager().LoadString(IDS_STATUS0_STRING+11)); } - // count of copies - if(m_ucCopies > 1) - { - _tcscat(pData->m_szStatusText, _T("/")); - TCHAR xx[4]; - _tcscat(pData->m_szStatusText, _itot(m_ucCopies, xx, 10)); - if(m_ucCopies < 5) - _tcscat(pData->m_szStatusText, GetResManager().LoadString(IDS_COPYWORDLESSFIVE_STRING)); - else - _tcscat(pData->m_szStatusText, GetResManager().LoadString(IDS_COPYWORDMOREFOUR_STRING)); - } - // time pData->m_timeElapsed = m_localStats.GetTimeElapsed(); } @@ -1077,30 +1048,6 @@ return bRet; } -void CTask::SetCopies(unsigned char ucCopies) -{ - boost::unique_lock lock(m_lock); - m_ucCopies=ucCopies; -} - -unsigned char CTask::GetCopies() -{ - boost::shared_lock lock(m_lock); - return m_ucCopies; -} - -void CTask::SetCurrentCopy(unsigned char ucCopy) -{ - boost::unique_lock lock(m_lock); - m_ucCurrentCopy=ucCopy; -} - -unsigned char CTask::GetCurrentCopy() -{ - boost::shared_lock lock(m_lock); - return m_ucCurrentCopy; -} - bool CTask::GetRequiredFreeSpace(ull_t *pullNeeded, ull_t *pullAvailable) { *pullNeeded = m_localStats.GetUnProcessedSize(); // it'd be nice to round up to take cluster size into consideration, @@ -1257,8 +1204,6 @@ ullTotalSize += m_files.GetAt(i)->GetLength64(); } - ullTotalSize *= m_ucCopies; - m_localStats.SetTotalSize(ullTotalSize); } @@ -1368,17 +1313,17 @@ m_log.logi(fmt); // found file/folder - check if the dest name has been generated - if(GetClipboardData(stIndex)->GetDestinationPathsCount() == 0) + if(!GetClipboardData(stIndex)->IsDestinationPathSet()) { // generate something - if dest folder == src folder - search for copy if(GetDestPath().GetPath() == spFileInfo->GetFileRoot()) { CString strSubst; FindFreeSubstituteName(spFileInfo->GetFullFilePath(), GetDestPath().GetPath(), &strSubst); - GetClipboardData(stIndex)->AddDestinationPath(strSubst); + GetClipboardData(stIndex)->SetDestinationPath(strSubst); } else - GetClipboardData(stIndex)->AddDestinationPath(spFileInfo->GetFileName()); + GetClipboardData(stIndex)->SetDestinationPath(spFileInfo->GetFileName()); } // add if needed @@ -1396,8 +1341,8 @@ } // don't add folder contents when moving inside one disk boundary - if(bIgnoreDirs || !bMove || GetCopies() > 1 || iDestDrvNumber == -1 - || iDestDrvNumber != spFileInfo->GetDriveNumber() || CFileInfo::Exist(spFileInfo->GetDestinationPath(GetDestPath().GetPath(), 0, ((int)bForceDirectories) << 1)) ) + if(bIgnoreDirs || !bMove || iDestDrvNumber == -1 + || iDestDrvNumber != spFileInfo->GetDriveNumber() || CFileInfo::Exist(spFileInfo->GetDestinationPath(GetDestPath().GetPath(), ((int)bForceDirectories) << 1)) ) { // log fmt.SetFormat(_T("Recursing folder %path")); @@ -1420,8 +1365,8 @@ } else { - if(bMove && GetCopies() == 1 && iDestDrvNumber != -1 && iDestDrvNumber == spFileInfo->GetDriveNumber() && - !CFileInfo::Exist(spFileInfo->GetDestinationPath(GetDestPath().GetPath(), 0, ((int)bForceDirectories) << 1)) ) + if(bMove && iDestDrvNumber != -1 && iDestDrvNumber == spFileInfo->GetDriveNumber() && + !CFileInfo::Exist(spFileInfo->GetDestinationPath(GetDestPath().GetPath(), ((int)bForceDirectories) << 1)) ) { // if moving within one partition boundary set the file size to 0 so the overall size will // be ok @@ -2398,7 +2343,6 @@ // begin at index which wasn't processed previously size_t stSize = FilesGetSize(); - int iCopiesCount = GetCopies(); bool bIgnoreFolders = (GetStatus(ST_SPECIAL_MASK) & ST_IGNORE_DIRS) != 0; bool bForceDirectories = (GetStatus(ST_SPECIAL_MASK) & ST_FORCE_DIRS) != 0; const CDestPath& dpDestPath = GetDestPath(); @@ -2407,60 +2351,94 @@ const BUFFERSIZES* pbs = ccp.dbBuffer.GetSizes(); ictranslate::CFormat fmt; - fmt.SetFormat(_T("Processing files/folders (ProcessFiles):\r\n\tOnlyCreate: %create\r\n\tBufferSize: [Def:%defsize, One:%onesize, Two:%twosize, CD:%cdsize, LAN:%lansize]\r\n\tFiles/folders count: %filecount\r\n\tCopies count: %copycount\r\n\tIgnore Folders: %ignorefolders\r\n\tDest path: %dstpath\r\n\tCurrent pass (0-based): %currpass\r\n\tCurrent index (0-based): %currindex")); + fmt.SetFormat(_T("Processing files/folders (ProcessFiles):\r\n\tOnlyCreate: %create\r\n\tBufferSize: [Def:%defsize, One:%onesize, Two:%twosize, CD:%cdsize, LAN:%lansize]\r\n\tFiles/folders count: %filecount\r\n\tIgnore Folders: %ignorefolders\r\n\tDest path: %dstpath\r\n\tCurrent index (0-based): %currindex")); fmt.SetParam(_t("%create"), ccp.bOnlyCreate); fmt.SetParam(_t("%defsize"), pbs->m_uiDefaultSize); fmt.SetParam(_t("%onesize"), pbs->m_uiOneDiskSize); fmt.SetParam(_t("%twosize"), pbs->m_uiTwoDisksSize); fmt.SetParam(_t("%cdsize"), pbs->m_uiCDSize); fmt.SetParam(_t("%lansize"), pbs->m_uiLANSize); fmt.SetParam(_t("%filecount"), stSize); - fmt.SetParam(_t("%copycount"), iCopiesCount); fmt.SetParam(_t("%ignorefolders"), bIgnoreFolders); fmt.SetParam(_t("%dstpath"), dpDestPath.GetPath()); - fmt.SetParam(_t("%currpass"), GetCurrentCopy()); fmt.SetParam(_t("%currindex"), GetCurrentIndex()); m_log.logi(fmt); - for (unsigned char j=GetCurrentCopy();jGetDestinationPath(dpDestPath.GetPath(), j, ((int)bForceDirectories) << 1 | (int)bIgnoreFolders); + // set dest path with filename + ccp.strDstFile = spFileInfo->GetDestinationPath(dpDestPath.GetPath(), ((int)bForceDirectories) << 1 | (int)bIgnoreFolders); - // are the files/folders lie on the same partition ? - bool bMove=GetStatus(ST_OPERATION_MASK) == ST_MOVE; - if(bMove && dpDestPath.GetDriveNumber() != -1 && dpDestPath.GetDriveNumber() == spFileInfo->GetDriveNumber() && iCopiesCount == 1 && spFileInfo->GetMove()) + // are the files/folders lie on the same partition ? + bool bMove=GetStatus(ST_OPERATION_MASK) == ST_MOVE; + if(bMove && dpDestPath.GetDriveNumber() != -1 && dpDestPath.GetDriveNumber() == spFileInfo->GetDriveNumber() && spFileInfo->GetMove()) + { + bool bRetry = true; + if(bRetry && !MoveFile(spFileInfo->GetFullFilePath(), ccp.strDstFile)) { + dwLastError=GetLastError(); + //log + fmt.SetFormat(_T("Error %errno while calling MoveFile %srcpath -> %dstpath (ProcessFiles)")); + fmt.SetParam(_t("%errno"), dwLastError); + fmt.SetParam(_t("%srcpath"), spFileInfo->GetFullFilePath()); + fmt.SetParam(_t("%dstpath"), ccp.strDstFile); + m_log.loge(fmt); + + CString strSrcFile = spFileInfo->GetFullFilePath(); + CString strDstFile = ccp.strDstFile; + FEEDBACK_FILEERROR ferr = { (PCTSTR)strSrcFile, (PCTSTR)strDstFile, eFastMoveError, dwLastError }; + CFeedbackHandler::EFeedbackResult frResult = (CFeedbackHandler::EFeedbackResult)piFeedbackHandler->RequestFeedback(CFeedbackHandler::eFT_FileError, &ferr); + switch(frResult) + { + case CFeedbackHandler::eResult_Cancel: + throw new CProcessingException(E_CANCEL); + break; + case CFeedbackHandler::eResult_Retry: + continue; + break; + case CFeedbackHandler::eResult_Pause: + throw new CProcessingException(E_PAUSE); + break; + case CFeedbackHandler::eResult_Skip: + bRetry = false; + break; // just do nothing + default: + BOOST_ASSERT(FALSE); // unknown result + throw new CProcessingException(E_ERROR, 0, _t("Unknown feedback result type")); + } + } + else + spFileInfo->SetFlags(FIF_PROCESSED, FIF_PROCESSED); + } + else + { + // if folder - create it + if(spFileInfo->IsDirectory()) + { bool bRetry = true; - if(bRetry && !MoveFile(spFileInfo->GetFullFilePath(), ccp.strDstFile)) + if(bRetry && !CreateDirectory(ccp.strDstFile, NULL) && (dwLastError=GetLastError()) != ERROR_ALREADY_EXISTS ) { - dwLastError=GetLastError(); - //log - fmt.SetFormat(_T("Error %errno while calling MoveFile %srcpath -> %dstpath (ProcessFiles)")); + // log + fmt.SetFormat(_T("Error %errno while calling CreateDirectory %path (ProcessFiles)")); fmt.SetParam(_t("%errno"), dwLastError); - fmt.SetParam(_t("%srcpath"), spFileInfo->GetFullFilePath()); - fmt.SetParam(_t("%dstpath"), ccp.strDstFile); + fmt.SetParam(_t("%path"), ccp.strDstFile); m_log.loge(fmt); - CString strSrcFile = spFileInfo->GetFullFilePath(); - CString strDstFile = ccp.strDstFile; - FEEDBACK_FILEERROR ferr = { (PCTSTR)strSrcFile, (PCTSTR)strDstFile, eFastMoveError, dwLastError }; + CString strFile = ccp.strDstFile; + FEEDBACK_FILEERROR ferr = { (PCTSTR)strFile, NULL, eCreateError, dwLastError }; CFeedbackHandler::EFeedbackResult frResult = (CFeedbackHandler::EFeedbackResult)piFeedbackHandler->RequestFeedback(CFeedbackHandler::eFT_FileError, &ferr); switch(frResult) { @@ -2481,81 +2459,38 @@ throw new CProcessingException(E_ERROR, 0, _t("Unknown feedback result type")); } } - else - spFileInfo->SetFlags(FIF_PROCESSED, FIF_PROCESSED); + + m_localStats.IncreaseProcessedSize(spFileInfo->GetLength64()); + spFileInfo->SetFlags(FIF_PROCESSED, FIF_PROCESSED); } else { - // if folder - create it - if(spFileInfo->IsDirectory()) - { - bool bRetry = true; - if(bRetry && !CreateDirectory(ccp.strDstFile, NULL) && (dwLastError=GetLastError()) != ERROR_ALREADY_EXISTS ) - { - // log - fmt.SetFormat(_T("Error %errno while calling CreateDirectory %path (ProcessFiles)")); - fmt.SetParam(_t("%errno"), dwLastError); - fmt.SetParam(_t("%path"), ccp.strDstFile); - m_log.loge(fmt); + // start copying/moving file + ccp.spSrcFile = spFileInfo; + ccp.bProcessed = false; - CString strFile = ccp.strDstFile; - FEEDBACK_FILEERROR ferr = { (PCTSTR)strFile, NULL, eCreateError, dwLastError }; - CFeedbackHandler::EFeedbackResult frResult = (CFeedbackHandler::EFeedbackResult)piFeedbackHandler->RequestFeedback(CFeedbackHandler::eFT_FileError, &ferr); - switch(frResult) - { - case CFeedbackHandler::eResult_Cancel: - throw new CProcessingException(E_CANCEL); - break; - case CFeedbackHandler::eResult_Retry: - continue; - break; - case CFeedbackHandler::eResult_Pause: - throw new CProcessingException(E_PAUSE); - break; - case CFeedbackHandler::eResult_Skip: - bRetry = false; - break; // just do nothing - default: - BOOST_ASSERT(FALSE); // unknown result - throw new CProcessingException(E_ERROR, 0, _t("Unknown feedback result type")); - } - } + // kopiuj dane + CustomCopyFile(&ccp); + spFileInfo->SetFlags(ccp.bProcessed ? FIF_PROCESSED : 0, FIF_PROCESSED); - m_localStats.IncreaseProcessedSize(spFileInfo->GetLength64()); - spFileInfo->SetFlags(FIF_PROCESSED, FIF_PROCESSED); - } - else + // if moving - delete file (only if config flag is set) + if(bMove && spFileInfo->GetFlags() & FIF_PROCESSED && !GetConfig().get_bool(PP_CMDELETEAFTERFINISHED)) { - // start copying/moving file - ccp.spSrcFile = spFileInfo; - ccp.bProcessed = false; - - // kopiuj dane - CustomCopyFile(&ccp); - spFileInfo->SetFlags(ccp.bProcessed ? FIF_PROCESSED : 0, FIF_PROCESSED); - - // if moving - delete file (only if config flag is set) - if(bMove && spFileInfo->GetFlags() & FIF_PROCESSED && !GetConfig().get_bool(PP_CMDELETEAFTERFINISHED) && j == iCopiesCount-1) - { - if(!GetConfig().get_bool(PP_CMPROTECTROFILES)) - SetFileAttributes(spFileInfo->GetFullFilePath(), FILE_ATTRIBUTE_NORMAL); - DeleteFile(spFileInfo->GetFullFilePath()); // there will be another try later, so I don't check - // if succeeded - } + if(!GetConfig().get_bool(PP_CMPROTECTROFILES)) + SetFileAttributes(spFileInfo->GetFullFilePath(), FILE_ATTRIBUTE_NORMAL); + DeleteFile(spFileInfo->GetFullFilePath()); // there will be another try later, so I don't check + // if succeeded } + } - // set a time - if(GetConfig().get_bool(PP_CMSETDESTDATE)) - SetFileDirectoryTime(ccp.strDstFile, spFileInfo); // no error checking (but most probably it should be checked) + // set a time + if(GetConfig().get_bool(PP_CMSETDESTDATE)) + SetFileDirectoryTime(ccp.strDstFile, spFileInfo); // no error checking (but most probably it should be checked) - // attributes - if(GetConfig().get_bool(PP_CMSETDESTATTRIBUTES)) - SetFileAttributes(ccp.strDstFile, spFileInfo->GetAttributes()); // as above - } + // attributes + if(GetConfig().get_bool(PP_CMSETDESTATTRIBUTES)) + SetFileAttributes(ccp.strDstFile, spFileInfo->GetAttributes()); // as above } - - // current copy finished - SetCurrentIndex(0); } // delete buffer - it's not needed Index: src/ch/task.h =================================================================== diff -u -N -rc435ab507c8b8280264188b49e9ada56d46c0261 -rbd08c279240bac9e7902f8da6a9251e0252ec324 --- src/ch/task.h (.../task.h) (revision c435ab507c8b8280264188b49e9ada56d46c0261) +++ src/ch/task.h (.../task.h) (revision bd08c279240bac9e7902f8da6a9251e0252ec324) @@ -97,9 +97,6 @@ time_t m_timeElapsed; - unsigned char m_ucCurrentCopy; - unsigned char m_ucCopies; - const CString* m_pstrUniqueName; // doesn't change from first setting TCHAR m_szStatusText[_MAX_PATH]; @@ -357,11 +354,6 @@ void SetFilters(const CFiltersArray* pFilters); - void SetCopies(unsigned char ucCopies); - unsigned char GetCopies(); - void SetCurrentCopy(unsigned char ucCopy); - unsigned char GetCurrentCopy(); - CClipboardArray* GetClipboard() { return &m_clipboard; }; void SetTaskPath(const tchar_t* pszDir); @@ -494,10 +486,6 @@ // mask (filter) CFiltersArray m_afFilters; - // copies count - unsigned char m_ucCopies; - unsigned char m_ucCurrentCopy; - tstring_t m_strTaskBasePath; // base path at which the files will be stored bool m_bSaved; // has the state been saved ('til next modification)