From c3aa3fb189b237130d658811f04d32c7ae739fa4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 26 Jun 2015 22:09:49 +0000 Subject: we don't need HGENMENU_ROOT anymore, die, crap, die git-svn-id: http://svn.miranda-ng.org/main/trunk@14405 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- include/delphi/m_clist.inc | 3 --- include/m_genmenu.h | 2 -- plugins/SecureIM/src/main.cpp | 1 - plugins/SendScreenshotPlus/src/Main.cpp | 1 - protocols/Steam/src/steam_menus.cpp | 2 -- src/mir_app/src/genmenu.cpp | 5 +---- 6 files changed, 1 insertion(+), 13 deletions(-) diff --git a/include/delphi/m_clist.inc b/include/delphi/m_clist.inc index 7fe96dd4ff..04af0877d9 100644 --- a/include/delphi/m_clist.inc +++ b/include/delphi/m_clist.inc @@ -68,9 +68,6 @@ type hLangpack : int; // plugin's hLangpack (added automatically) end; -const - HGENMENU_ROOT = HGENMENU(-1); - const CMIF_GRAYED = 1; CMIF_CHECKED = 2; diff --git a/include/m_genmenu.h b/include/m_genmenu.h index a1fd164538..c94aa39870 100644 --- a/include/m_genmenu.h +++ b/include/m_genmenu.h @@ -10,8 +10,6 @@ #else DECLARE_HANDLE(HGENMENU); #endif - -#define HGENMENU_ROOT ((HGENMENU)INVALID_HANDLE_VALUE) // predefined menu objects #define MO_MAIN (-1) diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp index 670b86fc79..e2980834c9 100644 --- a/plugins/SecureIM/src/main.cpp +++ b/plugins/SecureIM/src/main.cpp @@ -43,7 +43,6 @@ static HGENMENU AddMenuItem(LPCSTR name, int pos, HICON hicon, LPCSTR service, i mi.position = pos; mi.hIcon = hicon; mi.pszName = (char*)name; - mi.hParentMenu = HGENMENU_ROOT; mi.pszService = (char*)service; return Menu_AddContactMenuItem(&mi); } diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp index 39709c0b3f..1d7e4b25c5 100644 --- a/plugins/SendScreenshotPlus/src/Main.cpp +++ b/plugins/SendScreenshotPlus/src/Main.cpp @@ -273,7 +273,6 @@ DLL_EXPORT int Load(void) /// menu items CLISTMENUITEM mi = { 0 }; mi.flags = CMIF_TCHAR; - mi.hParentMenu = HGENMENU_ROOT; mi.icolibItem = GetIconHandle(ICO_MAINXS); #define _Menu_AddMainMenuItemEx(name,srv,pos) do{mi.ptszName=name;mi.pszService=srv;mi.position=pos;Menu_AddMainMenuItem(&mi);}while(0) #define _Menu_AddContactMenuItemEx(name,srv,pos) do{mi.ptszName=name;mi.pszService=srv;mi.position=pos;Menu_AddContactMenuItem(&mi);}while(0) diff --git a/protocols/Steam/src/steam_menus.cpp b/protocols/Steam/src/steam_menus.cpp index 1032d56037..cf0dbf3917 100644 --- a/protocols/Steam/src/steam_menus.cpp +++ b/protocols/Steam/src/steam_menus.cpp @@ -107,9 +107,7 @@ void CSteamProto::OnInitStatusMenu() if (!hSteamRoot) { mi.ptszName = m_tszUserName; mi.position = -1999901006; - mi.hParentMenu = HGENMENU_ROOT; mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED; - //mi.icolibItem = NULL; hSteamRoot = m_hMenuRoot = Menu_AddProtoMenuItem(&mi); } else { diff --git a/src/mir_app/src/genmenu.cpp b/src/mir_app/src/genmenu.cpp index f4b2529f7a..e4e4416f82 100644 --- a/src/mir_app/src/genmenu.cpp +++ b/src/mir_app/src/genmenu.cpp @@ -387,7 +387,7 @@ MIR_APP_DLL(void*) Menu_GetItemData(HGENMENU hMenuItem) TMO_IntMenuItem *MO_GetIntMenuItem(HGENMENU wParam) { TMO_IntMenuItem *result = (TMO_IntMenuItem*)wParam; - if (result == NULL || wParam == (HGENMENU)0xffff1234 || wParam == HGENMENU_ROOT) + if (result == NULL) return NULL; __try { @@ -737,9 +737,6 @@ MIR_APP_DLL(HGENMENU) Menu_AddItem(int hMenuObject, TMO_MenuItem *pmi) else p->iconId = ImageList_AddIcon(pmo->m_hMenuIcons, pmi->hIcon); } - if (p->mi.root == HGENMENU_ROOT) - p->mi.root = NULL; - TMO_IntMenuItem *pRoot = (p->mi.root != NULL) ? MO_GetIntMenuItem(p->mi.root) : NULL; if (pRoot) { p->owner = &pRoot->submenu; -- cgit v1.2.3