From 10bc9e42dfba6ed8be41199243d688c2e367dc0d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 30 Jun 2015 18:59:38 +0000 Subject: MS_CLIST_GETSTATUSMODEDESCRIPTION & MS_CLIST_GETCONTACTDISPLAYNAME replaced with pcli->* members git-svn-id: http://svn.miranda-ng.org/main/trunk@14459 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HistoryStats/src/main.cpp | 4 ++++ plugins/HistoryStats/src/mirandahistory.cpp | 2 +- plugins/HistoryStats/src/mu_common.cpp | 10 ---------- plugins/HistoryStats/src/mu_common.h | 2 -- plugins/HistoryStats/src/settingsserializer.cpp | 2 +- plugins/HistoryStats/src/stdafx.h | 1 - 6 files changed, 6 insertions(+), 15 deletions(-) (limited to 'plugins/HistoryStats/src') diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp index b468dd96bf..7c5c88fb9f 100644 --- a/plugins/HistoryStats/src/main.cpp +++ b/plugins/HistoryStats/src/main.cpp @@ -11,6 +11,7 @@ #include "iconlib.h" #include "dlgconfigure.h" +CLIST_INTERFACE *pcli; HINSTANCE g_hInst; int hLangpack; @@ -418,6 +419,9 @@ extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD) extern "C" __declspec(dllexport) int Load() { + mir_getLP(&g_pluginInfoEx); + mir_getCLI(); + // init COM, needed for GUID generation CoInitialize(NULL); diff --git a/plugins/HistoryStats/src/mirandahistory.cpp b/plugins/HistoryStats/src/mirandahistory.cpp index 8d703015e2..2c79237346 100644 --- a/plugins/HistoryStats/src/mirandahistory.cpp +++ b/plugins/HistoryStats/src/mirandahistory.cpp @@ -76,7 +76,7 @@ void MirandaHistory::readContacts() if (!pProtoName) pProtoName = con::ProtoUnknown; // MEMO: alternative would be "break;" - ext::string curNick = mu::clist::getContactDisplayName(hContact); + ext::string curNick = pcli->pfnGetContactDisplayName(hContact, 0); // retrieve protocol const ext::a::string curProtoName = pProtoName; diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp index e5508dade9..f380b2a35e 100644 --- a/plugins/HistoryStats/src/mu_common.cpp +++ b/plugins/HistoryStats/src/mu_common.cpp @@ -36,16 +36,6 @@ namespace mu mi.pszService = const_cast(pszService); return Menu_AddContactMenuItem(&mi); } - - const TCHAR* getContactDisplayName(MCONTACT hContact) - { - return reinterpret_cast(CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_UNICODE)); - } - - const TCHAR* getStatusModeDescription(int nStatusMode) - { - return reinterpret_cast(CallService(MS_CLIST_GETSTATUSMODEDESCRIPTION, static_cast(nStatusMode), GSMDF_UNICODE)); - } } /* diff --git a/plugins/HistoryStats/src/mu_common.h b/plugins/HistoryStats/src/mu_common.h index 0f760cfcfe..6769414b0b 100644 --- a/plugins/HistoryStats/src/mu_common.h +++ b/plugins/HistoryStats/src/mu_common.h @@ -15,8 +15,6 @@ namespace mu { HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, HGENMENU hRoot = 0); HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService); - const TCHAR* getContactDisplayName(MCONTACT hContact); - const TCHAR* getStatusModeDescription(int nStatusMode); } /* diff --git a/plugins/HistoryStats/src/settingsserializer.cpp b/plugins/HistoryStats/src/settingsserializer.cpp index 265ecb3d03..842657fdad 100644 --- a/plugins/HistoryStats/src/settingsserializer.cpp +++ b/plugins/HistoryStats/src/settingsserializer.cpp @@ -85,7 +85,7 @@ void SettingsSerializer::readFromDB() { clearColumns(); - ext::string defaultNick = mu::clist::getContactDisplayName(0); + ext::string defaultNick = pcli->pfnGetContactDisplayName(0, 0); SettingsTree settingsTree; // read version tag diff --git a/plugins/HistoryStats/src/stdafx.h b/plugins/HistoryStats/src/stdafx.h index 4b623bc649..6533dd30e7 100644 --- a/plugins/HistoryStats/src/stdafx.h +++ b/plugins/HistoryStats/src/stdafx.h @@ -39,7 +39,6 @@ #include // not used #include #include -#include // not used #include // not used #include #include -- cgit v1.2.3