Fix typo in doc
[TortoiseGit.git] / src / TortoiseProc / IgnoreDlg.cpp
blob12283baacae95ccefc6f3e0e36e9542373e637ba
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2012-2013 - TortoiseGit
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 // IgnoreDlg.cpp : implementation file
22 #include "stdafx.h"
23 #include "TortoiseProc.h"
24 #include "IgnoreDlg.h"
26 // CIgnoreDlg dialog
28 IMPLEMENT_DYNAMIC(CIgnoreDlg, CStateStandAloneDialog)
30 CIgnoreDlg::CIgnoreDlg(CWnd* pParent /*=nullptr*/)
31 : CStateStandAloneDialog(CIgnoreDlg::IDD, pParent)
32 , m_IgnoreType(0)
33 , m_IgnoreFile(1)
37 CIgnoreDlg::~CIgnoreDlg()
41 void CIgnoreDlg::DoDataExchange(CDataExchange* pDX)
43 CDialog::DoDataExchange(pDX);
47 BEGIN_MESSAGE_MAP(CIgnoreDlg, CStateStandAloneDialog)
48 END_MESSAGE_MAP()
51 // CIgnoreDlg message handlers
52 BOOL CIgnoreDlg::OnInitDialog()
54 CStateStandAloneDialog::OnInitDialog();
56 this->CheckRadioButton(IDC_RADIO_IGNOREFILE_GLOBALGITIGNORE, IDC_RADIO_IGNOREFILE_GITINFOEXCLUDE, IDC_RADIO_IGNOREFILE_GLOBALGITIGNORE + m_IgnoreType);
58 AdjustControlSize(IDC_RADIO_IGNOREFILE_GLOBALGITIGNORE);
59 AdjustControlSize(IDC_RADIO_IGNOREFILE_LOCALGITIGNORES);
60 AdjustControlSize(IDC_RADIO_IGNOREFILE_GITINFOEXCLUDE);
62 this->CheckRadioButton(IDC_RADIO_IGNORETYPE_ONLYINFOLDER, IDC_RADIO_IGNORETYPE_RECURSIVELY, IDC_RADIO_IGNORETYPE_ONLYINFOLDER + m_IgnoreType);
64 AdjustControlSize(IDC_RADIO_IGNORETYPE_ONLYINFOLDER);
65 AdjustControlSize(IDC_RADIO_IGNORETYPE_RECURSIVELY);
67 EnableSaveRestore(L"IgnoreDlg");
69 return TRUE;
72 void CIgnoreDlg::OnOK()
74 m_IgnoreFile = this->GetCheckedRadioButton(IDC_RADIO_IGNOREFILE_GLOBALGITIGNORE, IDC_RADIO_IGNOREFILE_GITINFOEXCLUDE) - IDC_RADIO_IGNOREFILE_GLOBALGITIGNORE;
75 m_IgnoreType = this->GetCheckedRadioButton(IDC_RADIO_IGNORETYPE_ONLYINFOLDER, IDC_RADIO_IGNORETYPE_RECURSIVELY) - IDC_RADIO_IGNORETYPE_ONLYINFOLDER;
76 return CStateStandAloneDialog::OnOK();