summaryrefslogtreecommitdiff
path: root/plugins/TopToolBar/src
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-05-23 23:29:25 +0300
committerGeorge Hazan <ghazan@miranda.im>2018-05-23 23:29:25 +0300
commit176e52e14fd0358a7f26ca8d7b0205244dfde2e7 (patch)
tree10da2f8951d20103af0215c38d07ea96ba61c191 /plugins/TopToolBar/src
parent91b13500b47a51f3a284d9f409b7b8dac167a06d (diff)
no need to initialize pcli variable in each plugin (only in Clist_*)
Diffstat (limited to 'plugins/TopToolBar/src')
-rw-r--r--plugins/TopToolBar/src/InternalButtons.cpp6
-rw-r--r--plugins/TopToolBar/src/main.cpp3
-rw-r--r--plugins/TopToolBar/src/toolbarwnd.cpp2
3 files changed, 4 insertions, 7 deletions
diff --git a/plugins/TopToolBar/src/InternalButtons.cpp b/plugins/TopToolBar/src/InternalButtons.cpp
index 56c3714919..b1e2613b0a 100644
--- a/plugins/TopToolBar/src/InternalButtons.cpp
+++ b/plugins/TopToolBar/src/InternalButtons.cpp
@@ -38,7 +38,7 @@ INT_PTR TTBInternalMainMenuButt(WPARAM, LPARAM)
{
POINT pt;
GetCursorPos(&pt);
- TrackPopupMenu(Menu_GetMainMenu(), TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, nullptr);
+ TrackPopupMenu(Menu_GetMainMenu(), TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, g_CLI.hwndContactList, nullptr);
return 0;
}
@@ -46,7 +46,7 @@ INT_PTR TTBInternalStatusMenuButt(WPARAM, LPARAM)
{
POINT pt;
GetCursorPos(&pt);
- TrackPopupMenu(Menu_GetStatusMenu(), TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, pcli->hwndContactList, nullptr);
+ TrackPopupMenu(Menu_GetStatusMenu(), TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, g_CLI.hwndContactList, nullptr);
return 0;
}
@@ -61,7 +61,7 @@ INT_PTR TTBInternalSoundsOnOff(WPARAM, LPARAM)
void InitInternalButtons()
{
- hwndContactTree = pcli->hwndContactTree;
+ hwndContactTree = g_CLI.hwndContactTree;
CreateServiceFunction(TTBI_SOUNDSONOFF, TTBInternalSoundsOnOff);
CreateServiceFunction(TTBI_MAINMENUBUTT, TTBInternalMainMenuButt);
diff --git a/plugins/TopToolBar/src/main.cpp b/plugins/TopToolBar/src/main.cpp
index 2715332a7a..e83a59dd08 100644
--- a/plugins/TopToolBar/src/main.cpp
+++ b/plugins/TopToolBar/src/main.cpp
@@ -2,7 +2,6 @@
#include "stdafx.h"
CMPlugin g_plugin;
-CLIST_INTERFACE *pcli;
IconItem iconList[] =
{
@@ -42,8 +41,6 @@ CMPlugin::CMPlugin() :
extern "C" int __declspec(dllexport) Load(void)
{
- pcli = Clist_GetInterface();
-
g_plugin.registerIcon(TTB_OPTDIR, iconList, TTB_OPTDIR);
LoadToolbarModule();
diff --git a/plugins/TopToolBar/src/toolbarwnd.cpp b/plugins/TopToolBar/src/toolbarwnd.cpp
index cef033447d..cd5dcf1900 100644
--- a/plugins/TopToolBar/src/toolbarwnd.cpp
+++ b/plugins/TopToolBar/src/toolbarwnd.cpp
@@ -240,7 +240,7 @@ LRESULT CALLBACK TopToolBarProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara
void CALLBACK OnEventFire()
{
- HWND parent = pcli->hwndContactList;
+ HWND parent = g_CLI.hwndContactList;
if (parent == nullptr) // no clist, no buttons
return;