added missing anchor for help button
[TortoiseGit.git] / src / TortoiseProc / ResetDlg.cpp
blob2d212f95ea3e2144567ac3a0784d2693427c3c6b
1 // TortoiseGit - a Windows shell extension for easy version control
3 // Copyright (C) 2008-2011 - 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 // ResetDlg.cpp : implementation file
22 #include "stdafx.h"
23 #include "TortoiseProc.h"
24 #include "ResetDlg.h"
25 #include "Git.h"
28 // CResetDlg dialog
30 IMPLEMENT_DYNAMIC(CResetDlg, CResizableStandAloneDialog)
32 CResetDlg::CResetDlg(CWnd* pParent /*=NULL*/)
33 : CResizableStandAloneDialog(CResetDlg::IDD, pParent)
34 , m_ResetType(1)
39 CResetDlg::~CResetDlg()
43 void CResetDlg::DoDataExchange(CDataExchange* pDX)
45 CDialog::DoDataExchange(pDX);
49 BEGIN_MESSAGE_MAP(CResetDlg, CResizableStandAloneDialog)
50 ON_BN_CLICKED(IDHELP, &CResetDlg::OnBnClickedHelp)
51 END_MESSAGE_MAP()
54 // CResetDlg message handlers
55 BOOL CResetDlg::OnInitDialog()
57 CResizableStandAloneDialog::OnInitDialog();
59 CString resetTo;
60 CString currentBranch = g_Git.GetCurrentBranch();
61 resetTo.Format(IDS_PROC_RESETBRANCH, currentBranch, m_ResetToVersion);
62 GetDlgItem(IDC_RESET_BRANCH_NAME)->SetWindowTextW(resetTo);
64 AddAnchor(IDC_RESET_BRANCH_NAME, TOP_LEFT, TOP_RIGHT);
65 AddAnchor(IDC_GROUP_RESET_TYPE, TOP_LEFT,TOP_RIGHT);
67 AddAnchor(IDOK,BOTTOM_RIGHT);
68 AddAnchor(IDCANCEL,BOTTOM_RIGHT);
69 AddAnchor(IDH_HELP,BOTTOM_RIGHT);
71 this->CheckRadioButton(IDC_RADIO_RESET_SOFT,IDC_RADIO_RESET_HARD,IDC_RADIO_RESET_SOFT+m_ResetType);
73 return TRUE;
76 void CResetDlg::OnOK()
78 m_ResetType=this->GetCheckedRadioButton(IDC_RADIO_RESET_SOFT,IDC_RADIO_RESET_HARD)-IDC_RADIO_RESET_SOFT;
79 return CResizableStandAloneDialog::OnOK();
82 void CResetDlg::OnBnClickedHelp()
84 OnHelp();