1 // CleanTypeDlg.cpp : implementation file
5 #include "TortoiseProc.h"
6 #include "CleanTypeDlg.h"
9 // CCleanTypeDlg dialog
11 IMPLEMENT_DYNAMIC(CCleanTypeDlg
, CResizableStandAloneDialog
)
13 CCleanTypeDlg::CCleanTypeDlg(CWnd
* pParent
/*=NULL*/)
14 : CResizableStandAloneDialog(CCleanTypeDlg::IDD
, pParent
)
17 CString WorkingDir
=g_Git
.m_CurrentDir
;
18 WorkingDir
.Replace(_T(':'),_T('_'));
19 this->m_regDir
= CRegDWORD( CString(_T("Software\\TortoiseGit\\History\\CleanDir\\"))+WorkingDir
, 1);
20 this->m_regType
= CRegDWORD( CString(_T("Software\\TortoiseGit\\History\\CleanType\\"))+WorkingDir
, 0);
22 this->m_bDir
= this->m_regDir
;
23 this->m_CleanType
= this->m_regType
;
26 CCleanTypeDlg::~CCleanTypeDlg()
30 void CCleanTypeDlg::DoDataExchange(CDataExchange
* pDX
)
32 CDialog::DoDataExchange(pDX
);
33 DDX_Check(pDX
, IDC_CHECK_DIR
, m_bDir
);
34 DDX_Radio(pDX
, IDC_RADIO_CLEAN_ALL
,m_CleanType
);
38 BEGIN_MESSAGE_MAP(CCleanTypeDlg
, CResizableStandAloneDialog
)
42 // CCleanTypeDlg message handlers
44 BOOL
CCleanTypeDlg::OnInitDialog()
46 CResizableStandAloneDialog::OnInitDialog();
48 this->AddAnchor(IDOK
,BOTTOM_RIGHT
);
49 this->AddAnchor(IDCANCEL
,BOTTOM_RIGHT
);
50 this->AddAnchor(IDHELP
,BOTTOM_RIGHT
);
52 this->AddAnchor(IDC_GROUP_CLEAN_TYPE
,TOP_LEFT
,TOP_RIGHT
);
54 this->AddOthersToAnchor();
55 // TODO: Add extra initialization here
57 return TRUE
; // return TRUE unless you set the focus to a control
58 // EXCEPTION: OCX Property Pages should return FALSE
61 void CCleanTypeDlg::OnOK()
63 // TODO: Add your specialized code here and/or call the base class
66 this->m_regDir
= this->m_bDir
;
67 this->m_regType
= this->m_CleanType
;
69 CResizableStandAloneDialog::OnOK();