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/FileAsMessage/src/dialog.cpp | 6 +++--- plugins/FileAsMessage/src/main.cpp | 6 ++---- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'plugins/FileAsMessage') diff --git a/plugins/FileAsMessage/src/dialog.cpp b/plugins/FileAsMessage/src/dialog.cpp index 8f426f9fb6..48ef4a9c79 100644 --- a/plugins/FileAsMessage/src/dialog.cpp +++ b/plugins/FileAsMessage/src/dialog.cpp @@ -67,7 +67,7 @@ static LRESULT CALLBACK PopupDlgProc(HWND hWnd, UINT message, WPARAM wParam, LPA case WM_COMMAND: { PUDeletePopup(hWnd); - pcli->pfnRemoveEvent(hContact, 0); + g_CLI.pfnRemoveEvent(hContact, 0); if (IsWindow(hDlg)) { ShowWindow(hDlg, SW_SHOWNORMAL); @@ -420,7 +420,7 @@ void FILEECHO::incomeRequest(char *param) cle.flags = CLEF_URGENT; cle.hDbEvent = 0; cle.pszService = MODULENAME "/FERecvFile"; - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); MakePopupMsg(hDlg, hContact, L"Incoming file..."); } @@ -488,7 +488,7 @@ void FILEECHO::onRecvTimer() setState(STATE_FINISHED); if (db_get_b(NULL, "SRFile", "AutoClose", 0)) { PostMessage(hDlg, WM_CLOSE, 0, 0); - pcli->pfnRemoveEvent(hContact, 0); + g_CLI.pfnRemoveEvent(hContact, 0); } Skin_PlaySound("FileDone"); destroyTransfer(); diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp index c709181372..f6ffd068d2 100644 --- a/plugins/FileAsMessage/src/main.cpp +++ b/plugins/FileAsMessage/src/main.cpp @@ -1,9 +1,9 @@ #include "stdafx.h" -CLIST_INTERFACE *pcli; -MWindowList hFileList; CMPlugin g_plugin; +MWindowList hFileList; + char *szServiceTitle = SERVICE_TITLE; char *szServicePrefix = SERVICE_PREFIX; HANDLE hHookDbSettingChange, hHookContactAdded, hHookSkinIconsChanged; @@ -185,8 +185,6 @@ static int OnModulesLoaded(WPARAM, LPARAM) extern "C" __declspec(dllexport) int Load(void) { - pcli = Clist_GetInterface(); - InitCRC32(); g_plugin.registerIcon("fileAsMessage", iconList); -- cgit v1.2.3