From 4da58668b9f6e4d3ba11c62ca79ad701d9a53717 Mon Sep 17 00:00:00 2001 From: KnIfER <1445952621@qq.com> Date: Wed, 14 Apr 2021 00:53:10 +0900 Subject: [PATCH] final adjustments before first release --- .gitignore | 1 + PowerEditor/src/Notepad_plus.h | 2 ++ PowerEditor/src/Notepad_plus_Window.cpp | 5 +++++ PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp | 4 +--- .../src/WinControls/DockingWnd/DockingManager.cpp | 4 ++++ .../src/WinControls/DocumentMap/documentMap.cpp | 2 +- .../src/WinControls/FileBrowser/fileBrowser.cpp | 2 +- .../src/WinControls/FunctionList/functionListPanel.cpp | 2 +- .../src/WinControls/ProjectPanel/ProjectPanel.cpp | 10 ++++++++-- .../src/WinControls/ProjectPanel/ProjectPanel.h | 1 + plugins/LocationNavigate | 2 +- plugins/MultiClipboard | 2 +- 12 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.gitignore b/.gitignore index 5351907cd..de46f3708 100644 --- a/.gitignore +++ b/.gitignore @@ -167,3 +167,4 @@ PowerEditor/src/MISC/md5/RCa06792 *.opendb plugins/plugins_dev.props plugins/BrowserWidget.props +NppSaveAsAdmin diff --git a/PowerEditor/src/Notepad_plus.h b/PowerEditor/src/Notepad_plus.h index e0c873156..ee164a7f2 100644 --- a/PowerEditor/src/Notepad_plus.h +++ b/PowerEditor/src/Notepad_plus.h @@ -59,6 +59,8 @@ #include +#include "InsituDebug.h" + #define MENU 0x01 #define TOOLBAR 0x02 diff --git a/PowerEditor/src/Notepad_plus_Window.cpp b/PowerEditor/src/Notepad_plus_Window.cpp index 63442fb71..e9a55bb86 100644 --- a/PowerEditor/src/Notepad_plus_Window.cpp +++ b/PowerEditor/src/Notepad_plus_Window.cpp @@ -357,6 +357,11 @@ void Notepad_plus_Window::init(HINSTANCE hInst, HWND parent, const TCHAR *cmdLin if (nppParams.doPrintAndExit()) ::SendMessage(_hSelf, NPPM_INTERNAL_PRNTANDQUIT, 0, 0); + if (TabBarPlus::isMultiLine()) + { + ::SendMessage(getHSelf(), WM_SIZE, 0, 0); + } + bSupressPrompt=0; } diff --git a/PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp b/PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp index 00cfab869..1b203530f 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp +++ b/PowerEditor/src/WinControls/DockingWnd/DockingCont.cpp @@ -137,9 +137,7 @@ void DockingCont::putDocker(DockingCont* item) { } AllDockers[AllDockerLen++]=item; - TCHAR buffer[100]={0}; - wsprintf(buffer,TEXT("dockercc=%d"), AllDockerLen); - SetWindowText(StatusBarHWND, buffer); + //LogIs("dockercc=%d", AllDockerLen); } void DockingCont::removeDocker(DockingCont* item){ diff --git a/PowerEditor/src/WinControls/DockingWnd/DockingManager.cpp b/PowerEditor/src/WinControls/DockingWnd/DockingManager.cpp index ec0098f0e..6eea73a4c 100644 --- a/PowerEditor/src/WinControls/DockingWnd/DockingManager.cpp +++ b/PowerEditor/src/WinControls/DockingWnd/DockingManager.cpp @@ -763,6 +763,10 @@ LRESULT DockingManager::SendNotify(HWND hWnd, UINT message) void DockingManager::setDockedContSize(int iCont, int iSize) { + if (iSize==0) + { + iSize = 10; + } if ((iCont == CONT_TOP) || (iCont == CONT_BOTTOM)) _dockData.rcRegion[iCont].bottom = iSize; else if ((iCont == CONT_LEFT) || (iCont == CONT_RIGHT)) diff --git a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp index 5b27d9008..83bd1ee30 100644 --- a/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp +++ b/PowerEditor/src/WinControls/DocumentMap/documentMap.cpp @@ -394,7 +394,7 @@ INT_PTR CALLBACK DocumentMap::run_dlgProc(UINT message, WPARAM wParam, LPARAM lP { case DMN_CLOSE: { - ::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_DOC_MAP, 0); + setClosed(1); return TRUE; } diff --git a/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp b/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp index 8e83abe2a..4a35ca49b 100644 --- a/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp +++ b/PowerEditor/src/WinControls/FileBrowser/fileBrowser.cpp @@ -568,7 +568,7 @@ void FileBrowser::notified(LPNMHDR notification) { if (notification->code == DMN_CLOSE) { - ::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_FILEBROWSER, 0); + setClosed(1); } else if (notification->code == TTN_GETDISPINFO) { diff --git a/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp b/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp index ae49e448a..75593870b 100644 --- a/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp +++ b/PowerEditor/src/WinControls/FunctionList/functionListPanel.cpp @@ -580,7 +580,7 @@ void FunctionListPanel::notified(LPNMHDR notification) } else if (notification->code == DMN_CLOSE) { - ::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_FUNC_LIST, 0); + setClosed(1); } } diff --git a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp index 5d69a119f..45700624c 100644 --- a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp +++ b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.cpp @@ -653,8 +653,7 @@ void ProjectPanel::notified(LPNMHDR notification) { if (notification->code == DMN_CLOSE) { - ::SendMessage(_hParent, WM_COMMAND, IDM_VIEW_PROJECT_PANEL_1 + _panelID, 0); - SetWindowLongPtr (getHSelf(), DWLP_MSGRESULT, _isClosed ? 0 : 1); + setClosed(1); } else if ((notification->hwndFrom == _treeView.getHSelf())) { @@ -814,6 +813,13 @@ void ProjectPanel::notified(LPNMHDR notification) } } +void ProjectPanel::setClosed(bool toClose) +{ + DockingDlgInterface::setClosed(toClose); + ::SendMessage(getHParent(), NPPM_SETMENUITEMCHECK, IDM_VIEW_PROJECT_PANEL_1 + _panelID, !toClose); + SetWindowLongPtr (getHSelf(), DWLP_MSGRESULT, _isClosed ? 0 : 1); +} + void ProjectPanel::setWorkSpaceDirty(bool isDirty) { _isDirty = isDirty; diff --git a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.h b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.h index 2200375b5..dcbce0078 100644 --- a/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.h +++ b/PowerEditor/src/WinControls/ProjectPanel/ProjectPanel.h @@ -115,6 +115,7 @@ class ProjectPanel : public DockingDlgInterface { }; bool enumWorkSpaceFiles(HTREEITEM tvFrom, const std::vector & patterns, std::vector & fileNames); + void setClosed(bool close); protected: TreeView _treeView; HIMAGELIST _hImaLst = nullptr; diff --git a/plugins/LocationNavigate b/plugins/LocationNavigate index e23adc2c0..ed8c5ba13 160000 --- a/plugins/LocationNavigate +++ b/plugins/LocationNavigate @@ -1 +1 @@ -Subproject commit e23adc2c019948dc913a43e81619f6ddd2176e53 +Subproject commit ed8c5ba132d24589adf77b907fe5cc5885c54e93 diff --git a/plugins/MultiClipboard b/plugins/MultiClipboard index 8706d21a9..1d81264a4 160000 --- a/plugins/MultiClipboard +++ b/plugins/MultiClipboard @@ -1 +1 @@ -Subproject commit 8706d21a9683a2b6e007b093cea301e0b5950c65 +Subproject commit 1d81264a48c61f7337678688e47cdef04bfba1a0