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/StatusManager/src | |
parent | 91b13500b47a51f3a284d9f409b7b8dac167a06d (diff) |
no need to initialize pcli variable in each plugin (only in Clist_*)
Diffstat (limited to 'plugins/StatusManager/src')
-rw-r--r-- | plugins/StatusManager/src/StartupStatus/startupstatus.cpp | 8 | ||||
-rw-r--r-- | plugins/StatusManager/src/main.cpp | 3 |
2 files changed, 4 insertions, 7 deletions
diff --git a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp index a4e67e1b31..7f4463a93e 100644 --- a/plugins/StatusManager/src/StartupStatus/startupstatus.cpp +++ b/plugins/StatusManager/src/StartupStatus/startupstatus.cpp @@ -268,13 +268,13 @@ static int OnShutdown(WPARAM, LPARAM) // set windowstate and docked for next startup if (db_get_b(0, SSMODULENAME, SETTING_SETWINSTATE, 0)) { int state = db_get_b(0, SSMODULENAME, SETTING_WINSTATE, SETTING_STATE_NORMAL); - HWND hClist = pcli->hwndContactList; + HWND hClist = g_CLI.hwndContactList; BOOL isHidden = !IsWindowVisible(hClist); switch (state) { case SETTING_STATE_HIDDEN: // try to use services where possible if (!isHidden) - pcli->pfnShowHide(); + g_CLI.pfnShowHide(); break; case SETTING_STATE_MINIMIZED: @@ -285,7 +285,7 @@ static int OnShutdown(WPARAM, LPARAM) case SETTING_STATE_NORMAL: // try to use services where possible (that's what they're for) if (isHidden) - pcli->pfnShowHide(); + g_CLI.pfnShowHide(); break; } } @@ -366,7 +366,7 @@ int SSModuleLoaded(WPARAM, LPARAM) // win size and location if (db_get_b(0, SSMODULENAME, SETTING_SETWINLOCATION, 0) || db_get_b(0, SSMODULENAME, SETTING_SETWINSIZE, 0)) { - HWND hClist = pcli->hwndContactList; + HWND hClist = g_CLI.hwndContactList; // store in db if (db_get_b(0, SSMODULENAME, SETTING_SETWINLOCATION, 0)) { diff --git a/plugins/StatusManager/src/main.cpp b/plugins/StatusManager/src/main.cpp index d5f1aa39a5..7bf1f1f69a 100644 --- a/plugins/StatusManager/src/main.cpp +++ b/plugins/StatusManager/src/main.cpp @@ -20,7 +20,6 @@ #include "stdafx.h" CMPlugin g_plugin; -CLIST_INTERFACE *pcli; ///////////////////////////////////////////////////////////////////////////////////////// // returns plugin's extended information @@ -95,8 +94,6 @@ int OnAccChanged(WPARAM wParam, LPARAM lParam) extern "C" int __declspec(dllexport) Load(void) { - pcli = Clist_GetInterface(); - HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded); HookEvent(ME_PROTO_ACCLISTCHANGED, OnAccChanged); |