diff options
author | George Hazan <ghazan@miranda.im> | 2018-05-22 18:00:57 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-05-22 18:00:57 +0300 |
commit | feac2b1a6a79c9d0bb58b0825ec2a776b888f9ce (patch) | |
tree | ef2fde024f8e13ac1ff5f2de8c772066319b3e6c /src | |
parent | 737d05018bbc2da54414bea0c2ccce6f1e15bde2 (diff) |
m_genmenu.h unbound from hLangpack
Diffstat (limited to 'src')
-rw-r--r-- | src/core/stdaway/src/awaymsg.cpp | 2 | ||||
-rw-r--r-- | src/core/stdemail/src/email.cpp | 2 | ||||
-rw-r--r-- | src/core/stdfile/src/file.cpp | 4 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.cpp | 2 | ||||
-rw-r--r-- | src/core/stduihist/src/history.cpp | 2 | ||||
-rw-r--r-- | src/core/stduserinfo/src/userinfo.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/CMPluginBase.cpp | 5 | ||||
-rw-r--r-- | src/mir_app/src/chat_svc.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/clui.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/findadd.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/help.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/menu_clist.cpp | 6 | ||||
-rw-r--r-- | src/mir_app/src/menu_groups.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/menu_tray.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/menu_utils.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/meta_menu.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/movetogroup.cpp | 4 | ||||
-rw-r--r-- | src/mir_app/src/options.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/proto_opts.cpp | 2 | ||||
-rw-r--r-- | src/mir_app/src/proto_utils.cpp | 2 |
22 files changed, 33 insertions, 26 deletions
diff --git a/src/core/stdaway/src/awaymsg.cpp b/src/core/stdaway/src/awaymsg.cpp index 0a8014e618..d7e8ae2b48 100644 --- a/src/core/stdaway/src/awaymsg.cpp +++ b/src/core/stdaway/src/awaymsg.cpp @@ -166,7 +166,7 @@ int LoadAwayMsgModule(void) hWindowList = WindowList_Create();
CreateServiceFunction(MS_AWAYMSG_SHOWAWAYMSG, GetMessageCommand);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xd3282acc, 0x9ff1, 0x4ede, 0x8a, 0x1e, 0x36, 0x72, 0x3f, 0x44, 0x4f, 0x84);
mi.position = -2000005000;
mi.flags = CMIF_NOTOFFLINE;
diff --git a/src/core/stdemail/src/email.cpp b/src/core/stdemail/src/email.cpp index 10787993bc..ab7cde149d 100644 --- a/src/core/stdemail/src/email.cpp +++ b/src/core/stdemail/src/email.cpp @@ -66,7 +66,7 @@ static int EMailPreBuildMenu(WPARAM hContact, LPARAM) int LoadSendRecvEMailModule(void)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x61d8e25a, 0x92e, 0x4470, 0x84, 0x57, 0x5e, 0x52, 0x17, 0x7f, 0xfa, 0x3);
mi.position = -2000010000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_SENDEMAIL);
diff --git a/src/core/stdfile/src/file.cpp b/src/core/stdfile/src/file.cpp index 4b39aff9b0..9ce90ca28a 100644 --- a/src/core/stdfile/src/file.cpp +++ b/src/core/stdfile/src/file.cpp @@ -315,7 +315,7 @@ static int SRFileProtoAck(WPARAM, LPARAM lParam) static int SRFileModulesLoaded(WPARAM, LPARAM)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x7f8dcf77, 0xe448, 0x4505, 0xb0, 0x56, 0xb, 0xb1, 0xab, 0xac, 0x64, 0x9d);
mi.position = -2000020000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
@@ -414,7 +414,7 @@ int LoadSendRecvFileModule(void) {
CreateServiceFunction("FtMgr/Show", FtMgrShowCommand);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x75794ab5, 0x2573, 0x48f4, 0xb4, 0xa0, 0x93, 0xd6, 0xf5, 0xe0, 0xf3, 0x32);
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
mi.position = 1900000000;
diff --git a/src/core/stdmsg/src/msgs.cpp b/src/core/stdmsg/src/msgs.cpp index 516695e7a5..c141710293 100644 --- a/src/core/stdmsg/src/msgs.cpp +++ b/src/core/stdmsg/src/msgs.cpp @@ -459,7 +459,7 @@ static int SplitmsgModulesLoaded(WPARAM, LPARAM) LoadMsgLogIcons();
OnCheckPlugins(0, 0);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x58d8dc1, 0x1c25, 0x49c0, 0xb8, 0x7c, 0xa3, 0x22, 0x2b, 0x3d, 0xf1, 0xd8);
mi.position = -2000090000;
mi.flags = CMIF_DEFAULT;
diff --git a/src/core/stduihist/src/history.cpp b/src/core/stduihist/src/history.cpp index 540aff5d08..c5e6850b58 100644 --- a/src/core/stduihist/src/history.cpp +++ b/src/core/stduihist/src/history.cpp @@ -399,7 +399,7 @@ static int PreShutdownHistoryModule(WPARAM, LPARAM) int LoadHistoryModule(void)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x28848d7a, 0x6995, 0x4799, 0x82, 0xd7, 0x18, 0x40, 0x3d, 0xe3, 0x71, 0xc4);
mi.position = 1000090000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
diff --git a/src/core/stduserinfo/src/userinfo.cpp b/src/core/stduserinfo/src/userinfo.cpp index 5d65eac93c..359edb0f9e 100644 --- a/src/core/stduserinfo/src/userinfo.cpp +++ b/src/core/stduserinfo/src/userinfo.cpp @@ -626,7 +626,7 @@ int LoadUserInfoModule(void) HookEvent(ME_DB_CONTACT_DELETED, UserInfoContactDelete);
HookEvent(ME_SYSTEM_PRESHUTDOWN, ShutdownUserInfo);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xe8731d53, 0x95af, 0x42cf, 0xae, 0x27, 0xc7, 0xa7, 0xa, 0xbf, 0x14, 0x1c);
mi.position = 1000050000;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
diff --git a/src/mir_app/src/CMPluginBase.cpp b/src/mir_app/src/CMPluginBase.cpp index bb08a3c2df..1933851f75 100644 --- a/src/mir_app/src/CMPluginBase.cpp +++ b/src/mir_app/src/CMPluginBase.cpp @@ -175,6 +175,11 @@ HANDLE CMPluginBase::addIcon(const SKINICONDESC *sid) return IcoLib_AddIcon(sid, m_hLang); } +HGENMENU CMPluginBase::addRootMenu(int hMenuObject, LPCWSTR ptszName, int position, HANDLE hIcoLib) +{ + return Menu_CreateRoot(hMenuObject, ptszName, position, hIcoLib, m_hLang); +} + int CMPluginBase::addUserInfo(WPARAM wParam, OPTIONSDIALOGPAGE *odp) { odp->langId = m_hLang; diff --git a/src/mir_app/src/chat_svc.cpp b/src/mir_app/src/chat_svc.cpp index e608868556..b700fa3be2 100644 --- a/src/mir_app/src/chat_svc.cpp +++ b/src/mir_app/src/chat_svc.cpp @@ -726,7 +726,7 @@ static int ModulesLoaded(WPARAM, LPARAM) HookEvent(ME_SMILEYADD_OPTIONSCHANGED, SmileyOptionsChanged);
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, PrebuildContactMenu);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x2bb76d5, 0x740d, 0x4fd2, 0x8f, 0xee, 0x7c, 0xa4, 0x5a, 0x74, 0x65, 0xa6);
mi.position = -2000090001;
mi.flags = CMIF_DEFAULT;
diff --git a/src/mir_app/src/clui.cpp b/src/mir_app/src/clui.cpp index cb86fe728d..a4145e9395 100644 --- a/src/mir_app/src/clui.cpp +++ b/src/mir_app/src/clui.cpp @@ -317,7 +317,7 @@ int LoadCLUIModule(void) db_get_b(0, "CList", "OnTop", SETTING_ONTOP_DEFAULT) ? HWND_TOPMOST : HWND_NOTOPMOST,
0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x66aada45, 0x8bcb, 0x49bb, 0x85, 0xb0, 0xae, 0x1, 0xf8, 0xbe, 0x78, 0x7e);
mi.position = 2000070000;
diff --git a/src/mir_app/src/findadd.cpp b/src/mir_app/src/findadd.cpp index da07067c41..043c0ea379 100644 --- a/src/mir_app/src/findadd.cpp +++ b/src/mir_app/src/findadd.cpp @@ -1009,7 +1009,7 @@ int LoadFindAddModule(void) HookEvent(ME_PROTO_ACCLISTCHANGED, OnSystemModulesLoaded); HookEvent(ME_SYSTEM_PRESHUTDOWN, FindAddPreShutdown); - CMenuItem mi; + CMenuItem mi(g_plugin); SET_UID(mi, 0x860556b9, 0x1577, 0x4f6f, 0x8c, 0xb0, 0x93, 0x24, 0xa8, 0x2e, 0x20, 0x92); mi.position = 500020000; mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FINDUSER); diff --git a/src/mir_app/src/help.cpp b/src/mir_app/src/help.cpp index d4d547c162..1b0aa39d5a 100644 --- a/src/mir_app/src/help.cpp +++ b/src/mir_app/src/help.cpp @@ -149,8 +149,8 @@ int LoadHelpModule(void) { HookEvent(ME_SYSTEM_PRESHUTDOWN, ShutdownHelpModule); - CMenuItem mi; - mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("&Help"), 2000090000); + CMenuItem mi(g_plugin); + mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("&Help"), 2000090000); Menu_ConfigureItem(mi.root, MCI_OPT_UID, "8824ECA5-6942-46D7-9D07-1BA600E0D02E"); SET_UID(mi, 0xf3ebf1fa, 0x587c, 0x494d, 0xbd, 0x33, 0x7f, 0x88, 0xb3, 0x61, 0x1e, 0xd3); diff --git a/src/mir_app/src/menu_clist.cpp b/src/mir_app/src/menu_clist.cpp index 59188edb5b..ad7c8e5580 100644 --- a/src/mir_app/src/menu_clist.cpp +++ b/src/mir_app/src/menu_clist.cpp @@ -727,7 +727,7 @@ void RebuildMenuOrder(void) int pos = 0;
// adding root
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE | CMIF_KEEPUNTRANSLATED;
mi.position = pos++;
mi.hIcon = ic = (HICON)CallProtoServiceInt(0, pa->szModuleName, PS_LOADICON, PLI_PROTOCOL | PLIF_SMALL, 0);
@@ -824,7 +824,7 @@ void RebuildMenuOrder(void) if (!(flags & it.Pf2flag))
continue;
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE;
if (it.iStatus == ID_STATUS_OFFLINE)
mi.flags |= CMIF_CHECKED;
@@ -1086,7 +1086,7 @@ void InitCustomMenus(void) HookEvent(ME_LANGPACK_CHANGED, sttRebuildHotkeys);
// add exit command to menu
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x707c8962, 0xc33f, 0x4893, 0x8e, 0x36, 0x30, 0xb1, 0x7c, 0xd8, 0x61, 0x40);
mi.position = 0x7fffffff;
mi.pszService = "CloseAction";
diff --git a/src/mir_app/src/menu_groups.cpp b/src/mir_app/src/menu_groups.cpp index 8797fd7e58..16bc77d0fd 100644 --- a/src/mir_app/src/menu_groups.cpp +++ b/src/mir_app/src/menu_groups.cpp @@ -285,7 +285,7 @@ void InitGroupMenus(void) Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSGroup/FreeOwnerDataGroupMenu");
Menu_ConfigureObject(hGroupMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSGroup/GroupMenuOnAddService");
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x2f75bc72, 0xd836, 0x4922, 0x9f, 0xe, 0xed, 0x9e, 0xe7, 0x2b, 0x84, 0xf0);
mi.position = 100000;
@@ -346,7 +346,7 @@ void InitGroupMenus(void) Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_FREE_SERVICE, "CLISTMENUSSubGroup/FreeOwnerDataSubGroupMenu");
Menu_ConfigureObject(hSubGroupMenuObject, MCO_OPT_CHECK_SERVICE, "CLISTMENUSSubGroup/SubGroupMenuCheckService");
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xd208f1d2, 0x7220, 0x4d37, 0xb6, 0xe4, 0xd5, 0x4a, 0xe8, 0xa3, 0xf4, 0x53);
mi.position = 1000;
diff --git a/src/mir_app/src/menu_tray.cpp b/src/mir_app/src/menu_tray.cpp index b2ad890e86..0496f63670 100644 --- a/src/mir_app/src/menu_tray.cpp +++ b/src/mir_app/src/menu_tray.cpp @@ -116,7 +116,7 @@ void InitTrayMenus(void) Menu_ConfigureObject(hTrayMenuObject, MCO_OPT_ONADD_SERVICE, "CLISTMENUSTRAY/TrayMenuOnAddService");
// add exit command to menu
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x6c202553, 0xb4d5, 0x403c, 0xa6, 0x82, 0x2, 0xd8, 0x2b, 0x42, 0xba, 0x9e);
mi.flags = CMIF_DEFAULT;
diff --git a/src/mir_app/src/menu_utils.cpp b/src/mir_app/src/menu_utils.cpp index 2aeaf57922..7d27599165 100644 --- a/src/mir_app/src/menu_utils.cpp +++ b/src/mir_app/src/menu_utils.cpp @@ -240,7 +240,7 @@ MIR_APP_DLL(HGENMENU) Menu_GetProtocolRoot(PROTO_INTERFACE *pThis) return p;
// create protocol root in the main menu
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.name.w = pThis->m_tszUserName;
mi.position = 500090000;
mi.flags = CMIF_UNICODE | CMIF_KEEPUNTRANSLATED;
@@ -686,7 +686,7 @@ MIR_APP_DLL(HGENMENU) Menu_CreateRoot(int hMenuObject, LPCTSTR ptszName, int pos if (oldroot != nullptr)
return oldroot;
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE;
mi.hIcolibItem = hIcoLib;
mi.langId = _hLang;
diff --git a/src/mir_app/src/meta_menu.cpp b/src/mir_app/src/meta_menu.cpp index 33a0b4d7ec..8ddebc8979 100644 --- a/src/mir_app/src/meta_menu.cpp +++ b/src/mir_app/src/meta_menu.cpp @@ -356,7 +356,7 @@ INT_PTR Meta_OnOff(WPARAM, LPARAM) void InitMenus()
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
// main menu item
SET_UID(mi, 0x8999a6ca, 0x9c66, 0x49c1, 0xad, 0xe1, 0x48, 0x17, 0x28, 0xb, 0x94, 0x86);
diff --git a/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 215666d9a7..5f12de28d3 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -604,3 +604,4 @@ RegisterPlugin @632 UnregisterPlugin @633
?addHotkey@CMPluginBase@@QAEHPBUHOTKEYDESC@@@Z @634 NONAME
?addIcon@CMPluginBase@@QAEPAXPBUSKINICONDESC@@@Z @635 NONAME
+?addRootMenu@CMPluginBase@@QAEPAUTMO_IntMenuItem@@HPB_WHPAX@Z @636 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 6201fd8878..0b04631195 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -604,3 +604,4 @@ RegisterPlugin @632 UnregisterPlugin @633
?addHotkey@CMPluginBase@@QEAAHPEBUHOTKEYDESC@@@Z @634 NONAME
?addIcon@CMPluginBase@@QEAAPEAXPEBUSKINICONDESC@@@Z @635 NONAME
+?addRootMenu@CMPluginBase@@QEAAPEAUTMO_IntMenuItem@@HPEB_WHPEAX@Z @636 NONAME
diff --git a/src/mir_app/src/movetogroup.cpp b/src/mir_app/src/movetogroup.cpp index 3a66641c4c..f00bf63fd7 100644 --- a/src/mir_app/src/movetogroup.cpp +++ b/src/mir_app/src/movetogroup.cpp @@ -66,7 +66,7 @@ static wchar_t* PrepareGroupName(wchar_t* str) static void AddGroupItem(HGENMENU hRoot, wchar_t* name, int pos, WPARAM param, bool checked)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.root = hRoot;
mi.position = pos;
mi.name.w = PrepareGroupName(name);
@@ -133,7 +133,7 @@ void MTG_OnmodulesLoad() HookEvent(ME_CLIST_PREBUILDCONTACTMENU, OnContactMenuBuild);
CreateServiceFunction(MTG_MOVE, MTG_DOMOVE);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x403c548, 0x4ac6, 0x4ced, 0xa7, 0x6c, 0x4e, 0xb9, 0xc8, 0xba, 0x94, 0x5);
mi.position = 100000;
mi.name.a = LPGEN("&Move to group");
diff --git a/src/mir_app/src/options.cpp b/src/mir_app/src/options.cpp index 7347b2e23f..cb1492ec27 100644 --- a/src/mir_app/src/options.cpp +++ b/src/mir_app/src/options.cpp @@ -1272,7 +1272,7 @@ static int OptDynamicLoadOptions(WPARAM, LPARAM hInstance) static int OptModulesLoaded(WPARAM, LPARAM)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xc1284523, 0x548d, 0x4744, 0xb0, 0x9, 0xfb, 0xa0, 0x4, 0x8e, 0xa8, 0x67);
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_OPTIONS);
mi.position = 1900000000;
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp index edd8114758..12308bea44 100644 --- a/src/mir_app/src/proto_opts.cpp +++ b/src/mir_app/src/proto_opts.cpp @@ -975,7 +975,7 @@ static INT_PTR OptProtosShow(WPARAM, LPARAM) int OptProtosLoaded(WPARAM, LPARAM)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xb1f74008, 0x1fa6, 0x4e98, 0x95, 0x28, 0x5a, 0x7e, 0xab, 0xfe, 0x10, 0x61);
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_ACCMGR);
mi.position = 1900000000;
diff --git a/src/mir_app/src/proto_utils.cpp b/src/mir_app/src/proto_utils.cpp index 08c7032a5d..8dff65dc03 100644 --- a/src/mir_app/src/proto_utils.cpp +++ b/src/mir_app/src/proto_utils.cpp @@ -122,7 +122,7 @@ static int __cdecl ProtoPrebuildContactMenu(WPARAM, LPARAM) void InitProtoMenus(void)
{
// "Request authorization"
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x36375a1f, 0xc142, 0x4d6e, 0xa6, 0x57, 0xe4, 0x76, 0x5d, 0xbc, 0x59, 0x8e);
mi.pszService = "Proto/Menu/ReqAuth";
mi.name.a = LPGEN("Request authorization");
|