diff options
author | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2012-05-08 09:16:28 +0000 |
---|---|---|
committer | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2012-05-08 09:16:28 +0000 |
commit | 6d84c2d0b9af7eb020ac5e4fd5553efd91b63e95 (patch) | |
tree | 1e66a955cb4de6ea7a7541d6fac69c4b742ca907 /PackUpdater/Src/Events.cpp | |
parent | 9aaad18e0849c2bf92b8d4ac19c5e180b8c545ba (diff) |
PackUpdater:
added checking schedule (Unsane patch)
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@298 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'PackUpdater/Src/Events.cpp')
-rw-r--r-- | PackUpdater/Src/Events.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/PackUpdater/Src/Events.cpp b/PackUpdater/Src/Events.cpp index 1967b07..3993fbb 100644 --- a/PackUpdater/Src/Events.cpp +++ b/PackUpdater/Src/Events.cpp @@ -19,6 +19,7 @@ Boston, MA 02111-1307, USA. #include "common.h"
+HANDLE Timer;
BOOL Silent;
int ModulesLoaded(WPARAM wParam, LPARAM lParam)
@@ -36,7 +37,12 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) hkd.lParam = FALSE;
CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
- DoCheck(AutoUpdate, (int)CheckThread);
+ if(AllowUpdateOnStartup())
+ DoCheck(UpdateOnStartup, (int)CheckThread);
+
+ Timer = CreateWaitableTimer(NULL, FALSE, NULL);
+ InitTimer();
+
return 0;
}
@@ -67,6 +73,9 @@ INT_PTR EmptyFolder(WPARAM wParam,LPARAM lParam) INT OnPreShutdown(WPARAM wParam, LPARAM lParam)
{
+ CancelWaitableTimer(Timer);
+ CloseHandle(Timer);
+
UnhookEvent(hOptHook);
UnhookEvent(hOnPreShutdown);
return 0;
|