summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-23 12:43:36 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-23 12:43:36 +0000
commit7d3d5e16b4e5378a751576095771c2a75b7276fb (patch)
treebda97aa4f8e050d6eeb56f24ad386fef7d5050e0 /plugins/Clist_nicer
parentf1fb66125cf0747022043cfdc9c83dfb8edb438e (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/Clist_nicer')
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/framesmenu.cpp2
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp34
2 files changed, 15 insertions, 21 deletions
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