Browse Source

[REALEASE_46] New release v4.6 - add the restriction to launch auto-updater under winnt/95/98/me.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository@75 f5eea248-9336-0410-98b8-ebc06183d4e3
pull/343/head^2
donho 17 years ago
parent
commit
c5b2193400
  1. 4
      PowerEditor/src/Notepad_plus.cpp
  2. 1
      PowerEditor/src/Notepad_plus.h
  3. 5
      PowerEditor/src/winmain.cpp

4
PowerEditor/src/Notepad_plus.cpp

@ -63,6 +63,8 @@ Notepad_plus::Notepad_plus(): Window(), _mainWindowStatus(0), _pDocTab(NULL), _p
_isScintillaKeyModified(false), _isPluginCmdScModified(false), _isRTL(false), \
_linkTriggered(true), _isDocModifing(false), _isHotspotDblClicked(false)
{
_winVersion = getWindowsVersion();
TiXmlDocument *nativeLangDocRoot = (NppParameters::getInstance())->getNativeLang();
if (nativeLangDocRoot)
{
@ -158,8 +160,6 @@ void Notepad_plus::init(HINSTANCE hInst, HWND parent, const char *cmdLine, CmdLi
{
Window::init(hInst, parent);
_winVersion = getWindowsVersion();
WNDCLASS nppClass;
nppClass.style = CS_BYTEALIGNWINDOW | CS_DBLCLKS;//CS_HREDRAW | CS_VREDRAW;

1
PowerEditor/src/Notepad_plus.h

@ -345,6 +345,7 @@ public:
loadSession(lastSession);
};
bool loadSession(Session & session);
winVer getWinVersion() const {return _winVersion;};
private:
static const char _className[32];

5
PowerEditor/src/winmain.cpp

@ -278,8 +278,11 @@ int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE, LPSTR lpszCmdLine, int nCmdSh
bool isUpExist = nppGui._doesExistUpdater = (::PathFileExists(updaterFullPath.c_str()) == TRUE);
bool doUpdate = !nppGui._neverUpdate;
bool winSupported = notepad_plus_plus.getWinVersion() >= WV_W2K;
if (!winSupported)
nppGui._doesExistUpdater = false;
if (TheFirstOne && isUpExist && doUpdate)
if (TheFirstOne && isUpExist && doUpdate && winSupported)
{
Process updater(updaterFullPath.c_str(), version.c_str(), updaterDir.c_str());
updater.run();

Loading…
Cancel
Save