From cbaf5fda2959117a82ac07baa2590f381353724c Mon Sep 17 00:00:00 2001 From: donho Date: Wed, 14 Jan 2009 19:19:00 +0000 Subject: [PATCH] [NEW] Add NPPM_DOOPEN plugin message. git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@396 f5eea248-9336-0410-98b8-ebc06183d4e3 --- PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h | 7 +++++++ PowerEditor/src/Notepad_plus.cpp | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h index 1b7b5b2b7..5f67e1914 100644 --- a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h +++ b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h @@ -193,6 +193,9 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV #define NPPM_CHECKDOCSTATUS (NPPMSG + 53) // VOID NPPM_CHECKDOCSTATUS(BOOL, 0) + // check all opened documents status. + // If files are modified, then reloaod (with or without prompt, it depends on settings). + // if files are deleted, then prompt user to close the documents #define NPPM_ENABLECHECKDOCOPT (NPPMSG + 54) // VOID NPPM_ENABLECHECKDOCOPT(OPT, 0) @@ -322,6 +325,10 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV // You may need it after getting NPPN_READY notification // returned value : TRUE if this function call is successful and shorcut is enable, otherwise FALSE + #define NPPM_DOOPEN (NPPMSG + 77) + // BOOL NPPM_DOOPEN(0, const TCHAR *fullPathName2Open) + // fullPathName2Open indicates the full file path name to be opened. + // The return value is TRUE (1) if the operation is successful, otherwise FALSE (0). #define RUNCOMMAND_USER (WM_USER + 3000) #define NPPM_GETFULLCURRENTPATH (RUNCOMMAND_USER + FULL_CURRENT_PATH) diff --git a/PowerEditor/src/Notepad_plus.cpp b/PowerEditor/src/Notepad_plus.cpp index dfbfac81b..ea5ca4b99 100644 --- a/PowerEditor/src/Notepad_plus.cpp +++ b/PowerEditor/src/Notepad_plus.cpp @@ -7058,10 +7058,12 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa return TRUE; } + case NPPM_DOOPEN: case WM_DOOPEN: { BufferID id = doOpen((const TCHAR *)lParam); - if (id != BUFFER_INVALID) { + if (id != BUFFER_INVALID) + { return switchToFile(id); } }