From 6c4f9a64d2be9343bc31ccf775a7391f7ec2d556 Mon Sep 17 00:00:00 2001 From: Don Ho Date: Sat, 7 May 2016 23:12:27 +0200 Subject: [PATCH] Add new API to disable auto-updater New API : NPPM_DISABLEAUTOUPDATE --- PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h | 3 +++ PowerEditor/src/NppBigSwitch.cpp | 7 +++++++ 2 files changed, 10 insertions(+) diff --git a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h index 54e434a8..7abcfdd3 100644 --- a/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h +++ b/PowerEditor/src/MISC/PluginsManager/Notepad_plus_msgs.h @@ -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) // VOID NPPM_SAVEFILE(0, const TCHAR *fileNameToSave) + #define NPPM_DISABLEAUTOUPDATE (NPPMSG + 95) + // VOID NPPM_DISABLEAUTOUPDATE(0, 0) + #define RUNCOMMAND_USER (WM_USER + 3000) #define NPPM_GETFULLCURRENTPATH (RUNCOMMAND_USER + FULL_CURRENT_PATH) #define NPPM_GETCURRENTDIRECTORY (RUNCOMMAND_USER + CURRENT_DIRECTORY) diff --git a/PowerEditor/src/NppBigSwitch.cpp b/PowerEditor/src/NppBigSwitch.cpp index 3eb204cc..53932c61 100644 --- a/PowerEditor/src/NppBigSwitch.cpp +++ b/PowerEditor/src/NppBigSwitch.cpp @@ -464,6 +464,13 @@ LRESULT Notepad_plus::process(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa return TRUE; } + case NPPM_DISABLEAUTOUPDATE: + { + NppGUI & nppGUI = (NppGUI &)pNppParam->getNppGUI(); + nppGUI._autoUpdateOpt._doAutoUpdate = false; + return TRUE; + } + case WM_SIZE: { RECT rc;