From 176e52e14fd0358a7f26ca8d7b0205244dfde2e7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 23 May 2018 23:29:25 +0300 Subject: no need to initialize pcli variable in each plugin (only in Clist_*) --- plugins/AutoShutdown/src/frame.cpp | 4 ++-- plugins/AutoShutdown/src/main.cpp | 3 --- plugins/AutoShutdown/src/shutdownsvc.cpp | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'plugins/AutoShutdown/src') diff --git a/plugins/AutoShutdown/src/frame.cpp b/plugins/AutoShutdown/src/frame.cpp index ab4baad2b9..78b11eb92d 100644 --- a/plugins/AutoShutdown/src/frame.cpp +++ b/plugins/AutoShutdown/src/frame.cpp @@ -487,7 +487,7 @@ void ShowCountdownFrame(WORD fTimeFlags) 0, 0, GetSystemMetrics(SM_CXICON) + 103, GetSystemMetrics(SM_CYICON) + 2, - pcli->hwndContactList, + g_CLI.hwndContactList, nullptr, g_plugin.getInst(), &fTimeFlags); @@ -509,7 +509,7 @@ void ShowCountdownFrame(WORD fTimeFlags) /* HACKS TO FIX CLUI FRAMES: * *** why is CLUIFrames is horribly buggy??! *** date: sept 2005, nothing changed until sept 2006 * workaround #1: MS_CLIST_FRAMES_REMOVEFRAME does not finish with destroy cycle (clist_modern, clist_nicer crashes) */ - SendMessage(pcli->hwndContactList, WM_SIZE, 0, 0); + SendMessage(g_CLI.hwndContactList, WM_SIZE, 0, 0); /* workaround #2: drawing glitch after adding a frame (frame positioned wrongly when hidden) */ CallService(MS_CLIST_FRAMES_UPDATEFRAME, hFrame, FU_FMPOS | FU_FMREDRAW); /* workaround #3: MS_CLIST_FRAMES_SETFRAMEOPTIONS does cause redrawing problems */ diff --git a/plugins/AutoShutdown/src/main.cpp b/plugins/AutoShutdown/src/main.cpp index a6b359a6b0..0f0dcfc0da 100644 --- a/plugins/AutoShutdown/src/main.cpp +++ b/plugins/AutoShutdown/src/main.cpp @@ -20,7 +20,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "stdafx.h" -CLIST_INTERFACE *pcli; CMPlugin g_plugin; IconItem iconList[] = @@ -62,8 +61,6 @@ static int ShutdownModulesLoaded(WPARAM, LPARAM) extern "C" __declspec(dllexport) int Load(void) { - pcli = Clist_GetInterface(); - INITCOMMONCONTROLSEX icc; icc.dwSize = sizeof(icc); icc.dwICC = ICC_DATE_CLASSES | ICC_UPDOWN_CLASS | ICC_PROGRESS_CLASS; diff --git a/plugins/AutoShutdown/src/shutdownsvc.cpp b/plugins/AutoShutdown/src/shutdownsvc.cpp index b120727a7a..d1ebc110a7 100644 --- a/plugins/AutoShutdown/src/shutdownsvc.cpp +++ b/plugins/AutoShutdown/src/shutdownsvc.cpp @@ -147,7 +147,7 @@ static DWORD ShutdownNow(BYTE shutdownType) OutputDebugStringA("Not ready to exit. Waiting...\n"); /* tell others, all ascii */ } /* shutdown service must be called from main thread anyway */ - if (!DestroyWindow(pcli->hwndContactList)) + if (!DestroyWindow(g_CLI.hwndContactList)) dwErrCode = GetLastError(); } break; -- cgit v1.2.3