summaryrefslogtreecommitdiff
path: root/plugins/HistoryStats
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-26 22:03:02 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-26 22:03:02 +0000
commitbe616d81bdaf8fd4ae61b0a145fb81bbdf467994 (patch)
treec0d4798a8e882583f74eb166508e0f4ce96bd4e4 /plugins/HistoryStats
parentc89c550677f40d8b2010de442053cba81ba06d96 (diff)
YEEHAW! CLISTMENUITEM::pszPopupName also died
git-svn-id: http://svn.miranda-ng.org/main/trunk@14404 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryStats')
-rw-r--r--plugins/HistoryStats/src/main.cpp21
-rw-r--r--plugins/HistoryStats/src/mu_common.cpp4
-rw-r--r--plugins/HistoryStats/src/mu_common.h2
3 files changed, 8 insertions, 19 deletions
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<char*>(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);