+\r
+void CCommitDlg::OnBnClickedWholeProject()\r
+{\r
+ // TODO: Add your control notification handler code here\r
+ m_tooltips.Pop(); // hide the tooltips\r
+ UpdateData();\r
+ m_ListCtrl.Clear();\r
+ if (!m_bBlock)\r
+ {\r
+ if(m_bWholeProject)\r
+ m_ListCtrl.GetStatus(NULL,true,false,true);\r
+ else\r
+ m_ListCtrl.GetStatus(&this->m_pathList,true,false,true);\r
+ \r
+ m_ListCtrl.Show(m_ListCtrl.GetShowFlags());\r
+ }\r
+\r
+ CTGitPath commonDir = m_ListCtrl.GetCommonDirectory(false);\r
+\r
+ if(this->m_bWholeProject) \r
+ SetWindowText(m_sWindowTitle + _T(" - ") + CString(_T("Whole Project")));\r
+ else\r
+ SetWindowText(m_sWindowTitle + _T(" - ") + commonDir.GetWinPathString());\r
+\r
+}\r
+\r
+void CCommitDlg::OnStnClickedBugidlabel()\r
+{\r
+ // TODO: Add your control notification handler code here\r
+}\r
+\r
+void CCommitDlg::OnFocusMessage()\r
+{\r
+ m_cLogMessage.SetFocus();\r
+}\r
+\r
+void CCommitDlg::OnScnUpdateUI(NMHDR *pNMHDR, LRESULT *pResult)\r
+{\r
+ SCNotification *pHead =(SCNotification *)pNMHDR;\r
+ \r
+ int pos=this->m_cLogMessage.Call(SCI_GETCURRENTPOS);\r
+ int line=this->m_cLogMessage.Call(SCI_LINEFROMPOSITION,pos);\r
+ int column=this->m_cLogMessage.Call(SCI_GETCOLUMN,pos);\r
+\r
+ CString str;\r
+ str.Format(_T("%d/%d"),line+1,column+1);\r
+ this->GetDlgItem(IDC_TEXT_INFO)->SetWindowText(str);\r
+\r
+ if(*pResult)\r
+ *pResult=0;\r
+}\r
+void CCommitDlg::OnStnClickedViewPatch()\r
+{\r
+ // TODO: Add your control notification handler code here\r
+ \r
+ m_patchViewdlg.m_pProjectProperties = &this->m_ProjectProperties;\r
+ m_patchViewdlg.m_ParentCommitDlg = this;\r
+ if(!IsWindow(this->m_patchViewdlg.m_hWnd))\r
+ {\r
+ m_patchViewdlg.Create(IDD_PATCH_VIEW,this);\r
+ CRect rect;\r
+ this->GetWindowRect(&rect);\r
+ \r
+ m_patchViewdlg.SetWindowPos(NULL,rect.right,rect.top,rect.Width(),rect.Height(),\r
+ SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOZORDER);\r
+ \r
+ m_patchViewdlg.m_ctrlPatchView.MoveWindow(0,0,rect.Width(),rect.Height());\r
+ m_patchViewdlg.ShowWindow(SW_SHOW);\r
+ \r
+ ShowViewPatchText(false);\r
+ FillPatchView();\r
+ }\r
+ else\r
+ {\r
+ m_patchViewdlg.ShowWindow(SW_HIDE);\r
+ m_patchViewdlg.DestroyWindow();\r
+ ShowViewPatchText(true);\r
+ }\r
+ this->m_ctrlShowPatch.Invalidate();\r
+}\r
+\r
+void CCommitDlg::OnMove(int x, int y)\r
+{\r
+ __super::OnMove(x, y);\r
+\r
+ // TODO: Add your message handler code here\r
+}\r
+\r
+void CCommitDlg::OnMoving(UINT fwSide, LPRECT pRect)\r
+{\r
+ __super::OnMoving(fwSide, pRect);\r
+\r
+ // TODO: Add your message handler code here\r
+ if (::IsWindow(m_patchViewdlg.m_hWnd))\r
+ {\r
+ RECT patchrect;\r
+ m_patchViewdlg.GetWindowRect(&patchrect);\r
+ if (::IsWindow(m_hWnd))\r
+ {\r
+ RECT thisrect;\r
+ GetWindowRect(&thisrect);\r
+ if (patchrect.left == thisrect.right)\r
+ {\r
+ m_patchViewdlg.SetWindowPos(NULL, patchrect.left - (thisrect.left - pRect->left), patchrect.top - (thisrect.top - pRect->top), \r
+ 0, 0, SWP_NOACTIVATE | SWP_NOOWNERZORDER | SWP_NOSIZE | SWP_NOZORDER);\r
+ }\r
+ }\r
+ }\r
+\r
+}\r
+\r
+void CCommitDlg::OnSizing(UINT fwSide, LPRECT pRect)\r
+{\r
+ __super::OnSizing(fwSide, pRect);\r
+\r
+ if(::IsWindow(this->m_patchViewdlg.m_hWnd))\r
+ {\r
+ CRect thisrect, patchrect;\r
+ this->GetWindowRect(thisrect);\r
+ this->m_patchViewdlg.GetWindowRect(patchrect);\r
+ if(thisrect.right==patchrect.left)\r
+ {\r
+ int width = patchrect.Width();\r
+ patchrect.left -= (thisrect.right - pRect->right);\r
+ patchrect.right-= (thisrect.right - pRect->right);\r
+\r
+ if( patchrect.bottom == thisrect.bottom)\r
+ {\r
+ patchrect.bottom -= (thisrect.bottom - pRect->bottom);\r
+ }\r
+ if( patchrect.top == thisrect.top)\r
+ {\r
+ patchrect.top -= thisrect.top-pRect->top;\r
+ }\r
+ m_patchViewdlg.MoveWindow(patchrect);\r
+ }\r
+ }\r
+ // TODO: Add your message handler code here\r
+}\r
+\r
+void CCommitDlg::OnHdnItemchangedFilelist(NMHDR *pNMHDR, LRESULT *pResult)\r
+{\r
+ LPNMHEADER phdr = reinterpret_cast<LPNMHEADER>(pNMHDR);\r
+ // TODO: Add your control notification handler code here\r
+ *pResult = 0;\r
+ TRACE("Item Changed\r\n");\r
+}\r