#include "FilterEdit.h"\r
#include "Tooltip.h"\r
#include "ProgressDlg.h"\r
-\r
-\r
+#include "MenuButton.h"\r
+#include "ACEdit.h"\r
#define IDT_FILTER 101\r
+#define IDT_INPUT 102\r
\r
/**\r
* \ingroup TortoiseProc\r
* repository. It shows a list of files/folders which were changed in those\r
* two revisions.\r
*/\r
+#define MSG_REF_LOADED (WM_USER+120)\r
+\r
class CFileDiffDlg : public CResizableStandAloneDialog\r
{\r
DECLARE_DYNAMIC(CFileDiffDlg)\r
virtual void OnCancel();\r
virtual BOOL OnInitDialog();\r
virtual BOOL PreTranslateMessage(MSG* pMsg);\r
+ afx_msg LRESULT OnRefLoad(WPARAM wParam, LPARAM lParam);\r
afx_msg void OnNMDblclkFilelist(NMHDR *pNMHDR, LRESULT *pResult);\r
afx_msg void OnLvnGetInfoTipFilelist(NMHDR *pNMHDR, LRESULT *pResult);\r
afx_msg void OnNMCustomdrawFilelist(NMHDR *pNMHDR, LRESULT *pResult);\r
afx_msg void OnBnClickedRev1btn();\r
afx_msg void OnBnClickedRev2btn();\r
afx_msg LRESULT OnClickedCancelFilter(WPARAM wParam, LPARAM lParam);\r
+ afx_msg LRESULT OnEnUpdate(WPARAM wParam, LPARAM lParam);\r
afx_msg void OnEnChangeFilter();\r
afx_msg void OnTimer(UINT_PTR nIDEvent);\r
\r
int AddEntry(const CTGitPath * fd);\r
void DoDiff(int selIndex, bool blame);\r
void DiffProps(int selIndex);\r
- void SetURLLabels();\r
+ void SetURLLabels(int mask=0x3);\r
+ void ClearURLabels(int mask);\r
void Filter(CString sFilterText);\r
void CopySelectionToClipboard();\r
+ \r
+ void ClickRevButton(CMenuButton *button,GitRev *rev, CACEdit *edit);\r
+\r
+ void EnableInputControl(bool b=true);\r
+\r
+ int FillRevFromString(GitRev *rev, CString str)\r
+ {\r
+ GitRev gitrev;\r
+ if(gitrev.GetCommit(str))\r
+ {\r
+ CString msg;\r
+ msg.Format(_T("Reference %s is wrong"),str);\r
+ CMessageBox::Show(NULL,msg,_T("TortoiseGit"),MB_OK|MB_ICONERROR);\r
+ return -1;\r
+ }\r
+ *rev=gitrev;\r
+ return 0;\r
+ }\r
+\r
private:\r
static UINT DiffThreadEntry(LPVOID pVoid);\r
UINT DiffThread();\r
static UINT ExportThreadEntry(LPVOID pVoid);\r
UINT ExportThread();\r
\r
+ static UINT LoadRefThreadEntry(LPVOID pVoid)\r
+ {\r
+ return ((CFileDiffDlg *)pVoid)->LoadRefThread();\r
+ };\r
+\r
+ UINT LoadRefThread();\r
+\r
+ STRING_VECTOR m_Reflist;\r
+\r
virtual BOOL Cancel() {return m_bCancelled;}\r
\r
CToolTips m_tooltips;\r
\r
- CButton m_cRev1Btn;\r
- CButton m_cRev2Btn;\r
+ CMenuButton m_cRev1Btn;\r
+ CMenuButton m_cRev2Btn;\r
CFilterEdit m_cFilter;\r
\r
CXPImageButton m_SwitchButton;\r
bool m_bDoPegDiff;\r
volatile LONG m_bThreadRunning;\r
\r
+ volatile LONG m_bLoadingRef;\r
+\r
bool m_bCancelled;\r
\r
void Sort();\r
\r
static BOOL m_bAscending;\r
static int m_nSortedColumn;\r
+\r
+ CACEdit m_ctrRev1Edit;\r
+ CACEdit m_ctrRev2Edit;\r
+\r
+ CString m_FileListText;\r
+public:\r
+ CString m_strRev1;\r
+ CString m_strRev2;\r
+\r
+public:\r
+ afx_msg void OnEnChangeRev1edit();\r
+ afx_msg void OnEnChangeRev2edit();\r
+ virtual BOOL DestroyWindow();\r
+ void OnTextUpdate(CACEdit *pEdit);\r
};\r