summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats/src/dlgoption_subglobal.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/HistoryStats/src/dlgoption_subglobal.cpp')
-rw-r--r--plugins/HistoryStats/src/dlgoption_subglobal.cpp13
1 files changed, 2 insertions, 11 deletions
diff --git a/plugins/HistoryStats/src/dlgoption_subglobal.cpp b/plugins/HistoryStats/src/dlgoption_subglobal.cpp
index 2ceed39e26..5f340c857e 100644
--- a/plugins/HistoryStats/src/dlgoption_subglobal.cpp
+++ b/plugins/HistoryStats/src/dlgoption_subglobal.cpp
@@ -239,17 +239,8 @@ void DlgOption::SubGlobal::onWMInitDialog()
// insert known protocols
m_hHideContactMenuProtos.clear();
- PROTOACCOUNT **protoList;
- int protoCount;
- Proto_EnumAccounts(&protoCount, &protoList);
- upto_each_(i, protoCount)
- {
- m_hHideContactMenuProtos.push_back(m_Options.insertCheck(
- m_hProtocols,
- protoList[i]->tszAccountName,
- 0,
- reinterpret_cast<INT_PTR>(protoList[i]->szModuleName)));
- }
+ for (auto &pa : Accounts())
+ m_hHideContactMenuProtos.push_back(m_Options.insertCheck(m_hProtocols, pa->tszAccountName, 0, INT_PTR(pa->szModuleName)));
m_Options.ensureVisible(nullptr);