summaryrefslogtreecommitdiff
path: root/plugins/Quotes
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/Quotes
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/Quotes')
-rw-r--r--plugins/Quotes/src/Forex.cpp36
1 files changed, 5 insertions, 31 deletions
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp
index 837220368f..9dcc4a8618 100644
--- a/plugins/Quotes/src/Forex.cpp
+++ b/plugins/Quotes/src/Forex.cpp
@@ -84,32 +84,25 @@ namespace
void InitMenu()
{
CLISTMENUITEM mi = { 0 };
- mi.ptszName = LPGENT("Quotes");
- mi.flags = CMIF_TCHAR | CMIF_ROOTHANDLE;
- mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
- HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
+ mi.flags = CMIF_TCHAR;
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Quotes"), 0, Quotes_GetIconHandle(IDI_ICON_MAIN));
mi.ptszName = LPGENT("Enable/Disable Auto Update");
- mi.flags = CMIF_TCHAR | CMIF_ROOTHANDLE;
mi.position = 10100001;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
mi.pszService = g_pszAutoUpdateCmd;
- mi.hParentMenu = hMenuRoot;
g_hEnableDisableMenu = Menu_AddMainMenuItem(&mi);
CreateServiceFunction(mi.pszService, QuotesMenu_EnableDisable);
UpdateMenu(g_bAutoUpdate);
mi.ptszName = LPGENT("Refresh All Quotes\\Rates");
- mi.flags = CMIF_TCHAR | CMIF_ROOTHANDLE;
mi.position = 20100001;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
mi.pszService = "Quotes/RefreshAll";
- mi.hParentMenu = hMenuRoot;
Menu_AddMainMenuItem(&mi);
CreateServiceFunction(mi.pszService, QuotesMenu_RefreshAll);
mi.ptszName = LPGENT("Currency Converter...");
- //mi.flags = CMIF_TCHAR|CMIF_ICONFROMICOLIB|CMIF_ROOTHANDLE;
mi.position = 20100002;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_CURRENCY_CONVERTER);
mi.pszService = g_pszCurrencyConverter;
@@ -117,7 +110,6 @@ namespace
CreateServiceFunction(mi.pszService, QuotesMenu_CurrencyConverter);
mi.ptszName = LPGENT("Export All Quotes");
- //mi.flags = CMIF_TCHAR|CMIF_ICONFROMICOLIB|CMIF_ROOTHANDLE;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_EXPORT);
mi.pszService = "Quotes/ExportAll";
mi.position = 20100003;
@@ -125,7 +117,6 @@ namespace
CreateServiceFunction(mi.pszService, QuotesMenu_ExportAll);
mi.ptszName = LPGENT("Import All Quotes");
- //mi.flags = CMIF_TCHAR|CMIF_ICONFROMICOLIB|CMIF_ROOTHANDLE;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_IMPORT);
mi.pszService = "Quotes/ImportAll";
mi.position = 20100004;
@@ -136,27 +127,10 @@ namespace
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, Quotes_PrebuildContactMenu);
- memset(&mi, 0, sizeof(mi));
- mi.pszContactOwner = QUOTES_PROTOCOL_NAME;
- hMenuRoot = NULL;
if (bSubGroups)
- {
- mi.pszPopupName = (char *)-1;
- mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
- mi.flags = CMIF_TCHAR | CMIF_ROOTHANDLE;
- tstring sProtocolName = quotes_a2t(QUOTES_PROTOCOL_NAME);
- mi.ptszName = const_cast<TCHAR*>(sProtocolName.c_str());//A2T(QUOTES_PROTOCOL_NAME);
- mi.position = 0;
-
- hMenuRoot = Menu_AddContactMenuItem(&mi);
- }
-
- mi.flags = CMIF_TCHAR;
- if (bSubGroups)
- {
- mi.flags |= CMIF_ROOTHANDLE;
- mi.pszPopupName = (char*)hMenuRoot;
- }
+ mi.hParentMenu = Menu_CreateRoot(MO_CONTACT, _T(QUOTES_PROTOCOL_NAME), 20100004, Quotes_GetIconHandle(IDI_ICON_MAIN));
+ else
+ mi.hParentMenu = NULL;
mi.ptszName = LPGENT("Refresh");
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_REFRESH);