diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-23 23:29:25 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-23 23:29:25 +0300 |
commit | 176e52e14fd0358a7f26ca8d7b0205244dfde2e7 (patch) | |
tree | 10da2f8951d20103af0215c38d07ea96ba61c191 /plugins/BossKeyPlus | |
parent | 91b13500b47a51f3a284d9f409b7b8dac167a06d (diff) |
no need to initialize pcli variable in each plugin (only in Clist_*)
Diffstat (limited to 'plugins/BossKeyPlus')
-rw-r--r-- | plugins/BossKeyPlus/src/BossKey.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp index 3f4b0a82eb..dad6b89086 100644 --- a/plugins/BossKeyPlus/src/BossKey.cpp +++ b/plugins/BossKeyPlus/src/BossKey.cpp @@ -36,7 +36,6 @@ wchar_t **oldStatusMsg; BYTE g_bOldSetting;
CMPlugin g_plugin;
-CLIST_INTERFACE *pcli;
PFNDwmIsCompositionEnabled dwmIsCompositionEnabled;
@@ -335,7 +334,7 @@ LRESULT CALLBACK ListenWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara }
}
- Clist_TrayIconDestroy(pcli->hwndContactList);
+ Clist_TrayIconDestroy(g_CLI.hwndContactList);
if (g_wMask & OPT_TRAYICON)
CreateTrayIcon(true);
@@ -411,12 +410,12 @@ LRESULT CALLBACK ListenWndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lPara if (g_TrayIcon) CreateTrayIcon(false);
- pcli->pfnTrayIconInit(pcli->hwndContactList);
+ g_CLI.pfnTrayIconInit(g_CLI.hwndContactList);
// force a redraw
// should prevent drawing problems
- InvalidateRect(pcli->hwndContactList, nullptr, true);
- UpdateWindow(pcli->hwndContactList);
+ InvalidateRect(g_CLI.hwndContactList, nullptr, true);
+ UpdateWindow(g_CLI.hwndContactList);
PostMessage(hWnd, WM_MOUSEMOVE, 0, (LPARAM)MAKELONG(2, 2)); // reset core's IDLE
g_bWindowHidden = false;
@@ -439,7 +438,7 @@ VOID CALLBACK WinEventProc(HWINEVENTHOOK, DWORD event, HWND hwnd, LONG idObject, {
if (g_bWindowHidden && idObject == OBJID_WINDOW && (event == EVENT_OBJECT_CREATE || event == EVENT_OBJECT_SHOW) && (IsWindowVisible(hwnd)))
{
- if (hwnd == pcli->hwndContactList)
+ if (hwnd == g_CLI.hwndContactList)
ShowWindow(hwnd, SW_HIDE);
else
EnumWindows(EnumWindowsProc, 0);
@@ -632,7 +631,7 @@ static int MirandaLoaded(WPARAM, LPARAM) HookTemporaryEvent(ME_MSG_TOOLBARLOADED, TabsrmmButtonsInit);
- GetWindowThreadProcessId(pcli->hwndContactList, &g_dwMirandaPID);
+ GetWindowThreadProcessId(g_CLI.hwndContactList, &g_dwMirandaPID);
WNDCLASS winclass = { 0 };
winclass.lpfnWndProc = ListenWndProc;
@@ -642,7 +641,7 @@ static int MirandaLoaded(WPARAM, LPARAM) if (RegisterClass(&winclass))
{
- g_hListenWindow = CreateWindow(BOSSKEY_LISTEN_INFO, BOSSKEY_LISTEN_INFO, WS_POPUP, 0, 0, 5, 5, pcli->hwndContactList, nullptr, g_plugin.getInst(), nullptr);
+ g_hListenWindow = CreateWindow(BOSSKEY_LISTEN_INFO, BOSSKEY_LISTEN_INFO, WS_POPUP, 0, 0, 5, 5, g_CLI.hwndContactList, nullptr, g_plugin.getInst(), nullptr);
WTSRegisterSessionNotification(g_hListenWindow, 0);
}
@@ -683,8 +682,6 @@ static int MirandaLoaded(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void)
{
- pcli = Clist_GetInterface();
-
g_wMaskAdv = db_get_w(NULL, MOD_NAME, "optsmaskadv", 0);
g_bOldSetting = db_get_b(NULL, MOD_NAME, "OldSetting", 0);
|