From be616d81bdaf8fd4ae61b0a145fb81bbdf467994 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Jun 2015 22:03:02 +0000 Subject: YEEHAW! CLISTMENUITEM::pszPopupName also died git-svn-id: http://svn.miranda-ng.org/main/trunk@14404 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HistoryStats/src/main.cpp | 21 +++++---------------- plugins/HistoryStats/src/mu_common.cpp | 4 ++-- plugins/HistoryStats/src/mu_common.h | 2 +- 3 files changed, 8 insertions(+), 19 deletions(-) (limited to 'plugins/HistoryStats') diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp index 28536605e8..b468dd96bf 100644 --- a/plugins/HistoryStats/src/main.cpp +++ b/plugins/HistoryStats/src/main.cpp @@ -155,29 +155,18 @@ void AddMainMenu() CreateServiceFunction(con::SvcShowStatistics, MenuShowStatistics); CreateServiceFunction(con::SvcConfigure, MenuConfigure); + HGENMENU hRoot = bInPopup ? Menu_CreateRoot(MO_MAIN, LPGENT("Statistics"), 1910000000) : NULL; + g_hMenuCreateStatistics = mu::clist::addMainMenuItem( - LPGENT("Create statistics"), // MEMO: implicit translation - 0, - 1910000000, - IconLib::getIcon(IconLib::iiMenuCreateStatistics), - con::SvcCreateStatistics, - bInPopup ? LPGENT("Statistics") : NULL); + LPGENT("Create statistics"), 0, 1910000000, IconLib::getIcon(IconLib::iiMenuCreateStatistics), con::SvcCreateStatistics, hRoot); g_hMenuShowStatistics = mu::clist::addMainMenuItem( LPGENT("Show statistics"), // MEMO: implicit translation - 0, - 1910000001, - IconLib::getIcon(IconLib::iiMenuShowStatistics), - con::SvcShowStatistics, - bInPopup ? LPGENT("Statistics") : NULL); + 0, 1910000001, IconLib::getIcon(IconLib::iiMenuShowStatistics), con::SvcShowStatistics, hRoot); g_hMenuConfigure = mu::clist::addMainMenuItem( bInPopup ? LPGENT("Configure...") : LPGENT("Configure statistics..."), // MEMO: implicit translation - 0, - 1910000002, - IconLib::getIcon(IconLib::iiMenuConfigure), - con::SvcConfigure, - bInPopup ? LPGENT("Statistics") : NULL); + 0, 1910000002, IconLib::getIcon(IconLib::iiMenuConfigure), con::SvcConfigure, hRoot); } /* diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp index 0446013c4d..7c344b2738 100644 --- a/plugins/HistoryStats/src/mu_common.cpp +++ b/plugins/HistoryStats/src/mu_common.cpp @@ -12,7 +12,7 @@ namespace mu namespace clist { - HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const TCHAR* pszPopupName /* = NULL */) + HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, HGENMENU hRoot) { // TODO: support for unicode-core with unicode-aware CList CLISTMENUITEM mi = { 0 }; @@ -21,7 +21,7 @@ namespace mu mi.position = position; mi.hIcon = hIcon; mi.pszService = const_cast(pszService); - mi.ptszPopupName = (TCHAR*)pszPopupName; + mi.hParentMenu = hRoot; return Menu_AddMainMenuItem(&mi); } diff --git a/plugins/HistoryStats/src/mu_common.h b/plugins/HistoryStats/src/mu_common.h index e05b36c078..9e1bf12eae 100644 --- a/plugins/HistoryStats/src/mu_common.h +++ b/plugins/HistoryStats/src/mu_common.h @@ -13,7 +13,7 @@ namespace mu namespace clist { - HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const TCHAR* pszPopupName = NULL); + 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 char* pszContactOwner = NULL); const TCHAR* getContactDisplayName(MCONTACT hContact); const TCHAR* getStatusModeDescription(int nStatusMode); -- cgit v1.2.3