From a66836887fc4aa7514fdf1b3b89b81aee94c145b Mon Sep 17 00:00:00 2001 From: "(no author)" <(no author)@4f64403b-2f21-0410-a795-97e2b3489a10> Date: Sun, 14 Nov 2010 16:15:33 +0000 Subject: Added hotkeys (patch by FREAK_THEMIGHTY) Version Update git-svn-id: https://server.scottellis.com.au/svn/mim_plugs@561 4f64403b-2f21-0410-a795-97e2b3489a10 --- updater/scan.cpp | 2 +- updater/updater.cpp | 34 +++++++++++++++++++++++++++++++++- updater/version.h | 4 ++-- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/updater/scan.cpp b/updater/scan.cpp index 8b43d8a..d17c338 100644 --- a/updater/scan.cpp +++ b/updater/scan.cpp @@ -98,7 +98,7 @@ void ScanPlugins(FilenameMap *fn_map, UpdateList *update_list) // this setting may not be there for running plugins - and isn't there for new ones. So, // we'll disable anything new when the setting isn't found anyway - but we write the // value below for all plugins so that we can expect to find it - char *lowname = mir_t2a(findData.cFileName); _strlwr(lowname); + char *lowname = _strlwr(mir_t2a(findData.cFileName)); if(DBGetContactSettingByte(0, "PluginDisable", lowname, 255) == 255) // setting not present DBWriteContactSettingByte(0, "PluginDisable", lowname, 0); mir_free(lowname); diff --git a/updater/updater.cpp b/updater/updater.cpp index 77f7c83..c5d6612 100644 --- a/updater/updater.cpp +++ b/updater/updater.cpp @@ -1,5 +1,6 @@ #include "common.h" #include "updater.h" +#include HINSTANCE hInst; PLUGINLINK *pluginLink; @@ -166,7 +167,11 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) { update.cpbVersionPrefix = strlen((char *)update.pbVersionPrefix); #endif //REGISTER_AUTO +#ifdef _WIN64 + update.szBetaUpdateURL = BETA_HOST_URL_PREFIX "/updater_x64.zip"; +#else update.szBetaUpdateURL = BETA_HOST_URL_PREFIX "/updater.zip"; +#endif update.szBetaVersionURL = BETA_HOST_URL_PREFIX "/ver_updater.html"; update.pbBetaVersionPrefix = (BYTE *)"Updater version "; update.cpbBetaVersionPrefix = (int)strlen((char *)update.pbBetaVersionPrefix); @@ -187,7 +192,8 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) { hEventIdleChanged = HookEvent(ME_IDLE_CHANGED, IdleChanged); - if(ServiceExists(MS_TRIGGER_REGISTERACTION)) { + if (ServiceExists(MS_TRIGGER_REGISTERACTION)) + { // create update action for triggerplugin ACTIONREGISTER ar = {0}; ar.cbSize = sizeof(ACTIONREGISTER); @@ -197,6 +203,32 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) { CallService(MS_TRIGGER_REGISTERACTION, 0, (LPARAM)&ar); } + if (ServiceExists(MS_HOTKEY_REGISTER)) + { + HOTKEYDESC shk = {0}; + + shk.cbSize = sizeof(shk); + shk.pszSection = LPGEN("Updater"); + + shk.pszDescription = LPGEN("Check for Updates"); + shk.pszName = "Update"; + shk.pszService = MS_UPDATE_CHECKFORUPDATES; + shk.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, 'U'); + CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&shk); + + shk.pszDescription = LPGEN("Restart"); + shk.pszName = "Restart"; + shk.pszService = MS_UPDATE_MENURESTART; + shk.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, 'R'); + CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&shk); + + shk.pszDescription = LPGEN("Update and Exit"); + shk.pszName = "UpdateAndExit"; + shk.pszService = MS_UPDATE_MENUUPDATEANDEXIT; + shk.DefHotKey = 0; + CallService(MS_HOTKEY_REGISTER, 0, (LPARAM)&shk); + } + return 0; } diff --git a/updater/version.h b/updater/version.h index 9b3853b..9173b30 100644 --- a/updater/version.h +++ b/updater/version.h @@ -4,8 +4,8 @@ #define __MAJOR_VERSION 0 #define __MINOR_VERSION 6 -#define __RELEASE_NUM 0 -#define __BUILD_NUM 9 +#define __RELEASE_NUM 1 +#define __BUILD_NUM 0 #define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM #define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM -- cgit v1.2.3