From aa7461f06242d77b67d82ccb499dfbdcba747246 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Mon, 23 Feb 2015 17:42:38 +0000 Subject: [PATCH] [ENHANCEMENT) (Author: Pavel Nedev) Enhance displaying of searching files on the progress bar while finding files. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@1347 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 8 ++++++++ PowerEditor/src/ScitillaComponent/FindReplaceDlg.h | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index c215b0218..74575469f 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -1496,6 +1496,10 @@ bool Notepad_plus::replaceInFiles() updateOnCount += filesPerPercent; progress.SetPercent((i * 100) / filesCount, fileNames.at(i).c_str()); } + else + { + progress.SetInfo(fileNames.at(i).c_str()); + } } progress.Close(); @@ -1578,6 +1582,10 @@ bool Notepad_plus::findInFiles() updateOnCount += filesPerPercent; progress.SetPercent((i * 100) / filesCount, fileNames.at(i).c_str()); } + else + { + progress.SetInfo(fileNames.at(i).c_str()); + } } progress.Close(); diff --git a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h index 0392e879c..2c51f7570 100644 --- a/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h +++ b/PowerEditor/src/ScitillaComponent/FindReplaceDlg.h @@ -413,6 +413,11 @@ public: HWND Open(HWND hOwner = NULL, const TCHAR* header = NULL); bool IsCancelled() const; void SetPercent(unsigned percent, const TCHAR *fileName) const; + void SetInfo(const TCHAR *info) const { + if (_hwnd) + ::SendMessage(_hPText, WM_SETTEXT, 0, (LPARAM)info); + }; + void Close(); private: