TortoiseSVN -> TortoiseGit
[TortoiseGit.git] / src / TortoiseProc / MergeAllDlg.cpp
blob3643e12d8f548fb1c8c0848d09ea3fc697e29aeb
1 // TortoiseSVN - a Windows shell extension for easy version control
3 // Copyright (C) 2007 - 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.
19 #include "stdafx.h"
20 #include "TortoiseProc.h"
21 #include "MergeAllDlg.h"
24 IMPLEMENT_DYNAMIC(CMergeAllDlg, CStandAloneDialog)
26 CMergeAllDlg::CMergeAllDlg(CWnd* pParent /*=NULL*/)
27 : CStandAloneDialog(CMergeAllDlg::IDD, pParent)
28 , m_depth(svn_depth_unknown)
29 , m_bIgnoreEOL(FALSE)
30 , m_bIgnoreAncestry(FALSE)
35 CMergeAllDlg::~CMergeAllDlg()
39 void CMergeAllDlg::DoDataExchange(CDataExchange* pDX)
41 CStandAloneDialog::DoDataExchange(pDX);
42 DDX_Control(pDX, IDC_DEPTH, m_depthCombo);
43 DDX_Check(pDX, IDC_IGNOREANCESTRY, m_bIgnoreAncestry);
44 DDX_Control(pDX, IDC_DEPTH, m_depthCombo);
45 DDX_Check(pDX, IDC_IGNOREEOL, m_bIgnoreEOL);
49 BEGIN_MESSAGE_MAP(CMergeAllDlg, CStandAloneDialog)
50 ON_BN_CLICKED(IDHELP, &CMergeAllDlg::OnBnClickedHelp)
51 END_MESSAGE_MAP()
54 // CMergeAllDlg message handlers
56 void CMergeAllDlg::OnBnClickedHelp()
58 OnHelp();
61 BOOL CMergeAllDlg::OnInitDialog()
63 CStandAloneDialog::OnInitDialog();
65 m_depthCombo.AddString(CString(MAKEINTRESOURCE(IDS_SVN_DEPTH_WORKING)));
66 m_depthCombo.AddString(CString(MAKEINTRESOURCE(IDS_SVN_DEPTH_INFINITE)));
67 m_depthCombo.AddString(CString(MAKEINTRESOURCE(IDS_SVN_DEPTH_IMMEDIATE)));
68 m_depthCombo.AddString(CString(MAKEINTRESOURCE(IDS_SVN_DEPTH_FILES)));
69 m_depthCombo.AddString(CString(MAKEINTRESOURCE(IDS_SVN_DEPTH_EMPTY)));
70 switch (m_depth)
72 case svn_depth_unknown:
73 m_depthCombo.SetCurSel(0);
74 break;
75 case svn_depth_infinity:
76 m_depthCombo.SetCurSel(1);
77 break;
78 case svn_depth_immediates:
79 m_depthCombo.SetCurSel(2);
80 break;
81 case svn_depth_files:
82 m_depthCombo.SetCurSel(3);
83 break;
84 case svn_depth_empty:
85 m_depthCombo.SetCurSel(4);
86 break;
87 default:
88 m_depthCombo.SetCurSel(0);
89 break;
92 CheckRadioButton(IDC_COMPAREWHITESPACES, IDC_IGNOREALLWHITESPACES, IDC_COMPAREWHITESPACES);
94 if ((m_pParentWnd==NULL)&&(hWndExplorer))
95 CenterWindow(CWnd::FromHandle(hWndExplorer));
96 return TRUE;
99 void CMergeAllDlg::OnOK()
101 switch (m_depthCombo.GetCurSel())
103 case 0:
104 m_depth = svn_depth_unknown;
105 break;
106 case 1:
107 m_depth = svn_depth_infinity;
108 break;
109 case 2:
110 m_depth = svn_depth_immediates;
111 break;
112 case 3:
113 m_depth = svn_depth_files;
114 break;
115 case 4:
116 m_depth = svn_depth_empty;
117 break;
118 default:
119 m_depth = svn_depth_empty;
120 break;
123 CStandAloneDialog::OnOK();