Index: src/ch/CustomCopyDlg.h =================================================================== diff -u -rd5c3edd0d167db9b5d47d04248820fda49499a5e -r4fe995b304ea342b50293f92d3c1992b43b820f7 --- src/ch/CustomCopyDlg.h (.../CustomCopyDlg.h) (revision d5c3edd0d167db9b5d47d04248820fda49499a5e) +++ src/ch/CustomCopyDlg.h (.../CustomCopyDlg.h) (revision 4fe995b304ea342b50293f92d3c1992b43b820f7) @@ -19,9 +19,10 @@ #ifndef __CUSTOMCOPYDLG_H__ #define __CUSTOMCOPYDLG_H__ -#include "DataBuffer.h" -#include "FileFilter.h" -#include "charvect.h" +#include "../libchcore/TFileFilter.h" +#include "../libchcore/TTaskDefinition.h" +#include "CDragDropListCtrl.h" +#include "CDragDropComboEx.h" ///////////////////////////////////////////////////////////////////////////// // CCustomCopyDlg dialog @@ -31,65 +32,29 @@ // Construction public: CCustomCopyDlg(); // standard constructor + explicit CCustomCopyDlg(const chcore::TTaskDefinition& rTaskDefinition); - void SetBuffersizesString(); - - struct _CCDATA - { - CStringArray m_astrPaths; // source paths to copy/move - CString m_strDestPath; // currently selected destination path - char_vector m_vRecent; // recently selected paths - int m_iOperation; // copy || move - int m_iPriority; // operation priority - BYTE m_ucCount; // count of copys - BUFFERSIZES m_bsSizes; // buffer sizes selected for this task - - CFiltersArray m_afFilters; // list of filters to select from combos - - bool m_bIgnoreFolders; - bool m_bForceDirectories; - bool m_bCreateStructure; - } m_ccData; - - bool m_bActualisation; // is this dialog processing the combo text changing ? -// Dialog Data - //{{AFX_DATA(CCustomCopyDlg) - enum { IDD = IDD_CUSTOM_COPY_DIALOG }; - CComboBoxEx m_ctlDstPath; - CSpinButtonCtrl m_ctlCountSpin; - CListCtrl m_ctlFilters; - CListBox m_ctlBufferSizes; - CComboBox m_ctlOperation; - CComboBox m_ctlPriority; - CListCtrl m_ctlFiles; - BYTE m_ucCount; - BOOL m_bOnlyCreate; - BOOL m_bIgnoreFolders; - BOOL m_bForceDirectories; - BOOL m_bFilters; - BOOL m_bAdvanced; - //}}AFX_DATA - // Overrides - // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CCustomCopyDlg) - protected: +protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support - //}}AFX_VIRTUAL // Implementation protected: virtual void OnLanguageChanged(); - void UpdateDialog(); + + void UpdateFilesListCtrlHeaderWidth(); + void UpdateComboIcon(); - void SetComboPath(LPCTSTR lpszText); void EnableControls(); - void AddFilter(const CFileFilter& rFilter, int iPos=-1); + void AddFilter(const chcore::TFileFilter& rFilter, int iPos=-1); void AddPath(CString strPath); - CImageList m_ilImages; + void SetBuffersizesString(); + + bool HasBasicTaskData(); + void UpdateInternalTaskDefinition(); + // Generated message map functions - //{{AFX_MSG(CCustomCopyDlg) virtual BOOL OnInitDialog(); afx_msg void OnAddDirectoryButton(); afx_msg void OnAddFilesButton(); @@ -109,11 +74,29 @@ afx_msg void OnImportButton(); afx_msg void OnIgnorefoldersCheck(); afx_msg void OnForcedirectoriesCheck(); - //}}AFX_MSG + afx_msg void OnExportButtonClicked(); + afx_msg void OnSize(UINT nType, int cx, int cy); + DECLARE_MESSAGE_MAP() -}; -//{{AFX_INSERT_LOCATION}} -// Microsoft Visual C++ will insert additional declarations immediately before the previous line. +public: + chcore::TTaskDefinition m_tTaskDefinition; + std::vector m_vRecent; // recently selected paths + CDragDropComboEx m_ctlDstPath; + CListCtrl m_ctlFilters; + CListBox m_ctlBufferSizes; + CComboBox m_ctlOperation; + CComboBox m_ctlPriority; + CDragDropListCtrl m_ctlFiles; + CImageList m_ilImages; + + bool m_bActualisation = false; // is this dialog processing the combo text changing ? + BOOL m_bOnlyCreate = FALSE; + BOOL m_bIgnoreFolders = FALSE; + BOOL m_bForceDirectories = FALSE; + BOOL m_bFilters = FALSE; + BOOL m_bAdvanced = FALSE; +}; + #endif