OSDN Git Service

Show current work at ProgressDlg
authorFrank Li <lznuaa@gmail.com>
Thu, 29 Oct 2009 14:12:25 +0000 (22:12 +0800)
committerFrank Li <lznuaa@gmail.com>
Thu, 29 Oct 2009 14:12:25 +0000 (22:12 +0800)
Signed-off-by: Frank Li <lznuaa@gmail.com>
src/TortoiseProc/ProgressDlg.cpp
src/TortoiseProc/ProgressDlg.h

index f7ab402..44a0116 100644 (file)
@@ -320,9 +320,9 @@ void CProgressDlg::ParserCmdOutput(TCHAR ch)
 \r
 void CProgressDlg::ParserCmdOutput(TCHAR ch)\r
 {\r
-       ParserCmdOutput(this->m_Log,this->m_Progress,this->m_LogText,ch);\r
+       ParserCmdOutput(this->m_Log,this->m_Progress,this->m_LogText,ch,&this->m_CurrentWork);\r
 }\r
-void CProgressDlg::ParserCmdOutput(CRichEditCtrl &log,CProgressCtrl &progressctrl,CString &oneline, TCHAR ch)\r
+void CProgressDlg::ParserCmdOutput(CRichEditCtrl &log,CProgressCtrl &progressctrl,CString &oneline, TCHAR ch, CWnd *CurrentWork)\r
 {\r
        //TRACE(_T("%c"),ch);\r
        TRACE(_T("%c"),ch);\r
@@ -359,7 +359,9 @@ void CProgressDlg::ParserCmdOutput(CRichEditCtrl &log,CProgressCtrl &progressctr
                int s2=oneline.Find(_T('%'));\r
                if(s1>0 && s2>0)\r
                {\r
-                       //this->m_CurrentWork.SetWindowTextW(m_LogText.Left(s1));\r
+                       if(CurrentWork)\r
+                               CurrentWork->SetWindowTextW(oneline.Left(s1));\r
+\r
                        int pos=FindPercentage(oneline);\r
                        TRACE(_T("Pos %d\r\n"),pos);\r
                        if(pos>0)\r
index 7c4f1ab..8f4ff56 100644 (file)
@@ -65,7 +65,7 @@ public:
 \r
        //Share with Sync Dailog\r
        static int      FindPercentage(CString &log);\r
-       static void     ParserCmdOutput(CRichEditCtrl &log,CProgressCtrl &progressctrl,CString &oneline, TCHAR ch);\r
+       static void     ParserCmdOutput(CRichEditCtrl &log,CProgressCtrl &progressctrl,CString &oneline, TCHAR ch,CWnd *CurrentWork=NULL);\r
 \r
        static UINT  RunCmdList(CWnd *pWnd,std::vector<CString> &cmdlist,bool bShowCommand,CString *pfilename,bool *bAbort,std::vector<TCHAR> *pdata=NULL);\r
 \r