1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2008-2012 - 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 // CleanTypeDlg.cpp : implementation file
23 #include "TortoiseProc.h"
24 #include "CleanTypeDlg.h"
28 // CCleanTypeDlg dialog
30 IMPLEMENT_DYNAMIC(CCleanTypeDlg
, CStandAloneDialog
)
32 CCleanTypeDlg::CCleanTypeDlg(CWnd
* pParent
/*=NULL*/)
33 : CStandAloneDialog(CCleanTypeDlg::IDD
, pParent
)
36 CString WorkingDir
=g_Git
.m_CurrentDir
;
37 WorkingDir
.Replace(_T(':'),_T('_'));
38 this->m_regDir
= CRegDWORD( CString(_T("Software\\TortoiseGit\\History\\CleanDir\\"))+WorkingDir
, 1);
39 this->m_regType
= CRegDWORD( CString(_T("Software\\TortoiseGit\\History\\CleanType\\"))+WorkingDir
, 0);
41 this->m_bDir
= this->m_regDir
;
42 this->m_CleanType
= this->m_regType
;
45 CCleanTypeDlg::~CCleanTypeDlg()
49 void CCleanTypeDlg::DoDataExchange(CDataExchange
* pDX
)
51 CDialog::DoDataExchange(pDX
);
52 DDX_Check(pDX
, IDC_CHECK_DIR
, m_bDir
);
53 DDX_Radio(pDX
, IDC_RADIO_CLEAN_ALL
,m_CleanType
);
57 BEGIN_MESSAGE_MAP(CCleanTypeDlg
, CStandAloneDialog
)
58 ON_BN_CLICKED(IDHELP
, &CCleanTypeDlg::OnBnClickedHelp
)
62 // CCleanTypeDlg message handlers
64 BOOL
CCleanTypeDlg::OnInitDialog()
66 CStandAloneDialog::OnInitDialog();
67 CAppUtils::MarkWindowAsUnpinnable(m_hWnd
);
69 AdjustControlSize(IDC_RADIO_CLEAN_ALL
);
70 AdjustControlSize(IDC_RADIO_CLEAN_NO
);
71 AdjustControlSize(IDC_RADIO_CLEAN_IGNORE
);
72 AdjustControlSize(IDC_CHECK_DIR
);
75 GetWindowText(sWindowTitle
);
76 CAppUtils::SetWindowTitle(m_hWnd
, g_Git
.m_CurrentDir
, sWindowTitle
);
78 return TRUE
; // return TRUE unless you set the focus to a control
79 // EXCEPTION: OCX Property Pages should return FALSE
82 void CCleanTypeDlg::OnOK()
86 this->m_regDir
= this->m_bDir
;
87 this->m_regType
= this->m_CleanType
;
89 CStandAloneDialog::OnOK();
92 void CCleanTypeDlg::OnBnClickedHelp()