diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-23 12:43:36 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-23 12:43:36 +0000 |
commit | 7d3d5e16b4e5378a751576095771c2a75b7276fb (patch) | |
tree | bda97aa4f8e050d6eeb56f24ad386fef7d5050e0 /plugins | |
parent | f1fb66125cf0747022043cfdc9c83dfb8edb438e (diff) |
- 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
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/CSList/src/cslist.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp | 36 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistmenus.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clisttray.cpp | 15 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp | 34 | ||||
-rw-r--r-- | plugins/FloatingContacts/src/thumbs.cpp | 8 | ||||
-rw-r--r-- | plugins/HistoryStats/src/mu_common.cpp | 6 | ||||
-rw-r--r-- | plugins/HistoryStats/src/mu_common.h | 4 | ||||
-rw-r--r-- | plugins/MirOTR/src/mirotrmenu.cpp | 6 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/mir_menuitems.cpp | 56 |
12 files changed, 75 insertions, 102 deletions
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp index 2714c2fdb7..68119b7f9b 100644 --- a/plugins/CSList/src/cslist.cpp +++ b/plugins/CSList/src/cslist.cpp @@ -229,7 +229,7 @@ void addProtoStatusMenuItem(char *protoName) if (pdescr == NULL) return; - HGENMENU hRoot = MO_GetProtoRootMenu(pdescr->szModuleName); + HGENMENU hRoot = Menu_GetProtocolRoot(pdescr->szModuleName); if (hRoot == NULL) return; diff --git a/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp index 4f11a5d83d..a8d4a70d58 100644 --- a/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/framesmenu.cpp @@ -111,6 +111,6 @@ int InitFramesMenus(void) // frame menu object
hFrameMenuObject = MO_CreateMenuObject("FrameMenu", LPGEN("Frame menu"), "FrameMenuCheckService", "FrameMenuExecService");
- MO_SetMenuObjectParam(hFrameMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, "FrameMenuFreeService");
+ Menu_ConfigureObject(hFrameMenuObject, MCO_OPT_FREE_SERVICE, "FrameMenuFreeService");
return 0;
}
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp index fd4d0f60db..57cf2ac25f 100644 --- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp @@ -84,15 +84,12 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam) }
tmi.ownerdata = mmep;
+ HGENMENU hNewItem = (HGENMENU)CallService(MO_ADDNEWMENUITEM, (WPARAM)hGroupMenuObject, (LPARAM)&tmi);
+
char buf[1024];
mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
-
- OptParam op;
- op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM, (WPARAM)hGroupMenuObject, (LPARAM)&tmi);
- op.Setting = OPT_MENUITEMSETUNIQNAME;
- op.Value = (INT_PTR)buf;
- CallService(MO_SETOPTIONSMENUITEM, 0, (LPARAM)&op);
- return (INT_PTR)op.Handle;
+ Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
+ return (INT_PTR)hNewItem;
}
int GroupMenuCheckService(WPARAM, LPARAM)
@@ -229,9 +226,9 @@ void GroupMenus_Init(void) // Group menu
hGroupMenuObject = MO_CreateMenuObject("GroupMenu", LPGEN("Group menu"), 0, "CLISTMENUSGroup/ExecService");
- MO_SetMenuObjectParam(hGroupMenuObject, OPT_USERDEFINEDITEMS, TRUE);
- MO_SetMenuObjectParam(hGroupMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, "CLISTMENUSGroup/FreeOwnerDataGroupMenu");
- MO_SetMenuObjectParam(hGroupMenuObject, OPT_MENUOBJECT_SET_ONADD_SERVICE, "CLISTMENUSGroup/GroupMenuonAddService");
+ Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
+ Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSGroup/FreeOwnerDataGroupMenu");
+ Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSGroup/GroupMenuonAddService");
//add exit command to menu
GroupMenuParam gmp;
@@ -395,15 +392,12 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam) }
tmi.ownerdata = mmep;
+ HGENMENU hNewItem = (HGENMENU)CallService(MO_ADDNEWMENUITEM, (WPARAM)hSubGroupMenuObject, (LPARAM)&tmi);
+
char buf[1024];
mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
-
- OptParam op;
- op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM, (WPARAM)hSubGroupMenuObject, (LPARAM)&tmi);
- op.Setting = OPT_MENUITEMSETUNIQNAME;
- op.Value = (INT_PTR)buf;
- CallService(MO_SETOPTIONSMENUITEM, 0, (LPARAM)&op);
- return (INT_PTR)op.Handle;
+ Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
+ return (INT_PTR)hNewItem;
}
INT_PTR SubGroupMenuCheckService(WPARAM wParam, LPARAM)
@@ -477,10 +471,10 @@ void InitSubGroupMenus(void) // SubGroup menu
hSubGroupMenuObject = MO_CreateMenuObject("SubGroupMenu", LPGEN("Subgroup menu"), 0, "CLISTMENUSSubGroup/ExecService");
- MO_SetMenuObjectParam(hSubGroupMenuObject, OPT_USERDEFINEDITEMS, TRUE);
- MO_SetMenuObjectParam(hSubGroupMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, "CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu");
- MO_SetMenuObjectParam(hSubGroupMenuObject, OPT_MENUOBJECT_SET_ONADD_SERVICE, "CLISTMENUSSubGroup/SubGroupMenuonAddService");
- MO_SetMenuObjectParam(hSubGroupMenuObject, OPT_MENUOBJECT_SET_CHECK_SERVICE, "CLISTMENUSSubGroup/SubGroupMenuCheckService");
+ Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
+ Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu");
+ Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSSubGroup/SubGroupMenuonAddService");
+ Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_CHECK_SERVICE, "CLISTMENUSSubGroup/SubGroupMenuCheckService");
// add exit command to menu
GroupMenuParam gmp;
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp index 809bb75508..0962902ba1 100644 --- a/plugins/Clist_modern/src/modern_clistmenus.cpp +++ b/plugins/Clist_modern/src/modern_clistmenus.cpp @@ -121,11 +121,7 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM) bModifyMenu = TRUE;
}
- OptParam op;
- op.Handle = hFavoriteContactMenu;
- op.Setting = OPT_MENUITEMSETUNIQNAME;
- op.Value = (INT_PTR)"ModernClistMenu_ContactRate";
- CallService(MO_SETOPTIONSMENUITEM, 0, (LPARAM)&op);
+ Menu_ConfigureObject(hFavoriteContactMenu, MCI_OPT_UNIQUENAME, "ModernClistMenu_ContactRate");
mi.hParentMenu = hFavoriteContactMenu;
if (!hFavoriteContactMenuItems) {
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp index 47c96ad7f7..7854a6abfa 100644 --- a/plugins/Clist_modern/src/modern_clisttray.cpp +++ b/plugins/Clist_modern/src/modern_clisttray.cpp @@ -181,12 +181,9 @@ static INT_PTR AddTrayMenuItem(WPARAM, LPARAM lParam) tmi.ownerdata = mir_strdup(mi->pszService);
- OptParam op;
- op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM, (WPARAM)hTrayMenuObject, (LPARAM)&tmi);
- op.Setting = OPT_MENUITEMSETUNIQNAME;
- op.Value = (INT_PTR)mi->pszService;
- CallService(MO_SETOPTIONSMENUITEM, 0, (LPARAM)&op);
- return (INT_PTR)op.Handle;
+ HGENMENU hNewItem = (HGENMENU)CallService(MO_ADDNEWMENUITEM, (WPARAM)hTrayMenuObject, (LPARAM)&tmi);
+ Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, mi->pszService);
+ return (INT_PTR)hNewItem;
}
INT_PTR TrayMenuonAddService(WPARAM wParam, LPARAM lParam)
@@ -315,9 +312,9 @@ void InitTrayMenus(void) // Tray menu
hTrayMenuObject = MO_CreateMenuObject("TrayMenu", LPGEN("Tray menu"), 0, "CLISTMENUSTRAY/ExecService");
- MO_SetMenuObjectParam(hTrayMenuObject, OPT_USERDEFINEDITEMS, TRUE);
- MO_SetMenuObjectParam(hTrayMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, "CLISTMENUSTRAY/FreeOwnerDataTrayMenu");
- MO_SetMenuObjectParam(hTrayMenuObject, OPT_MENUOBJECT_SET_ONADD_SERVICE, "CLISTMENUSTRAY/TrayMenuonAddService");
+ Menu_ConfigureObject(hTrayMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
+ Menu_ConfigureObject(hTrayMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSTRAY/FreeOwnerDataTrayMenu");
+ Menu_ConfigureObject(hTrayMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSTRAY/TrayMenuonAddService");
// add exit command to menu
CLISTMENUITEM mi = { 0 };
diff --git a/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp index c23a472b98..858c65dcf7 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp @@ -112,6 +112,6 @@ int InitFramesMenus(void) // frame menu object
hFrameMenuObject = MO_CreateMenuObject("FrameMenu", LPGEN("Frame menu"), "FrameMenuCheckService", "FrameMenuExecService");
- MO_SetMenuObjectParam(hFrameMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, "FrameMenuFreeService");
+ Menu_ConfigureObject(hFrameMenuObject, MCO_OPT_FREE_SERVICE, "FrameMenuFreeService");
return 0;
}
diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp index 279f6c1206..cbce3fa8a4 100644 --- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp +++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp @@ -92,15 +92,12 @@ static INT_PTR AddGroupMenuItem(WPARAM wParam, LPARAM lParam) }
tmi.ownerdata = mmep;
+ HGENMENU hNewItem = (HGENMENU)CallService(MO_ADDNEWMENUITEM, (WPARAM)hGroupMenuObject, (LPARAM)&tmi);
+
char buf[1024];
mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
-
- OptParam op;
- op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM, (WPARAM)hGroupMenuObject, (LPARAM)&tmi);
- op.Setting = OPT_MENUITEMSETUNIQNAME;
- op.Value = (INT_PTR)buf;
- CallService(MO_SETOPTIONSMENUITEM, 0, (LPARAM)&op);
- return (INT_PTR)op.Handle;
+ Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
+ return (INT_PTR)hNewItem;
}
INT_PTR GroupMenuCheckService(WPARAM, LPARAM)
@@ -244,9 +241,9 @@ void InitGroupMenus(void) //Group menu
hGroupMenuObject = MO_CreateMenuObject("GroupMenu", LPGEN("Group menu"), 0, "CLISTMENUSGroup/ExecService");
- MO_SetMenuObjectParam(hGroupMenuObject, OPT_USERDEFINEDITEMS, TRUE);
- MO_SetMenuObjectParam(hGroupMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, "CLISTMENUSGroup/FreeOwnerDataGroupMenu");
- MO_SetMenuObjectParam(hGroupMenuObject, OPT_MENUOBJECT_SET_ONADD_SERVICE, "CLISTMENUSGroup/GroupMenuonAddService");
+ Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
+ Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSGroup/FreeOwnerDataGroupMenu");
+ Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSGroup/GroupMenuonAddService");
// add exit command to menu
GroupMenuParam gmp;
@@ -405,15 +402,12 @@ static INT_PTR AddSubGroupMenuItem(WPARAM wParam, LPARAM lParam) }
tmi.ownerdata = mmep;
+ HGENMENU hNewItem = (HGENMENU)CallService(MO_ADDNEWMENUITEM, (WPARAM)hSubGroupMenuObject, (LPARAM)&tmi);
+
char buf[1024];
mir_snprintf(buf, "%s/%s", mi->pszService, mi->pszName);
-
- OptParam op;
- op.Handle = (HANDLE)CallService(MO_ADDNEWMENUITEM, (WPARAM)hSubGroupMenuObject, (LPARAM)&tmi);
- op.Setting = OPT_MENUITEMSETUNIQNAME;
- op.Value = (INT_PTR)buf;
- CallService(MO_SETOPTIONSMENUITEM, 0, (LPARAM)&op);
- return (INT_PTR)op.Handle;
+ Menu_ConfigureItem(hNewItem, MCI_OPT_UNIQUENAME, buf);
+ return (INT_PTR)hNewItem;
}
INT_PTR SubGroupMenuCheckService(WPARAM, LPARAM)
@@ -494,9 +488,9 @@ void InitSubGroupMenus(void) // SubGroup menu
hSubGroupMenuObject = MO_CreateMenuObject("SubGroupMenu", LPGEN("Subgroup menu"), 0, "CLISTMENUSSubGroup/ExecService");
- MO_SetMenuObjectParam(hSubGroupMenuObject, OPT_USERDEFINEDITEMS, TRUE);
- MO_SetMenuObjectParam(hSubGroupMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, "CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu");
- MO_SetMenuObjectParam(hSubGroupMenuObject, OPT_MENUOBJECT_SET_ONADD_SERVICE, "CLISTMENUSSubGroup/SubGroupMenuonAddService");
+ Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_USERDEFINEDITEMS, TRUE);
+ Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu");
+ Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSSubGroup/SubGroupMenuonAddService");
{
//add exit command to menu
diff --git a/plugins/FloatingContacts/src/thumbs.cpp b/plugins/FloatingContacts/src/thumbs.cpp index a060262332..7101b78803 100644 --- a/plugins/FloatingContacts/src/thumbs.cpp +++ b/plugins/FloatingContacts/src/thumbs.cpp @@ -683,14 +683,14 @@ void ThumbInfo::OnTimer(BYTE idTimer) }
}
if (bEnableTip && fcOpt.bShowTip && idTimer == TIMERID_HOVER_T) {
- POINT pt;
- CLCINFOTIP ti = { 0 };
- ti.cbSize = sizeof(ti);
-
KillTimer(hwnd, TIMERID_HOVER_T);
fTipTimerActive = FALSE;
+
+ POINT pt;
GetCursorPos(&pt);
if (abs(pt.x - ptTipSt.x) < 5 && abs(pt.y - ptTipSt.y) < 5) {
+ CLCINFOTIP ti = { 0 };
+ ti.cbSize = sizeof(ti);
ti.ptCursor = pt;
fTipActive = TRUE;
diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp index b2f7b9aa5a..0edf3fa601 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 */, int popupPosition /* = 0 */, DWORD hotKey /* = 0 */)
+ HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const TCHAR* pszPopupName /* = NULL */, int popupPosition /* = 0 */)
{
// TODO: support for unicode-core with unicode-aware CList
CLISTMENUITEM mi = { 0 };
@@ -23,11 +23,10 @@ namespace mu mi.pszService = const_cast<char*>(pszService);
mi.ptszPopupName = (TCHAR*)pszPopupName;
mi.popupPosition = popupPosition;
- mi.hotKey = hotKey;
return Menu_AddMainMenuItem(&mi);
}
- HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, DWORD hotKey /* = 0 */, const char* pszContactOwner /* = NULL */)
+ HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const char* pszContactOwner /* = NULL */)
{
// TODO: support for unicode-core with unicode-aware CList
CLISTMENUITEM mi = { 0 };
@@ -36,7 +35,6 @@ namespace mu mi.position = position;
mi.hIcon = hIcon;
mi.pszService = const_cast<char*>(pszService);
- mi.hotKey = hotKey;
mi.pszContactOwner = const_cast<char*>(pszContactOwner);
return Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/HistoryStats/src/mu_common.h b/plugins/HistoryStats/src/mu_common.h index ec7e1d5447..080b0fb931 100644 --- a/plugins/HistoryStats/src/mu_common.h +++ b/plugins/HistoryStats/src/mu_common.h @@ -13,8 +13,8 @@ namespace mu namespace clist
{
- HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const TCHAR* pszPopupName = NULL, int popupPosition = 0, DWORD hotKey = 0);
- HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, DWORD hotKey = 0, const char* pszContactOwner = NULL);
+ HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const TCHAR* pszPopupName = NULL, int popupPosition = 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);
}
diff --git a/plugins/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/src/mirotrmenu.cpp index d65acdc67b..87807a5ee2 100644 --- a/plugins/MirOTR/src/mirotrmenu.cpp +++ b/plugins/MirOTR/src/mirotrmenu.cpp @@ -31,7 +31,6 @@ static INT_PTR AddMirOTRMenuItem(WPARAM, LPARAM lParam) tmi.flags = mi->flags; tmi.hIcon = mi->hIcon; tmi.hIcolibItem = mi->icolibItem; - tmi.hotKey = mi->hotKey; tmi.position = mi->position; tmi.name.t = mi->ptszName; tmi.root = mi->root; @@ -197,9 +196,8 @@ void InitMirOTRMenu(void) CreateServiceFunction(MS_MIROTR_REMOVEMIROTRMENUITEM, RemoveMirOTRMenuItem); hMirOTRMenuObject = MO_CreateMenuObject("MirOTRMenu", LPGEN("MirOTR menu"), "MirOTRMenuCheckService", "MirOTRMenuExecService"); - MO_SetMenuObjectParam(hMirOTRMenuObject, OPT_USERDEFINEDITEMS, FALSE); - MO_SetMenuObjectParam(hMirOTRMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, "MIROTRMENUS/FreeOwnerDataMirOTRMenu"); - MO_SetMenuObjectParam(hMirOTRMenuObject, OPT_MENUOBJECT_SET_ONADD_SERVICE, "MIROTRMENUS/OnAddMenuItemMirOTRMenu"); + Menu_ConfigureObject(hMirOTRMenuObject, MCO_OPT_FREE_SERVICE, "MIROTRMENUS/FreeOwnerDataMirOTRMenu"); + Menu_ConfigureObject(hMirOTRMenuObject, MCO_OPT_ONADD_SERVICE, "MIROTRMENUS/OnAddMenuItemMirOTRMenu"); // menu items MIROTRMENUITEM mi = { 0 }; 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);
}
/**
|