diff options
author | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-14 19:02:53 +0000 |
---|---|---|
committer | Kirill Volinsky <mataes2007@gmail.com> | 2012-06-14 19:02:53 +0000 |
commit | 37f6d368b6214799b74dbc6050db106cb9df68af (patch) | |
tree | d3fead3b41a428b864a0731cfed8903a4bfe82dc /plugins/PackUpdater/Src/Events.cpp | |
parent | e1cfabdac8f9fba8d4e31e76a076bca5b067d667 (diff) |
PackUpdater sync:
added checking schedule (Unsane patch)
git-svn-id: http://svn.miranda-ng.org/main/trunk@417 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/PackUpdater/Src/Events.cpp')
-rw-r--r-- | plugins/PackUpdater/Src/Events.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/plugins/PackUpdater/Src/Events.cpp b/plugins/PackUpdater/Src/Events.cpp index 1967b0727d..f0f5ea8d69 100644 --- a/plugins/PackUpdater/Src/Events.cpp +++ b/plugins/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;
|