From 7d3d5e16b4e5378a751576095771c2a75b7276fb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 23 Jun 2015 12:43:36 +0000 Subject: - Menu_ConfigureItem replaced MO_SETOPTIONSMENUITEM; - Menu_ConfigureObject replaced MO_SETOPTIONSMENUOBJECT; - TIntMenuObject::hotkey replaced TMenuObject::hotkey git-svn-id: http://svn.miranda-ng.org/main/trunk@14349 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/UserInfoEx/src/mir_menuitems.cpp | 56 +++++++++++++++----------------- 1 file changed, 26 insertions(+), 30 deletions(-) (limited to 'plugins/UserInfoEx') diff --git a/plugins/UserInfoEx/src/mir_menuitems.cpp b/plugins/UserInfoEx/src/mir_menuitems.cpp index c1b188ea00..50a5e46a8a 100644 --- a/plugins/UserInfoEx/src/mir_menuitems.cpp +++ b/plugins/UserInfoEx/src/mir_menuitems.cpp @@ -93,7 +93,7 @@ void RebuildContact() case 3: //cascade off mhRoot = mhExIm = HGENMENU_ROOT; - hMenuItem[item++] = NULL; + hMenuItem[0] = NULL; break; case 5: //cascade all @@ -102,7 +102,7 @@ void RebuildContact() mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN); mi.pszName = MODULELONGNAME; mhRoot = Menu_AddContactMenuItem(&mi); - hMenuItem[item++] = mhRoot; + hMenuItem[0] = mhRoot; mhExIm = mhRoot; break; case 9: @@ -112,7 +112,7 @@ void RebuildContact() mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXIMPORT); mi.pszName = LPGEN("Export/import contact"); mhExIm = Menu_AddContactMenuItem(&mi); - hMenuItem[item++] = mhExIm; + hMenuItem[0] = mhExIm; mhRoot = HGENMENU_ROOT; break; default: @@ -122,35 +122,31 @@ void RebuildContact() mi.popupPosition = NULL; // ContactDetailsPS's menuitem - { - mi.hParentMenu = mhRoot; - mi.pszService = MS_USERINFO_SHOWDIALOG; - mi.pszName = LPGEN("User &details"); - mi.position = 1000050000; - mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN); - mi.hotKey = MAKELPARAM(VK_F3, MOD_ALT); - hMenuItem[item++] = Menu_AddContactMenuItem(&mi); - mi.hotKey = NULL; - } - - // VCard's Ex/Import menuitems - { - mi.hParentMenu = mhExIm; + mi.hParentMenu = mhRoot; + mi.pszService = MS_USERINFO_SHOWDIALOG; + mi.pszName = LPGEN("User &details"); + mi.position = 1000050000; + mi.hIcon = IcoLib_GetIcon(ICO_COMMON_MAIN); + hMenuItem[1] = Menu_AddContactMenuItem(&mi); - // Export - mi.pszService = MS_USERINFO_VCARD_EXPORT; - mi.pszName = mhExIm != HGENMENU_ROOT ? LPGEN("&Export") : LPGEN("&Export user details"); - mi.position = 1000050200; - mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT); - hMenuItem[item++] = Menu_AddContactMenuItem(&mi); + Menu_ConfigureItem(hMenuItem[1], MCI_OPT_HOTKEY, MAKELPARAM(VK_F3, MOD_ALT)); - // Import - mi.pszService = MS_USERINFO_VCARD_IMPORT; - mi.pszName = mhExIm != HGENMENU_ROOT ? LPGEN("&Import") : LPGEN("&Import user details"); - mi.position = 1000050300; - mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT); - hMenuItem[item++] = Menu_AddContactMenuItem(&mi); - } + // VCard's Ex/Import menuitems + mi.hParentMenu = mhExIm; + + // Export + mi.pszService = MS_USERINFO_VCARD_EXPORT; + mi.pszName = mhExIm != HGENMENU_ROOT ? LPGEN("&Export") : LPGEN("&Export user details"); + mi.position = 1000050200; + mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT); + hMenuItem[2] = Menu_AddContactMenuItem(&mi); + + // Import + mi.pszService = MS_USERINFO_VCARD_IMPORT; + mi.pszName = mhExIm != HGENMENU_ROOT ? LPGEN("&Import") : LPGEN("&Import user details"); + mi.position = 1000050300; + mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT); + hMenuItem[3] = Menu_AddContactMenuItem(&mi); } /** -- cgit v1.2.3