1 // TortoiseGitMerge - a Diff/Patch program
3 // Copyright (C) 2011, 2013 - TortoiseSVN
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 "TortoiseMerge.h"
21 #include "GotoLineDlg.h"
22 #include <afxdialogex.h>
25 // CGotoLineDlg dialog
27 IMPLEMENT_DYNAMIC(CGotoLineDlg
, CDialogEx
)
29 CGotoLineDlg::CGotoLineDlg(CWnd
* pParent
/*=NULL*/)
30 : CDialogEx(CGotoLineDlg::IDD
, pParent
)
38 CGotoLineDlg::~CGotoLineDlg()
42 void CGotoLineDlg::DoDataExchange(CDataExchange
* pDX
)
44 CDialogEx::DoDataExchange(pDX
);
45 DDX_Text(pDX
, IDC_NUMBER
, m_nLine
);
46 DDX_Control(pDX
, IDC_NUMBER
, m_cNumber
);
50 BEGIN_MESSAGE_MAP(CGotoLineDlg
, CDialogEx
)
56 BOOL
CGotoLineDlg::OnInitDialog()
58 CDialogEx::OnInitDialog();
60 if (!m_sLabel
.IsEmpty())
62 SetDlgItemText(IDC_LINELABEL
, m_sLabel
);
64 SetDlgItemText(IDC_NUMBER
, L
"");
65 GetDlgItem(IDC_NUMBER
)->SetFocus();
71 void CGotoLineDlg::OnOK()
74 if ((m_nLine
< m_nLow
)||(m_nLine
> m_nHigh
))
77 sError
.Format(IDS_GOTO_OUTOFRANGE
, m_nLow
, m_nHigh
);
78 m_cNumber
.ShowBalloonTip(L
"", sError
);
79 m_cNumber
.SetSel(0, -1);