From 46c32860774f65718b9cafa842c146f4fcf2bfeb Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 21 Aug 2010 16:24:57 +0000 Subject: [PATCH] [BUG_FIXED] Remove selected character count from status bar due to the performance issue. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@652 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/Notepad_plus.cpp | 14 +++++++------- PowerEditor/src/Notepad_plus.h | 2 +- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 66dd2484..89e944cb 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -284,9 +284,9 @@ LRESULT Notepad_plus::init(HWND hwnd) bool willBeShown = nppGUI._statusBarShow; _statusBar.init(_pPublicInterface->getHinst(), hwnd, 6); _statusBar.setPartWidth(STATUSBAR_DOC_SIZE, 170); - _statusBar.setPartWidth(STATUSBAR_CUR_POS, 380); - _statusBar.setPartWidth(STATUSBAR_EOF_FORMAT, 80); - _statusBar.setPartWidth(STATUSBAR_UNICODE_TYPE, 100); + _statusBar.setPartWidth(STATUSBAR_CUR_POS, 300); + _statusBar.setPartWidth(STATUSBAR_EOF_FORMAT, 100); + _statusBar.setPartWidth(STATUSBAR_UNICODE_TYPE, 120); _statusBar.setPartWidth(STATUSBAR_TYPING_MODE, 30); _statusBar.display(willBeShown); @@ -2265,7 +2265,7 @@ void Notepad_plus::activateDoc(int pos) static const char utflen[] = {1,1,2,3}; - +/* size_t Notepad_plus::getSelectedCharNumber(UniMode u) { size_t result = 0; @@ -2310,7 +2310,7 @@ size_t Notepad_plus::getSelectedCharNumber(UniMode u) } return result; } - +*/ #ifdef _OPENMP #include @@ -2418,10 +2418,10 @@ void Notepad_plus::updateStatusBar() int areas = getSelectedAreas(); int sizeofChar = (isFormatUnicode(u)) ? 2 : 1; - wsprintf(strLnCol, TEXT("Ln : %d Col : %d Sel : %d (%d bytes) in %d ranges"),\ + wsprintf(strLnCol, TEXT("Ln : %d Col : %d Sel : %d in %d ranges"),\ (_pEditView->getCurrentLineNumber() + 1), \ (_pEditView->getCurrentColumnNumber() + 1),\ - getSelectedCharNumber(u), getSelectedBytes() * sizeofChar,\ + getSelectedBytes() * sizeofChar,\ areas); _statusBar.setText(strLnCol, STATUSBAR_CUR_POS); diff --git a/PowerEditor/src/Notepad_plus.h b/PowerEditor/src/Notepad_plus.h index 1b9b3681..307504c7 100644 --- a/PowerEditor/src/Notepad_plus.h +++ b/PowerEditor/src/Notepad_plus.h @@ -540,7 +540,7 @@ private: void activateDoc(int pos); void updateStatusBar(); - size_t getSelectedCharNumber(UniMode); + //size_t getSelectedCharNumber(UniMode); size_t getCurrentDocCharCount(size_t numLines, UniMode u); int getSelectedAreas(); int _numSel;