summaryrefslogtreecommitdiff
path: root/plugins/StatusManager
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-10-14 13:08:08 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-10-14 13:08:08 +0300
commit9b99466b95de4d2666911fd622ff2a5005367516 (patch)
tree3e919cb0ef832e0f0283d38774dae440608a7857 /plugins/StatusManager
parent196e01a2ca9f8aefbd3ac55eedc955f56d3d6428 (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')
-rw-r--r--plugins/StatusManager/src/AdvancedAutoAway/aaa_options.cpp1
-rw-r--r--plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.cpp11
-rw-r--r--plugins/StatusManager/src/AdvancedAutoAway/advancedautoaway.h2
-rw-r--r--plugins/StatusManager/src/KeepStatus/keepstatus.cpp5
-rw-r--r--plugins/StatusManager/src/KeepStatus/keepstatus.h2
-rw-r--r--plugins/StatusManager/src/KeepStatus/ks_options.cpp1
-rw-r--r--plugins/StatusManager/src/StartupStatus/ss_options.cpp1
-rw-r--r--plugins/StatusManager/src/StartupStatus/ss_profiles.cpp3
-rw-r--r--plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp2
-rw-r--r--plugins/StatusManager/src/StartupStatus/startupstatus.cpp8
-rw-r--r--plugins/StatusManager/src/StartupStatus/startupstatus.h2
-rw-r--r--plugins/StatusManager/src/version.h2
12 files changed, 5 insertions, 35 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"
diff --git a/plugins/StatusManager/src/KeepStatus/keepstatus.cpp b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp
index f0c0051e60..def0bdf677 100644
--- a/plugins/StatusManager/src/KeepStatus/keepstatus.cpp
+++ b/plugins/StatusManager/src/KeepStatus/keepstatus.cpp
@@ -19,8 +19,6 @@
#include "..\stdafx.h"
-int hKSLangpack = 0;
-
struct TimerInfo
{
int timer;
@@ -1203,9 +1201,6 @@ int KSModuleLoaded(WPARAM, LPARAM)
void KeepStatusLoad()
{
- MUUID muidLast = MIID_LAST;
- hKSLangpack = GetPluginLangId(muidLast, 0);
-
HookEvent(ME_SYSTEM_MODULESLOADED, KSModuleLoaded);
CreateHookableEvent(ME_KS_CONNECTIONEVENT);
diff --git a/plugins/StatusManager/src/KeepStatus/keepstatus.h b/plugins/StatusManager/src/KeepStatus/keepstatus.h
index 3aa16d78b5..5c8f7aac26 100644
--- a/plugins/StatusManager/src/KeepStatus/keepstatus.h
+++ b/plugins/StatusManager/src/KeepStatus/keepstatus.h
@@ -20,8 +20,6 @@
#ifndef __KEEPSTATUS_HEADER
#define __KEEPSTATUS_HEADER
-extern int hKSLangpack;
-
#define KSMODULENAME "KeepStatus"
#define SETTING_CHECKCONNECTION "CheckConnection"
#define SETTING_MAXRETRIES "MaxRetries"
diff --git a/plugins/StatusManager/src/KeepStatus/ks_options.cpp b/plugins/StatusManager/src/KeepStatus/ks_options.cpp
index 0db88f5264..a43d528c34 100644
--- a/plugins/StatusManager/src/KeepStatus/ks_options.cpp
+++ b/plugins/StatusManager/src/KeepStatus/ks_options.cpp
@@ -566,7 +566,6 @@ int KeepStatusOptionsInit(WPARAM wparam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
- odp.hLangpack = hKSLangpack;
odp.szGroup.w = LPGENW("Status");
odp.szTitle.w = LPGENW("Keep status");
odp.flags = ODPF_BOLDGROUPS | ODPF_UNICODE;
diff --git a/plugins/StatusManager/src/StartupStatus/ss_options.cpp b/plugins/StatusManager/src/StartupStatus/ss_options.cpp
index 4e28b085b3..9229f901b0 100644
--- a/plugins/StatusManager/src/StartupStatus/ss_options.cpp
+++ b/plugins/StatusManager/src/StartupStatus/ss_options.cpp
@@ -911,7 +911,6 @@ int StartupStatusOptionsInit(WPARAM wparam, LPARAM)
{
OPTIONSDIALOGPAGE odp = { 0 };
odp.hInstance = hInst;
- odp.hLangpack = hSSLangpack;
odp.szGroup.a = LPGEN("Status");
odp.szTitle.a = LPGEN("Startup status");
odp.flags = ODPF_BOLDGROUPS;
diff --git a/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp
index 4dad85be05..275883d9ce 100644
--- a/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp
+++ b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp
@@ -55,7 +55,6 @@ static int CreateMainMenuItems(WPARAM, LPARAM)
CMenuItem mi;
mi.position = 2000100000;
mi.flags = CMIF_UNICODE;
- mi.hLangpack = hSSLangpack;
mcount = 0;
int count = GetProfileCount(0, 0);
for (int i = 0; i < count && mcount < MAX_MMITEMS; i++) {
@@ -64,7 +63,7 @@ static int CreateMainMenuItems(WPARAM, LPARAM)
continue;
if (db_get_b(NULL, SSMODULENAME, OptName(i, SETTING_INSUBMENU), 1) && !mi.root) {
- mi.root = Menu_CreateRoot(MO_STATUS, LPGENW("Status profiles"), 2000100000, 0, hSSLangpack);
+ mi.root = Menu_CreateRoot(MO_STATUS, LPGENW("Status profiles"), 2000100000);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "1AB30D51-BABA-4B27-9288-1A12278BAD8D");
}
diff --git a/plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp b/plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp
index db8f6aeb61..e9d153670a 100644
--- a/plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp
+++ b/plugins/StatusManager/src/StartupStatus/ss_toolbars.cpp
@@ -41,7 +41,7 @@ void RemoveTopToolbarButtons()
int CreateTopToolbarButtons(WPARAM, LPARAM)
{
if (iconList[0].hIcolib == NULL)
- Icon_Register(hInst, "Toolbar/StartupStatus", iconList, _countof(iconList), NULL, hSSLangpack);
+ Icon_Register(hInst, "Toolbar/StartupStatus", iconList, _countof(iconList));
int profileCount = CallService(MS_SS_GETPROFILECOUNT, 0, 0);
diff --git a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp
index 4004bc4623..ccfa0819a7 100644
--- a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp
+++ b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp
@@ -19,8 +19,6 @@
#include "..\stdafx.h"
-int hSSLangpack = 0;
-
static UINT_PTR setStatusTimerId = 0;
static TSettingsList startupSettings(10, SSCompareSettings);
@@ -483,9 +481,6 @@ static INT_PTR SrvGetProfile(WPARAM wParam, LPARAM lParam)
void StartupStatusLoad()
{
- MUUID muidLast = MIID_LAST;
- hSSLangpack = GetPluginLangId(muidLast, 0);
-
HookEvent(ME_SYSTEM_MODULESLOADED, SSModuleLoaded);
if (db_get_b(NULL, SSMODULENAME, SETTING_SETPROFILE, 1) ||
@@ -511,8 +506,5 @@ void StartupStatusLoad()
void StartupStatusUnload()
{
- KillModuleIcons(hSSLangpack);
- KillModuleMenus(hSSLangpack);
-
DeinitProfilesModule();
}
diff --git a/plugins/StatusManager/src/StartupStatus/startupstatus.h b/plugins/StatusManager/src/StartupStatus/startupstatus.h
index 9dd738c346..79b82950cb 100644
--- a/plugins/StatusManager/src/StartupStatus/startupstatus.h
+++ b/plugins/StatusManager/src/StartupStatus/startupstatus.h
@@ -19,8 +19,6 @@
#ifndef __STARTUPSTATUSHEADER
#define __STARTUPSTATUSHEADER
-extern int hSSLangpack;
-
#define SSMODULENAME "StartupStatus"
struct TSSSetting : public PROTOCOLSETTINGEX, public MZeroedObject
diff --git a/plugins/StatusManager/src/version.h b/plugins/StatusManager/src/version.h
index f22d556caf..07d9125074 100644
--- a/plugins/StatusManager/src/version.h
+++ b/plugins/StatusManager/src/version.h
@@ -2,7 +2,7 @@
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 11
#define __RELEASE_NUM 2
-#define __BUILD_NUM 1
+#define __BUILD_NUM 2
// other stuff for Version resource
#include <stdver.h>