From 186617e604c530b782d83905a8cb5d025a120751 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Fri, 30 Dec 2011 07:28:24 +0100 Subject: [PATCH] improve look&feel of buttons on apply patches dialog Signed-off-by: Sven Strickroth --- src/TortoiseProc/ImportPatchDlg.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/TortoiseProc/ImportPatchDlg.cpp b/src/TortoiseProc/ImportPatchDlg.cpp index 048e5082f..0fa6c6b11 100644 --- a/src/TortoiseProc/ImportPatchDlg.cpp +++ b/src/TortoiseProc/ImportPatchDlg.cpp @@ -349,7 +349,7 @@ UINT CImportPatchDlg::PatchThread() path.SetFromWin(g_Git.m_CurrentDir); int i=0; - + UpdateOkCancelText(); for(i=m_CurrentItem;im_bThreadRunning && !IsFinish()) + { + this->GetDlgItem(IDOK)->EnableWindow(FALSE); + this->GetDlgItem(IDCANCEL)->SetWindowText(_T("A&bort")); + } + else if (!IsFinish()) { - this->GetDlgItem(IDOK)->SetWindowText(_T("&Apply")); + this->GetDlgItem(IDOK)->EnableWindow(TRUE); } else { + this->GetDlgItem(IDCANCEL)->EnableWindow(FALSE); this->GetDlgItem(IDOK)->SetWindowText(_T("&OK")); } - - if(this->m_bThreadRunning) - this->GetDlgItem(IDCANCEL)->SetWindowText(_T("A&bort")); - else - this->GetDlgItem(IDCANCEL)->SetWindowText(_T("&Cancel")); - } void CImportPatchDlg::OnBnClickedCancel() { -- 2.11.4.GIT