OSDN Git Service

Disable File diff dialog when fetch difference
authorFrank Li <lznuaa@gmail.com>
Sat, 23 Jan 2010 12:16:11 +0000 (20:16 +0800)
committerFrank Li <lznuaa@gmail.com>
Sat, 23 Jan 2010 12:16:11 +0000 (20:16 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/FileDiffDlg.cpp
src/TortoiseProc/FileDiffDlg.h

index 0e9a918..522a638 100644 (file)
@@ -290,6 +290,7 @@ UINT CFileDiffDlg::DiffThread()
        m_cFileList.ShowText(CString(MAKEINTRESOURCE(IDS_FILEDIFF_WAIT)));\r
        m_cFileList.DeleteAllItems();\r
        m_arFileList.Clear();\r
+       EnableInputControl(false);\r
 #if 0\r
        if (m_bDoPegDiff)\r
        {\r
@@ -334,6 +335,7 @@ UINT CFileDiffDlg::DiffThread()
        InterlockedExchange(&m_bThreadRunning, FALSE);\r
        InvalidateRect(NULL);\r
        RefreshCursor();\r
+       EnableInputControl(true);\r
        return 0;\r
 }\r
 \r
@@ -360,6 +362,17 @@ int CFileDiffDlg::AddEntry(const CTGitPath * fd)
        return ret;\r
 }\r
 \r
+void CFileDiffDlg::EnableInputControl(bool b)\r
+{\r
+       this->m_ctrRev1Edit.EnableWindow(b);\r
+       this->m_ctrRev2Edit.EnableWindow(b);\r
+       this->m_cRev1Btn.EnableWindow(b);\r
+       this->m_cRev2Btn.EnableWindow(b);\r
+       m_cFilter.EnableWindow(b);\r
+       m_SwitchButton.EnableWindow(b);\r
+       \r
+}\r
+\r
 void CFileDiffDlg::DoDiff(int selIndex, bool blame)\r
 {\r
 \r
index 4ef30ac..e3fbb2b 100644 (file)
@@ -103,6 +103,8 @@ protected:
        \r
        void                            ClickRevButton(CMenuButton *button,GitRev *rev, CEdit *edit);\r
 \r
+       void                            EnableInputControl(bool b=true);\r
+\r
        int                                     FillRevFromString(GitRev *rev, CString str)\r
        {\r
                GitRev gitrev;\r