[NEW_FEATURE] Add new plugin notification message NPPN_FILEJUSTOPENED.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@12 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
donho 2007-08-22 23:10:45 +00:00
parent d2aecf4d18
commit 894c4dcffd
2 changed files with 12 additions and 1 deletions

View File

@ -206,7 +206,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.hwndFrom = hwndNpp;
//scnNotification->nmhdr.idFrom = 0; //scnNotification->nmhdr.idFrom = 0;
#define NPPN_FILEJUSTOPENED (NPPN_FIRST + 4) // To notify plugins that the current file is just opened
//scnNotification->nmhdr.code = NPPN_FILEJUSTOPENED;
//scnNotification->nmhdr.hwndFrom = hwndNpp;
//scnNotification->nmhdr.idFrom = 0;

View File

@ -472,6 +472,14 @@ bool Notepad_plus::doOpen(const char *fileName, bool isReadOnly)
_linkTriggered = true; _linkTriggered = true;
_isDocModifing = false; _isDocModifing = false;
setWorkingDir(longFileName); setWorkingDir(longFileName);
// Notify plugins that current file is just opened
SCNotification scnN;
scnN.nmhdr.code = NPPN_FILEJUSTOPENED;
scnN.nmhdr.hwndFrom = _hSelf;
scnN.nmhdr.idFrom = 0;
_pluginsManager.notify(&scnN);
return true; return true;
} }
else else