From 83310365c69bd40365ee0ae0e16c99c28e24cd0b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 19 Jun 2015 14:24:12 +0000 Subject: - all static protocol services replaced with functions; - m_protomod.h removed as useless git-svn-id: http://svn.miranda-ng.org/main/trunk@14260 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HistoryStats/src/dlgoption_subglobal.cpp | 18 ++++++++---------- plugins/HistoryStats/src/dlgoption_subinput.cpp | 18 ++++++++---------- plugins/HistoryStats/src/mirandahistory.cpp | 14 ++++++-------- plugins/HistoryStats/src/mu_common.cpp | 17 ----------------- plugins/HistoryStats/src/mu_common.h | 10 ---------- plugins/HistoryStats/src/protocol.cpp | 2 +- plugins/HistoryStats/src/stdafx.h | 1 - 7 files changed, 23 insertions(+), 57 deletions(-) (limited to 'plugins/HistoryStats/src') diff --git a/plugins/HistoryStats/src/dlgoption_subglobal.cpp b/plugins/HistoryStats/src/dlgoption_subglobal.cpp index 9df4998661..27d8071290 100644 --- a/plugins/HistoryStats/src/dlgoption_subglobal.cpp +++ b/plugins/HistoryStats/src/dlgoption_subglobal.cpp @@ -241,16 +241,14 @@ void DlgOption::SubGlobal::onWMInitDialog() PROTOACCOUNT **protoList; int protoCount; - - if (mu::proto::enumProtocols(&protoCount, &protoList) == 0) { - upto_each_(i, protoCount) - { - m_hHideContactMenuProtos.push_back(m_Options.insertCheck( - m_hProtocols, - Protocol::getDisplayName(protoList[i]->szModuleName).c_str(), - 0, - reinterpret_cast(protoList[i]->szModuleName))); - } + Proto_EnumAccounts(&protoCount, &protoList); + upto_each_(i, protoCount) + { + m_hHideContactMenuProtos.push_back(m_Options.insertCheck( + m_hProtocols, + Protocol::getDisplayName(protoList[i]->szModuleName).c_str(), + 0, + reinterpret_cast(protoList[i]->szModuleName))); } m_Options.ensureVisible(NULL); diff --git a/plugins/HistoryStats/src/dlgoption_subinput.cpp b/plugins/HistoryStats/src/dlgoption_subinput.cpp index 68a3a9d2e9..90b9ff8e66 100644 --- a/plugins/HistoryStats/src/dlgoption_subinput.cpp +++ b/plugins/HistoryStats/src/dlgoption_subinput.cpp @@ -103,16 +103,14 @@ void DlgOption::SubInput::onWMInitDialog() PROTOACCOUNT **protoList; int protoCount; - - if (mu::proto::enumProtocols(&protoCount, &protoList) == 0) { - upto_each_(i, protoCount) - { - m_hProtosIgnore.push_back(m_Options.insertCheck( - m_hProtocols, - Protocol::getDisplayName(protoList[i]->szModuleName).c_str(), - 0, - reinterpret_cast(protoList[i]->szModuleName))); - } + Proto_EnumAccounts(&protoCount, &protoList); + upto_each_(i, protoCount) + { + m_hProtosIgnore.push_back(m_Options.insertCheck( + m_hProtocols, + Protocol::getDisplayName(protoList[i]->szModuleName).c_str(), + 0, + reinterpret_cast(protoList[i]->szModuleName))); } // diable filtering raw RTF if 'rtfconv.dll' isn't available diff --git a/plugins/HistoryStats/src/mirandahistory.cpp b/plugins/HistoryStats/src/mirandahistory.cpp index 498e414d8d..8d703015e2 100644 --- a/plugins/HistoryStats/src/mirandahistory.cpp +++ b/plugins/HistoryStats/src/mirandahistory.cpp @@ -13,16 +13,14 @@ void MirandaHistory::populateProtocols() PROTOACCOUNT **protoList; int protoCount; + Proto_EnumAccounts(&protoCount, &protoList); + upto_each_(i, protoCount) + { + ext::a::string protoName = protoList[i]->szModuleName; - if (mu::proto::enumProtocols(&protoCount, &protoList) == 0) { - upto_each_(i, protoCount) - { - ext::a::string protoName = protoList[i]->szModuleName; - - Protocol& curProto = m_Protocols[protoName]; + Protocol& curProto = m_Protocols[protoName]; - curProto.displayName = Protocol::getDisplayName(protoName); - } + curProto.displayName = Protocol::getDisplayName(protoName); } m_DefaultProtocol.displayName = TranslateT("(Unknown)"); diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp index 4587d81ff8..971a525ae3 100644 --- a/plugins/HistoryStats/src/mu_common.cpp +++ b/plugins/HistoryStats/src/mu_common.cpp @@ -178,23 +178,6 @@ namespace mu } } - /* - * proto - */ - - namespace proto - { - int enumProtocols(int* numProtocols, PROTOACCOUNT*** ppProtoDescriptors) - { - return ProtoEnumAccounts(numProtocols, ppProtoDescriptors); - } - - const char* getContactBaseProto(MCONTACT hContact) - { - return reinterpret_cast(CallService(MS_PROTO_GETCONTACTBASEPROTO, hContact, 0)); - } - } - /* * protosvc */ diff --git a/plugins/HistoryStats/src/mu_common.h b/plugins/HistoryStats/src/mu_common.h index c249659a1a..6786201805 100644 --- a/plugins/HistoryStats/src/mu_common.h +++ b/plugins/HistoryStats/src/mu_common.h @@ -71,16 +71,6 @@ namespace mu void addPage(WPARAM addInfo, const TCHAR* pszGroup, const TCHAR* pszTitle, const TCHAR* pszTab, DLGPROC pfnDlgProc, const char* pszTemplate, HINSTANCE hInstance, DWORD flags = ODPF_BOLDGROUPS); } - /* - * proto - */ - - namespace proto - { - int enumProtocols(int* numProtocols, PROTOACCOUNT*** ppProtoDescriptors); - const char* getContactBaseProto(MCONTACT hContact); - } - /* * protosvc */ diff --git a/plugins/HistoryStats/src/protocol.cpp b/plugins/HistoryStats/src/protocol.cpp index 8914310740..16374745d3 100644 --- a/plugins/HistoryStats/src/protocol.cpp +++ b/plugins/HistoryStats/src/protocol.cpp @@ -5,6 +5,6 @@ ext::string Protocol::getDisplayName(const ext::a::string& protocol) { - PROTOACCOUNT *pa = ProtoGetAccount(protocol.c_str()); + PROTOACCOUNT *pa = Proto_GetAccount(protocol.c_str()); return (pa == NULL) ? utils::fromA(protocol) : pa->tszAccountName; } diff --git a/plugins/HistoryStats/src/stdafx.h b/plugins/HistoryStats/src/stdafx.h index 76b7afa97b..0b8e3d16c6 100644 --- a/plugins/HistoryStats/src/stdafx.h +++ b/plugins/HistoryStats/src/stdafx.h @@ -58,7 +58,6 @@ #include #include // not used #include -#include // not used #include #include #include -- cgit v1.2.3