Clear %GIT_DIR% on process start to prevent from interfering gitdll and git command...
[TortoiseGit.git] / src / TortoiseProc / IgnoreDlg.cpp
blob9a42f4e37afecdd2432624f8a87a91a82f867a5e
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 ON_BN_CLICKED(IDHELP, OnHelp)
51 END_MESSAGE_MAP()
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);
70 return TRUE;
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();