1 // TortoiseSVN - a Windows shell extension for easy version control
3 // Copyright (C) 2003-2008 - TortoiseSVN
5 // This program is free software; you can redistribute it and/or
6 // modify it under the terms of the GNU General Public License
7 // as published by the Free Software Foundation; either version 2
8 // of the License, or (at your option) any later version.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software Foundation,
17 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 #include "SettingsPropPage.h"
21 #include "SetProgsAdvDlg.h"
22 #include "FileDropEdit.h"
27 * \ingroup TortoiseProc
28 * Settings page to configure external unified diff viewers.
30 class CSettingsProgsUniDiff
: public ISettingsPropPage
32 DECLARE_DYNAMIC(CSettingsProgsUniDiff
)
35 CSettingsProgsUniDiff();
36 virtual ~CSettingsProgsUniDiff();
38 UINT
GetIconID() {return IDI_DIFF
;}
40 enum { IDD
= IDD_SETTINGSPROGSUNIDIFF
};
43 virtual void DoDataExchange(CDataExchange
* pDX
); // DDX/DDV support
44 virtual BOOL
OnInitDialog();
45 virtual BOOL
PreTranslateMessage(MSG
* pMsg
);
46 virtual BOOL
OnApply();
47 afx_msg
void OnBnClickedDiffviewerOff();
48 afx_msg
void OnBnClickedDiffviewerOn();
49 afx_msg
void OnBnClickedDiffviewerbrowse();
50 afx_msg
void OnEnChangeDiffviewer();
55 bool IsExternal(const CString
& path
) const { return !path
.IsEmpty() && path
.Left(1) != _T("#"); }
56 void CheckProgComment();
58 CString m_sDiffViewerPath
;
59 CRegString m_regDiffViewerPath
;
63 CFileDropEdit m_cUnifiedDiffEdit
;