From 6556b17ee2331cc33e4cdef7d1d57c719a925016 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Tue, 23 Jul 2024 12:31:50 +0200 Subject: [PATCH] Fix a typo; Make a function name & comment more accurate --- PowerEditor/bin/change.log | 2 +- PowerEditor/src/Notepad_plus.cpp | 2 +- PowerEditor/src/NppBigSwitch.cpp | 4 ++-- PowerEditor/src/ScintillaComponent/DocTabView.cpp | 2 +- PowerEditor/src/ScintillaComponent/DocTabView.h | 2 +- PowerEditor/src/WinControls/TabBar/TabBar.cpp | 2 +- PowerEditor/src/WinControls/TabBar/TabBar.h | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/PowerEditor/bin/change.log b/PowerEditor/bin/change.log index 13c5b40d0..d325e6f05 100644 --- a/PowerEditor/bin/change.log +++ b/PowerEditor/bin/change.log @@ -6,7 +6,7 @@ Notepad++ v8.6.9 bug-fixes & new enhancements: 4. Fix the regression where the Find dialog size is not remembered across sessions. 5. Fix the regression of content lost by using Encoding "Convert to..." commands. 6. Fix the regression of exception/crash on Windows Server Core 2022. - 7. Prevent DirectWrite from being enabled under Windows Sever. + 7. Prevent DirectWrite from being enabled under Windows Server. 8. Enhance the quality of Fluent toolbar icon sets for different DPI settings. 9. Improve the look & feel of tabbar close button in dark mode. 10. Improve the dark mode tab bar icon in the search results panel. diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 2e6adb421..d13c90a2b 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -6323,7 +6323,7 @@ void Notepad_plus::getCurrentOpenedFiles(Session & session, bool includUntitledD sessionFileInfo sfi(buf->getFullPathName(), langName, buf->getEncoding(), buf->getUserReadOnly(), buf->getPosition(editView), buf->getBackupFileName().c_str(), buf->getLastModifiedTimestamp(), buf->getMapPosition()); sfi._isMonitoring = buf->isMonitoringOn(); - sfi._individualTabColour = docTab[k]->getIndividualTabColour(static_cast(i)); + sfi._individualTabColour = docTab[k]->getIndividualTabColourId(static_cast(i)); sfi._isRTL = buf->isRTL(); _invisibleEditView.execute(SCI_SETDOCPOINTER, 0, buf->getDocument()); diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index 002fb0275..cb8c70335 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -2693,7 +2693,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa _isAttemptingCloseOnQuit = false; if (nppgui._rememberLastSession) - _lastRecentFileList.setLock(false); //only lock when the session is remembered + _lastRecentFileList.setLock(false); //only unlock when the session is remembered if (!saveProjectPanelsParams()) allClosed = false; //writeProjectPanelsSettings saveFileBrowserParam(); @@ -3122,7 +3122,7 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT message, WPARAM wParam, LPARAM lPa if ((tabIndex >= 0) && (tabIndex < static_cast(pDt->nbItem()))) { - colorId = pDt->getIndividualTabColour(tabIndex); + colorId = pDt->getIndividualTabColourId(tabIndex); } return colorId; diff --git a/PowerEditor/src/ScintillaComponent/DocTabView.cpp b/PowerEditor/src/ScintillaComponent/DocTabView.cpp index 2bd26d9ee..a6108d1cf 100644 --- a/PowerEditor/src/ScintillaComponent/DocTabView.cpp +++ b/PowerEditor/src/ScintillaComponent/DocTabView.cpp @@ -96,7 +96,7 @@ void DocTabView::setIndividualTabColour(BufferID bufferId, int colorId) bufferId->setDocColorId(colorId); } -int DocTabView::getIndividualTabColour(int tabIndex) +int DocTabView::getIndividualTabColourId(int tabIndex) { BufferID bufferId = getBufferByIndex(tabIndex); return bufferId->getDocColorId(); diff --git a/PowerEditor/src/ScintillaComponent/DocTabView.h b/PowerEditor/src/ScintillaComponent/DocTabView.h index 201ba4498..ffe35cc75 100644 --- a/PowerEditor/src/ScintillaComponent/DocTabView.h +++ b/PowerEditor/src/ScintillaComponent/DocTabView.h @@ -92,7 +92,7 @@ public : }; void setIndividualTabColour(BufferID bufferId, int colorId); - int getIndividualTabColour(int tabIndex) override; + int getIndividualTabColourId(int tabIndex) override; HIMAGELIST getImgLst(UINT index) { if (index >= _pIconListVector.size()) diff --git a/PowerEditor/src/WinControls/TabBar/TabBar.cpp b/PowerEditor/src/WinControls/TabBar/TabBar.cpp index c5afc5ae6..09c98a4b5 100644 --- a/PowerEditor/src/WinControls/TabBar/TabBar.cpp +++ b/PowerEditor/src/WinControls/TabBar/TabBar.cpp @@ -1250,7 +1250,7 @@ void TabBarPlus::drawItem(DRAWITEMSTRUCT *pDrawItemStruct, bool isDarkMode) } } - const int individualColourId = getIndividualTabColour(nTab); + const int individualColourId = getIndividualTabColourId(nTab); // draw highlights on tabs (top bar for active tab / darkened background for inactive tab) RECT barRect = rect; diff --git a/PowerEditor/src/WinControls/TabBar/TabBar.h b/PowerEditor/src/WinControls/TabBar/TabBar.h index eebe99126..5eaaf7027 100644 --- a/PowerEditor/src/WinControls/TabBar/TabBar.h +++ b/PowerEditor/src/WinControls/TabBar/TabBar.h @@ -223,7 +223,7 @@ public : } static void setColour(COLORREF colour2Set, tabColourIndex i, TabBarPlus* tbpObj); - virtual int getIndividualTabColour(int tabIndex) = 0; + virtual int getIndividualTabColourId(int tabIndex) = 0; void currentTabToStart(); void currentTabToEnd();