diff options
author | George Hazan <george.hazan@gmail.com> | 2013-12-16 16:07:54 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-12-16 16:07:54 +0000 |
commit | 3abd733254c02e2ca2c9bcc7fbbd1417c4a8ff74 (patch) | |
tree | f797b88d7a3c6993d447ac35b240a20fee4186b7 /src/modules/clist/clistmenus.cpp | |
parent | caf5e0116248d00c0b6beaed6e4e7817a0158fbb (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 'src/modules/clist/clistmenus.cpp')
-rw-r--r-- | src/modules/clist/clistmenus.cpp | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/src/modules/clist/clistmenus.cpp b/src/modules/clist/clistmenus.cpp index cbb8f97b92..ef7fcde149 100644 --- a/src/modules/clist/clistmenus.cpp +++ b/src/modules/clist/clistmenus.cpp @@ -850,13 +850,7 @@ void RebuildMenuOrder(void) mir_free(hStatusMenuHandles);
}
- TMenuParam tmp = { 0 };
- tmp.cbSize = sizeof(tmp);
- tmp.ExecService = "StatusMenuExecService";
- tmp.CheckService = "StatusMenuCheckService";
- tmp.name = "StatusMenu";
-
- hStatusMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, 0, (LPARAM)&tmp);
+ hStatusMenuObject = MO_CreateMenuObject("StatusMenu", LPGEN("Status menu"), "StatusMenuCheckService", "StatusMenuExecService");
MO_SetOptionsMenuObject(hStatusMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, (INT_PTR)"CLISTMENUS/FreeOwnerDataStatusMenu");
hStatusMainMenuHandles = (PMO_IntMenuItem*)mir_calloc(SIZEOF(statusModeList) * sizeof(PMO_IntMenuItem*));
@@ -1324,29 +1318,16 @@ void InitCustomMenus(void) hStatusMenuHandles = NULL;
hStatusMenuHandlesCnt = 0;
- //new menu sys
+ // new menu sys
InitGenMenu();
- //main menu
- {
- TMenuParam tmp = { sizeof(tmp) };
- tmp.ExecService = "MainMenuExecService";
- tmp.name = "MainMenu";
- hMainMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, 0, (LPARAM)&tmp);
- }
-
+ // main menu
+ hMainMenuObject = MO_CreateMenuObject("MainMenu", LPGEN("Main menu"), 0, "MainMenuExecService");
MO_SetOptionsMenuObject(hMainMenuObject, OPT_USERDEFINEDITEMS, TRUE);
MO_SetOptionsMenuObject(hMainMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, (INT_PTR)"CLISTMENUS/FreeOwnerDataMainMenu");
- //contact menu
- {
- TMenuParam tmp = { sizeof(tmp) };
- tmp.CheckService = "ContactMenuCheckService";
- tmp.ExecService = "ContactMenuExecService";
- tmp.name = "ContactMenu";
- hContactMenuObject = (HANDLE)CallService(MO_CREATENEWMENUOBJECT, 0, (LPARAM)&tmp);
- }
-
+ // contact menu
+ hContactMenuObject = MO_CreateMenuObject("ContactMenu", LPGEN("Contact menu"), "ContactMenuCheckService", "ContactMenuExecService");
MO_SetOptionsMenuObject(hContactMenuObject, OPT_USERDEFINEDITEMS, TRUE);
MO_SetOptionsMenuObject(hContactMenuObject, OPT_MENUOBJECT_SET_FREE_SERVICE, (INT_PTR)"CLISTMENUS/FreeOwnerDataContactMenu");
|