[NEW] Add NPPM_SAVECURRENTFILEAS message.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@634 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
9715f095f1
commit
1953eea074
|
@ -122,7 +122,7 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
|
|||
//BOOL NPPM_SWITCHTOFILE(0, TCHAR *filePathName2switch)
|
||||
|
||||
#define NPPM_SAVECURRENTFILE (NPPMSG + 38)
|
||||
//BOOL WM_SWITCHTOFILE(0, 0)
|
||||
//BOOL NPPM_SAVECURRENTFILE(0, 0)
|
||||
|
||||
#define NPPM_SAVEALLFILES (NPPMSG + 39)
|
||||
//BOOL NPPM_SAVEALLFILES(0, 0)
|
||||
|
@ -308,6 +308,9 @@ enum winVer{WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, WV
|
|||
// 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 NPPM_SAVECURRENTFILEAS (NPPMSG + 78)
|
||||
// BOOL NPPM_SAVECURRENTFILEAS (BOOL asCopy, const TCHAR* filename)
|
||||
|
||||
#define RUNCOMMAND_USER (WM_USER + 3000)
|
||||
#define NPPM_GETFULLCURRENTPATH (RUNCOMMAND_USER + FULL_CURRENT_PATH)
|
||||
#define NPPM_GETCURRENTDIRECTORY (RUNCOMMAND_USER + CURRENT_DIRECTORY)
|
||||
|
|
|
@ -356,6 +356,16 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
|||
}
|
||||
break;
|
||||
|
||||
case NPPM_SAVECURRENTFILEAS:
|
||||
{
|
||||
BufferID currentBufferID = _pEditView->getCurrentBufferID();
|
||||
bool asCopy = wParam == TRUE;
|
||||
const TCHAR *filename = (const TCHAR *)lParam;
|
||||
if (!filename) return FALSE;
|
||||
return doSave(currentBufferID, filename, asCopy);
|
||||
}
|
||||
break;
|
||||
|
||||
case NPPM_SAVEALLFILES:
|
||||
{
|
||||
return fileSaveAll();
|
||||
|
|
Loading…
Reference in New Issue