From cd82b3fa22d147feab2032cbdc43a4bda81658a5 Mon Sep 17 00:00:00 2001 From: Sven Strickroth Date: Tue, 29 Jul 2014 03:18:01 +0200 Subject: [PATCH] Correctly show progress label text Signed-off-by: Sven Strickroth --- src/TortoiseProc/GitProgressList.cpp | 6 ++++++ src/TortoiseProc/GitProgressList.h | 2 ++ src/TortoiseProc/ProgressCommands/RemoteProgressCommand.h | 4 +--- 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/TortoiseProc/GitProgressList.cpp b/src/TortoiseProc/GitProgressList.cpp index 10bcaa9bd..39f8973c1 100644 --- a/src/TortoiseProc/GitProgressList.cpp +++ b/src/TortoiseProc/GitProgressList.cpp @@ -1132,3 +1132,9 @@ void CGitProgressList::ShowProgressBar() m_pProgControl->SetRange32(0, 1); } } + +void CGitProgressList::SetProgressLabelText(const CString& str) +{ + if (m_pProgressLabelCtrl) + m_pProgressLabelCtrl->SetWindowText(str); +} diff --git a/src/TortoiseProc/GitProgressList.h b/src/TortoiseProc/GitProgressList.h index 04f9b1df4..87f960ffb 100644 --- a/src/TortoiseProc/GitProgressList.h +++ b/src/TortoiseProc/GitProgressList.h @@ -206,6 +206,8 @@ public: void AddNotify(NotificationData* data, CColors::Colors color = CColors::COLOR_END); BOOL UpdateProgress(const git_transfer_progress* stat); + void SetProgressLabelText(const CString& str); + protected: DECLARE_MESSAGE_MAP() diff --git a/src/TortoiseProc/ProgressCommands/RemoteProgressCommand.h b/src/TortoiseProc/ProgressCommands/RemoteProgressCommand.h index e60731ad6..9eecc3e24 100644 --- a/src/TortoiseProc/ProgressCommands/RemoteProgressCommand.h +++ b/src/TortoiseProc/ProgressCommands/RemoteProgressCommand.h @@ -30,9 +30,7 @@ protected: static int RemoteProgressCallback(const char* str, int len, void* data) { - CString progText; - progText = CUnicodeUtils::GetUnicode(CStringA(str, len)); - ((CGitProgressList*)data)->SetDlgItemText(IDC_PROGRESSLABEL, progText); + ((CGitProgressList*)data)->SetProgressLabelText(CUnicodeUtils::GetUnicode(CStringA(str, len))); return 0; } static int RemoteCompletionCallback(git_remote_completion_type /*type*/, void* /*data*/) -- 2.11.4.GIT