Fixed issue #3089: Show parent SHA1 on cherry picking a merge commit
[TortoiseGit.git] / src / TortoiseProc / SVNDCommitDlg.cpp
blobd2ddbed1529cf87430a943305cf3dff3ded51df9
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2012-2016 - 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.
20 #include "stdafx.h"
21 #include "TortoiseProc.h"
22 #include "SVNDCommitDlg.h"
23 #include "AppUtils.h"
24 #include "Git.h"
26 IMPLEMENT_DYNAMIC(CSVNDCommitDlg, CStandAloneDialog)
28 CSVNDCommitDlg::CSVNDCommitDlg(CWnd* pParent /*=nullptr*/)
29 : CStandAloneDialog(CSVNDCommitDlg::IDD, pParent)
30 , m_remember(FALSE)
31 , m_rmdir(FALSE)
35 CSVNDCommitDlg::~CSVNDCommitDlg()
39 void CSVNDCommitDlg::DoDataExchange(CDataExchange* pDX)
41 CStandAloneDialog::DoDataExchange(pDX);
42 DDX_Check(pDX,IDC_RADIO_GIT_COMMIT,m_rmdir);
43 DDX_Check(pDX,IDC_REMEMBER,m_remember);
47 BEGIN_MESSAGE_MAP(CSVNDCommitDlg, CStandAloneDialog)
48 ON_BN_CLICKED(IDOK, &CSVNDCommitDlg::OnBnClickedOk)
49 ON_BN_CLICKED(IDHELP, OnHelp)
50 END_MESSAGE_MAP()
52 BOOL CSVNDCommitDlg::OnInitDialog()
54 CStandAloneDialog::OnInitDialog();
55 CAppUtils::MarkWindowAsUnpinnable(m_hWnd);
57 CString sWindowTitle;
58 GetWindowText(sWindowTitle);
59 CAppUtils::SetWindowTitle(m_hWnd, g_Git.m_CurrentDir, sWindowTitle);
61 CheckRadioButton(IDC_RADIO_SVN_COMMIT, IDC_RADIO_GIT_COMMIT, IDC_RADIO_SVN_COMMIT);
63 AdjustControlSize(IDC_RADIO_SVN_COMMIT);
64 AdjustControlSize(IDC_RADIO_GIT_COMMIT);
65 AdjustControlSize(IDC_REMEMBER);
67 this->UpdateData(false);
68 return TRUE;
71 void CSVNDCommitDlg::OnBnClickedOk()
73 CStandAloneDialog::UpdateData(TRUE);
75 CStandAloneDialog::OnOK();