Fixed some warnings
[TortoiseGit.git] / src / TortoiseProc / IgnoreDlg.cpp
blobc2d6655bd547597e63e0e54de2d4bc834a27806b
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2012 - TortoiseGit
4 // Copyright (C) 2012 - Sven Strickroth <email@cs-ware.de>
6 // This program is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU General Public License
8 // as published by the Free Software Foundation; either version 2
9 // of the License, or (at your option) any later version.
11 // This program is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 // GNU General Public License for more details.
16 // You should have received a copy of the GNU General Public License
17 // along with this program; if not, write to the Free Software Foundation,
18 // 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20 // IgnoreDlg.cpp : implementation file
23 #include "stdafx.h"
24 #include "TortoiseProc.h"
25 #include "IgnoreDlg.h"
27 // CIgnoreDlg dialog
29 IMPLEMENT_DYNAMIC(CIgnoreDlg, CStandAloneDialog)
31 CIgnoreDlg::CIgnoreDlg(CWnd* pParent /*=NULL*/)
32 : CStandAloneDialog(CIgnoreDlg::IDD, pParent)
33 , m_IgnoreType(0)
34 , m_IgnoreFile(1)
39 CIgnoreDlg::~CIgnoreDlg()
43 void CIgnoreDlg::DoDataExchange(CDataExchange* pDX)
45 CDialog::DoDataExchange(pDX);
49 BEGIN_MESSAGE_MAP(CIgnoreDlg, CStandAloneDialog)
50 END_MESSAGE_MAP()
53 // CIgnoreDlg message handlers
54 BOOL CIgnoreDlg::OnInitDialog()
56 CStandAloneDialog::OnInitDialog();
58 this->CheckRadioButton(IDC_RADIO_IGNOREFILE_GLOBALGITIGNORE, IDC_RADIO_IGNOREFILE_GITINFOEXCLUDE, IDC_RADIO_IGNOREFILE_GLOBALGITIGNORE + m_IgnoreType);
60 AdjustControlSize(IDC_RADIO_IGNOREFILE_GLOBALGITIGNORE);
61 AdjustControlSize(IDC_RADIO_IGNOREFILE_LOCALGITIGNORES);
62 AdjustControlSize(IDC_RADIO_IGNOREFILE_GITINFOEXCLUDE);
64 this->CheckRadioButton(IDC_RADIO_IGNORETYPE_ONLYINFOLDER, IDC_RADIO_IGNORETYPE_RECURSIVELY, IDC_RADIO_IGNORETYPE_ONLYINFOLDER + m_IgnoreType);
66 AdjustControlSize(IDC_RADIO_IGNORETYPE_ONLYINFOLDER);
67 AdjustControlSize(IDC_RADIO_IGNORETYPE_RECURSIVELY);
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 CStandAloneDialog::OnOK();