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/TrafficCounter | |
parent | 91b13500b47a51f3a284d9f409b7b8dac167a06d (diff) |
no need to initialize pcli variable in each plugin (only in Clist_*)
Diffstat (limited to 'plugins/TrafficCounter')
-rw-r--r-- | plugins/TrafficCounter/src/TrafficCounter.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp index f0d3703806..a49d09d34d 100644 --- a/plugins/TrafficCounter/src/TrafficCounter.cpp +++ b/plugins/TrafficCounter/src/TrafficCounter.cpp @@ -29,7 +29,6 @@ int NumberOfAccounts; HWND TrafficHwnd;
CMPlugin g_plugin;
-CLIST_INTERFACE *pcli;
BOOL bPopupExists = FALSE, bVariablesExists = FALSE, bTooltipExists = FALSE;
@@ -225,7 +224,7 @@ int TrafficCounter_PaintCallbackProc(HWND hWnd, HDC hDC, RECT*, HRGN, DWORD, voi int TrafficCounter_Draw(HWND hwnd, HDC hDC)
{
if (hwnd == (HWND)-1) return 0;
- if (GetParent(hwnd) == pcli->hwndContactList)
+ if (GetParent(hwnd) == g_CLI.hwndContactList)
return PaintTrafficCounterWindow(hwnd, hDC);
else
InvalidateRect(hwnd, nullptr, FALSE);
@@ -1142,15 +1141,13 @@ static int TrafficCounterModulesLoaded(WPARAM, LPARAM) HookEvent(ME_NETLIB_FASTRECV, TrafficRecv);
HookEvent(ME_NETLIB_FASTSEND, TrafficSend);
- CreateTrafficWindow(pcli->hwndContactList);
+ CreateTrafficWindow(g_CLI.hwndContactList);
UpdateFonts(0, 0); //Load and create fonts here
return 0;
}
extern "C" int __declspec(dllexport) Load(void)
{
- pcli = Clist_GetInterface();
-
HookEvent(ME_OPT_INITIALISE, TrafficCounterOptInitialise);
HookEvent(ME_SYSTEM_MODULESLOADED, TrafficCounterModulesLoaded);
HookEvent(ME_PROTO_ACK, ProtocolAckHook);
|