1) JamesAC / spx change to Windows Messages / Dexpot support, with fix for copy / paste error in previous commit.

2) Change to version checking:
* CheckVersion= setting depreciated.  Removed from "About" dialog and automatically ignored and removed from Rainmeter.ini at Rainmeter start.
* New DisableVersionCheck= (1/0) setting added, which now changes the default from "don't check version" to "do check version" unless this is set to "1"
This commit is contained in:
jsmorley
2010-06-21 16:00:19 +00:00
parent b7ef7417b6
commit 8785516c09
9 changed files with 57 additions and 35 deletions

View File

@ -24,9 +24,11 @@
#include <Wininet.h>
#include <process.h>
extern CRainmeter* Rainmeter;
void CheckVersion(void* dummy)
{
int version = 0;
double version = 0.0;
HINTERNET hRootHandle = InternetOpen(L"Rainmeter",
INTERNET_OPEN_TYPE_PRECONFIG,
@ -63,22 +65,21 @@ void CheckVersion(void* dummy)
version += atoi(verMinor1.c_str()) * 1000;
version += atoi(verMinor2.c_str());
}
else
{
version += atoi(verMinor.c_str()) * 1000;
}
}
if (version > RAINMETER_VERSION)
{
if (IDYES == MessageBox(NULL, L"A new version of Rainmeter is available.\nDo you want to open the web page now?", APPNAME, MB_YESNO | MB_ICONQUESTION))
{
LSExecute(NULL, L"http://code.google.com/p/rainmeter/", SW_SHOWNORMAL);
}
Rainmeter->SetNewVersion(TRUE);
}
else
{
Rainmeter->SetNewVersion(FALSE);
DebugLog(L"CheckUpdate: No new version available.");
}
}