diff options
author | George Hazan <ghazan@miranda.im> | 2017-10-14 13:08:08 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-10-14 13:08:08 +0300 |
commit | 9b99466b95de4d2666911fd622ff2a5005367516 (patch) | |
tree | 3e919cb0ef832e0f0283d38774dae440608a7857 /plugins/StatusManager/src/AdvancedAutoAway | |
parent | 196e01a2ca9f8aefbd3ac55eedc955f56d3d6428 (diff) |
StatusManager to use the common hLangpack variable instead of dealing with separate variables which refer to the same value anyway
Diffstat (limited to 'plugins/StatusManager/src/AdvancedAutoAway')
3 files changed, 2 insertions, 12 deletions
diff --git a/plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp b/plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp index 4b38ce59f8..c069b46db8 100644 --- a/plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp +++ b/plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp @@ -518,7 +518,6 @@ int AutoAwayOptInitialise(WPARAM wParam, LPARAM) OPTIONSDIALOGPAGE odp = { 0 }; odp.position = 1000000000; odp.hInstance = hInst; - odp.hLangpack = hAAALangpack; odp.pszTemplate = MAKEINTRESOURCEA(IDD_OPT_TABS); odp.szTitle.a = LPGEN("Auto away"); odp.szGroup.a = LPGEN("Status"); diff --git a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp index 81361b5c73..97ddeaef97 100644 --- a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp +++ b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp @@ -22,8 +22,6 @@ #include "..\stdafx.h" -int hAAALangpack = 0; - #ifdef _DEBUG #define SECS_PER_MINUTE 20 /* speedup */ #else @@ -51,8 +49,7 @@ TAAAProtoSetting::~TAAAProtoSetting() ///////////////////////////////////////////////////////////////////////////////////////// -HANDLE hAAAModuleLoadedHook = NULL, -hStateChangedEvent = NULL; +HANDLE hStateChangedEvent = NULL; static BOOL ignoreLockKeys = FALSE; static BOOL ignoreSysKeys = FALSE; @@ -583,15 +580,11 @@ int AAAModuleLoaded(WPARAM, LPARAM) void AdvancedAutoAwayLoad() { - MUUID muidLast = MIID_LAST; - hAAALangpack = GetPluginLangId(muidLast, 0); - - hAAAModuleLoadedHook = HookEvent(ME_SYSTEM_MODULESLOADED, AAAModuleLoaded); + HookEvent(ME_SYSTEM_MODULESLOADED, AAAModuleLoaded); hStateChangedEvent = CreateHookableEvent(ME_AAA_STATECHANGED); } void AdvancedAutoAwayUnload() { - UnhookEvent(hAAAModuleLoadedHook); DestroyHookableEvent(hStateChangedEvent); } diff --git a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h index e6d7969743..c529bf69e0 100644 --- a/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h +++ b/plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h @@ -19,8 +19,6 @@ #ifndef __ADVANCED_AUTOAWAY_HEADER #define __ADVANCED_AUTOAWAY_HEADER -extern int hAAALangpack; - #define AAAMODULENAME "AdvancedAutoAway" #define SETTING_IGNLOCK "IgnoreLockKeys" #define SETTING_IGNSYSKEYS "IgnoreSysKeys" |