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_*) --- protocols/Dummy/src/main.cpp | 3 --- protocols/Gadu-Gadu/src/core.cpp | 2 +- protocols/Gadu-Gadu/src/gg.cpp | 3 --- protocols/Gadu-Gadu/src/gg.h | 1 - protocols/Gadu-Gadu/src/links.cpp | 2 +- protocols/IRCG/src/clist.cpp | 6 +++--- protocols/IRCG/src/main.cpp | 2 -- protocols/JabberG/src/jabber.cpp | 3 --- protocols/JabberG/src/jabber_chat.cpp | 12 ++++++------ protocols/JabberG/src/jabber_frame.cpp | 4 ++-- protocols/JabberG/src/jabber_iq_handlers.cpp | 2 +- protocols/JabberG/src/jabber_menu.cpp | 2 +- protocols/JabberG/src/jabber_notes.cpp | 2 +- protocols/JabberG/src/jabber_proto.cpp | 2 +- protocols/JabberG/src/jabber_rc.cpp | 2 +- protocols/MRA/src/Mra.cpp | 3 --- protocols/MRA/src/Mra_functions.cpp | 4 ++-- protocols/MSN/src/msn.cpp | 3 --- protocols/MSN/src/msn_mail.cpp | 4 ++-- protocols/MSN/src/msn_menu.cpp | 2 +- protocols/MSN/src/msn_misc.cpp | 4 ++-- protocols/MSN/src/msn_svcs.cpp | 2 +- protocols/MinecraftDynmap/src/main.cpp | 3 --- protocols/Omegle/src/main.cpp | 3 --- protocols/SkypeWeb/src/main.cpp | 2 -- protocols/SkypeWeb/src/skype_trouter.cpp | 6 +++--- protocols/Tox/src/main.cpp | 2 -- protocols/Twitter/src/main.cpp | 3 --- protocols/VKontakte/src/main.cpp | 3 --- protocols/VKontakte/src/misc.cpp | 4 ++-- protocols/VKontakte/src/vk_feed.cpp | 2 +- 31 files changed, 32 insertions(+), 66 deletions(-) (limited to 'protocols') diff --git a/protocols/Dummy/src/main.cpp b/protocols/Dummy/src/main.cpp index 79a8bedbdd..999d3f8b41 100644 --- a/protocols/Dummy/src/main.cpp +++ b/protocols/Dummy/src/main.cpp @@ -19,7 +19,6 @@ along with this program. If not, see . #include "version.h" CMPlugin g_plugin; -CLIST_INTERFACE *pcli; PLUGININFOEX pluginInfoEx = { @@ -62,8 +61,6 @@ static int OnModulesLoaded(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load() { - pcli = Clist_GetInterface(); - HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); return 0; } diff --git a/protocols/Gadu-Gadu/src/core.cpp b/protocols/Gadu-Gadu/src/core.cpp index 56d81d38fe..10a3436df4 100644 --- a/protocols/Gadu-Gadu/src/core.cpp +++ b/protocols/Gadu-Gadu/src/core.cpp @@ -1000,7 +1000,7 @@ retry: cle.lParam = (LPARAM)img; cle.pszService = service; cle.szTooltip.a = Translate("Incoming image"); - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); ReleaseIconEx("image", FALSE); } } diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index c6230db354..aaf4e792b8 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -26,7 +26,6 @@ // Other variables SSL_API sslApi; CMPlugin g_plugin; -CLIST_INTERFACE *pcli; static unsigned long crc_table[256]; @@ -298,8 +297,6 @@ void GaduProto::OnBuildProtoMenu() // extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); - HookEvent(ME_SYSTEM_MODULESLOADED, gg_modulesloaded); gg_links_instancemenu_init(); diff --git a/protocols/Gadu-Gadu/src/gg.h b/protocols/Gadu-Gadu/src/gg.h index 115fa9f799..67cc001e43 100644 --- a/protocols/Gadu-Gadu/src/gg.h +++ b/protocols/Gadu-Gadu/src/gg.h @@ -257,7 +257,6 @@ struct GGGETAVATARDATA struct GaduProto; -extern CLIST_INTERFACE *pcli; extern PLUGININFOEX pluginInfoEx; extern IconItem iconList[]; extern SSL_API sslApi; diff --git a/protocols/Gadu-Gadu/src/links.cpp b/protocols/Gadu-Gadu/src/links.cpp index 8bd6d0c438..95aeb08146 100644 --- a/protocols/Gadu-Gadu/src/links.cpp +++ b/protocols/Gadu-Gadu/src/links.cpp @@ -75,7 +75,7 @@ static INT_PTR gg_parselink(WPARAM, LPARAM lParam) HMENU hMenu = CreatePopupMenu(); Menu_Build(hMenu, hInstanceMenu); - int cmd = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, pcli->hwndContactList, nullptr); + int cmd = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, g_CLI.hwndContactList, nullptr); DestroyMenu(hMenu); if (cmd) diff --git a/protocols/IRCG/src/clist.cpp b/protocols/IRCG/src/clist.cpp index 2c0c9b0860..ff43d197c8 100644 --- a/protocols/IRCG/src/clist.cpp +++ b/protocols/IRCG/src/clist.cpp @@ -73,9 +73,9 @@ BOOL CIrcProto::CList_AddDCCChat(const CMStringW& name, const CMStringW& hostmas cle.szTooltip.w = szNick; cle.lParam = (LPARAM)pdci; - if (pcli->pfnGetEvent(hContact, 0)) - pcli->pfnRemoveEvent(hContact, -100); - pcli->pfnAddEvent(&cle); + if (g_CLI.pfnGetEvent(hContact, 0)) + g_CLI.pfnRemoveEvent(hContact, -100); + g_CLI.pfnAddEvent(&cle); } return TRUE; } diff --git a/protocols/IRCG/src/main.cpp b/protocols/IRCG/src/main.cpp index e8b9724a67..d2b9722c68 100644 --- a/protocols/IRCG/src/main.cpp +++ b/protocols/IRCG/src/main.cpp @@ -24,7 +24,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. CMPlugin g_plugin; CHAT_MANAGER *pci; -CLIST_INTERFACE *pcli; ///////////////////////////////////////////////////////////////////////////////////////// @@ -69,7 +68,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load() { pci = Chat_GetInterface(); - pcli = Clist_GetInterface(); InitIcons(); InitServers(); diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp index 21900ab114..369f2c5f76 100755 --- a/protocols/JabberG/src/jabber.cpp +++ b/protocols/JabberG/src/jabber.cpp @@ -46,8 +46,6 @@ CountryListEntry *g_countries; unsigned int g_nTempFileId; wchar_t szCoreVersion[100]; -CLIST_INTERFACE* pcli; - HANDLE hExtraActivity = nullptr; HANDLE hExtraMood = nullptr; HANDLE hExtListInit, hDiscoInfoResult; @@ -155,7 +153,6 @@ extern "C" int __declspec(dllexport) Load() { // set the memory, lists & utf8 managers pci = Chat_GetInterface(); - pcli = Clist_GetInterface(); char mirVer[100]; Miranda_GetVersionText(mirVer, _countof(mirVer)); diff --git a/protocols/JabberG/src/jabber_chat.cpp b/protocols/JabberG/src/jabber_chat.cpp index df81e4cd9f..63f729f9b5 100644 --- a/protocols/JabberG/src/jabber_chat.cpp +++ b/protocols/JabberG/src/jabber_chat.cpp @@ -1172,17 +1172,17 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* break; case IDM_CPY_NICK: - JabberCopyText(pcli->hwndContactList, him->m_tszResourceName); + JabberCopyText(g_CLI.hwndContactList, him->m_tszResourceName); break; case IDM_RJID_COPY: case IDM_CPY_RJID: - JabberCopyText(pcli->hwndContactList, him->m_tszRealJid); + JabberCopyText(g_CLI.hwndContactList, him->m_tszRealJid); break; case IDM_CPY_INROOMJID: szBuffer.Format(L"%s/%s", item->jid, him->m_tszResourceName); - JabberCopyText(pcli->hwndContactList, szBuffer); + JabberCopyText(g_CLI.hwndContactList, szBuffer); break; case IDM_RJID_VCARD: @@ -1208,7 +1208,7 @@ static void sttNickListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* if (wchar_t *tmp = wcschr(psr.id.w, '/')) *tmp = 0; psr.nick.w = psr.id.w; - Contact_AddBySearch(ppro->m_szModuleName, &psr, pcli->hwndContactList); + Contact_AddBySearch(ppro->m_szModuleName, &psr, g_CLI.hwndContactList); } break; } @@ -1329,11 +1329,11 @@ static void sttLogListHook(CJabberProto *ppro, JABBER_LIST_ITEM *item, GCHOOK* g break; case IDM_CPY_RJID: - JabberCopyText(pcli->hwndContactList, item->jid); + JabberCopyText(g_CLI.hwndContactList, item->jid); break; case IDM_CPY_TOPIC: - JabberCopyText(pcli->hwndContactList, item->getTemp()->m_tszStatusMessage); + JabberCopyText(g_CLI.hwndContactList, item->getTemp()->m_tszStatusMessage); break; } } diff --git a/protocols/JabberG/src/jabber_frame.cpp b/protocols/JabberG/src/jabber_frame.cpp index aff1bd2720..7a0e1a947b 100644 --- a/protocols/JabberG/src/jabber_frame.cpp +++ b/protocols/JabberG/src/jabber_frame.cpp @@ -78,7 +78,7 @@ CJabberInfoFrame::CJabberInfoFrame(CJabberProto *proto): InitClass(); CLISTFrame frame = { sizeof(frame) }; - HWND hwndClist = pcli->hwndContactList; + HWND hwndClist = g_CLI.hwndContactList; frame.hWnd = CreateWindowEx(0, L"JabberInfoFrameClass", nullptr, WS_CHILD|WS_VISIBLE, 0, 0, 100, 100, hwndClist, nullptr, g_plugin.getInst(), this); frame.align = alBottom; frame.height = 2 * SZ_FRAMEPADDING + GetSystemMetrics(SM_CYSMICON) + SZ_LINEPADDING; // compact height by default @@ -182,7 +182,7 @@ LRESULT CJabberInfoFrame::WndProc(UINT msg, WPARAM wParam, LPARAM lParam) POINT pt = { LOWORD(lParam), HIWORD(lParam) }; MapWindowPoints(m_hwnd, nullptr, &pt, 1); HMENU hMenu = (HMENU)CallService(MS_CLIST_MENUBUILDFRAMECONTEXT, m_frameId, 0); - int res = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, pcli->hwndContactList, nullptr); + int res = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, g_CLI.hwndContactList, nullptr); Clist_MenuProcessCommand(res, 0, m_frameId); return 0; } diff --git a/protocols/JabberG/src/jabber_iq_handlers.cpp b/protocols/JabberG/src/jabber_iq_handlers.cpp index 942e257746..f7dd1d1764 100644 --- a/protocols/JabberG/src/jabber_iq_handlers.cpp +++ b/protocols/JabberG/src/jabber_iq_handlers.cpp @@ -452,7 +452,7 @@ BOOL CJabberProto::AddClistHttpAuthEvent(CJabberHttpAuthParams *pParams) cle.lParam = (LPARAM)pParams; cle.pszService = szService; cle.szTooltip.w = TranslateT("Http authentication request received"); - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); return TRUE; } diff --git a/protocols/JabberG/src/jabber_menu.cpp b/protocols/JabberG/src/jabber_menu.cpp index 308c215d20..439d091e0d 100644 --- a/protocols/JabberG/src/jabber_menu.cpp +++ b/protocols/JabberG/src/jabber_menu.cpp @@ -1081,7 +1081,7 @@ CJabberProto* JabberChooseInstance(bool bIsLink) HMENU hMenu = CreatePopupMenu(); Menu_Build(hMenu, hChooserMenu); - int res = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, pcli->hwndContactList, nullptr); + int res = TrackPopupMenu(hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, g_CLI.hwndContactList, nullptr); DestroyMenu(hMenu); if (res) { diff --git a/protocols/JabberG/src/jabber_notes.cpp b/protocols/JabberG/src/jabber_notes.cpp index 07784b7ad7..b787622f2a 100644 --- a/protocols/JabberG/src/jabber_notes.cpp +++ b/protocols/JabberG/src/jabber_notes.cpp @@ -785,7 +785,7 @@ bool CJabberProto::OnIncomingNote(const wchar_t *szFrom, HXML hXml) cle.lParam = (LPARAM)pItem; cle.pszService = szService; cle.szTooltip.w = TranslateT("Incoming note"); - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); return true; } diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 80dcec55f5..11a6144b76 100755 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -1316,7 +1316,7 @@ void CJabberProto::InfoFrame_OnTransport(CJabberInfoFrame_Event *evt) HMENU hContactMenu = Menu_BuildContactMenu(hContact); POINT pt; GetCursorPos(&pt); - int res = TrackPopupMenu(hContactMenu, TPM_RETURNCMD, pt.x, pt.y, 0, pcli->hwndContactList, nullptr); + int res = TrackPopupMenu(hContactMenu, TPM_RETURNCMD, pt.x, pt.y, 0, g_CLI.hwndContactList, nullptr); Clist_MenuProcessCommand(res, MPCF_CONTACTMENU, hContact); } } diff --git a/protocols/JabberG/src/jabber_rc.cpp b/protocols/JabberG/src/jabber_rc.cpp index 6bdefc5412..2fe625e4f8 100644 --- a/protocols/JabberG/src/jabber_rc.cpp +++ b/protocols/JabberG/src/jabber_rc.cpp @@ -603,7 +603,7 @@ int CJabberProto::AdhocForwardHandler(HXML, CJabberIqInfo *pInfo, CJabberAdhocSe db_event_markRead(hContact, hDbEvent); if (bRemoveCListEvents) - pcli->pfnRemoveEvent(hContact, hDbEvent); + g_CLI.pfnRemoveEvent(hContact, hDbEvent); } } diff --git a/protocols/MRA/src/Mra.cpp b/protocols/MRA/src/Mra.cpp index cc50b71add..afc0564e7b 100644 --- a/protocols/MRA/src/Mra.cpp +++ b/protocols/MRA/src/Mra.cpp @@ -1,7 +1,6 @@ #include "stdafx.h" CMPlugin g_plugin; -CLIST_INTERFACE *pcli; HMODULE g_hDLLXStatusIcons; HICON g_hMainIcon; @@ -42,8 +41,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" __declspec(dllexport) int Load(void) { - pcli = Clist_GetInterface(); - IconsLoad(); InitXStatusIcons(); return 0; diff --git a/protocols/MRA/src/Mra_functions.cpp b/protocols/MRA/src/Mra_functions.cpp index 91dd706532..6bf5697249 100644 --- a/protocols/MRA/src/Mra_functions.cpp +++ b/protocols/MRA/src/Mra_functions.cpp @@ -662,7 +662,7 @@ void CMraProto::MraUpdateEmailStatus(const CMStringA &pszFrom, const CMStringA & memcpy(pszServiceFunctionName, MRA_GOTO_INBOX, sizeof(MRA_GOTO_INBOX)); cle.pszService = szServiceFunction; } - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); } Skin_PlaySound(szNewMailSound); @@ -675,7 +675,7 @@ void CMraProto::MraUpdateEmailStatus(const CMStringA &pszFrom, const CMStringA & else { if (!force_display && getByte("IncrementalNewMailNotify", MRA_DEFAULT_INC_NEW_MAIL_NOTIFY)) { if (bTrayIconNewMailNotify) - pcli->pfnRemoveEvent(0, (LPARAM)m_szModuleName); + g_CLI.pfnRemoveEvent(0, (LPARAM)m_szModuleName); PUDeletePopup(hWndEMailPopupStatus); hWndEMailPopupStatus = nullptr; } diff --git a/protocols/MSN/src/msn.cpp b/protocols/MSN/src/msn.cpp index 5b39364a1d..2dc0977d74 100644 --- a/protocols/MSN/src/msn.cpp +++ b/protocols/MSN/src/msn.cpp @@ -25,7 +25,6 @@ along with this program. If not, see . #include "version.h" CMPlugin g_plugin; -CLIST_INTERFACE *pcli; ///////////////////////////////////////////////////////////////////////////////////////// // Initialization routines @@ -83,8 +82,6 @@ static int OnModulesLoaded(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); - HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); MsnInitIcons(); diff --git a/protocols/MSN/src/msn_mail.cpp b/protocols/MSN/src/msn_mail.cpp index 30262e49c5..fc003304bd 100644 --- a/protocols/MSN/src/msn_mail.cpp +++ b/protocols/MSN/src/msn_mail.cpp @@ -282,7 +282,7 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial) MCONTACT hContact = MSN_HContactFromEmail(MyOptions.szEmail); if (hContact) { - pcli->pfnRemoveEvent(hContact, 1); + g_CLI.pfnRemoveEvent(hContact, 1); displayEmailCount(hContact); if (ShowPopup && !getByte("DisableHotmailTray", 1)) { @@ -296,7 +296,7 @@ void CMsnProto::sttNotificationMessage(char* msgBody, bool isInitial) cle.hIcon = Skin_LoadIcon(SKINICON_OTHER_SENDEMAIL); cle.szTooltip.w = tBuffer2; cle.pszService = buf; - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); } } diff --git a/protocols/MSN/src/msn_menu.cpp b/protocols/MSN/src/msn_menu.cpp index 3cf8a94b84..00b0d3384c 100644 --- a/protocols/MSN/src/msn_menu.cpp +++ b/protocols/MSN/src/msn_menu.cpp @@ -47,7 +47,7 @@ INT_PTR CMsnProto::MsnGotoInbox(WPARAM, LPARAM) { MCONTACT hContact = MSN_HContactFromEmail(MyOptions.szEmail); if (hContact) - pcli->pfnRemoveEvent(hContact, 1); + g_CLI.pfnRemoveEvent(hContact, 1); MsnInvokeMyURL(true, "http://mail.live.com?rru=inbox"); return 0; diff --git a/protocols/MSN/src/msn_misc.cpp b/protocols/MSN/src/msn_misc.cpp index 8912cc133a..b7a800b6ee 100644 --- a/protocols/MSN/src/msn_misc.cpp +++ b/protocols/MSN/src/msn_misc.cpp @@ -742,7 +742,7 @@ void HandlePopupData(PopupData *tData) { if (tData->flags & MSN_HOTMAIL_POPUP) { MCONTACT hContact = tData->proto->MSN_HContactFromEmail(tData->proto->MyOptions.szEmail, nullptr); if (hContact) - pcli->pfnRemoveEvent(hContact, 1); + g_CLI.pfnRemoveEvent(hContact, 1); if (tData->flags & MSN_ALLOW_ENTER) tData->proto->MsnInvokeMyURL(true, tData->url); } @@ -755,7 +755,7 @@ void RemovePopupData(PopupData *tData) { if (tData != nullptr && (tData->flags & MSN_HOTMAIL_POPUP)) { MCONTACT hContact = tData->proto->MSN_HContactFromEmail(tData->proto->MyOptions.szEmail, nullptr); if (hContact) - pcli->pfnRemoveEvent(hContact, 1); + g_CLI.pfnRemoveEvent(hContact, 1); } } diff --git a/protocols/MSN/src/msn_svcs.cpp b/protocols/MSN/src/msn_svcs.cpp index 70ec17fc56..919f92bafc 100644 --- a/protocols/MSN/src/msn_svcs.cpp +++ b/protocols/MSN/src/msn_svcs.cpp @@ -260,7 +260,7 @@ void CMsnProto::OnContactDeleted(MCONTACT hContact) else { char szEmail[MSN_MAX_EMAIL_LEN]; if (MSN_IsMeByContact(hContact, szEmail)) - pcli->pfnRemoveEvent(hContact, 1); + g_CLI.pfnRemoveEvent(hContact, 1); if (szEmail[0]) { debugLogA("Deleted Handler Email"); diff --git a/protocols/MinecraftDynmap/src/main.cpp b/protocols/MinecraftDynmap/src/main.cpp index d65a46fed8..268c8c1734 100644 --- a/protocols/MinecraftDynmap/src/main.cpp +++ b/protocols/MinecraftDynmap/src/main.cpp @@ -23,7 +23,6 @@ along with this program. If not, see . #include "stdafx.h" CMPlugin g_plugin; -CLIST_INTERFACE* pcli; std::string g_strUserAgent; @@ -58,8 +57,6 @@ static HANDLE g_hEvents[1]; extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); - InitIcons(); // Init native User-Agent diff --git a/protocols/Omegle/src/main.cpp b/protocols/Omegle/src/main.cpp index 8f1e9a35d5..51e4a2800a 100644 --- a/protocols/Omegle/src/main.cpp +++ b/protocols/Omegle/src/main.cpp @@ -25,7 +25,6 @@ along with this program. If not, see . // TODO: Make following as "globals" structure? CMPlugin g_plugin; -CLIST_INTERFACE* pcli; std::string g_strUserAgent; DWORD g_mirandaVersion; @@ -61,8 +60,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); - InitIcons(); // Init native User-Agent diff --git a/protocols/SkypeWeb/src/main.cpp b/protocols/SkypeWeb/src/main.cpp index 394126f175..1f280d8763 100644 --- a/protocols/SkypeWeb/src/main.cpp +++ b/protocols/SkypeWeb/src/main.cpp @@ -19,7 +19,6 @@ along with this program. If not, see . CMPlugin g_plugin; CHAT_MANAGER *pci; -CLIST_INTERFACE *pcli; char g_szMirVer[100]; HANDLE g_hCallEvent; @@ -63,7 +62,6 @@ int CSkypeProto::OnModulesLoaded(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); pci = Chat_GetInterface(); Miranda_GetVersionText(g_szMirVer, sizeof(g_szMirVer)); diff --git a/protocols/SkypeWeb/src/skype_trouter.cpp b/protocols/SkypeWeb/src/skype_trouter.cpp index 65e4108808..0b39aeea58 100644 --- a/protocols/SkypeWeb/src/skype_trouter.cpp +++ b/protocols/SkypeWeb/src/skype_trouter.cpp @@ -201,7 +201,7 @@ void CSkypeProto::OnTrouterEvent(const JSONNode &body, const JSONNode &) CMStringW tooltip(FORMAT, TranslateT("Incoming call from %s"), Clist_GetContactDisplayName(hContact)); cle.szTooltip.w = tooltip.GetBuffer(); - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); ShowNotification(Clist_GetContactDisplayName(hContact), TranslateT("Incoming call"), hContact, SKYPE_DB_EVENT_TYPE_INCOMING_CALL); } @@ -224,9 +224,9 @@ INT_PTR CSkypeProto::OnIncomingCallCLE(WPARAM, LPARAM lParam) INT_PTR CSkypeProto::OnIncomingCallPP(WPARAM wParam, LPARAM hContact) { - while (CLISTEVENT *cle = pcli->pfnGetEvent(hContact, 0)) { + while (CLISTEVENT *cle = g_CLI.pfnGetEvent(hContact, 0)) { if (cle->lParam == SKYPE_DB_EVENT_TYPE_INCOMING_CALL) { - pcli->pfnRemoveEvent(hContact, cle->hDbEvent); + g_CLI.pfnRemoveEvent(hContact, cle->hDbEvent); break; } } diff --git a/protocols/Tox/src/main.cpp b/protocols/Tox/src/main.cpp index 0d128b5d65..a4d2df911a 100644 --- a/protocols/Tox/src/main.cpp +++ b/protocols/Tox/src/main.cpp @@ -2,7 +2,6 @@ CMPlugin g_plugin; CHAT_MANAGER *pci; -CLIST_INTERFACE *pcli; HANDLE hProfileFolderPath; @@ -51,7 +50,6 @@ int OnModulesLoaded(WPARAM, LPARAM) extern "C" int __declspec(dllexport) Load(void) { pci = Chat_GetInterface(); - pcli = Clist_GetInterface(); HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); diff --git a/protocols/Twitter/src/main.cpp b/protocols/Twitter/src/main.cpp index 16a00f0ac9..7069d21bd3 100644 --- a/protocols/Twitter/src/main.cpp +++ b/protocols/Twitter/src/main.cpp @@ -23,7 +23,6 @@ along with this program. If not, see . #include "theme.h" CMPlugin g_plugin; -CLIST_INTERFACE *pcli; ///////////////////////////////////////////////////////////////////////////////////////// @@ -55,8 +54,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); - InitIcons(); InitContactMenus(); TwitterInitSounds(); diff --git a/protocols/VKontakte/src/main.cpp b/protocols/VKontakte/src/main.cpp index 493c01411a..d267ede49a 100644 --- a/protocols/VKontakte/src/main.cpp +++ b/protocols/VKontakte/src/main.cpp @@ -19,7 +19,6 @@ along with this program. If not, see . #include "version.h" CMPlugin g_plugin; -CLIST_INTERFACE *pcli; ///////////////////////////////////////////////////////////////////////////////////////// @@ -52,8 +51,6 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_PROTOC extern "C" int __declspec(dllexport) Load() { - pcli = Clist_GetInterface(); - InitIcons(); return 0; } diff --git a/protocols/VKontakte/src/misc.cpp b/protocols/VKontakte/src/misc.cpp index 43ff4a5c0d..1aa0f98c15 100644 --- a/protocols/VKontakte/src/misc.cpp +++ b/protocols/VKontakte/src/misc.cpp @@ -773,9 +773,9 @@ void CVkProto::MarkDialogAsRead(MCONTACT hContact) DBEVENTINFO dbei = {}; if (!db_event_get(hDBEvent, &dbei) && !mir_strcmp(m_szModuleName, dbei.szModule)) { db_event_markRead(hContact, hDBEvent); - pcli->pfnRemoveEvent(hMContact, hDBEvent); + g_CLI.pfnRemoveEvent(hMContact, hDBEvent); if (hContact != hMContact) - pcli->pfnRemoveEvent(hContact, hDBEvent); + g_CLI.pfnRemoveEvent(hContact, hDBEvent); } hDBEvent = db_event_next(hContact, hDBEvent); diff --git a/protocols/VKontakte/src/vk_feed.cpp b/protocols/VKontakte/src/vk_feed.cpp index 87fea21168..20e2bdfbe6 100644 --- a/protocols/VKontakte/src/vk_feed.cpp +++ b/protocols/VKontakte/src/vk_feed.cpp @@ -87,7 +87,7 @@ void CVkProto::AddCListEvent(bool bNews) wchar_t toolTip[255]; mir_snwprintf(toolTip, bNews ? TranslateT("New news") : TranslateT("New notifications")); cle.szTooltip.w = toolTip; - pcli->pfnAddEvent(&cle); + g_CLI.pfnAddEvent(&cle); } ////////////////////////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3