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/TooltipNotify/src/TooltipNotify.cpp | 4 ++-- plugins/TooltipNotify/src/main.cpp | 4 +--- 2 files changed, 3 insertions(+), 5 deletions(-) (limited to 'plugins/TooltipNotify/src') diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index a70a3d5c85..3644de47d4 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -837,7 +837,7 @@ void CTooltipNotify::OnTooltipDblClicked(CTooltip *pTooltip) { switch (m_sOptions.bLDblClick) { case SHOW_HIDE_CLIST: - pcli->pfnShowHide(); + g_CLI.pfnShowHide(); break; case OPEN_MSGDLG: @@ -851,7 +851,7 @@ void CTooltipNotify::OnTooltipDblClicked(CTooltip *pTooltip) } default: - pcli->pfnShowHide(); + g_CLI.pfnShowHide(); break; } } diff --git a/plugins/TooltipNotify/src/main.cpp b/plugins/TooltipNotify/src/main.cpp index 618e1adf9e..05fbbbe7ee 100644 --- a/plugins/TooltipNotify/src/main.cpp +++ b/plugins/TooltipNotify/src/main.cpp @@ -12,7 +12,7 @@ static HANDLE g_hProtoContactIsTyping = nullptr; // Main global object static CTooltipNotify *g_pTooltipNotify = nullptr; -CLIST_INTERFACE *pcli; + CMPlugin g_plugin; ///////////////////////////////////////////////////////////////////////////////////////// @@ -69,8 +69,6 @@ static int ModulesLoaded(WPARAM wParam, LPARAM lParam) extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); - g_pTooltipNotify = new CTooltipNotify(); assert(g_pTooltipNotify!=nullptr); -- cgit v1.2.3