summaryrefslogtreecommitdiff
path: root/plugins/Clist_mw/src/clisttray.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-12-16 16:07:54 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-12-16 16:07:54 +0000
commit3abd733254c02e2ca2c9bcc7fbbd1417c4a8ff74 (patch)
treef797b88d7a3c6993d447ac35b240a20fee4186b7 /plugins/Clist_mw/src/clisttray.cpp
parentcaf5e0116248d00c0b6beaed6e4e7817a0158fbb (diff)
- new menu object helpers (MO_CreateMenuObject, MO_SetMenuObjectParam);
- menu item display names are now translatable; - old nasty pieces of junk removed in CLUIFrames/cluiframes.cpp git-svn-id: http://svn.miranda-ng.org/main/trunk@7247 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_mw/src/clisttray.cpp')
-rw-r--r--plugins/Clist_mw/src/clisttray.cpp28
1 files changed, 4 insertions, 24 deletions
diff --git a/plugins/Clist_mw/src/clisttray.cpp b/plugins/Clist_mw/src/clisttray.cpp
index de61524292..ddfcb22811 100644
--- a/plugins/Clist_mw/src/clisttray.cpp
+++ b/plugins/Clist_mw/src/clisttray.cpp
@@ -192,16 +192,11 @@ INT_PTR FreeOwnerDataTrayMenu (WPARAM wParam,LPARAM lParam)
void InitTrayMenus(void)
{
- TMenuParam tmp;
- OptParam op;
-
//Tray menu
- memset(&tmp,0,sizeof(tmp));
- tmp.cbSize = sizeof(tmp);
- tmp.CheckService = NULL;
- tmp.ExecService = "CLISTMENUSTRAY/ExecService";
- tmp.name = "TrayMenu";
- hTrayMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT,0,(LPARAM)&tmp);
+ 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");
CreateServiceFunction("CLISTMENUSTRAY/ExecService",TrayMenuExecService);
CreateServiceFunction("CLISTMENUSTRAY/FreeOwnerDataTrayMenu",FreeOwnerDataTrayMenu);
@@ -212,21 +207,6 @@ void InitTrayMenus(void)
CreateServiceFunction(MS_CLIST_MENUBUILDTRAY,BuildTrayMenu);
hPreBuildTrayMenuEvent = CreateHookableEvent(ME_CLIST_PREBUILDTRAYMENU);
- op.Handle = hTrayMenuObject;
- op.Setting = OPT_USERDEFINEDITEMS;
- op.Value = TRUE;
- CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
-
- op.Handle = hTrayMenuObject;
- op.Setting = OPT_MENUOBJECT_SET_FREE_SERVICE;
- op.Value = (INT_PTR)"CLISTMENUSTRAY/FreeOwnerDataTrayMenu";
- CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
-
- op.Handle = hTrayMenuObject;
- op.Setting = OPT_MENUOBJECT_SET_ONADD_SERVICE;
- op.Value = (INT_PTR)"CLISTMENUSTRAY/TrayMenuonAddService";
- CallService(MO_SETOPTIONSMENUOBJECT,0,(LPARAM)&op);
-
//add exit command to menu
CLISTMENUITEM mi = { sizeof(mi) };
mi.position = 900000;