From 06bb38dfa357a731e16980d03ab100b84e5cb989 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 25 Jun 2015 21:53:56 +0000 Subject: MS_CLUI_GETHWND & MS_CLUI_GETHWNDTREE replaced with pcli->hwndContactList & pcli->hwndContactTree respectively git-svn-id: http://svn.miranda-ng.org/main/trunk@14386 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Ping/src/common.h | 1 + plugins/Ping/src/ping.cpp | 14 ++++++++------ plugins/Ping/src/pingthread.cpp | 4 ++-- plugins/Ping/src/utils.cpp | 5 +++-- 4 files changed, 14 insertions(+), 10 deletions(-) (limited to 'plugins/Ping/src') diff --git a/plugins/Ping/src/common.h b/plugins/Ping/src/common.h index 2bcf3b286a..b044c440d5 100644 --- a/plugins/Ping/src/common.h +++ b/plugins/Ping/src/common.h @@ -24,6 +24,7 @@ #include #include #include +#include #include #include #include diff --git a/plugins/Ping/src/ping.cpp b/plugins/Ping/src/ping.cpp index 3a4f5f26b6..261b959ada 100644 --- a/plugins/Ping/src/ping.cpp +++ b/plugins/Ping/src/ping.cpp @@ -1,5 +1,6 @@ #include "common.h" +CLIST_INTERFACE *pcli; HINSTANCE hInst; int hLangpack = 0; @@ -34,7 +35,8 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda return &pluginInfo; } -void CreatePluginServices() { +void CreatePluginServices() +{ // general CreateServiceFunction(PLUG "/Ping", PluginPing); CreateServiceFunction(PLUG "/DblClick", DblClick); @@ -79,7 +81,8 @@ int OnShutdown(WPARAM wParam, LPARAM lParam) { return 0; } -int OnModulesLoaded(WPARAM, LPARAM) { +int OnModulesLoaded(WPARAM, LPARAM) +{ NETLIBUSER nl_user = { 0 }; nl_user.cbSize = sizeof(nl_user); nl_user.szSettingsModule = PLUG; @@ -127,11 +130,10 @@ static IconItem iconList[] = extern "C" __declspec(dllexport) int Load(void) { - //if(init_raw_ping()) { - //MessageBox(0, Translate("Failed to initialize. Plugin disabled."), Translate("Ping Plugin"), MB_OK | MB_ICONERROR); - //return 1; + mir_getLP(&pluginInfo); + mir_getCLI(); + use_raw_ping = false; - //} db_set_b(0, PLUG, "UsingRawSockets", (BYTE)use_raw_ping); DuplicateHandle(GetCurrentProcess(), GetCurrentThread(), GetCurrentProcess(), &mainThread, THREAD_SET_CONTEXT, FALSE, 0); diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp index b44d165833..1534edbfee 100644 --- a/plugins/Ping/src/pingthread.cpp +++ b/plugins/Ping/src/pingthread.cpp @@ -228,7 +228,7 @@ void __cdecl sttCheckStatusThreadProc(void *vp) if (!get_list_changed()) { upCount = count; - total = index; + total = (int)index; } else total = 0; } @@ -952,7 +952,7 @@ void AttachToClist(bool attach) void InitList() { - hwnd_clist = (HWND)CallService(MS_CLUI_GETHWND, 0, 0); + hwnd_clist = pcli->hwndContactList; WNDCLASS wndclass; diff --git a/plugins/Ping/src/utils.cpp b/plugins/Ping/src/utils.cpp index 16adad8964..3040e69270 100644 --- a/plugins/Ping/src/utils.cpp +++ b/plugins/Ping/src/utils.cpp @@ -178,9 +178,10 @@ INT_PTR ToggleEnabled(WPARAM wParam, LPARAM lParam) { return 0; } -INT_PTR EditContact(WPARAM wParam, LPARAM lParam) { +INT_PTR EditContact(WPARAM wParam, LPARAM lParam) +{ PINGLIST pl; - HWND hwndList = (HWND)CallService(MS_CLUI_GETHWND, 0, 0); + HWND hwndList = pcli->hwndContactList; CallService(PLUG "/GetPingList", 0, (LPARAM)&pl); for (pinglist_it i = pl.begin(); i != pl.end(); ++i) { -- cgit v1.2.3