From 86855be7900f4916bb6f482e4ce23818affdd656 Mon Sep 17 00:00:00 2001 From: donho Date: Sun, 14 Oct 2007 22:29:56 +0000 Subject: [PATCH] [RELEASE_44] v4.4 OR. Add NPPN_SHUTDOWN notification. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@53 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/bin/change.log | 23 ++++++++----------- .../MISC/PluginsManager/Notepad_plus_msgs.h | 6 +++++ PowerEditor/src/Notepad_plus.cpp | 8 +++++++ PowerEditor/src/Notepad_plus.h | 5 +--- PowerEditor/src/Notepad_plus.rc | 2 +- PowerEditor/src/ScitillaComponent/Printer.cpp | 2 +- PowerEditor/src/WinControls/Grid/BabyGrid.cpp | 14 ++++++++--- 7 files changed, 37 insertions(+), 23 deletions(-) diff --git a/PowerEditor/bin/change.log b/PowerEditor/bin/change.log index 5687419a..49d5e43b 100644 --- a/PowerEditor/bin/change.log +++ b/PowerEditor/bin/change.log @@ -1,17 +1,12 @@ -Notepad++ v4.3 fixed bugs and added features (from v4.2.2) : +Notepad++ v4.4 fixed bugs and added features (from v4.3) : + +1. Add auto-add extension feature in file save dialog. +2. Fix crash issue while file is deleted outside (answer NO to popup dialog to not keep) and the silence update option is on. +3. Add Session Restore with Sub-View Settings feature. +4. Fix the Notepad++ getting focus problem while find dialog is activated. +5. Fix unwanted selection after popup dialog (keep file) when the file opened is deleted. +6. Add NPPN_FILEBEFOREOPENED, NPPN_FILECLOSED, NPPN_FILESAVED, NPPN_FILEBEFORESAVE and NPPN_SHUTDOWN plugin notifications. -1. Fix the crash bug due to the corrupted configuration file (config.xml and session.xml). -2. Fix the crash bug while the shortcut command is absent in shortcut.xml. -3. Fix the file status auto-detection bug : a unwanted selection after a pop-up dialog. -4. Enhance Styler Configurator : the visual effect is updated immediately while the setting is changing. -5. Add Global override feature (in Styler Configurator). -6. Fix the bold/italic/underline refresh problem in Stylers Configurator for Scintilla component. -7. Add hide lines feature (Menu : View->Hide lines). -8. Add new capacity (optional setting in Preferences dialog : Backup/Auto-completion tab) to trigger Auto-Completion(Function Completion or Word completion) automatically . -9. The set languages in session are remembered now. -10. Fix the Move down current line bug. -11. Add the start up with no plugins feature (command line : notepad++ -noPlugins). -12. Fix the display file type bug on the status bar while switching between the files. Included plugins : @@ -19,7 +14,7 @@ Included plugins : 2. Function list v1.2 3. ConvertExt v1.1 4. NppExec v0.2 beta 4 -5. Spell checker v1.1 +5. Spell checker v1.2 6. Quick text v0.02 7. Light Explorer v1.4 8. Hex editor v0.84 diff --git a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h index 456833f5..5d6f6be0 100644 --- a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h +++ b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h @@ -231,4 +231,10 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV //scnNotification->nmhdr.hwndFrom = hwndNpp; //scnNotification->nmhdr.idFrom = 0; + + #define NPPN_SHOUTDOWN (NPPN_FIRST + 9) // To notify plugins that Notepad++ is about to be shutdowned. + //scnNotification->nmhdr.code = NPPN_SHOUTDOWN; + //scnNotification->nmhdr.hwndFrom = hwndNpp; + //scnNotification->nmhdr.idFrom = 0; + #endif //NOTEPAD_PLUS_MSGS_H diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index 042725c4..25aa67f2 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -3985,6 +3985,8 @@ bool Notepad_plus::fileClose() { _pDocTab->closeCurrentDoc(); hideCurrentView(); + scnN.nmhdr.code = NPPN_FILECLOSED; + _pluginsManager.notify(&scnN); return true; } @@ -6636,6 +6638,12 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa case WM_QUERYENDSESSION: case WM_CLOSE: { + SCNotification scnN; + scnN.nmhdr.code = NPPN_SHOUTDOWN; + scnN.nmhdr.hwndFrom = _hSelf; + scnN.nmhdr.idFrom = 0; + _pluginsManager.notify(&scnN); + if (_isfullScreen) fullScreenToggle(); diff --git a/PowerEditor/src/Notepad_plus.h b/PowerEditor/src/Notepad_plus.h index d099d97e..221d9dfc 100644 --- a/PowerEditor/src/Notepad_plus.h +++ b/PowerEditor/src/Notepad_plus.h @@ -291,11 +291,8 @@ public: vPluginDockInfo.push_back(nppGUI._dockingData._pluginDockInfo[i]); } } -//printInt(5); - //delete [] floatContArray; -//printInt(6); + nppGUI._dockingData._pluginDockInfo = vPluginDockInfo; -//printInt(7); nppGUI._dockingData._flaotingWindowInfo = vFloatingWindowInfo; }; diff --git a/PowerEditor/src/Notepad_plus.rc b/PowerEditor/src/Notepad_plus.rc index eb92b0f9..05cbbfdd 100644 --- a/PowerEditor/src/Notepad_plus.rc +++ b/PowerEditor/src/Notepad_plus.rc @@ -21,7 +21,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #include "resource.h" #include "menuCmdID.h" -#define NOTEPAD_PLUS_VERSION "Notepad++ v4.3" +#define NOTEPAD_PLUS_VERSION "Notepad++ v4.4" #define VERSION_VALUE "4.4\0" #define VERSION_DIGITALVALUE 4, 4, 0, 0 diff --git a/PowerEditor/src/ScitillaComponent/Printer.cpp b/PowerEditor/src/ScitillaComponent/Printer.cpp index 5431f0f1..425bc0a3 100644 --- a/PowerEditor/src/ScitillaComponent/Printer.cpp +++ b/PowerEditor/src/ScitillaComponent/Printer.cpp @@ -478,7 +478,7 @@ size_t Printer::doPrint(bool justDoIt) if ((_pdlg.Flags & PD_PAGENUMS) && (pageNum > _pdlg.nToPage)) break; } - + //char toto[10]; //::MessageBox(NULL, itoa(pageNum, toto, 10), "page total", MB_OK); if (!nppGUI._printSettings._printLineNumber) diff --git a/PowerEditor/src/WinControls/Grid/BabyGrid.cpp b/PowerEditor/src/WinControls/Grid/BabyGrid.cpp index 9d87dd0b..3299d72f 100644 --- a/PowerEditor/src/WinControls/Grid/BabyGrid.cpp +++ b/PowerEditor/src/WinControls/Grid/BabyGrid.cpp @@ -3051,9 +3051,17 @@ LRESULT CALLBACK GridProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) if(CountGrids()==1) { - hfontbody=CreateFont(16,0,0, 0,100,FALSE,FALSE,FALSE,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,PROOF_QUALITY,VARIABLE_PITCH|FF_MODERN ,"MS Shell Dlg"); - hfontheader=CreateFont(18,0,0, 0,FW_HEAVY,FALSE,FALSE,FALSE,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,PROOF_QUALITY,VARIABLE_PITCH|FF_MODERN ,"MS Shell Dlg"); - hfonttitle=CreateFont(20,0,0, 0,FW_HEAVY,FALSE,FALSE,FALSE,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,PROOF_QUALITY,VARIABLE_PITCH|FF_MODERN ,"MS Shell Dlg"); + hfontbody=CreateFont(16,0,0, 0, + 100, + FALSE, + FALSE,FALSE,ANSI_CHARSET, + OUT_DEFAULT_PRECIS, + CLIP_DEFAULT_PRECIS, + 0, + 0 , + "MS Shell Dlg"); + hfontheader=CreateFont(18,0,0, 0,FW_HEAVY,FALSE,FALSE,FALSE,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,0,0,"MS Shell Dlg"); + hfonttitle=CreateFont(20,0,0, 0,FW_HEAVY,FALSE,FALSE,FALSE,ANSI_CHARSET,OUT_DEFAULT_PRECIS,CLIP_DEFAULT_PRECIS,0,0,"MS Shell Dlg"); }