Use CAutoGeneralHandle
[TortoiseGit.git] / src / TortoiseProc / SubmoduleUpdateDlg.cpp
blobc8ca1e008ca530c1900c7ddbdd6a3c0ed6ad6b82
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2012 Sven Strickroth, <email@cs-ware.de>
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.
20 #include "stdafx.h"
21 #include "TortoiseProc.h"
22 #include "SubmoduleUpdateDlg.h"
23 #include "AppUtils.h"
25 IMPLEMENT_DYNAMIC(CSubmoduleUpdateDlg, CStandAloneDialog)
27 CSubmoduleUpdateDlg::CSubmoduleUpdateDlg(CWnd* pParent /*=NULL*/)
28 : CStandAloneDialog(CSubmoduleUpdateDlg::IDD, pParent)
29 , m_bInit(true)
30 , m_bRecursive(FALSE)
34 CSubmoduleUpdateDlg::~CSubmoduleUpdateDlg()
38 void CSubmoduleUpdateDlg::DoDataExchange(CDataExchange* pDX)
40 CStandAloneDialog::DoDataExchange(pDX);
41 DDX_Check(pDX, IDC_CHECK_SUBMODULE_INIT, m_bInit);
42 DDX_Check(pDX, IDC_CHECK_SUBMODULE_RECURSIVE, m_bRecursive);
46 BEGIN_MESSAGE_MAP(CSubmoduleUpdateDlg, CStandAloneDialog)
47 ON_BN_CLICKED(IDOK, &CSubmoduleUpdateDlg::OnBnClickedOk)
48 ON_BN_CLICKED(IDHELP, &CSubmoduleUpdateDlg::OnBnClickedHelp)
49 END_MESSAGE_MAP()
51 BOOL CSubmoduleUpdateDlg::OnInitDialog()
53 CStandAloneDialog::OnInitDialog();
54 CAppUtils::MarkWindowAsUnpinnable(m_hWnd);
56 CString sWindowTitle;
57 GetWindowText(sWindowTitle);
58 CAppUtils::SetWindowTitle(m_hWnd, g_Git.m_CurrentDir, sWindowTitle);
60 AdjustControlSize(IDC_CHECK_SUBMODULE_INIT);
61 AdjustControlSize(IDC_CHECK_SUBMODULE_RECURSIVE);
63 UpdateData(FALSE);
65 return TRUE;
68 void CSubmoduleUpdateDlg::OnBnClickedOk()
70 CStandAloneDialog::UpdateData(TRUE);
72 CStandAloneDialog::OnOK();
75 void CSubmoduleUpdateDlg::OnBnClickedHelp()
77 OnHelp();