From 2d1390d67815911b185df73dd0068f3768d6470e Mon Sep 17 00:00:00 2001 From: Kimmo Varis Date: Mon, 14 Apr 2008 08:09:06 +0000 Subject: [PATCH] Rename CWMGotoDlg to WMGotoDlg. Add/improve doxygen comments. --- Src/MergeEditView.cpp | 5 ++--- Src/WMGotoDlg.cpp | 26 +++++++++++++++----------- Src/WMGotoDlg.h | 26 +++++++++++++++----------- 3 files changed, 32 insertions(+), 25 deletions(-) diff --git a/Src/MergeEditView.cpp b/Src/MergeEditView.cpp index ae9ceb464..756096a47 100644 --- a/Src/MergeEditView.cpp +++ b/Src/MergeEditView.cpp @@ -1141,8 +1141,7 @@ void CMergeEditView::OnL2r() // If cursor is inside diff get number of that diff if (m_bCurrentLineIsDiff) { - CPoint pt; - pt = GetCursorPos(); + CPoint pt = GetCursorPos(); currentDiff = pDoc->m_diffList.LineToDiff(pt.y); } } @@ -2227,7 +2226,7 @@ void CMergeEditView::OnUpdateChangePane(CCmdUI* pCmdUI) */ void CMergeEditView::OnWMGoto() { - CWMGotoDlg dlg; + WMGotoDlg dlg; CMergeDoc *pDoc = GetDocument(); CPoint pos = GetCursorPos(); int nRealLine = 0; diff --git a/Src/WMGotoDlg.cpp b/Src/WMGotoDlg.cpp index 69d5371da..2517103d1 100644 --- a/Src/WMGotoDlg.cpp +++ b/Src/WMGotoDlg.cpp @@ -17,7 +17,7 @@ /** * @file WMGotoDlg.cpp * - * @brief Implementation of the CWMGotoDlg class + * @brief Implementation of the WMGotoDlg dialog. */ // ID line follows -- this is updated by SVN // $Id$ @@ -35,16 +35,20 @@ static char THIS_FILE[] = __FILE__; ///////////////////////////////////////////////////////////////////////////// // CGotoDlg dialog - -CWMGotoDlg::CWMGotoDlg(CWnd* pParent /*=NULL*/) - : CDialog(CWMGotoDlg::IDD, pParent) +/** + * @brief Constructor. + */ +WMGotoDlg::WMGotoDlg(CWnd* pParent /*=NULL*/) + : CDialog(WMGotoDlg::IDD, pParent) , m_nFile(-1) , m_nGotoWhat(-1) { } - -BOOL CWMGotoDlg::OnInitDialog() +/** + * @brief Initialize dialog. + */ +BOOL WMGotoDlg::OnInitDialog() { theApp.TranslateDialog(m_hWnd); CDialog::OnInitDialog(); @@ -52,10 +56,10 @@ BOOL CWMGotoDlg::OnInitDialog() } -void CWMGotoDlg::DoDataExchange(CDataExchange* pDX) +void WMGotoDlg::DoDataExchange(CDataExchange* pDX) { CDialog::DoDataExchange(pDX); - //{{AFX_DATA_MAP(CWMGotoDlg) + //{{AFX_DATA_MAP(WMGotoDlg) DDX_Text(pDX, IDC_WMGOTO_PARAM, m_strParam); DDX_Radio(pDX, IDC_WMGOTO_FILELEFT, m_nFile); DDX_Radio(pDX, IDC_WMGOTO_TOLINE, m_nGotoWhat); @@ -63,11 +67,11 @@ void CWMGotoDlg::DoDataExchange(CDataExchange* pDX) } -BEGIN_MESSAGE_MAP(CWMGotoDlg, CDialog) - //{{AFX_MSG_MAP(CWMGotoDlg) +BEGIN_MESSAGE_MAP(WMGotoDlg, CDialog) + //{{AFX_MSG_MAP(WMGotoDlg) // NOTE: the ClassWizard will add message map macros here //}}AFX_MSG_MAP END_MESSAGE_MAP() ///////////////////////////////////////////////////////////////////////////// -// CWMGotoDlg message handlers +// WMGotoDlg message handlers diff --git a/Src/WMGotoDlg.h b/Src/WMGotoDlg.h index f01a0e82e..29741a5e8 100644 --- a/Src/WMGotoDlg.h +++ b/Src/WMGotoDlg.h @@ -17,10 +17,10 @@ /** * @file WMGotoDlg.h * - * @brief Declaration file for CWMGotoDlg + * @brief Declaration file for WMGotoDlg dialog. * */ -// RCS ID line follows -- this is updated by CVS +// ID line follows -- this is updated by SVN // $Id$ #if !defined(AFX_WMGOTODLG_H__A9D2366D_6358_4A74_9A45_6681D22EC786__INCLUDED_) @@ -28,26 +28,30 @@ /** - * @brief Class for Goto-dialog + * @brief Class for Goto-dialog. + * This dialog allows user to go to certain line or or difference in the file + * compare. As there are two panels with different line numbers, there is a + * choice for target panel. When dialog is opened, its values are initialized + * for active file's line number. */ -class CWMGotoDlg : public CDialog +class WMGotoDlg : public CDialog { // Construction public: - CWMGotoDlg(CWnd* pParent = NULL); // standard constructor + WMGotoDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data - //{{AFX_DATA(CWMGotoDlg) + //{{AFX_DATA(WMGotoDlg) enum { IDD = IDD_WMGOTO }; - CString m_strParam; - int m_nFile; - int m_nGotoWhat; + CString m_strParam; /**< Line/difference number. */ + int m_nFile; /**< Target file number. */ + int m_nGotoWhat; /**< Goto line or difference? */ //}}AFX_DATA // Overrides // ClassWizard generated virtual function overrides - //{{AFX_VIRTUAL(CWMGotoDlg) + //{{AFX_VIRTUAL(WMGotoDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL @@ -56,7 +60,7 @@ public: protected: // Generated message map functions - //{{AFX_MSG(CWMGotoDlg) + //{{AFX_MSG(WMGotoDlg) virtual BOOL OnInitDialog(); // NOTE: the ClassWizard will add member functions here //}}AFX_MSG -- 2.11.0