Index: src/ch/CustomCopyDlg.cpp =================================================================== diff -u -r1c366a50e84393bce67e50dcccc4fc5ff147db27 -r53e3a91f9bcb2e26f758fc92e9856a69eba71a61 --- src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision 1c366a50e84393bce67e50dcccc4fc5ff147db27) +++ src/ch/CustomCopyDlg.cpp (.../CustomCopyDlg.cpp) (revision 53e3a91f9bcb2e26f758fc92e9856a69eba71a61) @@ -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 #include "resource.h" @@ -29,17 +29,17 @@ #include "CfgProperties.h" #include "../libchengine/TTaskDefinition.h" #include "../libchengine/TTaskConfigBufferSizes.h" +#include "RuleEditDlg.h" #ifdef _DEBUG #define new DEBUG_NEW #undef THIS_FILE static char THIS_FILE[] = __FILE__; #endif -///////////////////////////////////////////////////////////////////////////// -// CCustomCopyDlg dialog +using namespace chengine; +using namespace string; - CCustomCopyDlg::CCustomCopyDlg() : ictranslate::CLanguageDialog(IDD_CUSTOM_COPY_DIALOG) { @@ -55,23 +55,22 @@ void CCustomCopyDlg::DoDataExchange(CDataExchange* pDX) { CLanguageDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CCustomCopyDlg) + DDX_Control(pDX, IDC_DESTPATH_COMBOBOXEX, m_ctlDstPath); 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_Control(pDX, IDC_FEEDBACK_RULES_SUMMARY_EDIT, m_ctlFeedbackRules); DDX_Check(pDX, IDC_ONLYSTRUCTURE_CHECK, m_bOnlyCreate); DDX_Check(pDX, IDC_IGNOREFOLDERS_CHECK, m_bIgnoreFolders); DDX_Check(pDX, IDC_FORCEDIRECTORIES_CHECK, m_bForceDirectories); DDX_Check(pDX, IDC_FILTERS_CHECK, m_bFilters); DDX_Check(pDX, IDC_ADVANCED_CHECK, m_bAdvanced); - //}}AFX_DATA_MAP } -BEGIN_MESSAGE_MAP(CCustomCopyDlg,ictranslate::CLanguageDialog) - //{{AFX_MSG_MAP(CCustomCopyDlg) +BEGIN_MESSAGE_MAP(CCustomCopyDlg, ictranslate::CLanguageDialog) ON_BN_CLICKED(IDC_ADDDIR_BUTTON, OnAddDirectoryButton) ON_BN_CLICKED(IDC_ADDFILE_BUTTON, OnAddFilesButton) ON_BN_CLICKED(IDC_REMOVEFILEFOLDER_BUTTON, OnRemoveButton) @@ -90,8 +89,8 @@ ON_BN_CLICKED(IDC_IGNOREFOLDERS_CHECK, OnIgnorefoldersCheck) ON_BN_CLICKED(IDC_FORCEDIRECTORIES_CHECK, OnForcedirectoriesCheck) ON_BN_CLICKED(IDC_EXPORT_BUTTON, OnExportButtonClicked) + ON_BN_CLICKED(IDC_CUSTOM_RULES_BUTTON, OnBnCustomRules) ON_WM_SIZE() - //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// @@ -135,6 +134,12 @@ AddResizableControl(IDC_ADDFILTER_BUTTON, 1.0, 0.5, 0.0, 0.0); AddResizableControl(IDC_REMOVEFILTER_BUTTON, 1.0, 0.5, 0.0, 0.0); + AddResizableControl(IDC_BAR7_STATIC, 0.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_FEEDBACK_RULES_STATIC, 0.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_BAR8_STATIC, 0.0, 1.0, 1.0, 0.0); + AddResizableControl(IDC_FEEDBACK_RULES_SUMMARY_EDIT, 0.0, 1.0, 1.0, 0.0); + AddResizableControl(IDC_CUSTOM_RULES_BUTTON, 1.0, 1.0, 0.0, 0.0); + AddResizableControl(IDC_ADVANCED_CHECK, 0.0, 1.0, 0.0, 0.0); AddResizableControl(IDC_BAR4_STATIC, 0.0, 1.0, 1.0, 0.0); @@ -283,6 +288,8 @@ UpdateData(FALSE); + UpdateFeedbackRulesEdit(); + EnableControls(); return TRUE; @@ -375,9 +382,11 @@ const chengine::TFileFilter& rFilter = afFilters.GetAt(stIndex); AddFilter(rFilter, boost::numeric_cast(stIndex)); } + + UpdateFeedbackRulesEdit(); } -void CCustomCopyDlg::OnAddDirectoryButton() +void CCustomCopyDlg::OnAddDirectoryButton() { CString strPath; if (BrowseForFolder(GetResManager().LoadString(IDS_BROWSE_STRING), &strPath)) @@ -1002,6 +1011,9 @@ // operation type m_tTaskDefinition.SetOperationType(m_ctlOperation.GetCurSel() == 0 ? chengine::eOperation_Copy : chengine::eOperation_Move); + // feedback rules + m_tTaskDefinition.SetFeedbackRules(m_rules); + // priority chengine::SetTaskPropValue(m_tTaskDefinition.GetConfiguration(), IndexToPriority(m_ctlPriority.GetCurSel())); @@ -1043,3 +1055,39 @@ UpdateFilesListCtrlHeaderWidth(); } } + +void CCustomCopyDlg::UpdateFeedbackRulesEdit() +{ + TString strText; + if(m_rules.IsEmpty()) + { + strText = GetResManager().LoadString(IDS_RULES_EMPTY_STRING); + } + else + { + size_t stAlreadyExists = m_rules.GetAlreadyExistsRules().GetCount(); + size_t stError = m_rules.GetErrorRules().GetCount(); + size_t stNotEnougSpace = m_rules.GetNotEnoughSpaceRules().GetCount(); + + ictranslate::CFormat fmt; + + fmt.SetFormat(GetResManager().LoadString(IDS_RULES_NON_EMPTY_STRING)); + fmt.SetParam(_T("%exists"), stAlreadyExists); + fmt.SetParam(_T("%error"), stError); + fmt.SetParam(_T("%space"), stNotEnougSpace); + strText = fmt.ToString(); + } + + m_ctlFeedbackRules.SetWindowTextW(strText.c_str()); +} + +void CCustomCopyDlg::OnBnCustomRules() +{ + RuleEditDlg dlg(m_rules); + if(dlg.DoModal() == IDOK) + { + m_rules = dlg.GetRules(); + } + + UpdateFeedbackRulesEdit(); +} Index: src/ch/CustomCopyDlg.h =================================================================== diff -u -r0d5b67ee96b435d63f7bf075dc8e28603793b187 -r53e3a91f9bcb2e26f758fc92e9856a69eba71a61 --- src/ch/CustomCopyDlg.h (.../CustomCopyDlg.h) (revision 0d5b67ee96b435d63f7bf075dc8e28603793b187) +++ src/ch/CustomCopyDlg.h (.../CustomCopyDlg.h) (revision 53e3a91f9bcb2e26f758fc92e9856a69eba71a61) @@ -1,27 +1,27 @@ -/*************************************************************************** -* 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 __CUSTOMCOPYDLG_H__ -#define __CUSTOMCOPYDLG_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 "CDragDropListCtrl.h" #include "CDragDropComboEx.h" #include "../libchengine/TTaskDefinition.h" +#include "../libchengine/FeedbackRules.h" ///////////////////////////////////////////////////////////////////////////// // CCustomCopyDlg dialog @@ -37,17 +37,14 @@ CCustomCopyDlg(); // standard constructor explicit CCustomCopyDlg(const chengine::TTaskDefinition& rTaskDefinition); -// Overrides protected: void DoDataExchange(CDataExchange* pDX) override; // DDX/DDV support - -// Implementation -protected: void OnLanguageChanged() override; void UpdateFilesListCtrlHeaderWidth(); - void UpdateComboIcon(); + void UpdateFeedbackRulesEdit(); + void EnableControls(); void AddFilter(const chengine::TFileFilter& rFilter, int iPos=-1); void AddPath(CString strPath); @@ -57,13 +54,12 @@ bool HasBasicTaskData(); void UpdateInternalTaskDefinition(); - // Generated message map functions BOOL OnInitDialog() override; afx_msg void OnAddDirectoryButton(); afx_msg void OnAddFilesButton(); afx_msg void OnRemoveButton(); afx_msg void OnBrowseButton(); - void OnOK() override; + afx_msg void OnOK() override; afx_msg void OnChangebufferButton(); afx_msg void OnAddfilterButton(); afx_msg void OnRemovefilterButton(); @@ -78,12 +74,14 @@ afx_msg void OnIgnorefoldersCheck(); afx_msg void OnForcedirectoriesCheck(); afx_msg void OnExportButtonClicked(); + afx_msg void OnBnCustomRules(); afx_msg void OnSize(UINT nType, int cx, int cy); DECLARE_MESSAGE_MAP() public: chengine::TTaskDefinition m_tTaskDefinition; + chengine::FeedbackRules m_rules; std::vector m_vRecent; // recently selected paths CDragDropComboEx m_ctlDstPath; @@ -93,6 +91,7 @@ CComboBox m_ctlPriority; CDragDropListCtrl m_ctlFiles; CImageList m_ilImages; + CEdit m_ctlFeedbackRules; bool m_bActualisation = false; // is this dialog processing the combo text changing ? BOOL m_bOnlyCreate = FALSE; @@ -101,5 +100,3 @@ BOOL m_bFilters = FALSE; BOOL m_bAdvanced = FALSE; }; - -#endif Index: src/ch/ch.rc =================================================================== diff -u -r931355150221601949c1e8e3efc9e1621d337189 -r53e3a91f9bcb2e26f758fc92e9856a69eba71a61 --- src/ch/ch.rc (.../ch.rc) (revision 931355150221601949c1e8e3efc9e1621d337189) +++ src/ch/ch.rc (.../ch.rc) (revision 53e3a91f9bcb2e26f758fc92e9856a69eba71a61) @@ -225,7 +225,7 @@ CONTROL "Progress1",IDC_TIME_PROGRESS,"msctls_progress32",PBS_SMOOTH,7,48,172,9 END -IDD_CUSTOM_COPY_DIALOG DIALOGEX 0, 0, 351, 318 +IDD_CUSTOM_COPY_DIALOG DIALOGEX 0, 0, 351, 349 STYLE DS_SETFONT | DS_CENTER | WS_MINIMIZEBOX | WS_MAXIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CLIPCHILDREN | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME EXSTYLE WS_EX_APPWINDOW CAPTION "Copying/moving parameters" @@ -246,27 +246,32 @@ CONTROL "List2",IDC_FILTERS_LIST,"SysListView32",LVS_REPORT | WS_BORDER | WS_TABSTOP,13,190,303,46 PUSHBUTTON "+",IDC_ADDFILTER_BUTTON,322,190,22,14 PUSHBUTTON "-",IDC_REMOVEFILTER_BUTTON,322,206,22,14 - CONTROL "Advanced options",IDC_ADVANCED_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,242,84,10 + CONTROL "Custom rules...",IDC_CUSTOM_RULES_BUTTON,"MfcButton",WS_TABSTOP,273,254,71,14 + CONTROL "Advanced options",IDC_ADVANCED_CHECK,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,273,84,10 CONTROL "Do not create destination directories - copy files loosely to destination folder",IDC_IGNOREFOLDERS_CHECK, - "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,255,329,10 + "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,286,329,10 + CONTROL "Create directory structure in destination folder (relatively to root directory)",IDC_FORCEDIRECTORIES_CHECK, + "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,297,329,10 CONTROL "Do not copy/move contents of files - only create it (empty)",IDC_ONLYSTRUCTURE_CHECK, - "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,277,329,10 - PUSHBUTTON "&OK",IDOK,239,297,50,14 - PUSHBUTTON "&Cancel",IDCANCEL,294,297,50,14 + "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,308,329,10 + PUSHBUTTON "&Export...",IDC_EXPORT_BUTTON,7,328,50,14 + PUSHBUTTON "&OK",IDOK,239,328,50,14 + PUSHBUTTON "&Cancel",IDCANCEL,294,328,50,14 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,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 - CONTROL "",IDC_BAR5_STATIC,"Static",SS_ETCHEDHORZ,7,291,337,1 + CONTROL "",IDC_BAR4_STATIC,"Static",SS_ETCHEDHORZ,98,278,246,1 + CONTROL "",IDC_BAR5_STATIC,"Static",SS_ETCHEDHORZ,7,322,337,1 CONTROL "",IDC_BAR2_STATIC,"Static",SS_ETCHEDHORZ,107,107,237,1 CTEXT "Standard options",IDC_007_STATIC,20,104,80,8 CONTROL "",IDC_BAR1_STATIC,"Static",SS_ETCHEDHORZ,7,107,8,1 - CONTROL "Create directory structure in destination folder (relatively to root directory)",IDC_FORCEDIRECTORIES_CHECK, - "Button",BS_AUTOCHECKBOX | BS_NOTIFY | WS_TABSTOP,13,266,329,10 - PUSHBUTTON "&Export...",IDC_EXPORT_BUTTON,7,297,50,14 + CONTROL "",IDC_BAR8_STATIC,"Static",SS_ETCHEDHORZ,108,244,236,1 + CTEXT "Feedback rules",IDC_FEEDBACK_RULES_STATIC,21,241,80,8 + CONTROL "",IDC_BAR7_STATIC,"Static",SS_ETCHEDHORZ,8,244,7,1 + EDITTEXT IDC_FEEDBACK_RULES_SUMMARY_EDIT,13,254,255,14,ES_AUTOHSCROLL | WS_DISABLED END IDD_FILTER_DIALOG DIALOGEX 0, 0, 291, 266 @@ -618,7 +623,7 @@ LEFTMARGIN, 7 RIGHTMARGIN, 344 TOPMARGIN, 7 - BOTTOMMARGIN, 311 + BOTTOMMARGIN, 342 END IDD_FILTER_DIALOG, DIALOG @@ -1399,7 +1404,34 @@ 0 END +IDD_CUSTOM_COPY_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" + 0 +END + ///////////////////////////////////////////////////////////////////////////// // // String Table @@ -1790,6 +1822,9 @@ BEGIN IDS_OPERATION_CHECKFORFREESPACE "Check for free space" IDS_OPERATION_RETRIEVEFILEINFO "Retrieve file information" + IDS_RULES_EMPTY_STRING "No rules defined" + IDS_RULES_NON_EMPTY_STRING + "%exists 'already exists' rules, %error 'error' rules, %space 'not enough space' rules" END STRINGTABLE Index: src/ch/resource.h =================================================================== diff -u -r931355150221601949c1e8e3efc9e1621d337189 -r53e3a91f9bcb2e26f758fc92e9856a69eba71a61 --- src/ch/resource.h (.../resource.h) (revision 931355150221601949c1e8e3efc9e1621d337189) +++ src/ch/resource.h (.../resource.h) (revision 53e3a91f9bcb2e26f758fc92e9856a69eba71a61) @@ -93,7 +93,7 @@ #define IDC_TASK_ADVANCED_BUTTON 1017 #define IDC_PAUSE_BUTTON 1018 #define IDC_STANDARD_CHECK 1019 -#define IDC_CUSTOM_RULES_BUTTON 1019 +#define IDC_CUSTOM_RULES_BUTTON 1035 #define IDC_FORCEDIRECTORIES_CHECK 1020 #define IDC_PAUSE_BUTTON2 1020 #define IDC_RESUME_BUTTON 1021 @@ -270,6 +270,7 @@ #define IDC_007_STATIC 1225 #define IDC_008_STATIC 1226 #define IDC_SUBTASKCOUNT_LABEL_STATIC 1226 +#define IDC_FEEDBACK_RULES_STATIC 1226 #define IDC_009_STATIC 1227 #define IDC_CURRENTOBJECT_LABEL_STATIC 1227 #define IDC_010_STATIC 1228 @@ -320,7 +321,9 @@ #define IDC_BAR4_STATIC 1252 #define IDC_BAR5_STATIC 1253 #define IDC_HEADER_STATIC 1254 +#define IDC_BAR8_STATIC 1254 #define IDC_HOSTLINK_STATIC 1255 +#define IDC_BAR7_STATIC 1255 #define IDC_PROGRAM_STATICEX 1263 #define IDC_FULLVERSION_STATICEX 1264 #define IDC_HOMEPAGE_STATICEX 1265 @@ -459,6 +462,7 @@ #define IDC_REQUIRED_SPACE_HDR_STATIC 1427 #define IDC_AVAILABLE_SPACE_HDR_STATIC 1428 #define IDC_DETAILS_STATIC 1429 +#define IDC_FEEDBACK_RULES_SUMMARY_EDIT 1431 #define IDS_APPNAME_STRING 5000 #define IDS_PRIORITY0_STRING 5001 #define IDS_PRIORITY1_STRING 5002 @@ -743,6 +747,8 @@ #define IDS_OPERATION_CREATEERROR 15039 #define IDS_OPERATION_CHECKFORFREESPACE 15040 #define IDS_OPERATION_RETRIEVEFILEINFO 15041 +#define IDS_RULES_EMPTY_STRING 15042 +#define IDS_RULES_NON_EMPTY_STRING 15043 #define IDS_DATECREATED_STRING 18000 #define IDS_DATELASTWRITE_STRING 18001 #define IDS_DATEACCESSED_STRING 18002 @@ -839,9 +845,9 @@ #ifdef APSTUDIO_INVOKED #ifndef APSTUDIO_READONLY_SYMBOLS #define _APS_3D_CONTROLS 1 -#define _APS_NEXT_RESOURCE_VALUE 239 +#define _APS_NEXT_RESOURCE_VALUE 240 #define _APS_NEXT_COMMAND_VALUE 32835 -#define _APS_NEXT_CONTROL_VALUE 1430 +#define _APS_NEXT_CONTROL_VALUE 1432 #define _APS_NEXT_SYMED_VALUE 101 #endif #endif Index: src/libchengine/FeedbackRules.cpp =================================================================== diff -u -rf01ed9a0279a52c96a7272273ef19e57f7670f4a -r53e3a91f9bcb2e26f758fc92e9856a69eba71a61 --- src/libchengine/FeedbackRules.cpp (.../FeedbackRules.cpp) (revision f01ed9a0279a52c96a7272273ef19e57f7670f4a) +++ src/libchengine/FeedbackRules.cpp (.../FeedbackRules.cpp) (revision 53e3a91f9bcb2e26f758fc92e9856a69eba71a61) @@ -143,6 +143,11 @@ return m_feedbackOperationEventRules; } +bool chengine::FeedbackRules::IsEmpty() const +{ + return m_feedbackAlreadyExistsRules.IsEmpty() && m_feedbackErrorRules.IsEmpty() && m_feedbackNotEnoughSpaceRules.IsEmpty() && m_feedbackOperationEventRules.IsEmpty(); +} + chengine::FeedbackNotEnoughSpaceRuleList& chengine::FeedbackRules::GetNotEnoughSpaceRules() { return m_feedbackNotEnoughSpaceRules; Index: src/libchengine/FeedbackRules.h =================================================================== diff -u -rf01ed9a0279a52c96a7272273ef19e57f7670f4a -r53e3a91f9bcb2e26f758fc92e9856a69eba71a61 --- src/libchengine/FeedbackRules.h (.../FeedbackRules.h) (revision f01ed9a0279a52c96a7272273ef19e57f7670f4a) +++ src/libchengine/FeedbackRules.h (.../FeedbackRules.h) (revision 53e3a91f9bcb2e26f758fc92e9856a69eba71a61) @@ -38,6 +38,7 @@ void StoreInConfig(TConfig& rConfig, PCTSTR pszNodeName) const; bool ReadFromConfig(const TConfig& rConfig, PCTSTR pszNodeName); + bool IsEmpty() const; void Clear(); void ResetModifications();