diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-25 21:53:56 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-25 21:53:56 +0000 |
commit | 06bb38dfa357a731e16980d03ab100b84e5cb989 (patch) | |
tree | 686bd8edc9e71087bb943ec3fe6dbb5193d09247 /plugins/Ping | |
parent | cc6abc9eed963a2659c121ddec136f1ab4256535 (diff) |
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
Diffstat (limited to 'plugins/Ping')
-rw-r--r-- | plugins/Ping/src/common.h | 1 | ||||
-rw-r--r-- | plugins/Ping/src/ping.cpp | 14 | ||||
-rw-r--r-- | plugins/Ping/src/pingthread.cpp | 4 | ||||
-rw-r--r-- | plugins/Ping/src/utils.cpp | 5 |
4 files changed, 14 insertions, 10 deletions
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 <m_protosvc.h>
#include <m_clui.h>
#include <m_cluiframes.h>
+#include <m_clistint.h>
#include <m_fontservice.h>
#include <m_icolib.h>
#include <win2k.h>
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) {
|