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
24 #include "TortoiseProc.h"
25 #include "IgnoreDlg.h"
29 IMPLEMENT_DYNAMIC(CIgnoreDlg
, CStandAloneDialog
)
31 CIgnoreDlg::CIgnoreDlg(CWnd
* pParent
/*=NULL*/)
32 : CStandAloneDialog(CIgnoreDlg::IDD
, pParent
)
39 CIgnoreDlg::~CIgnoreDlg()
43 void CIgnoreDlg::DoDataExchange(CDataExchange
* pDX
)
45 CDialog::DoDataExchange(pDX
);
49 BEGIN_MESSAGE_MAP(CIgnoreDlg
, CStandAloneDialog
)
50 ON_BN_CLICKED(IDHELP
, OnHelp
)
54 // CIgnoreDlg message handlers
55 BOOL
CIgnoreDlg::OnInitDialog()
57 CStandAloneDialog::OnInitDialog();
59 this->CheckRadioButton(IDC_RADIO_IGNOREFILE_GLOBALGITIGNORE
, IDC_RADIO_IGNOREFILE_GITINFOEXCLUDE
, IDC_RADIO_IGNOREFILE_GLOBALGITIGNORE
+ m_IgnoreType
);
61 AdjustControlSize(IDC_RADIO_IGNOREFILE_GLOBALGITIGNORE
);
62 AdjustControlSize(IDC_RADIO_IGNOREFILE_LOCALGITIGNORES
);
63 AdjustControlSize(IDC_RADIO_IGNOREFILE_GITINFOEXCLUDE
);
65 this->CheckRadioButton(IDC_RADIO_IGNORETYPE_ONLYINFOLDER
, IDC_RADIO_IGNORETYPE_RECURSIVELY
, IDC_RADIO_IGNORETYPE_ONLYINFOLDER
+ m_IgnoreType
);
67 AdjustControlSize(IDC_RADIO_IGNORETYPE_ONLYINFOLDER
);
68 AdjustControlSize(IDC_RADIO_IGNORETYPE_RECURSIVELY
);
73 void CIgnoreDlg::OnOK()
75 m_IgnoreFile
= this->GetCheckedRadioButton(IDC_RADIO_IGNOREFILE_GLOBALGITIGNORE
, IDC_RADIO_IGNOREFILE_GITINFOEXCLUDE
) - IDC_RADIO_IGNOREFILE_GLOBALGITIGNORE
;
76 m_IgnoreType
= this->GetCheckedRadioButton(IDC_RADIO_IGNORETYPE_ONLYINFOLDER
, IDC_RADIO_IGNORETYPE_RECURSIVELY
) - IDC_RADIO_IGNORETYPE_ONLYINFOLDER
;
77 return CStandAloneDialog::OnOK();