diff options
author | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-05-04 19:22:26 +0000 |
---|---|---|
committer | mataes2007 <mataes2007@e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb> | 2011-05-04 19:22:26 +0000 |
commit | 3182d972021c69dc23d6a7968dc0d141032b4acc (patch) | |
tree | 9c7fb8415d3191b8df134a7c846636d85c28a217 /PackUpdater/Src/Events.cpp | |
parent | e512a30af0c6f0f377f5f463b2cfe647224df3c6 (diff) |
added PackUpdater
added TranslitSwitcher
git-svn-id: http://miranda-plugins.googlecode.com/svn/trunk@69 e753b5eb-9565-29b2-b5c5-2cc6f99dfbcb
Diffstat (limited to 'PackUpdater/Src/Events.cpp')
-rw-r--r-- | PackUpdater/Src/Events.cpp | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/PackUpdater/Src/Events.cpp b/PackUpdater/Src/Events.cpp new file mode 100644 index 0000000..7c15ed0 --- /dev/null +++ b/PackUpdater/Src/Events.cpp @@ -0,0 +1,71 @@ +/*
+Copyright (C) 2010 Mataes
+
+This is free software; you can redistribute it and/or
+modify it under the terms of the GNU Library General Public
+License as published by the Free Software Foundation; either
+version 2 of the License, or (at your option) any later version.
+
+This is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+Library General Public License for more details.
+
+You should have received a copy of the GNU Library General Public
+License along with this file; see the file license.txt. If
+not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.
+*/
+
+#include "common.h"
+
+BOOL Silent;
+
+int ModulesLoaded(WPARAM wParam, LPARAM lParam)
+{
+ UnhookEvent(hLoadHook);
+ Silent = true;
+ HOTKEYDESC hkd = {0};
+ hkd.cbSize = sizeof(hkd);
+ hkd.dwFlags = HKD_TCHAR;
+ hkd.pszName = "Check for pack updates";
+ hkd.ptszDescription = _T("Check for pack updates");
+ hkd.ptszSection = _T("Pack Updater");
+ hkd.pszService = MODNAME"/CheckUpdates";
+ hkd.DefHotKey = HOTKEYCODE(HOTKEYF_CONTROL, VK_F10) | HKF_MIRANDA_LOCAL;
+ hkd.lParam = FALSE;
+ CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&hkd);
+
+ DoCheck(AutoUpdate, (int)CheckThread);
+ return 0;
+}
+
+INT_PTR MenuCommand(WPARAM wParam,LPARAM lParam)
+{
+ Silent = false;
+ DoCheck(1, (int)CheckThread);
+ return 0;
+}
+
+INT_PTR EmptyFolder(WPARAM wParam,LPARAM lParam)
+{
+ SHFILEOPSTRUCT file_op = {
+ NULL,
+ FO_DELETE,
+ tszRoot,
+ _T(""),
+ FOF_NOERRORUI |
+ FOF_SILENT,
+ false,
+ 0,
+ _T("") };
+ SHFileOperation(&file_op);
+ return 0;
+}
+
+INT OnPreShutdown(WPARAM wParam, LPARAM lParam)
+{
+ UnhookEvent(hOptHook);
+ UnhookEvent(hOnPreShutdown);
+ return 0;
+}
\ No newline at end of file |