diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-29 19:30:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-29 19:30:51 +0000 |
commit | ee3100701b64a1a34e8e5b3069219c7c5a201d8a (patch) | |
tree | 65ae99da9575d2611734482dcedec21bf7f186db /plugins/MirOTR | |
parent | cadd3f86302d30d6d6a2e4af63a7a50f0dd1f1cb (diff) |
- unified menu creation using wrapper class CMenuItem;
- duplicated hLangpack field removed from TMO_IntMenuItem;
- code cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@14440 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirOTR')
-rw-r--r-- | plugins/MirOTR/src/mirotrmenu.cpp | 68 | ||||
-rw-r--r-- | plugins/MirOTR/src/svcs_menu.cpp | 2 |
2 files changed, 35 insertions, 35 deletions
diff --git a/plugins/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/src/mirotrmenu.cpp index b4459382f4..e946b25199 100644 --- a/plugins/MirOTR/src/mirotrmenu.cpp +++ b/plugins/MirOTR/src/mirotrmenu.cpp @@ -169,40 +169,40 @@ void InitMirOTRMenu(void) Menu_ConfigureObject(hMirOTRMenuObject, MCO_OPT_ONADD_SERVICE, "MIROTRMENUS/OnAddMenuItemMirOTRMenu"); // menu items - TMO_MenuItem tmi = { 0 }; - tmi.flags = CMIF_DISABLED | CMIF_TCHAR; - tmi.name.t = LPGENT("OTR Status"); - tmi.position = 0; - hStatusInfoItem = AddMirOTRMenuItem(&tmi, NULL); - - tmi.flags = CMIF_TCHAR | CMIF_NOTPRIVATE | CMIF_NOTUNVERIFIED; - tmi.name.t = LANG_MENU_START; - tmi.position = 100001; - tmi.hIcolibItem = IcoLib_GetIconHandle(ICON_UNVERIFIED); - AddMirOTRMenuItem(&tmi, MS_OTR_MENUSTART); - - tmi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE | CMIF_NOTFINISHED; - tmi.name.t = LANG_MENU_REFRESH; - tmi.position = 100002; - tmi.hIcolibItem = IcoLib_GetIconHandle(ICON_FINISHED); - AddMirOTRMenuItem(&tmi, MS_OTR_MENUREFRESH); - - tmi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE; - tmi.name.t = LANG_MENU_STOP; - tmi.position = 100003; - tmi.hIcolibItem = IcoLib_GetIconHandle(ICON_NOT_PRIVATE); - AddMirOTRMenuItem(&tmi, MS_OTR_MENUSTOP); - - tmi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE | CMIF_NOTFINISHED; - tmi.name.t = LANG_MENU_VERIFY; - tmi.position = 200001; - tmi.hIcolibItem = IcoLib_GetIconHandle(ICON_PRIVATE); - AddMirOTRMenuItem(&tmi, MS_OTR_MENUVERIFY); - - tmi.flags = CMIF_TCHAR | CMIF_CHECKED; - tmi.name.t = LANG_MENU_TOGGLEHTML; - tmi.position = 300001; - hHTMLConvMenuItem = AddMirOTRMenuItem(&tmi, MS_OTR_MENUTOGGLEHTML); + CMenuItem mi; + mi.flags = CMIF_DISABLED | CMIF_TCHAR; + mi.name.t = LPGENT("OTR Status"); + mi.position = 0; + hStatusInfoItem = AddMirOTRMenuItem(&mi, NULL); + + mi.flags = CMIF_TCHAR | CMIF_NOTPRIVATE | CMIF_NOTUNVERIFIED; + mi.name.t = LANG_MENU_START; + mi.position = 100001; + mi.hIcolibItem = IcoLib_GetIconHandle(ICON_UNVERIFIED); + AddMirOTRMenuItem(&mi, MS_OTR_MENUSTART); + + mi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE | CMIF_NOTFINISHED; + mi.name.t = LANG_MENU_REFRESH; + mi.position = 100002; + mi.hIcolibItem = IcoLib_GetIconHandle(ICON_FINISHED); + AddMirOTRMenuItem(&mi, MS_OTR_MENUREFRESH); + + mi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE; + mi.name.t = LANG_MENU_STOP; + mi.position = 100003; + mi.hIcolibItem = IcoLib_GetIconHandle(ICON_NOT_PRIVATE); + AddMirOTRMenuItem(&mi, MS_OTR_MENUSTOP); + + mi.flags = CMIF_TCHAR | CMIF_NOTNOTPRIVATE | CMIF_NOTFINISHED; + mi.name.t = LANG_MENU_VERIFY; + mi.position = 200001; + mi.hIcolibItem = IcoLib_GetIconHandle(ICON_PRIVATE); + AddMirOTRMenuItem(&mi, MS_OTR_MENUVERIFY); + + mi.flags = CMIF_TCHAR | CMIF_CHECKED; + mi.name.t = LANG_MENU_TOGGLEHTML; + mi.position = 300001; + hHTMLConvMenuItem = AddMirOTRMenuItem(&mi, MS_OTR_MENUTOGGLEHTML); } void UninitMirOTRMenu(void) diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp index 585463f2bd..bc905375aa 100644 --- a/plugins/MirOTR/src/svcs_menu.cpp +++ b/plugins/MirOTR/src/svcs_menu.cpp @@ -158,7 +158,7 @@ void InitMenu() CreateServiceFunction(MS_OTR_MENUVERIFY, SVC_VerifyOTR); CreateServiceFunction(MS_OTR_MENUTOGGLEHTML, SVC_ToggleHTMLOTR); - TMO_MenuItem mi = { 0 }; + CMenuItem mi; mi.flags = CMIF_NOTOFFLINE | CMIF_TCHAR; mi.position = -400000; |