Add new API to disable auto-updater

New API : NPPM_DISABLEAUTOUPDATE
This commit is contained in:
Don Ho 2016-05-07 23:12:27 +02:00
parent 2ff03fe250
commit 6c4f9a64d2
2 changed files with 10 additions and 0 deletions

View File

@ -416,6 +416,9 @@ enum winVer{ WV_UNKNOWN, WV_WIN32S, WV_95, WV_98, WV_ME, WV_NT, WV_W2K, WV_XP, W
#define NPPM_SAVEFILE (NPPMSG + 94) #define NPPM_SAVEFILE (NPPMSG + 94)
// VOID NPPM_SAVEFILE(0, const TCHAR *fileNameToSave) // VOID NPPM_SAVEFILE(0, const TCHAR *fileNameToSave)
#define NPPM_DISABLEAUTOUPDATE (NPPMSG + 95)
// VOID NPPM_DISABLEAUTOUPDATE(0, 0)
#define RUNCOMMAND_USER (WM_USER + 3000) #define RUNCOMMAND_USER (WM_USER + 3000)
#define NPPM_GETFULLCURRENTPATH (RUNCOMMAND_USER + FULL_CURRENT_PATH) #define NPPM_GETFULLCURRENTPATH (RUNCOMMAND_USER + FULL_CURRENT_PATH)
#define NPPM_GETCURRENTDIRECTORY (RUNCOMMAND_USER + CURRENT_DIRECTORY) #define NPPM_GETCURRENTDIRECTORY (RUNCOMMAND_USER + CURRENT_DIRECTORY)

View File

@ -464,6 +464,13 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
return TRUE; return TRUE;
} }
case NPPM_DISABLEAUTOUPDATE:
{
NppGUI & nppGUI = (NppGUI &)pNppParam->getNppGUI();
nppGUI._autoUpdateOpt._doAutoUpdate = false;
return TRUE;
}
case WM_SIZE: case WM_SIZE:
{ {
RECT rc; RECT rc;