From: Perry Rapp Date: Mon, 11 Jul 2005 20:33:06 +0000 (+0000) Subject: PATCH: [ 1229024 ] Rename CPropFilter to CPropLineFilter X-Git-Tag: 2.16.5~5838 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=e6b7c98e8c61b6da66348d7f1757d5064eb573f3;p=winmerge-jp%2Fwinmerge-jp.git PATCH: [ 1229024 ] Rename CPropFilter to CPropLineFilter Rename class Src: PropLineFilter.cpp PropLineFilter.h (And adding the new/renamed PropLineFilter.* files) --- diff --git a/Src/MainFrm.cpp b/Src/MainFrm.cpp index d8fd3dffd..f79ebf202 100644 --- a/Src/MainFrm.cpp +++ b/Src/MainFrm.cpp @@ -2573,7 +2573,7 @@ void CMainFrame::OnFileNew() void CMainFrame::OnToolsFilters() { CPropertySheet sht(IDS_FILTER_TITLE); - CPropFilter filter; + CPropLineFilter filter; FileFiltersDlg fileFiltersDlg; FILEFILTER_INFOLIST fileFilters; CString selectedFilter; diff --git a/Src/PropLineFilter.cpp b/Src/PropLineFilter.cpp new file mode 100644 index 000000000..5c4bce45a --- /dev/null +++ b/Src/PropLineFilter.cpp @@ -0,0 +1,77 @@ +/** + * @file PropLineFilter.cpp + * + * @brief Implementation of Line Filter dialog + */ +// RCS ID line follows -- this is updated by CVS +// $Id$ + +#include "stdafx.h" +#include "merge.h" +#include "PropLineFilter.h" + +#ifdef _DEBUG +#define new DEBUG_NEW +#undef THIS_FILE +static char THIS_FILE[] = __FILE__; +#endif + +///////////////////////////////////////////////////////////////////////////// +// CPropLineFilter property page + +IMPLEMENT_DYNAMIC(CPropLineFilter, CPropertyPage) + +CPropLineFilter::CPropLineFilter() +: CPropertyPage(CPropLineFilter::IDD) +{ + //{{AFX_DATA_INIT(CPropLineFilter) + m_bIgnoreRegExp = FALSE; + m_sPattern = _T(""); + //}}AFX_DATA_INIT +} + +CPropLineFilter::~CPropLineFilter() +{ +} + +void CPropLineFilter::DoDataExchange(CDataExchange* pDX) +{ + CPropertyPage::DoDataExchange(pDX); + //{{AFX_DATA_MAP(CPropLineFilter) + DDX_Control(pDX, IDC_EDITPATTERN, m_cPattern); + DDX_Check(pDX, IDC_IGNOREREGEXP, m_bIgnoreRegExp); + DDX_Text(pDX, IDC_EDITPATTERN, m_sPattern); + //}}AFX_DATA_MAP +} + + +BEGIN_MESSAGE_MAP(CPropLineFilter, CPropertyPage) + //{{AFX_MSG_MAP(CPropLineFilter) + ON_BN_CLICKED(IDC_IGNOREREGEXP, OnIgnoreregexp) + //}}AFX_MSG_MAP +END_MESSAGE_MAP() + +///////////////////////////////////////////////////////////////////////////// +// CPropLineFilter message handlers + +BOOL CPropLineFilter::OnInitDialog() +{ + CPropertyPage::OnInitDialog(); + + m_cPattern.EnableWindow(m_bIgnoreRegExp); + + return TRUE; // return TRUE unless you set the focus to a control + // EXCEPTION: OCX Property Pages should return FALSE +} + + +/// User clicked the ignore checkbox +void CPropLineFilter::OnIgnoreregexp() +{ + UpdateData(); + // enable or disable the edit box according to + // the value of the check box + m_cPattern.EnableWindow(m_bIgnoreRegExp); + if (m_bIgnoreRegExp) + m_cPattern.SetFocus(); +} diff --git a/Src/PropLineFilter.h b/Src/PropLineFilter.h new file mode 100644 index 000000000..7df62f1a6 --- /dev/null +++ b/Src/PropLineFilter.h @@ -0,0 +1,58 @@ +// PropLineFilter.h : header file +// + +#if !defined(AFX_PROPFILTER_H__73E79E13_34DD_4C86_A3EC_A1044B721CCA__INCLUDED_) +#define AFX_PROPFILTER_H__73E79E13_34DD_4C86_A3EC_A1044B721CCA__INCLUDED_ + +/** + * @file PropLineFilter.h + * + * @brief Declaration file for Line Filter dialog + * + */ +// RCS ID line follows -- this is updated by CVS +// $Id$ + +/// Class for Line filter propertypage +class CPropLineFilter : public CPropertyPage +{ + DECLARE_DYNAMIC(CPropLineFilter) + +// Construction +public: + CPropLineFilter(); + ~CPropLineFilter(); + +// Dialog Data + //{{AFX_DATA(CPropLineFilter) + enum { IDD = IDD_PROPPAGE_FILTER }; + CEdit m_cPattern; + BOOL m_bIgnoreRegExp; + CString m_sPattern; + //}}AFX_DATA + +// Implementation + +// Overrides + // ClassWizard generate virtual function overrides + //{{AFX_VIRTUAL(CPropLineFilter) + protected: + virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support + //}}AFX_VIRTUAL + +// Implementation +protected: + + // Generated message map functions + //{{AFX_MSG(CPropLineFilter) + virtual BOOL OnInitDialog(); + afx_msg void OnIgnoreregexp(); + //}}AFX_MSG + DECLARE_MESSAGE_MAP() + +}; + +//{{AFX_INSERT_LOCATION}} +// Microsoft Visual C++ will insert additional declarations immediately before the previous line. + +#endif // !defined(AFX_PROPFILTER_H__73E79E13_34DD_4C86_A3EC_A1044B721CCA__INCLUDED_) diff --git a/Src/readme.txt b/Src/readme.txt index 416c9ece1..b2356d5cd 100644 --- a/Src/readme.txt +++ b/Src/readme.txt @@ -3,6 +3,9 @@ Remove PropFilter.cpp PropFilter.h Add PropLineFilter.cpp PropLineFilter.h Src: Merge.dsp MainFrm.cpp + PATCH: [ 1229024 ] Rename CPropFilter to CPropLineFilter + Rename class + Src: PropLineFilter.cpp PropLineFilter.h 2005-07-08 Tim PATCH: [ 1232760 ] Icon for 'Merge->Delete'