Index: src/ch/FeedbackFileErrorDlg.cpp =================================================================== diff -u -r3993a75a24145732742d61be638111d1d85c367b -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/ch/FeedbackFileErrorDlg.cpp (.../FeedbackFileErrorDlg.cpp) (revision 3993a75a24145732742d61be638111d1d85c367b) +++ src/ch/FeedbackFileErrorDlg.cpp (.../FeedbackFileErrorDlg.cpp) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -7,30 +7,27 @@ #include "FeedbackHandler.h" #include "../libchcore/TWin32ErrorFormatter.h" #include "resource.h" +#include "RuleEditDlg.h" +#include "../libchengine/FeedbackPredefinedRules.h" -// CFeedbackFileErrorDlg dialog +using namespace chengine; IMPLEMENT_DYNAMIC(CFeedbackFileErrorDlg, ictranslate::CLanguageDialog) -CFeedbackFileErrorDlg::CFeedbackFileErrorDlg(chengine::FeedbackRules& currentRules, const wchar_t* pszSrcPath, const wchar_t* pszDstPath, unsigned long ulSysError, CWnd* pParent /*=nullptr*/) +CFeedbackFileErrorDlg::CFeedbackFileErrorDlg(chengine::FeedbackRules& currentRules, const wchar_t* pszSrcPath, const wchar_t* pszDstPath, EFileError eOperationType, unsigned long ulSysError, CWnd* pParent /*=nullptr*/) : ictranslate::CLanguageDialog(IDD_FEEDBACK_FILE_ERROR_DIALOG, pParent), - m_bAllItems(FALSE), m_strSrcPath(pszSrcPath), m_strDstPath(pszDstPath), m_ulSysError(ulSysError), - m_rules(currentRules) + m_rules(currentRules), + m_eOperationType(eOperationType) { } CFeedbackFileErrorDlg::~CFeedbackFileErrorDlg() { } -bool CFeedbackFileErrorDlg::IsApplyToAllItemsChecked() const -{ - return m_bAllItems; -} - const chengine::FeedbackRules& CFeedbackFileErrorDlg::GetRules() const { return m_rules; @@ -39,19 +36,26 @@ void CFeedbackFileErrorDlg::DoDataExchange(CDataExchange* pDX) { ictranslate::CLanguageDialog::DoDataExchange(pDX); - DDX_Check(pDX, IDC_ALL_ITEMS_CHECK, m_bAllItems); - DDX_Control(pDX, IDC_INFO_STATIC, m_ctlErrorInfo); + DDX_Control(pDX, IDC_FILENAME_EDIT, m_ctlFirstName); + DDX_Control(pDX, IDC_SECOND_FILENAME_EDIT, m_ctlSecondName); + DDX_Control(pDX, IDC_OPERATION_EDIT, m_ctlOperationType); + DDX_Control(pDX, IDC_SYSTEM_ERROR_EDIT, m_ctlSystemError); + + DDX_Control(pDX, IDC_RETRY_BUTTON, m_btnRetry); + DDX_Control(pDX, IDC_SKIP_BUTTON, m_btnSkip); + DDX_Control(pDX, IDC_CUSTOM_RULES_BUTTON, m_btnCustomRules); + DDX_Control(pDX, IDC_PAUSE_BUTTON, m_btnPause); + DDX_Control(pDX, IDC_CANCEL_BUTTON, m_btnCancel); } BEGIN_MESSAGE_MAP(CFeedbackFileErrorDlg, ictranslate::CLanguageDialog) - ON_BN_CLICKED(IDC_RETRY_BUTTON, &CFeedbackFileErrorDlg::OnBnClickedRetryButton) - ON_BN_CLICKED(IDC_SKIP_BUTTON, &CFeedbackFileErrorDlg::OnBnClickedSkipButton) - ON_BN_CLICKED(IDC_PAUSE_BUTTON, &CFeedbackFileErrorDlg::OnBnClickedPauseButton) - ON_BN_CLICKED(IDCANCEL, &CFeedbackFileErrorDlg::OnBnClickedCancel) + ON_BN_CLICKED(IDC_RETRY_BUTTON, OnBnRetry) + ON_BN_CLICKED(IDC_SKIP_BUTTON, OnBnSkip) + ON_BN_CLICKED(IDC_PAUSE_BUTTON, OnBnPause) + ON_BN_CLICKED(IDCANCEL, OnCancel) + ON_BN_CLICKED(IDC_CUSTOM_RULES_BUTTON, OnBnCustomRules) END_MESSAGE_MAP() - -// CFeedbackFileErrorDlg message handlers BOOL CFeedbackFileErrorDlg::OnInitDialog() { CLanguageDialog::OnInitDialog(); @@ -60,59 +64,88 @@ HICON hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME); SetIcon(hIcon, FALSE); - AddResizableControl(IDC_001_STATIC, 0.0, 0.0, 0.0, 0.0); - AddResizableControl(IDC_DESC_STATIC, 0.0, 0.0, 1.0, 0.0); - AddResizableControl(IDC_INFO_STATIC, 0.0, 0.0, 1.0, 1.0); + AddResizableControl(IDC_HEADER_STATIC, 0.0, 0.0, 0.0, 0.0); + AddResizableControl(IDC_ERROR_DETAILS_STATIC, 0.0, 0.0, 0.0, 0.0); + AddResizableControl(IDC_NAMES_STATIC, 0.0, 0.0, 1.0, 0.0); + AddResizableControl(IDC_FILENAME_EDIT, 0.0, 0.0, 1.0, 1.0); + AddResizableControl(IDC_SECOND_FILENAME_EDIT, 0.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_OPERATION_STATIC, 0.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_OPERATION_EDIT, 0.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_SYSTEM_ERROR_STATIC, 0.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_SYSTEM_ERROR_EDIT, 0.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_RETRY_BUTTON, 0.0, 1.0, 0.0, 0.0); AddResizableControl(IDC_SKIP_BUTTON, 0.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_CUSTOM_RULES_BUTTON, 0.0, 1.0, 0.0, 0.0); AddResizableControl(IDC_PAUSE_BUTTON, 0.0, 1.0, 0.0, 0.0); AddResizableControl(IDCANCEL, 0.0, 1.0, 0.0, 0.0); - AddResizableControl(IDC_ALL_ITEMS_CHECK, 0.0, 1.0, 1.0, 0.0); InitializeResizableControls(); + // set menus on buttons + HMENU hMenu = GetResManager().LoadMenu(MAKEINTRESOURCE(IDR_ERROR_MASS_RETRY_MENU)); + m_menuMassRetry.Attach(hMenu); + m_btnRetry.m_hMenu = m_menuMassSkip.GetSubMenu(0)->GetSafeHmenu(); + m_btnRetry.m_bDefaultClick = TRUE; + + hMenu = GetResManager().LoadMenu(MAKEINTRESOURCE(IDR_ERROR_MASS_SKIP_MENU)); + m_menuMassSkip.Attach(hMenu); + m_btnSkip.m_hMenu = m_menuMassSkip.GetSubMenu(0)->GetSafeHmenu(); + m_btnSkip.m_bDefaultClick = TRUE; + + // set data ictranslate::CResourceManager& rResManager = GetResManager(); - CString strFmt; - strFmt = rResManager.LoadString(m_strDstPath.IsEmpty() ? IDS_INFO_FILE_STRING : IDS_INFO_TWO_FILE_STRING); - strFmt += _T("\r\n"); - strFmt += rResManager.LoadString(IDS_INFO_REASON_STRING); + CString strOperationType = rResManager.LoadString(IDS_OPERATION_DELETEERROR + m_eOperationType); + m_ctlOperationType.SetWindowText(strOperationType); + m_ctlFirstName.SetWindowText(m_strSrcPath); + m_ctlSecondName.SetWindowText(m_strDstPath); + // get system error string string::TString strError = chcore::TWin32ErrorFormatter::FormatWin32ErrorCode(m_ulSysError, true); + + ictranslate::CFormat fmt(L"%errno - %msg"); + fmt.SetParam(_T("%errno"), m_ulSysError); + fmt.SetParam(_T("%msg"), strError.c_str()); - ictranslate::CFormat fmt(strFmt); - fmt.SetParam(_T("%filename"), m_strSrcPath); - fmt.SetParam(_T("%dstfilename"), m_strDstPath); - fmt.SetParam(_T("%reason"), strError.c_str()); + m_ctlSystemError.SetWindowText(fmt.ToString()); - m_ctlErrorInfo.SetWindowText(fmt.ToString()); - return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE } -void CFeedbackFileErrorDlg::OnBnClickedRetryButton() +void CFeedbackFileErrorDlg::OnBnRetry() { UpdateData(TRUE); EndDialog(chengine::EFeedbackResult::eResult_Retry); } -void CFeedbackFileErrorDlg::OnBnClickedSkipButton() +void CFeedbackFileErrorDlg::OnBnSkip() { UpdateData(TRUE); + switch(m_btnSkip.m_nMenuResult) + { + case ID_FEEDBACK_SKIP_WHEN_SAME_ERROR: + m_rules.GetErrorRules().Merge(FeedbackPredefinedRules::CreateErrorRule(EErrorPredefinedRuleCondition::eCondition_WhenSameError, m_ulSysError, eResult_Skip)); + break; + } + EndDialog(chengine::EFeedbackResult::eResult_Skip); } -void CFeedbackFileErrorDlg::OnBnClickedPauseButton() +void CFeedbackFileErrorDlg::OnBnPause() { UpdateData(TRUE); EndDialog(chengine::EFeedbackResult::eResult_Pause); } -void CFeedbackFileErrorDlg::OnBnClickedCancel() +void CFeedbackFileErrorDlg::OnBnCustomRules() { - UpdateData(TRUE); - EndDialog(chengine::EFeedbackResult::eResult_Cancel); + RuleEditDlg dlg(m_rules); + if(dlg.DoModal() == IDOK) + { + m_rules = dlg.GetRules(); + } } void CFeedbackFileErrorDlg::OnCancel() Index: src/ch/FeedbackFileErrorDlg.h =================================================================== diff -u -r3993a75a24145732742d61be638111d1d85c367b -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/ch/FeedbackFileErrorDlg.h (.../FeedbackFileErrorDlg.h) (revision 3993a75a24145732742d61be638111d1d85c367b) +++ src/ch/FeedbackFileErrorDlg.h (.../FeedbackFileErrorDlg.h) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -1,60 +1,70 @@ -/*************************************************************************** - * Copyright (C) 2001-2008 by J�zef Starosczyk * - * ixen@copyhandler.com * - * * - * This program is free software; you can redistribute it and/or modify * - * it under the terms of the GNU Library General Public License * - * (version 2) as published by the Free Software Foundation; * - * * - * This program is distributed in the hope that it will be useful, * - * but WITHOUT ANY WARRANTY; without even the implied warranty of * - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * - * GNU General Public License for more details. * - * * - * You should have received a copy of the GNU Library General Public * - * License along with this program; if not, write to the * - * Free Software Foundation, Inc., * - * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * - ***************************************************************************/ -#ifndef __FEEDBACKFILEERRORDLG_H__ -#define __FEEDBACKFILEERRORDLG_H__ +// ============================================================================ +// Copyright (C) 2001-2020 by Jozef Starosczyk +// ixen {at} copyhandler [dot] com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#pragma once + #include "../libchengine/FeedbackErrorRuleList.h" #include "../libchengine/FeedbackRules.h" +#include "../libchengine/EFileError.h" // CFeedbackFileErrorDlg dialog class CFeedbackFileErrorDlg : public ictranslate::CLanguageDialog { DECLARE_DYNAMIC(CFeedbackFileErrorDlg) public: - CFeedbackFileErrorDlg(chengine::FeedbackRules& currentRules, const wchar_t* pszSrcPath, const wchar_t* pszDstPath, unsigned long ulSysError, CWnd* pParent = nullptr); // standard constructor + CFeedbackFileErrorDlg(chengine::FeedbackRules& currentRules, const wchar_t* pszSrcPath, const wchar_t* pszDstPath, chengine::EFileError eOperationType, unsigned long ulSysError, CWnd* pParent = nullptr); // standard constructor virtual ~CFeedbackFileErrorDlg(); - bool IsApplyToAllItemsChecked() const; - const chengine::FeedbackRules& GetRules() const; protected: - void DoDataExchange(CDataExchange* pDX) override; // DDX/DDV support + void DoDataExchange(CDataExchange* pDX) override; void OnCancel() override; BOOL OnInitDialog() override; - afx_msg void OnBnClickedRetryButton(); - afx_msg void OnBnClickedSkipButton(); - afx_msg void OnBnClickedPauseButton(); - afx_msg void OnBnClickedCancel(); + afx_msg void OnBnRetry(); + afx_msg void OnBnSkip(); + afx_msg void OnBnPause(); + afx_msg void OnBnCustomRules(); DECLARE_MESSAGE_MAP() private: - BOOL m_bAllItems = FALSE; - CStatic m_ctlErrorInfo; + CEdit m_ctlFirstName; + CEdit m_ctlSecondName; + CEdit m_ctlOperationType; + CEdit m_ctlSystemError; + + CMFCMenuButton m_btnRetry; + CMFCMenuButton m_btnSkip; + CMFCButton m_btnCustomRules; + CMFCButton m_btnPause; + CMFCButton m_btnCancel; + + CMenu m_menuMassRetry; + CMenu m_menuMassSkip; + CString m_strSrcPath; CString m_strDstPath; + chengine::EFileError m_eOperationType = chengine::eCheckForFreeSpace; unsigned long m_ulSysError = 0; chengine::FeedbackRules& m_rules; }; - -#endif Index: src/ch/FeedbackHandler.cpp =================================================================== diff -u -r3993a75a24145732742d61be638111d1d85c367b -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/ch/FeedbackHandler.cpp (.../FeedbackHandler.cpp) (revision 3993a75a24145732742d61be638111d1d85c367b) +++ src/ch/FeedbackHandler.cpp (.../FeedbackHandler.cpp) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -30,9 +30,9 @@ using namespace chengine; using namespace string; -chengine::EFeedbackResult CFeedbackHandler::FileError(const TString& strSrcPath, const TString& strDstPath, EFileError /*eFileError*/, unsigned long ulError, FeedbackRules& rNewRules) +chengine::EFeedbackResult CFeedbackHandler::FileError(const TString& strSrcPath, const TString& strDstPath, EFileError eOperationType, unsigned long ulError, FeedbackRules& rNewRules) { - CFeedbackFileErrorDlg dlg(rNewRules, strSrcPath.c_str(), strDstPath.c_str(), ulError); + CFeedbackFileErrorDlg dlg(rNewRules, strSrcPath.c_str(), strDstPath.c_str(), eOperationType, ulError); EFeedbackResult eResult = (EFeedbackResult)dlg.DoModal(); if(dlg.GetRules().IsModified()) @@ -57,9 +57,9 @@ return eResult; } -chengine::EFeedbackResult CFeedbackHandler::NotEnoughSpace(const TString& strSrcPath, const TString& strDstPath, unsigned long long ullRequiredSize, FeedbackRules& rNewRules) +chengine::EFeedbackResult CFeedbackHandler::NotEnoughSpace(const TString& strDstPath, unsigned long long ullRequiredSize, FeedbackRules& rNewRules) { - CFeedbackNotEnoughSpaceDlg dlg(rNewRules, ullRequiredSize, strSrcPath.c_str(), strDstPath.c_str()); + CFeedbackNotEnoughSpaceDlg dlg(rNewRules, ullRequiredSize, strDstPath.c_str()); EFeedbackResult eResult = (EFeedbackResult) dlg.DoModal(); if(dlg.GetRules().IsModified()) Index: src/ch/FeedbackHandler.h =================================================================== diff -u -r3993a75a24145732742d61be638111d1d85c367b -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/ch/FeedbackHandler.h (.../FeedbackHandler.h) (revision 3993a75a24145732742d61be638111d1d85c367b) +++ src/ch/FeedbackHandler.h (.../FeedbackHandler.h) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -31,7 +31,7 @@ public: chengine::EFeedbackResult FileError(const string::TString& strSrcPath, const string::TString& strDstPath, chengine::EFileError eFileError, unsigned long ulError, chengine::FeedbackRules& rNewRules) override; chengine::EFeedbackResult FileAlreadyExists(const chengine::TFileInfo& spSrcFileInfo, const chengine::TFileInfo& spDstFileInfo, string::TString& strRenameName, chengine::FeedbackRules& rNewRules) override; - chengine::EFeedbackResult NotEnoughSpace(const string::TString& strSrcPath, const string::TString& strDstPath, unsigned long long ullRequiredSize, chengine::FeedbackRules& rNewRules) override; + chengine::EFeedbackResult NotEnoughSpace(const string::TString& strDstPath, unsigned long long ullRequiredSize, chengine::FeedbackRules& rNewRules) override; chengine::EFeedbackResult OperationEvent(chengine::EOperationEvent eEvent, chengine::FeedbackRules& rNewRules) override; protected: Index: src/ch/FeedbackNotEnoughSpaceDlg.cpp =================================================================== diff -u -r3993a75a24145732742d61be638111d1d85c367b -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/ch/FeedbackNotEnoughSpaceDlg.cpp (.../FeedbackNotEnoughSpaceDlg.cpp) (revision 3993a75a24145732742d61be638111d1d85c367b) +++ src/ch/FeedbackNotEnoughSpaceDlg.cpp (.../FeedbackNotEnoughSpaceDlg.cpp) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -1,27 +1,28 @@ -/*************************************************************************** -* Copyright (C) 2001-2008 by J�zef Starosczyk * -* ixen@copyhandler.com * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU Library General Public License * -* (version 2) as published by the Free Software Foundation; * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this program; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ +// ============================================================================ +// Copyright (C) 2001-2020 by Jozef Starosczyk +// ixen {at} copyhandler [dot] com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ #include "stdafx.h" #include "ch.h" #include "FeedbackNotEnoughSpaceDlg.h" -#include "StringHelpers.h" #include "resource.h" #include "../libchengine/EFeedbackResult.h" +#include "RuleEditDlg.h" +#include "StringHelpers.h" #ifdef _DEBUG #define new DEBUG_NEW @@ -32,22 +33,15 @@ ///////////////////////////////////////////////////////////////////////////// // CFeedbackNotEnoughSpaceDlg dialog -CFeedbackNotEnoughSpaceDlg::CFeedbackNotEnoughSpaceDlg(chengine::FeedbackRules& currentRules, unsigned long long ullSizeRequired, const wchar_t* pszSrcPath, const wchar_t* pszDstPath) +CFeedbackNotEnoughSpaceDlg::CFeedbackNotEnoughSpaceDlg(chengine::FeedbackRules& currentRules, unsigned long long ullSizeRequired, const wchar_t* pszDstPath) :ictranslate::CLanguageDialog(IDD_FEEDBACK_NOTENOUGHSPACE_DIALOG), - m_strDisk(pszDstPath), + m_strDstPath(pszDstPath), m_ullRequired(ullSizeRequired), - m_bAllItems(FALSE), m_fsLocal(GetLogFileData()), m_rules(currentRules) { - m_vstrFiles.emplace_back(pszSrcPath); } -bool CFeedbackNotEnoughSpaceDlg::IsApplyToAllItemsChecked() const -{ - return m_bAllItems; -} - const chengine::FeedbackRules& CFeedbackNotEnoughSpaceDlg::GetRules() const { return m_rules; @@ -56,53 +50,47 @@ void CFeedbackNotEnoughSpaceDlg::DoDataExchange(CDataExchange* pDX) { CLanguageDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CFeedbackNotEnoughSpaceDlg) - DDX_Control(pDX, IDC_FILES_LIST, m_ctlFiles); - //}}AFX_DATA_MAP - DDX_Check(pDX, IDC_ALL_ITEMS_CHECK, m_bAllItems); + + DDX_Control(pDX, IDC_LOCATION_EDIT, m_ctlLocationEdit); + DDX_Control(pDX, IDC_REQUIRED_SPACE_STATIC, m_ctlRequiredSpaceStatic); + DDX_Control(pDX, IDC_AVAILABLE_SPACE_STATIC, m_ctlAvailableSpaceStatic); + DDX_Control(pDX, IDC_RETRY_BUTTON, m_btnRetry); + DDX_Control(pDX, IDC_IGNORE_BUTTON, m_btnIgnore); + DDX_Control(pDX, IDC_CUSTOM_RULES_BUTTON, m_btnCustomRules); + DDX_Control(pDX, IDC_PAUSE_BUTTON, m_btnPause); + DDX_Control(pDX, IDCANCEL, m_btnCancel); } BEGIN_MESSAGE_MAP(CFeedbackNotEnoughSpaceDlg,ictranslate::CLanguageDialog) - //{{AFX_MSG_MAP(CFeedbackNotEnoughSpaceDlg) ON_WM_TIMER() - ON_BN_CLICKED(IDC_RETRY_BUTTON, OnRetryButton) - ON_BN_CLICKED(IDC_IGNORE_BUTTON, OnIgnoreButton) - //}}AFX_MSG_MAP - ON_BN_CLICKED(IDCANCEL, &CFeedbackNotEnoughSpaceDlg::OnBnClickedCancel) + ON_BN_CLICKED(IDC_RETRY_BUTTON, OnBnRetry) + ON_BN_CLICKED(IDC_IGNORE_BUTTON, OnBnIgnore) + ON_BN_CLICKED(IDCANCEL, OnCancel) + ON_BN_CLICKED(IDC_CUSTOM_RULES_BUTTON, OnBnCustomRules) + ON_BN_CLICKED(IDC_PAUSE_BUTTON, OnBnPause) END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// // CFeedbackNotEnoughSpaceDlg message handlers void CFeedbackNotEnoughSpaceDlg::UpdateDialog() { - // format needed text - ictranslate::CFormat fmt(GetResManager().LoadString(IDS_NERPATH_STRING)); - fmt.SetParam(_T("%path"), m_strDisk); + // update size information + m_ctlRequiredSpaceStatic.SetWindowText(GetSizeString(m_ullRequired)); - CWnd* pWnd=GetDlgItem(IDC_HEADER_STATIC); - if (pWnd) - pWnd->SetWindowText(fmt.ToString()); - - // now the sizes - pWnd=GetDlgItem(IDC_REQUIRED_STATIC); - if (pWnd) - pWnd->SetWindowText(GetSizeString(m_ullRequired)); - unsigned long long ullFree = 0, ullTotal = 0; - pWnd=GetDlgItem(IDC_AVAILABLE_STATIC); - if(pWnd) + try { - try - { - m_fsLocal.GetDynamicFreeSpace(chcore::PathFromString(m_strDisk), ullFree, ullTotal); - } - catch(const std::exception&) - { - ullFree = 0; - } - pWnd->SetWindowText(GetSizeString(ullFree)); + m_fsLocal.GetDynamicFreeSpace(chcore::PathFromString(m_strDstPath), ullFree, ullTotal); } + catch(const std::exception&) + { + ullFree = 0; + } + m_ctlAvailableSpaceStatic.SetWindowText(GetSizeString(ullFree)); + + // location + m_ctlLocationEdit.SetWindowText(m_strDstPath); } BOOL CFeedbackNotEnoughSpaceDlg::OnInitDialog() @@ -114,31 +102,29 @@ SetIcon(hIcon, FALSE); AddResizableControl(IDC_HEADER_STATIC, 0.0, 0.0, 1.0, 0.0); - AddResizableControl(IDC_001_STATIC, 0.0, 0.0, 0.0, 0.0); + AddResizableControl(IDC_DETAILS_STATIC, 0.0, 0.0, 1.0, 1.0); + AddResizableControl(IDC_ICON_STATIC, 0.0, 0.0, 0.0, 0.0); - AddResizableControl(IDC_FILES_LIST, 0.0, 0.0, 1.0, 1.0); + AddResizableControl(IDC_LOCATION_STATIC, 0.0, 0.0, 0.0, 0.0); + AddResizableControl(IDC_LOCATION_EDIT, 0.0, 0.0, 0.0, 1.0); - AddResizableControl(IDC_003_STATIC, 0.0, 1.0, 0.0, 0.0); - AddResizableControl(IDC_004_STATIC, 0.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_REQUIRED_SPACE_HDR_STATIC, 0.0, 0.0, 0.0, 0.0); + AddResizableControl(IDC_REQUIRED_SPACE_STATIC, 0.0, 0.0, 1.0, 0.0); - AddResizableControl(IDC_REQUIRED_STATIC, 0.0, 1.0, 1.0, 0.0); - AddResizableControl(IDC_AVAILABLE_STATIC, 0.0, 1.0, 1.0, 0.0); + AddResizableControl(IDC_AVAILABLE_SPACE_HDR_STATIC, 0.0, 0.0, 0.0, 0.0); + AddResizableControl(IDC_AVAILABLE_SPACE_STATIC, 0.0, 0.0, 1.0, 0.0); - AddResizableControl(IDC_RETRY_BUTTON, 1.0, 1.0, 0.0, 0.0); - AddResizableControl(IDC_IGNORE_BUTTON, 1.0, 1.0, 0.0, 0.0); - AddResizableControl(IDCANCEL, 1.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_RETRY_BUTTON, 0.34, 1.0, 0.33, 0.0); + AddResizableControl(IDC_IGNORE_BUTTON, 0.67, 1.0, 0.33, 0.0); + AddResizableControl(IDC_CUSTOM_RULES_BUTTON, 0.0, 1.0, 0.34, 0.0); + AddResizableControl(IDC_PAUSE_BUTTON, 0.34, 1.0, 0.33, 0.0); + AddResizableControl(IDCANCEL, 0.67, 1.0, 0.33, 0.0); - AddResizableControl(IDC_ALL_ITEMS_CHECK, 0.0, 1.0, 1.0, 0.0); - InitializeResizableControls(); // set to top - SetWindowPos(&wndNoTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE /*| SWP_SHOWWINDOW*/); + //SetWindowPos(&wndNoTopMost, 0, 0, 0, 0, SWP_NOMOVE | SWP_NOSIZE /*| SWP_SHOWWINDOW*/); - // needed data - for (size_t i=0;iSetWindowText(GetSizeString(ullFree)); + m_ctlAvailableSpaceStatic.SetWindowText(GetSizeString(ullFree)); - // end dialog if this is enough - if (m_ullRequired <= ullFree) - { - CLanguageDialog::OnTimer(nIDEvent); - EndDialog(chengine::EFeedbackResult::eResult_Retry); - } + // end dialog if this is enough + if (m_ullRequired <= ullFree) + { + KillTimer(1601); + EndDialog(chengine::EFeedbackResult::eResult_Retry); } } CLanguageDialog::OnTimer(nIDEvent); } -void CFeedbackNotEnoughSpaceDlg::OnRetryButton() +void CFeedbackNotEnoughSpaceDlg::OnLanguageChanged() { - UpdateData(TRUE); - EndDialog(chengine::EFeedbackResult::eResult_Retry); + UpdateDialog(); } -void CFeedbackNotEnoughSpaceDlg::OnIgnoreButton() +void CFeedbackNotEnoughSpaceDlg::OnBnRetry() { - UpdateData(TRUE); - EndDialog(chengine::EFeedbackResult::eResult_Ignore); + EndDialog(chengine::EFeedbackResult::eResult_Retry); } -void CFeedbackNotEnoughSpaceDlg::OnLanguageChanged() +void CFeedbackNotEnoughSpaceDlg::OnBnIgnore() { - UpdateDialog(); + EndDialog(chengine::EFeedbackResult::eResult_Ignore); } void CFeedbackNotEnoughSpaceDlg::OnCancel() { - UpdateData(TRUE); EndDialog(chengine::EFeedbackResult::eResult_Cancel); } -void CFeedbackNotEnoughSpaceDlg::OnBnClickedCancel() +void CFeedbackNotEnoughSpaceDlg::OnBnCustomRules() { - UpdateData(TRUE); - EndDialog(chengine::EFeedbackResult::eResult_Cancel); + RuleEditDlg dlg(m_rules); + if(dlg.DoModal() == IDOK) + { + m_rules = dlg.GetRules(); + } } + +void CFeedbackNotEnoughSpaceDlg::OnBnPause() +{ + EndDialog(chengine::EFeedbackResult::eResult_Pause); +} Index: src/ch/FeedbackNotEnoughSpaceDlg.h =================================================================== diff -u -r3993a75a24145732742d61be638111d1d85c367b -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/ch/FeedbackNotEnoughSpaceDlg.h (.../FeedbackNotEnoughSpaceDlg.h) (revision 3993a75a24145732742d61be638111d1d85c367b) +++ src/ch/FeedbackNotEnoughSpaceDlg.h (.../FeedbackNotEnoughSpaceDlg.h) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -1,23 +1,22 @@ -/*************************************************************************** -* Copyright (C) 2001-2008 by J�zef Starosczyk * -* ixen@copyhandler.com * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU Library General Public License * -* (version 2) as published by the Free Software Foundation; * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this program; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ -#ifndef __FEEDBACKNOTENOUGHSPACEDLG_H__ -#define __FEEDBACKNOTENOUGHSPACEDLG_H__ +// ============================================================================ +// Copyright (C) 2001-2020 by Jozef Starosczyk +// ixen {at} copyhandler [dot] com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ +#pragma once #include "../libchengine/TLocalFilesystem.h" #include "../libchengine/FeedbackNotEnoughSpaceRuleList.h" @@ -29,10 +28,8 @@ class CFeedbackNotEnoughSpaceDlg : public ictranslate::CLanguageDialog { public: - CFeedbackNotEnoughSpaceDlg(chengine::FeedbackRules& currentRules, unsigned long long ullSizeRequired, const wchar_t* pszSrcPath, const wchar_t* pszDstPath); // standard constructor + CFeedbackNotEnoughSpaceDlg(chengine::FeedbackRules& currentRules, unsigned long long ullSizeRequired, const wchar_t* pszDstPath); // standard constructor - bool IsApplyToAllItemsChecked() const; - const chengine::FeedbackRules& GetRules() const; protected: @@ -44,22 +41,28 @@ BOOL OnInitDialog() override; afx_msg void OnTimer(UINT_PTR nIDEvent); - afx_msg void OnRetryButton(); - afx_msg void OnIgnoreButton(); - afx_msg void OnBnClickedCancel(); + afx_msg void OnBnRetry(); + afx_msg void OnBnIgnore(); + afx_msg void OnBnCustomRules(); + afx_msg void OnBnPause(); DECLARE_MESSAGE_MAP() private: - BOOL m_bAllItems = FALSE; - CString m_strDisk; + CString m_strDstPath; unsigned long long m_ullRequired = 0; - std::vector m_vstrFiles; - CListBox m_ctlFiles; + CMFCButton m_btnRetry; + CMFCButton m_btnIgnore; + CMFCButton m_btnCustomRules; + CMFCButton m_btnPause; + CMFCButton m_btnCancel; + CEdit m_ctlLocationEdit; + CStatic m_ctlRequiredSpaceStatic; + CStatic m_ctlAvailableSpaceStatic; + + chengine::TLocalFilesystem m_fsLocal; chengine::FeedbackRules& m_rules; }; - -#endif Index: src/ch/FeedbackReplaceDlg.cpp =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/ch/FeedbackReplaceDlg.cpp (.../FeedbackReplaceDlg.cpp) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/ch/FeedbackReplaceDlg.cpp (.../FeedbackReplaceDlg.cpp) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -129,13 +129,13 @@ RefreshFilesInfo(); RefreshImages(); - HMENU hMenu = GetResManager().LoadMenu(MAKEINTRESOURCE(IDR_FEEDBACK_MASS_REPLACE_MENU)); + HMENU hMenu = GetResManager().LoadMenu(MAKEINTRESOURCE(IDR_ALREADYEXISTS_MASS_REPLACE_MENU)); m_menuMassReplace.Attach(hMenu); - hMenu = GetResManager().LoadMenu(MAKEINTRESOURCE(IDR_FEEDBACK_MASS_RENAME_MENU)); + hMenu = GetResManager().LoadMenu(MAKEINTRESOURCE(IDR_ALREADYEXISTS_MASS_RENAME_MENU)); m_menuMassRename.Attach(hMenu); - hMenu = GetResManager().LoadMenu(MAKEINTRESOURCE(IDR_FEEDBACK_MASS_RESUME_MENU)); + hMenu = GetResManager().LoadMenu(MAKEINTRESOURCE(IDR_ALREADYEXISTS_MASS_RESUME_MENU)); m_menuMassResume.Attach(hMenu); - hMenu = GetResManager().LoadMenu(MAKEINTRESOURCE(IDR_FEEDBACK_MASS_SKIP_MENU)); + hMenu = GetResManager().LoadMenu(MAKEINTRESOURCE(IDR_ALREADYEXISTS_MASS_SKIP_MENU)); m_menuMassSkip.Attach(hMenu); m_btnReplace.m_hMenu = m_menuMassReplace.GetSubMenu(0)->GetSafeHmenu(); @@ -214,16 +214,16 @@ switch(m_btnReplace.m_nMenuResult) { case ID_FEEDBACK_REPLACE_ALLEXISTINGFILES: - m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition::eCondition_ApplyToAll, eResult_Overwrite)); + m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition::eCondition_ApplyToAll, eResult_Overwrite)); break; case ID_FEEDBACK_REPLACE_FILESWITHDIFFERENTDATESORSIZES: - m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition::eCondition_WhenDifferentDateOrSize, eResult_Overwrite)); + m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition::eCondition_WhenDifferentDateOrSize, eResult_Overwrite)); break; case ID_FEEDBACK_REPLACE_OLDERFILESWITHNEWERVERSIONS: - m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition::eCondition_WhenNewerThanDst, eResult_Overwrite)); + m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition::eCondition_WhenNewerThanDst, eResult_Overwrite)); break; case ID_FEEDBACK_REPLACE_NEWERFILESWITHOLDERVERSIONS: - m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition::eCondition_WhenOlderThanDst, eResult_Overwrite)); + m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition::eCondition_WhenOlderThanDst, eResult_Overwrite)); break; } @@ -237,19 +237,19 @@ switch(m_btnRename.m_nMenuResult) { case ID_FEEDBACK_RENAME_WHENDESTIONATIONFILEEXISTS: - m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition::eCondition_ApplyToAll, eResult_Rename)); + m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition::eCondition_ApplyToAll, eResult_Rename)); break; case ID_FEEDBACK_RENAME_WHENDATEORSIZEDIFFERS: - m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition::eCondition_WhenDifferentDateOrSize, eResult_Rename)); + m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition::eCondition_WhenDifferentDateOrSize, eResult_Rename)); break; case ID_FEEDBACK_RENAME_WHENDATEANDSZEARESAME: - m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition::eCondition_WhenSameDateAndSize, eResult_Rename)); + m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition::eCondition_WhenSameDateAndSize, eResult_Rename)); break; case ID_FEEDBACK_RENAME_WHENNEWERTHANDESTINATION: - m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition::eCondition_WhenNewerThanDst, eResult_Rename)); + m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition::eCondition_WhenNewerThanDst, eResult_Rename)); break; case ID_FEEDBACK_RENAME_WHENOLDERTHANDESTINATION: - m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition::eCondition_WhenOlderThanDst, eResult_Rename)); + m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition::eCondition_WhenOlderThanDst, eResult_Rename)); break; default: { @@ -268,7 +268,7 @@ switch(m_btnResume.m_nMenuResult) { case ID_FEEDBACK_RESUME_WHENFILEBIGGERTHANDESTINATION: - m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition::eCondition_WhenBiggerThanDst, eResult_CopyRest)); + m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition::eCondition_WhenBiggerThanDst, eResult_CopyRest)); break; } @@ -281,16 +281,16 @@ switch(m_btnSkip.m_nMenuResult) { case ID_FEEDBACK_SKIP_ALLEXISTINGDESTINATIONFILES: - m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition::eCondition_ApplyToAll, eResult_Skip)); + m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition::eCondition_ApplyToAll, eResult_Skip)); break; case ID_FEEDBACK_SKIP_ALLFILESWITHSAMEDATESANDSIZES: - m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition::eCondition_WhenSameDateAndSize, eResult_Skip)); + m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition::eCondition_WhenSameDateAndSize, eResult_Skip)); break; case ID_FEEDBACK_SKIP_FILESTHATAREOLDERTHANDESTINATION: - m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition::eCondition_WhenOlderThanDst, eResult_Skip)); + m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition::eCondition_WhenOlderThanDst, eResult_Skip)); break; case ID_FEEDBACK_SKIP_FILESTHATARENEWERTHANDESTINATION: - m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition::eCondition_WhenNewerThanDst, eResult_Skip)); + m_rules.GetAlreadyExistsRules().Merge(FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition::eCondition_WhenNewerThanDst, eResult_Skip)); break; } @@ -314,7 +314,7 @@ RuleEditDlg dlg(m_rules); if(dlg.DoModal() == IDOK) { - // todo: apply modified rules + m_rules = dlg.GetRules(); } } Index: src/ch/RuleEditDlg.cpp =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/ch/RuleEditDlg.cpp (.../RuleEditDlg.cpp) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/ch/RuleEditDlg.cpp (.../RuleEditDlg.cpp) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -1,21 +1,21 @@ -/*************************************************************************** -* Copyright (C) 2001-2008 by J�zef Starosczyk * -* ixen@copyhandler.com * -* * -* This program is free software; you can redistribute it and/or modify * -* it under the terms of the GNU Library General Public License * -* (version 2) as published by the Free Software Foundation; * -* * -* This program is distributed in the hope that it will be useful, * -* but WITHOUT ANY WARRANTY; without even the implied warranty of * -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * -* GNU General Public License for more details. * -* * -* You should have received a copy of the GNU Library General Public * -* License along with this program; if not, write to the * -* Free Software Foundation, Inc., * -* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * -***************************************************************************/ +// ============================================================================ +// Copyright (C) 2001-2020 by Jozef Starosczyk +// ixen {at} copyhandler [dot] com +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU Library General Public License +// (version 2) as published by the Free Software Foundation; +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Library General Public +// License along with this program; if not, write to the +// Free Software Foundation, Inc., +// 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +// ============================================================================ #include "stdafx.h" #include "resource.h" #include "RuleEditDlg.h" Index: src/ch/RuleEditDlg.h =================================================================== diff -u -r1c585b955eb548cbedc7d36f1ea5af484206e7eb -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/ch/RuleEditDlg.h (.../RuleEditDlg.h) (revision 1c585b955eb548cbedc7d36f1ea5af484206e7eb) +++ src/ch/RuleEditDlg.h (.../RuleEditDlg.h) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -31,12 +31,11 @@ public: explicit RuleEditDlg(const chengine::FeedbackRules& rRules); -// Overrides + chengine::FeedbackRules GetRules() const { return m_rules; } + protected: void DoDataExchange(CDataExchange* pDX) override; // DDX/DDV support -// Implementation -protected: void OnLanguageChanged() override; // Generated message map functions Index: src/ch/ch.rc =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/ch/ch.rc (.../ch.rc) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/ch/ch.rc (.../ch.rc) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -78,19 +78,26 @@ LTEXT "Max concurrent writes",IDC_MAXCONCURRENTWRITES_STATIC,231,100,107,8 END -IDD_FEEDBACK_FILE_ERROR_DIALOG DIALOGEX 0, 0, 283, 112 -STYLE DS_SYSMODAL | DS_SETFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +IDD_FEEDBACK_FILE_ERROR_DIALOG DIALOGEX 0, 0, 275, 153 +STYLE DS_SETFONT | DS_SETFOREGROUND | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME CAPTION "File Error" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN - PUSHBUTTON "&Retry",IDC_RETRY_BUTTON,7,79,64,14 - PUSHBUTTON "&Skip",IDC_SKIP_BUTTON,74,79,64,14 - DEFPUSHBUTTON "&Pause",IDC_PAUSE_BUTTON,141,79,64,14 - PUSHBUTTON "&Cancel",IDCANCEL,212,79,64,14 - ICON IDI_ERR_ICON,IDC_001_STATIC,15,15,20,20,SS_REALSIZEIMAGE - CONTROL "&Apply to all items",IDC_ALL_ITEMS_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,95,269,10 - LTEXT "Encountered an error while processing file.",IDC_DESC_STATIC,43,7,223,23 - LTEXT "File: c:\\test.avi\nReason: No permission to perform the operation requested.",IDC_INFO_STATIC,51,28,225,42 + ICON IDI_ERR_ICON,IDC_ICON_STATIC,17,39,20,20,SS_REALSIZEIMAGE + LTEXT "Encountered an error while processing file.",IDC_HEADER_STATIC,7,7,261,8 + CONTROL "C&ustom rules...",IDC_CUSTOM_RULES_BUTTON,"MfcButton",WS_TABSTOP,7,132,81,14 + CONTROL "&Pause",IDC_PAUSE_BUTTON,"MfcButton",WS_TABSTOP,97,132,81,14 + CONTROL "&Cancel",IDC_CANCEL_BUTTON,"MfcButton",WS_TABSTOP,187,132,81,14 + CONTROL "&Skip",IDC_SKIP_BUTTON,"MfcMenuButton",WS_TABSTOP,187,112,81,14 + CONTROL "&Retry",IDC_RETRY_BUTTON,"MfcMenuButton",WS_TABSTOP,97,112,81,14 + EDITTEXT IDC_FILENAME_EDIT,92,40,169,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + LTEXT "Names:",IDC_NAMES_STATIC,45,40,45,8 + EDITTEXT IDC_OPERATION_EDIT,92,65,169,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + LTEXT "Operation:",IDC_OPERATION_STATIC,45,65,45,8 + EDITTEXT IDC_SYSTEM_ERROR_EDIT,92,77,169,24,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + LTEXT "System error:",IDC_SYSTEM_ERROR_STATIC,45,77,45,8 + EDITTEXT IDC_SECOND_FILENAME_EDIT,92,52,169,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + GROUPBOX "Error details",IDC_ERROR_DETAILS_STATIC,7,22,261,86 END IDD_MINIVIEW_DIALOG DIALOGEX 0, 0, 91, 23 @@ -184,22 +191,25 @@ GROUPBOX "Global statistics",IDC_GLOBAL_GROUP_STATIC,7,242,223,53,0,WS_EX_TRANSPARENT END -IDD_FEEDBACK_NOTENOUGHSPACE_DIALOG DIALOGEX 0, 0, 255, 147 -STYLE DS_SYSMODAL | DS_SETFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +IDD_FEEDBACK_NOTENOUGHSPACE_DIALOG DIALOGEX 0, 0, 275, 129 +STYLE DS_SETFONT | DS_SETFOREGROUND | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME CAPTION "Not enough free space" FONT 8, "Tahoma", 0, 0, 0x1 BEGIN - PUSHBUTTON "&Retry",IDC_RETRY_BUTTON,78,113,57,14 - PUSHBUTTON "C&ontinue",IDC_IGNORE_BUTTON,136,113,57,14 - PUSHBUTTON "&Cancel",IDCANCEL,198,113,50,14 - LISTBOX IDC_FILES_LIST,42,35,206,44,LBS_NOINTEGRALHEIGHT | WS_VSCROLL | WS_HSCROLL | WS_TABSTOP - LTEXT "",IDC_REQUIRED_STATIC,109,85,139,8 - LTEXT "",IDC_AVAILABLE_STATIC,109,97,139,8 - ICON IDI_WARNING_ICON,IDC_001_STATIC,9,11,20,20,SS_REALSIZEIMAGE - LTEXT "Required space:",IDC_003_STATIC,41,85,59,8 - LTEXT "Space available:",IDC_004_STATIC,41,97,59,8 - LTEXT "",IDC_HEADER_STATIC,42,7,206,24 - CONTROL "&Do not ask anymore",IDC_ALL_ITEMS_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,130,241,10 + PUSHBUTTON "&Cancel",IDCANCEL,187,108,81,14 + LTEXT "Static",IDC_REQUIRED_SPACE_STATIC,109,49,150,8 + LTEXT "Static",IDC_AVAILABLE_SPACE_STATIC,109,63,150,8 + ICON IDI_WARNING_ICON,IDC_ICON_STATIC,19,39,20,20,SS_REALSIZEIMAGE + LTEXT "Required space:",IDC_REQUIRED_SPACE_HDR_STATIC,49,49,59,8 + LTEXT "Space available:",IDC_AVAILABLE_SPACE_HDR_STATIC,49,63,59,8 + LTEXT "There is not enough space in the destination location.",IDC_HEADER_STATIC,7,7,261,8 + CONTROL "C&ustom rules...",IDC_CUSTOM_RULES_BUTTON,"MfcButton",WS_TABSTOP,7,108,81,14 + CONTROL "&Pause",IDC_PAUSE_BUTTON,"MfcButton",WS_TABSTOP,97,108,81,14 + EDITTEXT IDC_LOCATION_EDIT,107,34,152,12,ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER + LTEXT "Location:",IDC_LOCATION_STATIC,49,34,45,8 + GROUPBOX "Details",IDC_DETAILS_STATIC,7,20,261,64 + CONTROL "&Retry",IDC_RETRY_BUTTON,"MfcButton",WS_TABSTOP,97,88,81,14 + CONTROL "&Ignore",IDC_IGNORE_BUTTON,"MfcButton",WS_TABSTOP,187,88,81,14 END IDD_SHUTDOWN_DIALOG DIALOGEX 0, 0, 186, 86 @@ -392,7 +402,7 @@ END IDD_FEEDBACK_REPLACE_DIALOG DIALOGEX 0, 0, 364, 224 -STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME +STYLE DS_SETFONT | DS_SETFOREGROUND | DS_FIXEDSYS | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME CAPTION "File already exists" FONT 8, "MS Shell Dlg", 400, 0, 0x1 BEGIN @@ -551,9 +561,9 @@ IDD_FEEDBACK_FILE_ERROR_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 276 + RIGHTMARGIN, 268 TOPMARGIN, 7 - BOTTOMMARGIN, 105 + BOTTOMMARGIN, 146 END IDD_MINIVIEW_DIALOG, DIALOG @@ -583,9 +593,9 @@ IDD_FEEDBACK_NOTENOUGHSPACE_DIALOG, DIALOG BEGIN LEFTMARGIN, 7 - RIGHTMARGIN, 248 + RIGHTMARGIN, 268 TOPMARGIN, 7 - BOTTOMMARGIN, 140 + BOTTOMMARGIN, 122 END IDD_SHUTDOWN_DIALOG, DIALOG @@ -937,7 +947,7 @@ END END -IDR_FEEDBACK_MASS_REPLACE_MENU MENU +IDR_ALREADYEXISTS_MASS_REPLACE_MENU MENU BEGIN POPUP "POPUP" BEGIN @@ -950,7 +960,7 @@ END END -IDR_FEEDBACK_MASS_RENAME_MENU MENU +IDR_ALREADYEXISTS_MASS_RENAME_MENU MENU BEGIN POPUP "POPUP" BEGIN @@ -964,15 +974,15 @@ END END -IDR_FEEDBACK_MASS_RESUME_MENU MENU +IDR_ALREADYEXISTS_MASS_RESUME_MENU MENU BEGIN POPUP "POPUP" BEGIN MENUITEM "Resume when file bigger than destination", ID_FEEDBACK_RESUME_WHENFILEBIGGERTHANDESTINATION END END -IDR_FEEDBACK_MASS_SKIP_MENU MENU +IDR_ALREADYEXISTS_MASS_SKIP_MENU MENU BEGIN POPUP "POPUP" BEGIN @@ -985,7 +995,23 @@ END END +IDR_ERROR_MASS_RETRY_MENU MENU +BEGIN + POPUP "POPUP" + BEGIN + MENUITEM "Retry when the same error is encountered again", ID_FEEDBACK_RETRY_WHEN_SAME_ERROR + END +END +IDR_ERROR_MASS_SKIP_MENU MENU +BEGIN + POPUP "POPUP" + BEGIN + MENUITEM "Skip when the same error is encountered again", ID_FEEDBACK_SKIP_WHEN_SAME_ERROR + END +END + + #ifdef APSTUDIO_INVOKED ///////////////////////////////////////////////////////////////////////////// // @@ -1168,7 +1194,205 @@ 0 END +IDD_FEEDBACK_NOTENOUGHSPACE_DIALOG DLGINIT +BEGIN + IDC_CUSTOM_RULES_BUTTON, 0x37c, 369, 0 +0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x7974, 0x656c, 0x343e, +0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x6c79, 0x3e65, +0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x415f, 0x7475, 0x736f, 0x7a69, +0x3e65, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, +0x415f, 0x7475, 0x736f, 0x7a69, 0x3e65, 0x4d3c, 0x4346, 0x7542, 0x7474, +0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x4d2f, 0x4346, 0x7542, +0x7474, 0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x464d, 0x4243, +0x7475, 0x6f74, 0x5f6e, 0x7546, 0x6c6c, 0x6554, 0x7478, 0x6f54, 0x6c6f, +0x543e, 0x5552, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x465f, +0x6c75, 0x546c, 0x7865, 0x5474, 0x6f6f, 0x3e6c, 0x4d3c, 0x4346, 0x7542, +0x7474, 0x6e6f, 0x435f, 0x7275, 0x6f73, 0x5472, 0x7079, 0x3e65, 0x3131, +0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7543, 0x7372, 0x726f, +0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, +0x6761, 0x5465, 0x7079, 0x3e65, 0x3c38, 0x4d2f, 0x4346, 0x7542, 0x7474, +0x6e6f, 0x495f, 0x616d, 0x6567, 0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, +0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x546e, 0x706f, 0x463e, +0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, +0x6761, 0x4f65, 0x546e, 0x706f, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, +0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x526e, 0x6769, 0x7468, 0x463e, 0x4c41, +0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, +0x4f65, 0x526e, 0x6769, 0x7468, "\076" + IDC_PAUSE_BUTTON, 0x37c, 369, 0 +0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x7974, 0x656c, 0x343e, +0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x6c79, 0x3e65, +0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x415f, 0x7475, 0x736f, 0x7a69, +0x3e65, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, +0x415f, 0x7475, 0x736f, 0x7a69, 0x3e65, 0x4d3c, 0x4346, 0x7542, 0x7474, +0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x4d2f, 0x4346, 0x7542, +0x7474, 0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x464d, 0x4243, +0x7475, 0x6f74, 0x5f6e, 0x7546, 0x6c6c, 0x6554, 0x7478, 0x6f54, 0x6c6f, +0x543e, 0x5552, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x465f, +0x6c75, 0x546c, 0x7865, 0x5474, 0x6f6f, 0x3e6c, 0x4d3c, 0x4346, 0x7542, +0x7474, 0x6e6f, 0x435f, 0x7275, 0x6f73, 0x5472, 0x7079, 0x3e65, 0x3131, +0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7543, 0x7372, 0x726f, +0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, +0x6761, 0x5465, 0x7079, 0x3e65, 0x3c38, 0x4d2f, 0x4346, 0x7542, 0x7474, +0x6e6f, 0x495f, 0x616d, 0x6567, 0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, +0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x546e, 0x706f, 0x463e, +0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, +0x6761, 0x4f65, 0x546e, 0x706f, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, +0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x526e, 0x6769, 0x7468, 0x463e, 0x4c41, +0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, +0x4f65, 0x526e, 0x6769, 0x7468, "\076" + IDC_RETRY_BUTTON, 0x37c, 369, 0 +0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x7974, 0x656c, 0x343e, +0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x6c79, 0x3e65, +0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x415f, 0x7475, 0x736f, 0x7a69, +0x3e65, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, +0x415f, 0x7475, 0x736f, 0x7a69, 0x3e65, 0x4d3c, 0x4346, 0x7542, 0x7474, +0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x4d2f, 0x4346, 0x7542, +0x7474, 0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x464d, 0x4243, +0x7475, 0x6f74, 0x5f6e, 0x7546, 0x6c6c, 0x6554, 0x7478, 0x6f54, 0x6c6f, +0x543e, 0x5552, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x465f, +0x6c75, 0x546c, 0x7865, 0x5474, 0x6f6f, 0x3e6c, 0x4d3c, 0x4346, 0x7542, +0x7474, 0x6e6f, 0x435f, 0x7275, 0x6f73, 0x5472, 0x7079, 0x3e65, 0x3131, +0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7543, 0x7372, 0x726f, +0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, +0x6761, 0x5465, 0x7079, 0x3e65, 0x3c38, 0x4d2f, 0x4346, 0x7542, 0x7474, +0x6e6f, 0x495f, 0x616d, 0x6567, 0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, +0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x546e, 0x706f, 0x463e, +0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, +0x6761, 0x4f65, 0x546e, 0x706f, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, +0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x526e, 0x6769, 0x7468, 0x463e, 0x4c41, +0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, +0x4f65, 0x526e, 0x6769, 0x7468, "\076" + IDC_IGNORE_BUTTON, 0x37c, 369, 0 +0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x7974, 0x656c, 0x343e, +0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x6c79, 0x3e65, +0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x415f, 0x7475, 0x736f, 0x7a69, +0x3e65, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, +0x415f, 0x7475, 0x736f, 0x7a69, 0x3e65, 0x4d3c, 0x4346, 0x7542, 0x7474, +0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x4d2f, 0x4346, 0x7542, +0x7474, 0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x464d, 0x4243, +0x7475, 0x6f74, 0x5f6e, 0x7546, 0x6c6c, 0x6554, 0x7478, 0x6f54, 0x6c6f, +0x543e, 0x5552, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x465f, +0x6c75, 0x546c, 0x7865, 0x5474, 0x6f6f, 0x3e6c, 0x4d3c, 0x4346, 0x7542, +0x7474, 0x6e6f, 0x435f, 0x7275, 0x6f73, 0x5472, 0x7079, 0x3e65, 0x3131, +0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7543, 0x7372, 0x726f, +0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, +0x6761, 0x5465, 0x7079, 0x3e65, 0x3c38, 0x4d2f, 0x4346, 0x7542, 0x7474, +0x6e6f, 0x495f, 0x616d, 0x6567, 0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, +0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x546e, 0x706f, 0x463e, +0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, +0x6761, 0x4f65, 0x546e, 0x706f, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, +0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x526e, 0x6769, 0x7468, 0x463e, 0x4c41, +0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, +0x4f65, 0x526e, 0x6769, 0x7468, "\076" + 0 +END +IDD_FEEDBACK_FILE_ERROR_DIALOG DLGINIT +BEGIN + IDC_CUSTOM_RULES_BUTTON, 0x37c, 369, 0 +0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x7974, 0x656c, 0x343e, +0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x6c79, 0x3e65, +0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x415f, 0x7475, 0x736f, 0x7a69, +0x3e65, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, +0x415f, 0x7475, 0x736f, 0x7a69, 0x3e65, 0x4d3c, 0x4346, 0x7542, 0x7474, +0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x4d2f, 0x4346, 0x7542, +0x7474, 0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x464d, 0x4243, +0x7475, 0x6f74, 0x5f6e, 0x7546, 0x6c6c, 0x6554, 0x7478, 0x6f54, 0x6c6f, +0x543e, 0x5552, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x465f, +0x6c75, 0x546c, 0x7865, 0x5474, 0x6f6f, 0x3e6c, 0x4d3c, 0x4346, 0x7542, +0x7474, 0x6e6f, 0x435f, 0x7275, 0x6f73, 0x5472, 0x7079, 0x3e65, 0x3131, +0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7543, 0x7372, 0x726f, +0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, +0x6761, 0x5465, 0x7079, 0x3e65, 0x3c38, 0x4d2f, 0x4346, 0x7542, 0x7474, +0x6e6f, 0x495f, 0x616d, 0x6567, 0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, +0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x546e, 0x706f, 0x463e, +0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, +0x6761, 0x4f65, 0x546e, 0x706f, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, +0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x526e, 0x6769, 0x7468, 0x463e, 0x4c41, +0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, +0x4f65, 0x526e, 0x6769, 0x7468, "\076" + IDC_PAUSE_BUTTON, 0x37c, 369, 0 +0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x7974, 0x656c, 0x343e, +0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x6c79, 0x3e65, +0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x415f, 0x7475, 0x736f, 0x7a69, +0x3e65, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, +0x415f, 0x7475, 0x736f, 0x7a69, 0x3e65, 0x4d3c, 0x4346, 0x7542, 0x7474, +0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x4d2f, 0x4346, 0x7542, +0x7474, 0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x464d, 0x4243, +0x7475, 0x6f74, 0x5f6e, 0x7546, 0x6c6c, 0x6554, 0x7478, 0x6f54, 0x6c6f, +0x543e, 0x5552, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x465f, +0x6c75, 0x546c, 0x7865, 0x5474, 0x6f6f, 0x3e6c, 0x4d3c, 0x4346, 0x7542, +0x7474, 0x6e6f, 0x435f, 0x7275, 0x6f73, 0x5472, 0x7079, 0x3e65, 0x3131, +0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7543, 0x7372, 0x726f, +0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, +0x6761, 0x5465, 0x7079, 0x3e65, 0x3c38, 0x4d2f, 0x4346, 0x7542, 0x7474, +0x6e6f, 0x495f, 0x616d, 0x6567, 0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, +0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x546e, 0x706f, 0x463e, +0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, +0x6761, 0x4f65, 0x546e, 0x706f, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, +0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x526e, 0x6769, 0x7468, 0x463e, 0x4c41, +0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, +0x4f65, 0x526e, 0x6769, 0x7468, "\076" + IDC_CANCEL_BUTTON, 0x37c, 369, 0 +0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x7974, 0x656c, 0x343e, +0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x6c79, 0x3e65, +0x4d3c, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x415f, 0x7475, 0x736f, 0x7a69, +0x3e65, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, +0x415f, 0x7475, 0x736f, 0x7a69, 0x3e65, 0x4d3c, 0x4346, 0x7542, 0x7474, +0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x4d2f, 0x4346, 0x7542, +0x7474, 0x6e6f, 0x545f, 0x6f6f, 0x746c, 0x7069, 0x3c3e, 0x464d, 0x4243, +0x7475, 0x6f74, 0x5f6e, 0x7546, 0x6c6c, 0x6554, 0x7478, 0x6f54, 0x6c6f, +0x543e, 0x5552, 0x3c45, 0x4d2f, 0x4346, 0x7542, 0x7474, 0x6e6f, 0x465f, +0x6c75, 0x546c, 0x7865, 0x5474, 0x6f6f, 0x3e6c, 0x4d3c, 0x4346, 0x7542, +0x7474, 0x6e6f, 0x435f, 0x7275, 0x6f73, 0x5472, 0x7079, 0x3e65, 0x3131, +0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x7543, 0x7372, 0x726f, +0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, +0x6761, 0x5465, 0x7079, 0x3e65, 0x3c38, 0x4d2f, 0x4346, 0x7542, 0x7474, +0x6e6f, 0x495f, 0x616d, 0x6567, 0x7954, 0x6570, 0x3c3e, 0x464d, 0x4243, +0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x546e, 0x706f, 0x463e, +0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, +0x6761, 0x4f65, 0x546e, 0x706f, 0x3c3e, 0x464d, 0x4243, 0x7475, 0x6f74, +0x5f6e, 0x6d49, 0x6761, 0x4f65, 0x526e, 0x6769, 0x7468, 0x463e, 0x4c41, +0x4553, 0x2f3c, 0x464d, 0x4243, 0x7475, 0x6f74, 0x5f6e, 0x6d49, 0x6761, +0x4f65, 0x526e, 0x6769, 0x7468, "\076" + IDC_SKIP_BUTTON, 0x37c, 283, 0 +0x4d3c, 0x4346, 0x654d, 0x756e, 0x7542, 0x7474, 0x6e6f, 0x4f5f, 0x4d53, +0x6e65, 0x3e75, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x654d, 0x756e, +0x7542, 0x7474, 0x6e6f, 0x4f5f, 0x4d53, 0x6e65, 0x3e75, 0x4d3c, 0x4346, +0x654d, 0x756e, 0x7542, 0x7474, 0x6e6f, 0x525f, 0x6769, 0x7468, 0x7241, +0x6f72, 0x3e77, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x654d, 0x756e, +0x7542, 0x7474, 0x6e6f, 0x525f, 0x6769, 0x7468, 0x7241, 0x6f72, 0x3e77, +0x4d3c, 0x4346, 0x654d, 0x756e, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x6174, +0x5079, 0x6572, 0x7373, 0x6465, 0x463e, 0x4c41, 0x4553, 0x2f3c, 0x464d, +0x4d43, 0x6e65, 0x4275, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x7961, 0x7250, +0x7365, 0x6573, 0x3e64, 0x4d3c, 0x4346, 0x654d, 0x756e, 0x7542, 0x7474, +0x6e6f, 0x445f, 0x6665, 0x7561, 0x746c, 0x6c43, 0x6369, 0x3e6b, 0x5254, +0x4555, 0x2f3c, 0x464d, 0x4d43, 0x6e65, 0x4275, 0x7475, 0x6f74, 0x5f6e, +0x6544, 0x6166, 0x6c75, 0x4374, 0x696c, 0x6b63, 0x3c3e, 0x464d, 0x4d43, +0x6e65, 0x4275, 0x7475, 0x6f74, 0x5f6e, 0x7541, 0x6f74, 0x6973, 0x657a, +0x463e, 0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4d43, 0x6e65, 0x4275, 0x7475, +0x6f74, 0x5f6e, 0x7541, 0x6f74, 0x6973, 0x657a, "\076" + IDC_RETRY_BUTTON, 0x37c, 283, 0 +0x4d3c, 0x4346, 0x654d, 0x756e, 0x7542, 0x7474, 0x6e6f, 0x4f5f, 0x4d53, +0x6e65, 0x3e75, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x654d, 0x756e, +0x7542, 0x7474, 0x6e6f, 0x4f5f, 0x4d53, 0x6e65, 0x3e75, 0x4d3c, 0x4346, +0x654d, 0x756e, 0x7542, 0x7474, 0x6e6f, 0x525f, 0x6769, 0x7468, 0x7241, +0x6f72, 0x3e77, 0x4146, 0x534c, 0x3c45, 0x4d2f, 0x4346, 0x654d, 0x756e, +0x7542, 0x7474, 0x6e6f, 0x525f, 0x6769, 0x7468, 0x7241, 0x6f72, 0x3e77, +0x4d3c, 0x4346, 0x654d, 0x756e, 0x7542, 0x7474, 0x6e6f, 0x535f, 0x6174, +0x5079, 0x6572, 0x7373, 0x6465, 0x463e, 0x4c41, 0x4553, 0x2f3c, 0x464d, +0x4d43, 0x6e65, 0x4275, 0x7475, 0x6f74, 0x5f6e, 0x7453, 0x7961, 0x7250, +0x7365, 0x6573, 0x3e64, 0x4d3c, 0x4346, 0x654d, 0x756e, 0x7542, 0x7474, +0x6e6f, 0x445f, 0x6665, 0x7561, 0x746c, 0x6c43, 0x6369, 0x3e6b, 0x5254, +0x4555, 0x2f3c, 0x464d, 0x4d43, 0x6e65, 0x4275, 0x7475, 0x6f74, 0x5f6e, +0x6544, 0x6166, 0x6c75, 0x4374, 0x696c, 0x6b63, 0x3c3e, 0x464d, 0x4d43, +0x6e65, 0x4275, 0x7475, 0x6f74, 0x5f6e, 0x7541, 0x6f74, 0x6973, 0x657a, +0x463e, 0x4c41, 0x4553, 0x2f3c, 0x464d, 0x4d43, 0x6e65, 0x4275, 0x7475, +0x6f74, 0x5f6e, 0x7541, 0x6f74, 0x6973, 0x657a, "\076" + 0 +END + + ///////////////////////////////////////////////////////////////////////////// // // String Table @@ -1660,14 +1884,6 @@ STRINGTABLE BEGIN - IDS_INFO_REASON_STRING "Reason: %reason" - IDS_INFO_FILE_STRING "File: %filename" -END - -STRINGTABLE -BEGIN - IDS_INFO_TWO_FILE_STRING - "Source file: %filename\nDestination file: %dstfilename" IDS_OK_STRING "&OK" IDS_CANCEL_STRING "&Cancel" IDS_YES_STRING "&Yes" @@ -1681,11 +1897,6 @@ STRINGTABLE BEGIN - IDS_NERPATH_STRING "There is not enough room in %path to copy or move:" -END - -STRINGTABLE -BEGIN IDS_UPDATER_EQUAL_VERSION_STRING "Your current version: %thisver (%thisnumericver)" IDS_UPDATER_ERROR_STRING "Check for updates error" Index: src/ch/resource.h =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/ch/resource.h (.../resource.h) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/ch/resource.h (.../resource.h) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -54,14 +54,16 @@ #define IDD_FEEDBACK_REPLACE_DIALOG 214 #define IDD_MSGBOX_DIALOG 215 #define IDR_TASK_ADVANCED_MENU 216 -#define IDR_FEEDBACK_MASS_REPLACE_MENU 225 -#define IDR_FEEDBACK_MASS_SKIP_MENU 226 -#define IDR_FEEDBACK_MASS_RENAME_MENU 228 -#define IDR_FEEDBACK_MASS_RESUME_MENU 230 +#define IDR_ALREADYEXISTS_MASS_REPLACE_MENU 225 +#define IDR_ALREADYEXISTS_MASS_SKIP_MENU 226 +#define IDR_ALREADYEXISTS_MASS_RENAME_MENU 228 +#define IDR_ALREADYEXISTS_MASS_RESUME_MENU 230 #define IDD_RULE_EDIT_ALREADYEXISTS_DIALOG 231 #define IDD_RULE_EDIT_ERROR_DIALOG 232 #define IDD_RULE_EDIT_NOTENOUGHSPACE_DIALOG 233 #define IDD_RULE_EDIT_ALL_DIALOG 234 +#define IDR_ERROR_MASS_SKIP_MENU 237 +#define IDR_ERROR_MASS_RETRY_MENU 238 #define IDC_PROGRAM_STATIC 1000 #define IDC_ADDFILE_BUTTON 1002 #define IDC_STATUS_LIST 1003 @@ -91,11 +93,12 @@ #define IDC_TASK_ADVANCED_BUTTON 1017 #define IDC_PAUSE_BUTTON 1018 #define IDC_STANDARD_CHECK 1019 -#define IDC_PAUSE_BUTTON2 1019 #define IDC_CUSTOM_RULES_BUTTON 1019 #define IDC_FORCEDIRECTORIES_CHECK 1020 +#define IDC_PAUSE_BUTTON2 1020 #define IDC_RESUME_BUTTON 1021 #define IDC_CANCEL_BUTTON 1022 +#define IDC_PAUSE_BUTTON3 1022 #define IDC_ADVANCED_CHECK 1023 #define IDC_BUFFERSIZES_BUTTON 1024 #define IDC_ADDFILTER_BUTTON 1025 @@ -167,7 +170,9 @@ #define IDC_FREESPACE_STATIC 1123 #define IDC_DISK_STATIC 1124 #define IDC_REQUIRED_STATIC 1127 +#define IDC_REQUIRED_SPACE_STATIC 1127 #define IDC_AVAILABLE_STATIC 1128 +#define IDC_AVAILABLE_SPACE_STATIC 1128 #define IDC_TEST_BUTTON 1129 #define IDC_SOURCEFILENAME_EDIT 1130 #define IDC_YESALL_BUTTON 1131 @@ -385,9 +390,12 @@ #define IDC_UPDATECHANNEL_STATIC 1334 #define IDC_SRC_FILENAME_EDIT 1340 #define IDC_DST_FILENAME_EDIT 1341 +#define IDC_OPERATION_EDIT 1341 #define IDC_SRC_FILESIZE_EDIT 1342 +#define IDC_SYSTEM_ERROR_EDIT 1342 #define IDC_MODIFIEDDATE_EDIT 1343 #define IDC_SRC_MODIFIEDDATE_EDIT 1343 +#define IDC_SECOND_FILENAME_EDIT 1343 #define IDC_DST_FILESIZE_EDIT 1344 #define IDC_DST_MODIFIEDDATE_EDIT 1345 #define IDC_SRC_PATH_EDIT 1346 @@ -397,6 +405,7 @@ #define IDC_SRC_NAME_STATIC 1378 #define IDC_SRC_LOCATION_STATIC 1379 #define IDC_SRC_SIZE_STATIC 1380 +#define IDC_SYSTEM_ERROR_STATIC 1380 #define IDC_SRC_TIME_STATIC 1381 #define IDC_DST_NAME_STATIC 1382 #define IDC_DST_LOCATION_STATIC 1383 @@ -436,6 +445,13 @@ #define IDC_DESTINATION_SIZE_STATIC 1416 #define IDC_SOURCE_DATE_STATIC 1417 #define IDC_DST_DATE_STATIC 1418 +#define IDC_ERROR_DETAILS_STATIC 1423 +#define IDC_NAMES_STATIC 1424 +#define IDC_FILENAME_EDIT 1425 +#define IDC_LOCATION_STATIC 1426 +#define IDC_REQUIRED_SPACE_HDR_STATIC 1427 +#define IDC_AVAILABLE_SPACE_HDR_STATIC 1428 +#define IDC_DETAILS_STATIC 1429 #define IDS_APPNAME_STRING 5000 #define IDS_PRIORITY0_STRING 5001 #define IDS_PRIORITY1_STRING 5002 @@ -667,13 +683,10 @@ #define IDS_BDDIR_STRING 13034 #define IDS_BDTREE_STRING 13035 #define IDS_BDNDSCONTAINER_STRING 13036 -#define IDS_INFO_REASON_STRING 13040 -#define IDS_INFO_FILE_STRING 13041 #define IDS_TITLECOPY_STRING 13500 #define IDS_TITLEMOVE_STRING 13501 #define IDS_TITLEUNKNOWNOPERATION_STRING 13502 #define IDS_MAINBROWSETEXT_STRING 13503 -#define IDS_INFO_TWO_FILE_STRING 13504 #define IDS_OK_STRING 13505 #define IDS_CANCEL_STRING 13506 #define IDS_YES_STRING 13507 @@ -723,7 +736,6 @@ #define IDS_OPERATION_CREATEERROR 15039 #define IDS_OPERATION_CHECKFORFREESPACE 15040 #define IDS_OPERATION_RETRIEVEFILEINFO 15041 -#define IDS_NERPATH_STRING 16500 #define IDS_DATECREATED_STRING 18000 #define IDS_DATELASTWRITE_STRING 18001 #define IDS_DATEACCESSED_STRING 18002 @@ -812,15 +824,17 @@ #define ID_FEEDBACK_RENAME_WHENNEWERTHANDESTINATION 32830 #define ID_FEEDBACK_RENAME_WHENOLDERTHANDESTINATION 32831 #define ID_FEEDBACK_RESUME_WHENFILEBIGGERTHANDESTINATION 32832 +#define ID_FEEDBACK_RETRY_WHEN_SAME_ERROR 32833 +#define ID_FEEDBACK_SKIP_WHEN_SAME_ERROR 32834 // Next default values for new objects // #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 235 -#define _APS_NEXT_COMMAND_VALUE 32833 -#define _APS_NEXT_CONTROL_VALUE 1419 +#define _APS_NEXT_RESOURCE_VALUE 239 +#define _APS_NEXT_COMMAND_VALUE 32835 +#define _APS_NEXT_CONTROL_VALUE 1430 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif Index: src/libchengine/FeedbackErrorRule.cpp =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/libchengine/FeedbackErrorRule.cpp (.../FeedbackErrorRule.cpp) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/libchengine/FeedbackErrorRule.cpp (.../FeedbackErrorRule.cpp) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -142,7 +142,7 @@ rColumns.AddColumn(_T("use_error_type"), IColumnsDefinition::eType_bool); rColumns.AddColumn(_T("error_type"), IColumnsDefinition::eType_int); rColumns.AddColumn(_T("use_system_error_no"), IColumnsDefinition::eType_bool); - rColumns.AddColumn(_T("system_error_no"), IColumnsDefinition::eType_ulong); + rColumns.AddColumn(_T("system_error_no"), IColumnsDefinition::eType_uint); rColumns.AddColumn(_T("result"), IColumnsDefinition::eType_int); } Index: src/libchengine/FeedbackManager.cpp =================================================================== diff -u -r3993a75a24145732742d61be638111d1d85c367b -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/libchengine/FeedbackManager.cpp (.../FeedbackManager.cpp) (revision 3993a75a24145732742d61be638111d1d85c367b) +++ src/libchengine/FeedbackManager.cpp (.../FeedbackManager.cpp) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -130,14 +130,14 @@ return { eResult, bAutomatedResponse }; } - chengine::TFeedbackResult FeedbackManager::NotEnoughSpace(const string::TString& strSrcPath, const string::TString& strDstPath, unsigned long long ullRequiredSize) + chengine::TFeedbackResult FeedbackManager::NotEnoughSpace(const string::TString& strDstPath, unsigned long long ullRequiredSize) { bool bAutomatedResponse = true; EFeedbackResult eResult = eResult_Unknown; { boost::shared_lock lock(m_lock); - eResult = m_feedbackRules.GetNotEnoughSpaceRules().Matches(strSrcPath, strDstPath, ullRequiredSize); + eResult = m_feedbackRules.GetNotEnoughSpaceRules().Matches(strDstPath, ullRequiredSize); } if(eResult == eResult_Unknown) { @@ -149,7 +149,7 @@ { TScopedRunningTimeTrackerPause scopedTimePause(m_pTimeTracker); TScopedRunningTimeTrackerPause scopedSecondaryTimePause(m_pSecondaryTimeTracker); - eResult = m_spFeedbackHandler->NotEnoughSpace(strSrcPath, strDstPath, ullRequiredSize, modRules); + eResult = m_spFeedbackHandler->NotEnoughSpace(strDstPath, ullRequiredSize, modRules); } if(eResult != eResult_Unknown) { Index: src/libchengine/FeedbackManager.h =================================================================== diff -u -rb9453afbc6264bc3f3c6a7f86fadab7744e0fb16 -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/libchengine/FeedbackManager.h (.../FeedbackManager.h) (revision b9453afbc6264bc3f3c6a7f86fadab7744e0fb16) +++ src/libchengine/FeedbackManager.h (.../FeedbackManager.h) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -41,7 +41,7 @@ TFeedbackResult FileError(const string::TString& strSrcPath, const string::TString& strDstPath, EFileError eFileError, unsigned long ulError); TFeedbackResult FileAlreadyExists(const TFileInfoPtr& spSrcFileInfo, const TFileInfo& rDstFileInfo, const chcore::TSmartPath& suggestedPath); - TFeedbackResult NotEnoughSpace(const string::TString& strSrcPath, const string::TString& strDstPath, unsigned long long ullRequiredSize); + TFeedbackResult NotEnoughSpace(const string::TString& strDstPath, unsigned long long ullRequiredSize); TFeedbackResult OperationEvent(EOperationEvent eEvent); // resets the permanent status from all responses Index: src/libchengine/FeedbackNotEnoughSpaceRule.cpp =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/libchengine/FeedbackNotEnoughSpaceRule.cpp (.../FeedbackNotEnoughSpaceRule.cpp) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/libchengine/FeedbackNotEnoughSpaceRule.cpp (.../FeedbackNotEnoughSpaceRule.cpp) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -79,7 +79,7 @@ m_eResult = rSrc.m_eResult; } - bool FeedbackNotEnoughSpaceRule::Matches(const string::TString& /*strSrcPath*/, const string::TString& strDstPath, unsigned long long /*ullRequiredSize*/, EFeedbackResult& eResult) const + bool FeedbackNotEnoughSpaceRule::Matches(const string::TString& strDstPath, unsigned long long /*ullRequiredSize*/, EFeedbackResult& eResult) const { eResult = eResult_Unknown; Index: src/libchengine/FeedbackNotEnoughSpaceRule.h =================================================================== diff -u -rf8b6de9c28b2957db0b4e71efa11df8632e41261 -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/libchengine/FeedbackNotEnoughSpaceRule.h (.../FeedbackNotEnoughSpaceRule.h) (revision f8b6de9c28b2957db0b4e71efa11df8632e41261) +++ src/libchengine/FeedbackNotEnoughSpaceRule.h (.../FeedbackNotEnoughSpaceRule.h) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -43,7 +43,7 @@ void SetData(const FeedbackNotEnoughSpaceRule& rSrc); - bool Matches(const string::TString& strSrcPath, const string::TString& strDstPath, unsigned long long ullRequiredSize, EFeedbackResult& eResult) const; + bool Matches(const string::TString& strDstPath, unsigned long long ullRequiredSize, EFeedbackResult& eResult) const; void Store(const serializer::ISerializerContainerPtr& spContainer) const override; void Load(const serializer::ISerializerRowReaderPtr& spRowReader) override; Index: src/libchengine/FeedbackNotEnoughSpaceRuleList.cpp =================================================================== diff -u -rf8042fcdb059c5a410e7737175f84a7dabbbdeb7 -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/libchengine/FeedbackNotEnoughSpaceRuleList.cpp (.../FeedbackNotEnoughSpaceRuleList.cpp) (revision f8042fcdb059c5a410e7737175f84a7dabbbdeb7) +++ src/libchengine/FeedbackNotEnoughSpaceRuleList.cpp (.../FeedbackNotEnoughSpaceRuleList.cpp) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -9,15 +9,15 @@ namespace chengine { - EFeedbackResult FeedbackNotEnoughSpaceRuleList::Matches(const string::TString& strSrcPath, const string::TString& strDstPath, unsigned long long ullRequiredSize) const + EFeedbackResult FeedbackNotEnoughSpaceRuleList::Matches(const string::TString& strDstPath, unsigned long long ullRequiredSize) const { if(m_vEntries.empty()) return eResult_Unknown; for(const FeedbackNotEnoughSpaceRule& rRule : m_vEntries) { EFeedbackResult eResult = eResult_Unknown; - if(rRule.Matches(strSrcPath, strDstPath, ullRequiredSize, eResult)) + if(rRule.Matches(strDstPath, ullRequiredSize, eResult)) return eResult; } Index: src/libchengine/FeedbackNotEnoughSpaceRuleList.h =================================================================== diff -u -r08717141ce5f6926116c298cbc9442094a45bb67 -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/libchengine/FeedbackNotEnoughSpaceRuleList.h (.../FeedbackNotEnoughSpaceRuleList.h) (revision 08717141ce5f6926116c298cbc9442094a45bb67) +++ src/libchengine/FeedbackNotEnoughSpaceRuleList.h (.../FeedbackNotEnoughSpaceRuleList.h) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -13,7 +13,7 @@ class LIBCHENGINE_API FeedbackNotEnoughSpaceRuleList : public serializer::SerializableContainer { public: - EFeedbackResult Matches(const string::TString& strSrcPath, const string::TString& strDstPath, unsigned long long ullRequiredSize) const; + EFeedbackResult Matches(const string::TString& strDstPath, unsigned long long ullRequiredSize) const; void Merge(const FeedbackNotEnoughSpaceRuleList& rSrc); Index: src/libchengine/FeedbackPredefinedRules.cpp =================================================================== diff -u -r08717141ce5f6926116c298cbc9442094a45bb67 -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/libchengine/FeedbackPredefinedRules.cpp (.../FeedbackPredefinedRules.cpp) (revision 08717141ce5f6926116c298cbc9442094a45bb67) +++ src/libchengine/FeedbackPredefinedRules.cpp (.../FeedbackPredefinedRules.cpp) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -1,23 +1,22 @@ #include "stdafx.h" #include "FeedbackPredefinedRules.h" -#include "FeedbackAlreadyExistsRuleList.h" namespace chengine { - FeedbackAlreadyExistsRuleList FeedbackPredefinedRules::CreateAlreadyExistsRule(EPredefinedRuleCondition eCondition, EFeedbackResult eResult) + FeedbackAlreadyExistsRuleList FeedbackPredefinedRules::CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition eCondition, EFeedbackResult eResult) { FeedbackAlreadyExistsRuleList ruleList; switch(eCondition) { - case EPredefinedRuleCondition::eCondition_ApplyToAll: + case EAlreadyExistsPredefinedRuleCondition::eCondition_ApplyToAll: { FeedbackAlreadyExistsRule rule; rule.SetResult(eResult); ruleList.Add(rule); break; } - case EPredefinedRuleCondition::eCondition_WhenDifferentDateOrSize: + case EAlreadyExistsPredefinedRuleCondition::eCondition_WhenDifferentDateOrSize: { FeedbackAlreadyExistsRule rule; rule.SetResult(eResult); @@ -33,7 +32,7 @@ break; } - case EPredefinedRuleCondition::eCondition_WhenSameDateAndSize: + case EAlreadyExistsPredefinedRuleCondition::eCondition_WhenSameDateAndSize: { FeedbackAlreadyExistsRule rule; rule.SetResult(eResult); @@ -44,7 +43,7 @@ ruleList.Add(rule); break; } - case EPredefinedRuleCondition::eCondition_WhenNewerThanDst: + case EAlreadyExistsPredefinedRuleCondition::eCondition_WhenNewerThanDst: { FeedbackAlreadyExistsRule rule; rule.SetResult(eResult); @@ -53,7 +52,7 @@ ruleList.Add(rule); break; } - case EPredefinedRuleCondition::eCondition_WhenOlderThanDst: + case EAlreadyExistsPredefinedRuleCondition::eCondition_WhenOlderThanDst: { FeedbackAlreadyExistsRule rule; rule.SetResult(eResult); @@ -62,7 +61,7 @@ ruleList.Add(rule); break; } - case EPredefinedRuleCondition::eCondition_WhenSmallerThanDst: + case EAlreadyExistsPredefinedRuleCondition::eCondition_WhenSmallerThanDst: { FeedbackAlreadyExistsRule rule; rule.SetResult(eResult); @@ -71,7 +70,7 @@ ruleList.Add(rule); break; } - case EPredefinedRuleCondition::eCondition_WhenBiggerThanDst: + case EAlreadyExistsPredefinedRuleCondition::eCondition_WhenBiggerThanDst: { FeedbackAlreadyExistsRule rule; rule.SetResult(eResult); @@ -86,4 +85,26 @@ return ruleList; } + + chengine::FeedbackErrorRuleList FeedbackPredefinedRules::CreateErrorRule(EErrorPredefinedRuleCondition eCondition, unsigned int uiSystemError, EFeedbackResult eResult) + { + FeedbackErrorRuleList ruleList; + + switch(eCondition) + { + case EErrorPredefinedRuleCondition::eCondition_WhenSameError: + { + FeedbackErrorRule rule; + rule.SetUseSystemErrorNo(true); + rule.SetSystemErrorNo(uiSystemError); + rule.SetResult(eResult); + ruleList.Add(rule); + break; + } + default: + throw std::runtime_error("Unhandled predefined rule condition"); + } + + return ruleList; + } } Index: src/libchengine/FeedbackPredefinedRules.h =================================================================== diff -u -r08717141ce5f6926116c298cbc9442094a45bb67 -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/libchengine/FeedbackPredefinedRules.h (.../FeedbackPredefinedRules.h) (revision 08717141ce5f6926116c298cbc9442094a45bb67) +++ src/libchengine/FeedbackPredefinedRules.h (.../FeedbackPredefinedRules.h) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -3,10 +3,11 @@ #include "libchengine.h" #include "EFeedbackResult.h" #include "FeedbackAlreadyExistsRuleList.h" +#include "FeedbackErrorRuleList.h" namespace chengine { - enum class EPredefinedRuleCondition + enum class EAlreadyExistsPredefinedRuleCondition { eCondition_ApplyToAll, @@ -20,9 +21,15 @@ eCondition_WhenBiggerThanDst }; + enum class EErrorPredefinedRuleCondition + { + eCondition_WhenSameError + }; + class LIBCHENGINE_API FeedbackPredefinedRules { public: - static FeedbackAlreadyExistsRuleList CreateAlreadyExistsRule(EPredefinedRuleCondition eCondition, EFeedbackResult eResult); + static FeedbackAlreadyExistsRuleList CreateAlreadyExistsRule(EAlreadyExistsPredefinedRuleCondition eCondition, EFeedbackResult eResult); + static FeedbackErrorRuleList CreateErrorRule(EErrorPredefinedRuleCondition eCondition, unsigned int uiSystemError, EFeedbackResult eResult); }; } Index: src/libchengine/IFeedbackHandler.h =================================================================== diff -u -r3993a75a24145732742d61be638111d1d85c367b -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/libchengine/IFeedbackHandler.h (.../IFeedbackHandler.h) (revision 3993a75a24145732742d61be638111d1d85c367b) +++ src/libchengine/IFeedbackHandler.h (.../IFeedbackHandler.h) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -38,7 +38,7 @@ virtual EFeedbackResult FileError(const string::TString& strSrcPath, const string::TString& strDstPath, EFileError eFileError, unsigned long ulError, FeedbackRules& rNewRules) = 0; virtual EFeedbackResult FileAlreadyExists(const TFileInfo& spSrcFileInfo, const TFileInfo& spDstFileInfo, string::TString& strRenameName, FeedbackRules& rNewRules) = 0; - virtual EFeedbackResult NotEnoughSpace(const string::TString& strSrcPath, const string::TString& strDstPath, unsigned long long ullRequiredSize, FeedbackRules& rNewRules) = 0; + virtual EFeedbackResult NotEnoughSpace(const string::TString& strDstPath, unsigned long long ullRequiredSize, FeedbackRules& rNewRules) = 0; virtual EFeedbackResult OperationEvent(EOperationEvent eEvent, FeedbackRules& rNewRules) = 0; }; Index: src/libchengine/TFilesystemFeedbackWrapper.cpp =================================================================== diff -u -r08717141ce5f6926116c298cbc9442094a45bb67 -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/libchengine/TFilesystemFeedbackWrapper.cpp (.../TFilesystemFeedbackWrapper.cpp) (revision 08717141ce5f6926116c298cbc9442094a45bb67) +++ src/libchengine/TFilesystemFeedbackWrapper.cpp (.../TFilesystemFeedbackWrapper.cpp) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -100,7 +100,7 @@ return false; } - TSubTaskBase::ESubOperationResult TFilesystemFeedbackWrapper::CheckForFreeSpaceFB(const TSmartPath& pathFirstSrc, const TSmartPath& pathDestination, unsigned long long ullNeededSize) + TSubTaskBase::ESubOperationResult TFilesystemFeedbackWrapper::CheckForFreeSpaceFB(const TSmartPath& pathDestination, unsigned long long ullNeededSize) { unsigned long long ullAvailableSize = 0, ullTotal = 0; TFeedbackResult frResult(eResult_Unknown, false); @@ -162,7 +162,7 @@ strFormat.Replace(_T("%availablesize"), boost::lexical_cast(ullAvailableSize).c_str()); LOG_WARNING(m_spLog) << strFormat.c_str(); - frResult = m_spFeedbackManager->NotEnoughSpace(pathFirstSrc.ToWString(), pathDestination.ToWString(), ullNeededSize); + frResult = m_spFeedbackManager->NotEnoughSpace(pathDestination.ToWString(), ullNeededSize); switch (frResult.GetResult()) { case eResult_Cancel: Index: src/libchengine/TFilesystemFeedbackWrapper.h =================================================================== diff -u -r08717141ce5f6926116c298cbc9442094a45bb67 -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/libchengine/TFilesystemFeedbackWrapper.h (.../TFilesystemFeedbackWrapper.h) (revision 08717141ce5f6926116c298cbc9442094a45bb67) +++ src/libchengine/TFilesystemFeedbackWrapper.h (.../TFilesystemFeedbackWrapper.h) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -38,8 +38,7 @@ TFilesystemFeedbackWrapper& operator=(const TFilesystemFeedbackWrapper&) = delete; TSubTaskBase::ESubOperationResult CreateDirectoryFB(const chcore::TSmartPath& pathDirectory); - TSubTaskBase::ESubOperationResult CheckForFreeSpaceFB(const chcore::TSmartPath& pathFirstSrc, const chcore::TSmartPath& pathDestination, - unsigned long long ullNeededSize); + TSubTaskBase::ESubOperationResult CheckForFreeSpaceFB(const chcore::TSmartPath& pathDestination, unsigned long long ullNeededSize); TSubTaskBase::ESubOperationResult RemoveDirectoryFB(const TFileInfoPtr& spFileInfo, bool bProtectReadOnlyFiles); TSubTaskBase::ESubOperationResult DeleteFileFB(const TFileInfoPtr& spFileInfo, bool bProtectReadOnlyFiles); Index: src/libchengine/TSubTaskCopyMove.cpp =================================================================== diff -u -r20c1b142537a6a4a2a88b7ef722c65c374ece35f -re6f64ea0eecaf86dfa1a42c80604d227b69be768 --- src/libchengine/TSubTaskCopyMove.cpp (.../TSubTaskCopyMove.cpp) (revision 20c1b142537a6a4a2a88b7ef722c65c374ece35f) +++ src/libchengine/TSubTaskCopyMove.cpp (.../TSubTaskCopyMove.cpp) (revision e6f64ea0eecaf86dfa1a42c80604d227b69be768) @@ -137,8 +137,8 @@ // now it's time to check if there is enough space on destination device unsigned long long ullNeededSize = rFilesCache.CalculateTotalSize() - rFilesCache.CalculatePartialSize(m_spSubTaskStats->GetCurrentIndex()); - TSmartPath pathSingleSrc = spSrcPaths->GetAt(0)->GetSrcPath(); - TSubTaskBase::ESubOperationResult eResult = tFilesystemFBWrapper.CheckForFreeSpaceFB(pathSingleSrc, pathDestination, ullNeededSize); + + TSubTaskBase::ESubOperationResult eResult = tFilesystemFBWrapper.CheckForFreeSpaceFB(pathDestination, ullNeededSize); if(eResult != eSubResult_Continue) return eResult;