summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/AddContactPlus/src/main.cpp2
-rwxr-xr-xplugins/Alarms/src/frame.cpp4
-rwxr-xr-xplugins/Alarms/src/options.cpp4
-rw-r--r--plugins/AuthState/src/main.cpp2
-rw-r--r--plugins/AutoShutdown/src/settingsdlg.cpp2
-rw-r--r--plugins/AvatarHistory/src/AvatarDlg.cpp2
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp6
-rw-r--r--plugins/Boltun/src/boltun.cpp2
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp2
-rw-r--r--plugins/BuddyExpectator/src/BuddyExpectator.cpp2
-rw-r--r--plugins/BuddyPounce/src/main.cpp2
-rw-r--r--plugins/CSList/src/cslist.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp4
-rw-r--r--plugins/Clist_modern/src/cluiframes.cpp8
-rw-r--r--plugins/Clist_modern/src/groupmenu.cpp4
-rw-r--r--plugins/Clist_modern/src/modern_clistmenus.cpp2
-rw-r--r--plugins/Clist_modern/src/modern_clui.cpp2
-rw-r--r--plugins/Clist_nicer/src/clistmenus.cpp2
-rw-r--r--plugins/Clist_nicer/src/cluiframes.cpp8
-rw-r--r--plugins/Clist_nicer/src/groupmenu.cpp2
-rw-r--r--plugins/CloudFile/src/menus.cpp4
-rw-r--r--plugins/Console/src/Console.cpp2
-rw-r--r--plugins/ContactsPlus/src/main.cpp2
-rw-r--r--plugins/CrashDumper/src/crshdmp.cpp4
-rw-r--r--plugins/CyrTranslit/src/MirandaContact.cpp2
-rw-r--r--plugins/Db3x_mmap/src/ui.cpp4
-rw-r--r--plugins/DbEditorPP/src/main.cpp4
-rw-r--r--plugins/Db_autobackups/src/main.cpp4
-rw-r--r--plugins/Dbx_mdbx/src/ui.cpp4
-rw-r--r--plugins/Exchange/src/hooked_events.cpp2
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp4
-rw-r--r--plugins/FileAsMessage/src/main.cpp2
-rw-r--r--plugins/FloatingContacts/src/main.cpp2
-rw-r--r--plugins/GmailNotifier/src/main.cpp2
-rw-r--r--plugins/HTTPServer/src/GuiElements.cpp2
-rw-r--r--plugins/HTTPServer/src/main.cpp2
-rw-r--r--plugins/HistoryLinkListPlus/src/linklist.cpp2
-rw-r--r--plugins/HistoryStats/src/main.cpp2
-rw-r--r--plugins/HistoryStats/src/mu_common.cpp4
-rw-r--r--plugins/IEHistory/src/IEHistory.cpp2
-rw-r--r--plugins/Import/src/main.cpp2
-rw-r--r--plugins/ListeningTo/src/listeningto.cpp4
-rw-r--r--plugins/LotusNotify/src/LotusNotify.cpp2
-rw-r--r--plugins/MenuItemEx/src/main.cpp4
-rw-r--r--plugins/MirLua/src/Modules/m_clist.cpp10
-rw-r--r--plugins/MirOTR/src/mirotrmenu.cpp2
-rw-r--r--plugins/MirOTR/src/svcs_menu.cpp2
-rwxr-xr-xplugins/Msg_Export/src/main.cpp2
-rw-r--r--plugins/MyDetails/src/frame.cpp4
-rw-r--r--plugins/MyDetails/src/mydetails.cpp2
-rw-r--r--plugins/NewAwaySysMod/src/AwaySys.cpp2
-rw-r--r--plugins/NewEventNotify/src/menuitem.cpp4
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp4
-rwxr-xr-xplugins/New_GPG/src/init.cpp2
-rwxr-xr-xplugins/New_GPG/src/utilities.cpp2
-rw-r--r--plugins/NewsAggregator/Src/Menus.cpp4
-rw-r--r--plugins/NoHistory/src/dllmain.cpp2
-rw-r--r--plugins/Non-IM Contact/src/main.cpp4
-rw-r--r--plugins/NotesAndReminders/src/main.cpp4
-rw-r--r--plugins/Nudge/src/main.cpp2
-rw-r--r--plugins/OpenFolder/src/openFolder.cpp2
-rw-r--r--plugins/PackUpdater/Src/PackUpdater.cpp2
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp4
-rw-r--r--plugins/Ping/src/menu.cpp4
-rw-r--r--plugins/Ping/src/pingthread.cpp4
-rw-r--r--plugins/PluginUpdater/src/PluginUpdater.cpp2
-rw-r--r--plugins/Popup/src/main.cpp4
-rw-r--r--plugins/ProfileManager/src/pmanagerEx.cpp4
-rw-r--r--plugins/QuickContacts/src/quickcontacts.cpp2
-rw-r--r--plugins/Quotes/src/Forex.cpp6
-rw-r--r--plugins/RecentContacts/src/RecentContacts.cpp2
-rw-r--r--plugins/RemovePersonalSettings/src/rps.cpp2
-rw-r--r--plugins/Restart/src/restart.cpp2
-rw-r--r--plugins/SMS/src/SMS_svc.cpp2
-rw-r--r--plugins/Scriver/src/msgs.cpp2
-rw-r--r--plugins/SecureIM/src/main.cpp4
-rw-r--r--plugins/SeenPlugin/src/menu.cpp2
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp2
-rw-r--r--plugins/Sessions/Src/Main.cpp4
-rw-r--r--plugins/SimpleAR/src/Main.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/awaymsg.cpp2
-rw-r--r--plugins/SimpleStatusMsg/src/main.cpp6
-rw-r--r--plugins/SmileyAdd/src/main.cpp2
-rw-r--r--plugins/SmileyAdd/src/services.cpp2
-rw-r--r--plugins/StartupSilence/src/main.cpp2
-rw-r--r--plugins/StatusManager/src/StartupStatus/ss_profiles.cpp4
-rwxr-xr-xplugins/StopSpamMod/src/init.cpp2
-rw-r--r--plugins/StopSpamPlus/src/stopspam.cpp2
-rw-r--r--plugins/TabSRMM/src/globals.cpp4
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp4
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp2
-rw-r--r--plugins/UserGuide/src/main.cpp2
-rw-r--r--plugins/UserInfoEx/src/mir_menuitems.cpp10
-rw-r--r--plugins/UserInfoEx/src/svc_email.cpp2
-rw-r--r--plugins/UserInfoEx/src/svc_homepage.cpp2
-rw-r--r--plugins/Weather/src/weather_svcs.cpp6
-rw-r--r--plugins/WebView/src/main.cpp4
-rw-r--r--plugins/WhenWasIt/src/WhenWasIt.cpp4
-rw-r--r--plugins/WhoUsesMyFiles/src/wumfplug.cpp4
-rw-r--r--plugins/XSoundNotify/src/xsn_main.cpp2
-rw-r--r--plugins/YAMN/src/main.cpp2
-rw-r--r--plugins/YAPP/src/yapp.cpp4
-rw-r--r--plugins/ZeroNotification/src/main.cpp2
103 files changed, 159 insertions, 159 deletions
diff --git a/plugins/AddContactPlus/src/main.cpp b/plugins/AddContactPlus/src/main.cpp
index 720395d8bc..511b7acdd3 100644
--- a/plugins/AddContactPlus/src/main.cpp
+++ b/plugins/AddContactPlus/src/main.cpp
@@ -88,7 +88,7 @@ static int OnAccListChanged(WPARAM, LPARAM)
if (hMainMenuItem)
return 0;
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xb19db907, 0x870e, 0x49fa, 0xa7, 0x1e, 0x43, 0x5e, 0xa8, 0xe5, 0x9b, 0xbd);
mi.position = 500020001;
mi.flags = CMIF_UNICODE;
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp
index 9836ab3858..f9c435a518 100755
--- a/plugins/Alarms/src/frame.cpp
+++ b/plugins/Alarms/src/frame.cpp
@@ -521,8 +521,8 @@ int CreateFrame()
// create menu item
CreateServiceFunction(MODULENAME "/ShowHideReminders", ShowHideMenuFunc);
- CMenuItem mi;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Alarms"), 0);
+ CMenuItem mi(g_plugin);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Alarms"), 0);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "8A3C1906-4809-4EE8-A32A-858003A2AAA7");
SET_UID(mi, 0x27556ea9, 0xfa19, 0x4c2e, 0xb0, 0xc9, 0x48, 0x2, 0x5c, 0x17, 0xba, 0x5);
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp
index d756fe850f..3b9027af7a 100755
--- a/plugins/Alarms/src/options.cpp
+++ b/plugins/Alarms/src/options.cpp
@@ -811,9 +811,9 @@ void AddMenuItem()
{
if (hMainMenuItem) return;
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
if (!ServiceExists(MS_CLIST_FRAMES_ADDFRAME)) {
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Alarms"), mi.position);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Alarms"), mi.position);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "24F03563-01BE-4118-8297-E94375A783E7");
}
diff --git a/plugins/AuthState/src/main.cpp b/plugins/AuthState/src/main.cpp
index 381abe6a97..f5bfb2fc9a 100644
--- a/plugins/AuthState/src/main.cpp
+++ b/plugins/AuthState/src/main.cpp
@@ -176,7 +176,7 @@ extern "C" int __declspec(dllexport) Load(void)
HookEvent(ME_DB_CONTACT_ADDED, onDBContactAdded);
CreateServiceFunction("AuthState/MenuItem", onAuthMenuSelected);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xc5a784ea, 0x8b07, 0x4b95, 0xa2, 0xb2, 0x84, 0x9d, 0x87, 0x43, 0x7e, 0xda);
mi.position = -1999901005;
mi.flags = CMIF_UNICODE;
diff --git a/plugins/AutoShutdown/src/settingsdlg.cpp b/plugins/AutoShutdown/src/settingsdlg.cpp
index e54ef15296..c9faec75f4 100644
--- a/plugins/AutoShutdown/src/settingsdlg.cpp
+++ b/plugins/AutoShutdown/src/settingsdlg.cpp
@@ -433,7 +433,7 @@ static HGENMENU hMainMenuItem, hTrayMenuItem;
void SetShutdownMenuItem(bool fActive)
{
/* main menu */
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x61e2a38f, 0xcd94, 0x4f72, 0x84, 0x8c, 0x72, 0x92, 0xde, 0x1d, 0x6d, 0x5);
mi.position = 2001090000;
if (fActive) {
diff --git a/plugins/AvatarHistory/src/AvatarDlg.cpp b/plugins/AvatarHistory/src/AvatarDlg.cpp
index 1fee474f87..d48c571f4d 100644
--- a/plugins/AvatarHistory/src/AvatarDlg.cpp
+++ b/plugins/AvatarHistory/src/AvatarDlg.cpp
@@ -494,7 +494,7 @@ void InitMenuItem()
{
CreateServiceFunction(MS_AVATARHISTORY_SHOWDIALOG, ShowDialogSvc);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x2fb5c7eb, 0xa606, 0x4145, 0x9e, 0x86, 0x73, 0x88, 0x73, 0x1d, 0xe7, 0x5c);
mi.name.w = LPGENW("View avatar history");
mi.flags = CMIF_UNICODE;
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp
index c57ad05b03..feda8d28bd 100644
--- a/plugins/BasicHistory/src/BasicHistory.cpp
+++ b/plugins/BasicHistory/src/BasicHistory.cpp
@@ -95,7 +95,7 @@ int ToolbarModuleLoaded(WPARAM, LPARAM)
void InitMenuItems()
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x28848d7a, 0x6995, 0x4799, 0x82, 0xd7, 0x18, 0x40, 0x3d, 0xe3, 0x71, 0xc4);
mi.position = 1000090000;
@@ -122,7 +122,7 @@ void InitTaskMenuItems()
{
if (Options::instance->taskOptions.size() > 0) {
if (hTaskMainMenu == nullptr) {
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xbf66499, 0x1b39, 0x47a2, 0x9b, 0x74, 0xa6, 0xae, 0x89, 0x95, 0x59, 0x59);
mi.position = 500060005;
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
@@ -140,7 +140,7 @@ void InitTaskMenuItems()
int pos = (int)taskMenus.size();
for (; taskIt != Options::instance->taskOptions.end(); ++taskIt) {
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE | CMIF_KEEPUNTRANSLATED;
mi.pszService = MS_HISTORY_EXECUTE_TASK;
mi.root = hTaskMainMenu;
diff --git a/plugins/Boltun/src/boltun.cpp b/plugins/Boltun/src/boltun.cpp
index 1c1f2f51a4..79326137b3 100644
--- a/plugins/Boltun/src/boltun.cpp
+++ b/plugins/Boltun/src/boltun.cpp
@@ -533,7 +533,7 @@ extern "C" int __declspec(dllexport) Load(void)
CreateServiceFunction(SERV_CONTACT_NOT_TO_CHAT, ContactClickNotToChat);
CreateServiceFunction(SERV_CONTACT_START_CHATTING, ContactClickStartChatting);
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xea31f628, 0x1445, 0x4b62, 0x98, 0x19, 0xce, 0x15, 0x81, 0x49, 0xa, 0xbd);
mi.position = -50010002; //TODO: check the warning
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index 0f7e6b2680..16623446f8 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -530,7 +530,7 @@ static int GenMenuInit(WPARAM, LPARAM) // Modify menu item text before to show t
void BossKeyMenuItemInit(void) // Add menu item
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x42428114, 0xfac7, 0x44c2, 0x9a, 0x11, 0x18, 0xbe, 0x81, 0xd4, 0xa9, 0xe3);
mi.flags = CMIF_UNICODE;
mi.position = 2000100000;
diff --git a/plugins/BuddyExpectator/src/BuddyExpectator.cpp b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
index c5cb55f264..57ba89e6d8 100644
--- a/plugins/BuddyExpectator/src/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/src/BuddyExpectator.cpp
@@ -612,7 +612,7 @@ int ModulesLoaded(WPARAM, LPARAM)
if (options.enableMissYou) {
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, onPrebuildContactMenu);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xc48c31d4, 0x56b6, 0x48c6, 0x8e, 0xe9, 0xe6, 0x57, 0xb5, 0x80, 0xb8, 0x1e);
mi.flags = CMIF_UNICODE;
mi.hIcolibItem = iconList[2].hIcolib;
diff --git a/plugins/BuddyPounce/src/main.cpp b/plugins/BuddyPounce/src/main.cpp
index 3dfb782687..35e15a39dd 100644
--- a/plugins/BuddyPounce/src/main.cpp
+++ b/plugins/BuddyPounce/src/main.cpp
@@ -33,7 +33,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD)
int MainInit(WPARAM, LPARAM)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x719c1596, 0xb0fd, 0x4c74, 0xb7, 0xe4, 0xeb, 0x22, 0xf4, 0x99, 0xd7, 0x68);
mi.position = 10;
mi.hIcolibItem = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_POUNCE));
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp
index 8dd2ce56f0..5879ad8b8b 100644
--- a/plugins/CSList/src/cslist.cpp
+++ b/plugins/CSList/src/cslist.cpp
@@ -226,7 +226,7 @@ void addProtoStatusMenuItem(char *protoName)
if (!ServiceExists(buf))
CreateServiceFunctionParam(buf, showList, (LPARAM)protoName);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE;
mi.hIcolibItem = forms[0].hIcoLibItem;
mi.name.w = MODULENAME;
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index af22f6709a..518bf49eb9 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -328,9 +328,9 @@ static int MirandaLoaded(WPARAM, LPARAM)
CreateServiceFunction(MS_CCN_TOGGLEPOPUPS, srvTogglePopups);
HookEvent(ME_CLIST_PREBUILDMAINMENU, PrebuildMainMenu);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xfabb9181, 0xdb92, 0x43f4, 0x86, 0x40, 0xca, 0xb6, 0x4c, 0x93, 0x34, 0x27);
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Popups"), 0);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Popups"), 0);
mi.flags = CMIF_UNICODE;
if (g_PopupOptPage.GetDBValueCopy(IDC_POPUPOPTDLG_POPUPNOTIFY))
mi.name.w = LPGENW("Disable c&lient change notification");
diff --git a/plugins/Clist_modern/src/cluiframes.cpp b/plugins/Clist_modern/src/cluiframes.cpp
index 3006c0441e..8d631fc505 100644
--- a/plugins/Clist_modern/src/cluiframes.cpp
+++ b/plugins/Clist_modern/src/cluiframes.cpp
@@ -69,7 +69,7 @@ static HFONT _hTitleBarFont = nullptr;
// menus
static FrameMenuHandles cont = {};
-static LIST<HGENMENU__> g_frameMenus(10);
+static LIST<TMO_IntMenuItem> g_frameMenus(10);
// others
static int _nContactListHeight = 0;
@@ -749,7 +749,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popupp
int framepos = id2pos(frameid);
FrameMenuHandles &fmh = (frameid == -1) ? cont : g_pfwFrames[framepos].MenuHandles;
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.root = root;
mi.position = popuppos++;
mi.name.a = LPGEN("&Visible");
@@ -1470,7 +1470,7 @@ static int CLUIFramesLoadMainMenu()
g_frameMenus.destroy();
// create frames menu
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.root = cont.MainMenuItem;
int separator = 3000200000;
for (int i = 0; i < g_nFramesCount; i++) {
@@ -3312,7 +3312,7 @@ int LoadCLUIFramesModule(void)
InitGroupMenus();
{
// create root menu
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x3931AC4, 0x7A32, 0x4D9C, 0x99, 0x92, 0x94, 0xD4, 0xB5, 0x9B, 0xD6, 0xB6);
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME);
mi.position = 3000090000;
diff --git a/plugins/Clist_modern/src/groupmenu.cpp b/plugins/Clist_modern/src/groupmenu.cpp
index 0c2f81b74a..431bc8ace8 100644
--- a/plugins/Clist_modern/src/groupmenu.cpp
+++ b/plugins/Clist_modern/src/groupmenu.cpp
@@ -56,7 +56,7 @@ void InitGroupMenus(void)
InitSubGroupMenus();
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xe386678a, 0x5aee, 0x4bfa, 0xa8, 0x23, 0xd, 0xa0, 0x11, 0x99, 0xb1, 0x98);
mi.position = 500;
@@ -132,7 +132,7 @@ void InitSubGroupMenus(void)
// add exit command to menu
GroupMenuParam gmp = { POPUP_GROUPSHOWOFFLINE, 0 };
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x7E081A28, 0x19B3, 0x407F, 0x80, 0x6B, 0x70, 0xC3, 0xC3, 0xA9, 0xD2, 0xA4);
mi.position = 1002;
mi.pszService = "CLISTMENUSSubGroup/GroupMenuExecProxy";
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp
index 0ba0175fe0..6690aadc85 100644
--- a/plugins/Clist_modern/src/modern_clistmenus.cpp
+++ b/plugins/Clist_modern/src/modern_clistmenus.cpp
@@ -93,7 +93,7 @@ INT_PTR FAV_ToggleShowOffline(WPARAM hContact, LPARAM)
void LoadFavoriteContactMenu()
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xf99a2320, 0xc024, 0x48bd, 0x81, 0xf7, 0x9f, 0xa2, 0x5, 0xb0, 0x7f, 0xdc);
mi.name.w = FAVMENUROOTNAME;
mi.flags = CMIF_UNICODE;
diff --git a/plugins/Clist_modern/src/modern_clui.cpp b/plugins/Clist_modern/src/modern_clui.cpp
index a64770f200..c498208b64 100644
--- a/plugins/Clist_modern/src/modern_clui.cpp
+++ b/plugins/Clist_modern/src/modern_clui.cpp
@@ -325,7 +325,7 @@ HRESULT CLUI::RegisterAvatarMenu()
{
g_plugin.registerIcon(LPGEN("Contact list"), iconItem);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x1cc99858, 0x40ca, 0x4558, 0xae, 0x10, 0xba, 0x81, 0xaf, 0x4c, 0x67, 0xb5);
CreateServiceFunction("CList/ShowContactAvatar", CLUI::Service_Menu_ShowContactAvatar);
mi.position = 2000150000;
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp
index 516315d7a9..6d49d47549 100644
--- a/plugins/Clist_nicer/src/clistmenus.cpp
+++ b/plugins/Clist_nicer/src/clistmenus.cpp
@@ -360,7 +360,7 @@ int InitCustomMenus(void)
CreateServiceFunction("CloseAction", CloseAction);
CreateServiceFunction("CList/SetContactIgnore", SetContactIgnore);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xe3b08c6f, 0x8a01, 0x4c94, 0xb3, 0xf5, 0x9d, 0x38, 0x6, 0x63, 0x7a, 0xa9);
mi.position = 200000;
mi.pszService = "CList/SetContactIgnore";
diff --git a/plugins/Clist_nicer/src/cluiframes.cpp b/plugins/Clist_nicer/src/cluiframes.cpp
index f1be52c9dd..7af99edbd3 100644
--- a/plugins/Clist_nicer/src/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/cluiframes.cpp
@@ -88,7 +88,7 @@ static boolean resizing = FALSE;
// menus
static FrameMenuHandles cont;
-static LIST<HGENMENU__> g_frameMenus(10);
+static LIST<TMO_IntMenuItem> g_frameMenus(10);
// others
static int ContactListHeight;
@@ -567,7 +567,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, boo
int framepos = id2pos(frameid);
FrameMenuHandles &fmh = (frameid == -1) ? cont : Frames[framepos].MenuHandles;
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
mi.root = root;
mi.position = popuppos++;
@@ -1322,7 +1322,7 @@ static int CLUIFramesLoadMainMenu()
g_frameMenus.destroy();
// create frames menu
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.root = cont.MainMenuItem;
mi.flags = CMIF_UNICODE | CMIF_SYSTEM;
int separator = (int)3000200000;
@@ -2938,7 +2938,7 @@ int LoadCLUIFramesModule(void)
RegisterClass(&cntclass);
// create root menu
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x3931AC4, 0x7A32, 0x4D9C, 0x99, 0x92, 0x94, 0xD4, 0xB5, 0x9B, 0xD6, 0xB6);
mi.hIcolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME);
mi.position = 3000090000;
diff --git a/plugins/Clist_nicer/src/groupmenu.cpp b/plugins/Clist_nicer/src/groupmenu.cpp
index 2d9c4fb495..11fef9cd61 100644
--- a/plugins/Clist_nicer/src/groupmenu.cpp
+++ b/plugins/Clist_nicer/src/groupmenu.cpp
@@ -95,7 +95,7 @@ void InitGroupMenus(void)
HookEvent(ME_CLIST_PREBUILDGROUPMENU, OnBuildGroupMenu);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xe386678a, 0x5aee, 0x4bfa, 0xa8, 0x23, 0xd, 0xa0, 0x11, 0x99, 0xb1, 0x98);
mi.position = 500;
mi.pszService = MS_CLIST_SHOWHIDE;
diff --git a/plugins/CloudFile/src/menus.cpp b/plugins/CloudFile/src/menus.cpp
index 6fcfeafd6e..c6861e27a2 100644
--- a/plugins/CloudFile/src/menus.cpp
+++ b/plugins/CloudFile/src/menus.cpp
@@ -11,7 +11,7 @@ static INT_PTR UploadMenuCommand(void *obj, WPARAM hContact, LPARAM)
void InitializeMenus()
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x93d4495b, 0x259b, 0x4fba, 0xbc, 0x14, 0xf9, 0x46, 0x2c, 0xda, 0xfc, 0x6d);
mi.name.a = LPGEN("Upload to...");
@@ -32,7 +32,7 @@ void InitializeMenus()
void CCloudService::OnModulesLoaded()
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.root = hContactMenu;
CMStringA serviceName(FORMAT, "/%s/Upload", GetAccountName());
mi.pszService = serviceName.GetBuffer();
diff --git a/plugins/Console/src/Console.cpp b/plugins/Console/src/Console.cpp
index 3152d46524..566e307791 100644
--- a/plugins/Console/src/Console.cpp
+++ b/plugins/Console/src/Console.cpp
@@ -1141,7 +1141,7 @@ static int OnSystemModulesLoaded(WPARAM, LPARAM)
if (hwndConsole && IsWindow(hwndConsole)) {
HookEvent(ME_TTB_MODULELOADED, OnTTBLoaded);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x6d97694e, 0x2024, 0x4560, 0xbb, 0xbc, 0x20, 0x62, 0x7e, 0x5, 0xdf, 0xb3);
mi.flags = CMIF_UNICODE;
mi.hIcolibItem = hIcons[0];
diff --git a/plugins/ContactsPlus/src/main.cpp b/plugins/ContactsPlus/src/main.cpp
index bf8c264a4e..ebdb996a65 100644
--- a/plugins/ContactsPlus/src/main.cpp
+++ b/plugins/ContactsPlus/src/main.cpp
@@ -140,7 +140,7 @@ static int HookModulesLoaded(WPARAM, LPARAM)
modules[0] = MODULENAME;
CallService("DBEditorpp/RegisterModule", (WPARAM)modules, 1);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x94a4ed39, 0xabd0, 0x4c70, 0x89, 0xeb, 0x1b, 0x2, 0xf0, 0xac, 0x6, 0x4c);
mi.name.a = LPGEN("Contacts");
mi.position = -2000009990; //position in menu
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp
index eb3e85ec00..82113cd663 100644
--- a/plugins/CrashDumper/src/crshdmp.cpp
+++ b/plugins/CrashDumper/src/crshdmp.cpp
@@ -261,8 +261,8 @@ static int ModulesLoaded(WPARAM, LPARAM)
FoldersPathChanged(0, 0);
}
- CMenuItem mi;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Version Information"), 2000089999, GetIconHandle(IDI_VI));
+ CMenuItem mi(g_plugin);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Version Information"), 2000089999, GetIconHandle(IDI_VI));
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "9A7A9C76-7FD8-4C05-B402-6C46060C2D78");
SET_UID(mi, 0x52930e40, 0xb2ee, 0x4433, 0xad, 0x77, 0xf5, 0x42, 0xe, 0xf6, 0x57, 0xc1);
diff --git a/plugins/CyrTranslit/src/MirandaContact.cpp b/plugins/CyrTranslit/src/MirandaContact.cpp
index 173696bcbf..207135c19d 100644
--- a/plugins/CyrTranslit/src/MirandaContact.cpp
+++ b/plugins/CyrTranslit/src/MirandaContact.cpp
@@ -63,7 +63,7 @@ void MirandaContact::save(MCONTACT hContact, bool bValue)
void MirandaContact::addMenuItem()
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi,0x47bbf49f, 0x2b77, 0x412a, 0xaa, 0x80, 0xbe, 0xd5, 0x2f, 0x8, 0x29, 0x96);
mi.name.a = MENU_ITEM_TEXT;
mi.position = 65535;
diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp
index fe00cf272d..49601ba2c7 100644
--- a/plugins/Db3x_mmap/src/ui.cpp
+++ b/plugins/Db3x_mmap/src/ui.cpp
@@ -329,10 +329,10 @@ static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM)
HookEventObj(ME_OPT_INITIALISE, OnOptionsInit, db);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
// main menu item
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Database"), 500000000, iconList[0].hIcolib);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Database"), 500000000, iconList[0].hIcolib);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "F7C5567C-D1EE-484B-B4F6-24677A5AAAEF");
SET_UID(mi, 0x50321866, 0xba1, 0x46dd, 0xb3, 0xa6, 0xc3, 0xcc, 0x55, 0xf2, 0x42, 0x9e);
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp
index 164411a54a..8a154fd2b7 100644
--- a/plugins/DbEditorPP/src/main.cpp
+++ b/plugins/DbEditorPP/src/main.cpp
@@ -107,8 +107,8 @@ static int ModulesLoaded(WPARAM, LPARAM)
IcoLibRegister();
// Register menu item
- CMenuItem mi;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Database"), 1900000001);
+ CMenuItem mi(g_plugin);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Database"), 1900000001);
SET_UID(mi, 0xe298849c, 0x1a8c, 0x4fc7, 0xa0, 0xf4, 0x78, 0x18, 0xf, 0xe2, 0xf7, 0xc9);
mi.position = 1900000001;
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp
index 294ae84cd3..219de0dfe1 100644
--- a/plugins/Db_autobackups/src/main.cpp
+++ b/plugins/Db_autobackups/src/main.cpp
@@ -70,8 +70,8 @@ static int FoldersGetBackupPath(WPARAM, LPARAM)
static int ModulesLoad(WPARAM, LPARAM)
{
- CMenuItem mi;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Database"), 500100000);
+ CMenuItem mi(g_plugin);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Database"), 500100000);
SET_UID(mi, 0x1439b1db, 0x7d95, 0x495b, 0xbf, 0x5, 0x3d, 0x21, 0xc1, 0xeb, 0xf7, 0x58);
mi.name.a = LPGEN("Backup profile");
diff --git a/plugins/Dbx_mdbx/src/ui.cpp b/plugins/Dbx_mdbx/src/ui.cpp
index 83caaab11e..9795cb305d 100644
--- a/plugins/Dbx_mdbx/src/ui.cpp
+++ b/plugins/Dbx_mdbx/src/ui.cpp
@@ -186,10 +186,10 @@ static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM)
HookEventObj(ME_OPT_INITIALISE, OnOptionsInit, db);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
// main menu item
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Database"), 500000000, iconList[0].hIcolib);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Database"), 500000000, iconList[0].hIcolib);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "F7C5567C-D1EE-484B-B4F6-24677A5AAAEF");
SET_UID(mi, 0x50321866, 0xba1, 0x46dd, 0xb3, 0xa6, 0xc3, 0xcc, 0x55, 0xf2, 0x42, 0x9e);
diff --git a/plugins/Exchange/src/hooked_events.cpp b/plugins/Exchange/src/hooked_events.cpp
index 479a0c05ff..9739e41ae9 100644
--- a/plugins/Exchange/src/hooked_events.cpp
+++ b/plugins/Exchange/src/hooked_events.cpp
@@ -54,7 +54,7 @@ int OnModulesLoaded(WPARAM, LPARAM)
{
UpdateTimers();
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xcbfbfd3d, 0x5002, 0x4c64, 0x92, 0xb, 0x9c, 0x12, 0x4b, 0x6, 0x51, 0x2a);
mi.hIcolibItem = hiMailIcon;
mi.position = 10000000;
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index 494bd5aa4f..7605c88443 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -86,7 +86,7 @@ void InitMenuItems()
{
wchar_t stzName[256];
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xB7132F5A, 0x65FC, 0x42C5, 0xB4, 0xCB, 0x54, 0xBC, 0xAC, 0x58, 0x34, 0xE9);
mi.flags = CMIF_UNICODE;
mi.hIcolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
@@ -101,7 +101,7 @@ void InitMenuItems()
mi.name.w = stzName;
mi.flags = CMIF_UNICODE | CMIF_SYSTEM;
- CMenuItem mi2;
+ CMenuItem mi2(g_plugin);
mi2.flags = CMIF_UNICODE | CMIF_SYSTEM;
mi2.pszService = MS_FTPFILE_CONTACTMENU;
diff --git a/plugins/FileAsMessage/src/main.cpp b/plugins/FileAsMessage/src/main.cpp
index 608e465691..4db8db2919 100644
--- a/plugins/FileAsMessage/src/main.cpp
+++ b/plugins/FileAsMessage/src/main.cpp
@@ -178,7 +178,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
hHookSkinIconsChanged = HookEvent(ME_SKIN2_ICONSCHANGED, OnSkinIconsChanged);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xe4a98d2a, 0xa54a, 0x4db1, 0x8d, 0x29, 0xd, 0x5c, 0xf1, 0x10, 0x69, 0x35);
mi.position = 200011;
mi.hIcolibItem = iconList[ICON_MAIN].hIcolib;
diff --git a/plugins/FloatingContacts/src/main.cpp b/plugins/FloatingContacts/src/main.cpp
index a0d2441eea..6c08fb4a50 100644
--- a/plugins/FloatingContacts/src/main.cpp
+++ b/plugins/FloatingContacts/src/main.cpp
@@ -714,7 +714,7 @@ static INT_PTR OnHotKey_HideWhenCListShow(WPARAM, LPARAM)
static void LoadMenus()
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
// Remove thumb menu item
CreateServiceFunction(MODULE "/RemoveThumb", OnContactMenu_Remove);
diff --git a/plugins/GmailNotifier/src/main.cpp b/plugins/GmailNotifier/src/main.cpp
index 5f598ba4d5..67b15cdeb6 100644
--- a/plugins/GmailNotifier/src/main.cpp
+++ b/plugins/GmailNotifier/src/main.cpp
@@ -141,7 +141,7 @@ extern "C" int __declspec(dllexport) Load()
CreateServiceFunction(MODULENAME "/MenuCommand", PluginMenuCommand);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xbe16f37, 0x17be, 0x4494, 0xaa, 0xb2, 0x3a, 0xa7, 0x38, 0xfa, 0xf9, 0xcc);
mi.position = -0x7FFFFFFF;
mi.hIcolibItem = Skin_LoadProtoIcon(MODULENAME, ID_STATUS_ONLINE);
diff --git a/plugins/HTTPServer/src/GuiElements.cpp b/plugins/HTTPServer/src/GuiElements.cpp
index c7ff424622..831a3ea9a8 100644
--- a/plugins/HTTPServer/src/GuiElements.cpp
+++ b/plugins/HTTPServer/src/GuiElements.cpp
@@ -1473,7 +1473,7 @@ void InitGuiElements()
hShareNewFileService = CreateServiceFunction(MS_SHARE_NEW_FILE, nShareNewFile);
hShowStatisticsViewService = CreateServiceFunction(MS_SHOW_STATISTICS_VIEW, nShowStatisticsView);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE;
SET_UID(mi, 0xb30a6ab5, 0x17a8, 0x4e2e, 0x84, 0x52, 0x5f, 0xbc, 0x83, 0x35, 0xf2, 0x6);
mi.hIcolibItem = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
diff --git a/plugins/HTTPServer/src/main.cpp b/plugins/HTTPServer/src/main.cpp
index 9c5035a4f7..2e83b92b37 100644
--- a/plugins/HTTPServer/src/main.cpp
+++ b/plugins/HTTPServer/src/main.cpp
@@ -886,7 +886,7 @@ extern "C" __declspec(dllexport) int Load()
indexCreationMode = (eIndexCreationMode)db_get_b(NULL, MODULENAME, "IndexCreationMode", 2);
if (db_get_b(NULL, MODULENAME, "AddAcceptConMenuItem", 1)) {
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xf0a68784, 0xc30e, 0x4245, 0xb6, 0x2b, 0xb8, 0x71, 0x7e, 0xe6, 0xe1, 0x73);
mi.flags = CMIF_UNICODE;
mi.hIcolibItem = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_SHARE_NEW_FILE));
diff --git a/plugins/HistoryLinkListPlus/src/linklist.cpp b/plugins/HistoryLinkListPlus/src/linklist.cpp
index 85b1cc546e..9414e2db1b 100644
--- a/plugins/HistoryLinkListPlus/src/linklist.cpp
+++ b/plugins/HistoryLinkListPlus/src/linklist.cpp
@@ -155,7 +155,7 @@ extern "C" __declspec(dllexport) int Load(void)
{
CreateServiceFunction("Linklist/MenuCommand", LinkList_Main);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x2964dc6c, 0x9cf9, 0x4f20, 0x8f, 0x8a, 0xc6, 0xfe, 0xe2, 0x65, 0xac, 0xc9);
mi.flags = CMIF_UNICODE;
mi.hIcolibItem = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_LINKLISTICON));
diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp
index 97d7d5dacb..a3deb926a3 100644
--- a/plugins/HistoryStats/src/main.cpp
+++ b/plugins/HistoryStats/src/main.cpp
@@ -147,7 +147,7 @@ void AddMainMenu()
CreateServiceFunction(con::SvcShowStatistics, MenuShowStatistics);
CreateServiceFunction(con::SvcConfigure, MenuConfigure);
- HGENMENU hRoot = bInPopup ? Menu_CreateRoot(MO_MAIN, LPGENW("Statistics"), 1910000000) : nullptr;
+ HGENMENU hRoot = bInPopup ? g_plugin.addRootMenu(MO_MAIN, LPGENW("Statistics"), 1910000000) : nullptr;
Menu_ConfigureItem(hRoot, MCI_OPT_UID, "7F116B24-9D84-4D04-B6AA-EED95051A184");
g_hMenuCreateStatistics = mu::clist::addMainMenuItem(
diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp
index 4df8bede52..3287d8ed5b 100644
--- a/plugins/HistoryStats/src/mu_common.cpp
+++ b/plugins/HistoryStats/src/mu_common.cpp
@@ -18,7 +18,7 @@ namespace mu
HGENMENU addMainMenuItem(const wchar_t* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, HGENMENU hRoot)
{
// TODO: support for unicode-core with unicode-aware CList
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.name.w = (wchar_t*)pszName;
mi.flags = flags | CMIF_UNICODE;
mi.position = position;
@@ -32,7 +32,7 @@ namespace mu
HGENMENU addContactMenuItem(const wchar_t* pszName, DWORD flags, int position, HICON hIcon, const char* pszService)
{
// TODO: support for unicode-core with unicode-aware CList
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.name.w = (wchar_t*)pszName;
mi.flags = flags | CMIF_UNICODE;
mi.position = position;
diff --git a/plugins/IEHistory/src/IEHistory.cpp b/plugins/IEHistory/src/IEHistory.cpp
index 6e91e9b857..1814b98f70 100644
--- a/plugins/IEHistory/src/IEHistory.cpp
+++ b/plugins/IEHistory/src/IEHistory.cpp
@@ -77,7 +77,7 @@ extern "C" int __declspec(dllexport) Load(void)
InitServices();
/// menu items
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x28848d7a, 0x6995, 0x4799, 0x82, 0xd7, 0x18, 0x40, 0x3d, 0xe3, 0x71, 0xc4);
mi.name.w = LPGENW("View &history");
mi.flags = CMIF_UNICODE;
diff --git a/plugins/Import/src/main.cpp b/plugins/Import/src/main.cpp
index 3b7bc81400..7591f998f7 100644
--- a/plugins/Import/src/main.cpp
+++ b/plugins/Import/src/main.cpp
@@ -67,7 +67,7 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = { MIID_IMPORT
static int ModulesLoaded(WPARAM, LPARAM)
{
// menu item
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x20ffaf55, 0xafa0, 0x4da3, 0xa9, 0x46, 0x20, 0x51, 0xa0, 0x24, 0xb, 0x41);
mi.hIcolibItem = GetIconHandle(IDI_IMPORT);
mi.name.a = LPGEN("&Import...");
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp
index 4cd31b2450..52015e80de 100644
--- a/plugins/ListeningTo/src/listeningto.cpp
+++ b/plugins/ListeningTo/src/listeningto.cpp
@@ -94,7 +94,7 @@ void RebuildMenu()
wchar_t text[512];
mir_snwprintf(text, TranslateT("Send to %s"), info->account);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.position = 100000 + i;
mi.root = hMainMenuGroup;
mi.position = 500080000 + i;
@@ -192,7 +192,7 @@ int ModulesLoaded(WPARAM, LPARAM)
}
// Add main menu item
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xe8e4e594, 0x255e, 0x434d, 0x83, 0x74, 0x79, 0x44, 0x1b, 0x4e, 0xe7, 0x16);
mi.position = 500080000;
mi.name.w = LPGENW("Listening to");
diff --git a/plugins/LotusNotify/src/LotusNotify.cpp b/plugins/LotusNotify/src/LotusNotify.cpp
index 673a130b88..b6f6495b94 100644
--- a/plugins/LotusNotify/src/LotusNotify.cpp
+++ b/plugins/LotusNotify/src/LotusNotify.cpp
@@ -1714,7 +1714,7 @@ extern "C" int __declspec(dllexport) Load(void)
//function that will be called on menu click
CreateServiceFunction("LotusNotify/MenuCommand", PluginMenuCommand);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x4519458, 0xb55a, 0x4e22, 0xac, 0x95, 0x5e, 0xa4, 0x4d, 0x92, 0x65, 0x65);
mi.position = -0x7FFFFFFF; //on top menu position
mi.flags = CMIF_UNICODE;
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 3d9380a06a..3dea87f5fc 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -744,7 +744,7 @@ static INT_PTR onIgnore(WPARAM wparam, LPARAM lparam)
static HGENMENU AddSubmenuItem(HGENMENU hRoot, wchar_t* name, HICON icon, DWORD flag, char* service, int pos, INT_PTR param)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.root = hRoot;
mi.position = pos;
mi.name.w = name;
@@ -950,7 +950,7 @@ static int PluginInit(WPARAM, LPARAM)
ModuleLoad(0, 0);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE;
SET_UID(mi, 0x2616aa3f, 0x535a, 0x464c, 0xbd, 0x26, 0x1b, 0x15, 0xbe, 0xfa, 0x1f, 0xf);
diff --git a/plugins/MirLua/src/Modules/m_clist.cpp b/plugins/MirLua/src/Modules/m_clist.cpp
index 5e5b7475b8..abe3da84c3 100644
--- a/plugins/MirLua/src/Modules/m_clist.cpp
+++ b/plugins/MirLua/src/Modules/m_clist.cpp
@@ -46,7 +46,7 @@ static int clist_AddMainMenuRoot(lua_State *L)
int position = lua_tointeger(L, 2);
HANDLE hIcon = (HANDLE)lua_touserdata(L, 3);
- HGENMENU res = Menu_CreateRoot(MO_MAIN, ptrW(Utf8DecodeW(name)), position, hIcon);
+ HGENMENU res = g_plugin.addRootMenu(MO_MAIN, ptrW(Utf8DecodeW(name)), position, hIcon);
if (res != nullptr)
lua_pushlightuserdata(L, res);
else
@@ -59,7 +59,7 @@ static int clist_AddMainMenuItem(lua_State *L)
{
luaL_checktype(L, 1, LUA_TTABLE);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
MakeMenuItem(L, mi);
HGENMENU res = Menu_AddMainMenuItem(&mi);
@@ -77,7 +77,7 @@ static int clist_AddContactMenuRoot(lua_State *L)
int position = lua_tointeger(L, 2);
HANDLE hIcon = (HANDLE)lua_touserdata(L, 3);
- HGENMENU res = Menu_CreateRoot(MO_MAIN, ptrW(Utf8DecodeW(name)), position, hIcon);
+ HGENMENU res = g_plugin.addRootMenu(MO_MAIN, ptrW(Utf8DecodeW(name)), position, hIcon);
if (res != nullptr)
lua_pushlightuserdata(L, res);
else
@@ -90,7 +90,7 @@ static int clist_AddContactMenuItem(lua_State *L)
{
luaL_checktype(L, 1, LUA_TTABLE);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
MakeMenuItem(L, mi);
ptrA szProto(mir_utf8decodeA(lua_tostring(L, 2)));
@@ -107,7 +107,7 @@ static int clist_AddTrayMenuItem(lua_State *L)
{
luaL_checktype(L, 1, LUA_TTABLE);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
MakeMenuItem(L, mi);
HGENMENU res = Menu_AddTrayMenuItem(&mi);
diff --git a/plugins/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/src/mirotrmenu.cpp
index 899b41e5c4..cc47a815f9 100644
--- a/plugins/MirOTR/src/mirotrmenu.cpp
+++ b/plugins/MirOTR/src/mirotrmenu.cpp
@@ -166,7 +166,7 @@ void InitMirOTRMenu(void)
Menu_ConfigureObject(hMirOTRMenuObject, MCO_OPT_ONADD_SERVICE, "MIROTRMENUS/OnAddMenuItemMirOTRMenu");
// menu items
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_DISABLED | CMIF_UNICODE;
mi.name.w = LPGENW("OTR Status");
mi.position = 0;
diff --git a/plugins/MirOTR/src/svcs_menu.cpp b/plugins/MirOTR/src/svcs_menu.cpp
index 5b9d4703d7..d375500602 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);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_NOTOFFLINE | CMIF_UNICODE;
mi.position = -400000;
diff --git a/plugins/Msg_Export/src/main.cpp b/plugins/Msg_Export/src/main.cpp
index cd2e999d82..c32bb2f880 100755
--- a/plugins/Msg_Export/src/main.cpp
+++ b/plugins/Msg_Export/src/main.cpp
@@ -117,7 +117,7 @@ int MainInit(WPARAM /*wparam*/, LPARAM /*lparam*/)
HookEvent(ME_OPT_INITIALISE, OptionsInitialize);
if (!bReplaceHistory) {
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x701c543, 0xd078, 0x41dd, 0x95, 0xe3, 0x96, 0x49, 0x8a, 0x72, 0xc7, 0x50);
mi.hIcolibItem = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_EXPORT_MESSAGE));
mi.position = 1000090100;
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp
index 4664af7a7a..f6ba0111eb 100644
--- a/plugins/MyDetails/src/frame.cpp
+++ b/plugins/MyDetails/src/frame.cpp
@@ -327,8 +327,8 @@ int CreateFrame()
// Create menu item
- CMenuItem mi;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("My details"), 500010000);
+ CMenuItem mi(g_plugin);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("My details"), 500010000);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "8C1C981C-4F28-4C4C-9121-544156210CE9");
SET_UID(mi, 0x69a43f1d, 0x6ebd, 0x4e41, 0xa6, 0xbd, 0x18, 0xea, 0xc4, 0x3, 0x90, 0x35);
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp
index a751bb713e..c19f70b1a0 100644
--- a/plugins/MyDetails/src/mydetails.cpp
+++ b/plugins/MyDetails/src/mydetails.cpp
@@ -82,7 +82,7 @@ static int MainInit(WPARAM, LPARAM)
InitProtocolData();
// Add options to menu
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x73ff525d, 0x7b8, 0x49cc, 0xa2, 0xdf, 0xc5, 0xad, 0x13, 0xf3, 0x8e, 0x2d);
mi.position = 500050000;
mi.flags = CMIF_UNICODE;
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp
index e3cf1b21ef..04a1d980e4 100644
--- a/plugins/NewAwaySysMod/src/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/src/AwaySys.cpp
@@ -625,7 +625,7 @@ int MirandaLoaded(WPARAM, LPARAM)
int SendOnEvent = CContactSettings(g_ProtoStates[(char*)NULL].m_status).Autoreply;
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xa379c361, 0x9e3f, 0x468d, 0xb2, 0xac, 0xc4, 0x89, 0xbb, 0xfc, 0x81, 0x15);
mi.position = 1000020000;
mi.flags = CMIF_UNICODE | CMIF_NOTOFFLINE;
diff --git a/plugins/NewEventNotify/src/menuitem.cpp b/plugins/NewEventNotify/src/menuitem.cpp
index d2c04d4d04..a2d03a96b5 100644
--- a/plugins/NewEventNotify/src/menuitem.cpp
+++ b/plugins/NewEventNotify/src/menuitem.cpp
@@ -50,9 +50,9 @@ int MenuitemInit(BOOL bStatus)
{
CreateServiceFunction(MS_NEN_MENUNOTIFY, MenuitemNotifyCmd);
- HGENMENU hRoot = Menu_CreateRoot(MO_MAIN, LPGENW("Popups"), 0);
+ HGENMENU hRoot = g_plugin.addRootMenu(MO_MAIN, LPGENW("Popups"), 0);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x7aed93f7, 0x835, 0x4ff6, 0xb1, 0x34, 0xae, 0x0, 0x21, 0x2a, 0xd7, 0x81);
mi.root = hRoot;
mi.position = 1;
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index 7fe98a5799..7b262ccaf3 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -1088,11 +1088,11 @@ INT_PTR EnableDisableMenuCommand(WPARAM, LPARAM)
void InitMainMenuItem()
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x22b7b4db, 0xa9a1, 0x4d43, 0x88, 0x80, 0x4c, 0x23, 0x20, 0x31, 0xc6, 0xa0);
mi.flags = CMIF_UNICODE;
if (ServiceExists(MS_POPUP_ADDPOPUPT))
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Popups"), 0);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Popups"), 0);
mi.pszService = MS_STATUSCHANGE_MENUCOMMAND;
hEnableDisableMenu = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/New_GPG/src/init.cpp b/plugins/New_GPG/src/init.cpp
index 3cbd78d649..6bb1bdfa1b 100755
--- a/plugins/New_GPG/src/init.cpp
+++ b/plugins/New_GPG/src/init.cpp
@@ -157,7 +157,7 @@ extern "C" int __declspec(dllexport) Load()
CreateServiceFunction("/ExportGPGKeys",ExportGpGKeys);
CreateServiceFunction("/ImportGPGKeys",ImportGpGKeys);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xbd22e3f8, 0xc19c, 0x45a8, 0xb7, 0x37, 0x6b, 0x3b, 0x27, 0xf0, 0x8c, 0xbb);
mi.position = -0x7FFFFFFF;
diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp
index aaf36d1e85..fddc9e357a 100755
--- a/plugins/New_GPG/src/utilities.cpp
+++ b/plugins/New_GPG/src/utilities.cpp
@@ -217,7 +217,7 @@ int OnPreBuildContactMenu(WPARAM w, LPARAM)
{
MCONTACT hContact = db_mc_tryMeta(w);
{
- CMenuItem mi2;
+ CMenuItem mi2(g_plugin);
LPSTR proto = GetContactProto(hContact);
PROTOACCOUNT *acc = Proto_GetAccount(proto);
std::string setting;
diff --git a/plugins/NewsAggregator/Src/Menus.cpp b/plugins/NewsAggregator/Src/Menus.cpp
index 7f6a73f77f..e64b3f0764 100644
--- a/plugins/NewsAggregator/Src/Menus.cpp
+++ b/plugins/NewsAggregator/Src/Menus.cpp
@@ -23,9 +23,9 @@ HGENMENU hService2[7];
void InitMenu()
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE | CMIF_NOTOFFLINE;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("News Aggregator"), 500099000);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("News Aggregator"), 500099000);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "D9733E4F-1946-4390-8EB3-591E8687222E");
SET_UID(mi, 0x3ec91864, 0xefa7, 0x4994, 0xb7, 0x75, 0x6c, 0x96, 0xcb, 0x29, 0x2f, 0x93);
diff --git a/plugins/NoHistory/src/dllmain.cpp b/plugins/NoHistory/src/dllmain.cpp
index bdaf770712..60e9591cf9 100644
--- a/plugins/NoHistory/src/dllmain.cpp
+++ b/plugins/NoHistory/src/dllmain.cpp
@@ -245,7 +245,7 @@ void SrmmMenu_Load()
static int ModulesLoaded(WPARAM, LPARAM)
{
// create contact menu item
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE;
SET_UID(mi, 0xede12697, 0x3e9d, 0x47ca, 0x83, 0xe0, 0xc1, 0x40, 0x69, 0xbf, 0x2d, 0xab);
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp
index c2d73aeb5f..3736e2d196 100644
--- a/plugins/Non-IM Contact/src/main.cpp
+++ b/plugins/Non-IM Contact/src/main.cpp
@@ -145,8 +145,8 @@ extern "C" __declspec(dllexport) int Load()
CreateServiceFunction("TestStringReplaceLine", testStringReplacer);
CreateServiceFunction("NIM_Contact/DoubleClick", doubleClick);
- CMenuItem mi;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("&Non-IM Contact"), 600090000);
+ CMenuItem mi(g_plugin);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("&Non-IM Contact"), 600090000);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "D7CE61C5-1178-41BA-B2ED-5A711BB21AE9");
SET_UID(mi, 0x73c11266, 0x153c, 0x4da4, 0x9b, 0x82, 0x5c, 0xce, 0xca, 0x86, 0xd, 0x41);
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp
index 81daebc34f..008ffc7728 100644
--- a/plugins/NotesAndReminders/src/main.cpp
+++ b/plugins/NotesAndReminders/src/main.cpp
@@ -205,8 +205,8 @@ int OnModulesLoaded(WPARAM, LPARAM)
g_AddContListMI = (BOOL)db_get_dw(0, MODULENAME, "AddContactMenuItems", 1);
// register menus
- CMenuItem mi;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Notes && Reminders"), 1600000000);
+ CMenuItem mi(g_plugin);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Notes && Reminders"), 1600000000);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "A5E140BC-D697-4689-B75B-8ECFB6FE5931");
mi.flags = CMIF_UNICODE;
diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp
index 5077b2d773..347887f5be 100644
--- a/plugins/Nudge/src/main.cpp
+++ b/plugins/Nudge/src/main.cpp
@@ -497,7 +497,7 @@ extern "C" int __declspec(dllexport) Load(void)
CreateServiceFunction(MS_NUDGE_SHOWMENU, NudgeShowMenu);
// Add contact menu entry
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xd617db26, 0x22ba, 0x4205, 0x9c, 0x3e, 0x53, 0x10, 0xbc, 0xcf, 0xce, 0x19);
mi.flags = CMIF_NOTOFFLINE | CMIF_UNICODE;
mi.position = -500050004;
diff --git a/plugins/OpenFolder/src/openFolder.cpp b/plugins/OpenFolder/src/openFolder.cpp
index 313c0391de..af4305c31b 100644
--- a/plugins/OpenFolder/src/openFolder.cpp
+++ b/plugins/OpenFolder/src/openFolder.cpp
@@ -103,7 +103,7 @@ extern "C" int __declspec(dllexport) Load()
hotkey.DefHotKey = MAKEWORD( 'O', HOTKEYF_SHIFT | HOTKEYF_ALT );
g_plugin.addHotkey(&hotkey);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xbba6ad01, 0x755a, 0x4d01, 0x94, 0xee, 0x57, 0x84, 0x18, 0x70, 0x77, 0x4f);
mi.position = 0x7FFFFFFF;
mi.flags = CMIF_UNICODE;
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp
index 77ef244139..102aa5b575 100644
--- a/plugins/PackUpdater/Src/PackUpdater.cpp
+++ b/plugins/PackUpdater/Src/PackUpdater.cpp
@@ -70,7 +70,7 @@ extern "C" __declspec(dllexport) int Load(void)
// Add cheking update menu item
CreateServiceFunction(MODULENAME"/CheckUpdates", MenuCommand);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x326495e8, 0xab0a, 0x47d2, 0xb2, 0x22, 0x2a, 0x8e, 0xa8, 0xae, 0x53, 0x1a);
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_UNICODE;
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index 390e43b74a..a18beb03ab 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -258,7 +258,7 @@ static INT_PTR ContactMenuService(WPARAM hContact, LPARAM lParam)
static void InitMenuItems()
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x33ecc112, 0x6, 0x487d, 0xbb, 0x8b, 0x76, 0xb4, 0x17, 0x9b, 0xdb, 0xc5);
mi.flags = CMIF_UNICODE;
@@ -284,7 +284,7 @@ static void InitMenuItems()
HGENMENU hDefWebMenu = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hDefWebMenu, MCI_OPT_EXECPARAM, DEF_PAGES_START - 1);
- CMenuItem mi2;
+ CMenuItem mi2(g_plugin);
mi2.pszService = MS_PASTEIT_CONTACTMENU;
mi2.root = hDefWebMenu;
for (int i = 0; i < PasteToWeb::pages; ++i) {
diff --git a/plugins/Ping/src/menu.cpp b/plugins/Ping/src/menu.cpp
index b3f286a246..fd49c789df 100644
--- a/plugins/Ping/src/menu.cpp
+++ b/plugins/Ping/src/menu.cpp
@@ -6,9 +6,9 @@ HANDLE hEventMenuBuild;
void InitMenus()
{
// main menu
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Ping"), 500099900);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Ping"), 500099900);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "FF273885-6AEC-4C8A-B8BC-9247D920F223");
SET_UID(mi, 0xc9a4d17a, 0xd5fa, 0x40d9, 0xbe, 0x7b, 0x9e, 0x2e, 0x5b, 0xbf, 0x8, 0x59);
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp
index c37ef558a9..79e9e7942d 100644
--- a/plugins/Ping/src/pingthread.cpp
+++ b/plugins/Ping/src/pingthread.cpp
@@ -881,8 +881,8 @@ void InitList()
CreateServiceFunction(MODULENAME "/ShowWindow", PingPlugShowWindow);
- CMenuItem mi;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Ping"), 1000200001);
+ CMenuItem mi(g_plugin);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Ping"), 1000200001);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "7CFBF239-86B5-48B2-8D5B-39E09A7DB514");
SET_UID(mi, 0x4adbd753, 0x27d6, 0x457a, 0xa6, 0x6, 0xdf, 0x4f, 0x2c, 0xd8, 0xb9, 0x3b);
diff --git a/plugins/PluginUpdater/src/PluginUpdater.cpp b/plugins/PluginUpdater/src/PluginUpdater.cpp
index d7d2a7b48f..1c2ce833f7 100644
--- a/plugins/PluginUpdater/src/PluginUpdater.cpp
+++ b/plugins/PluginUpdater/src/PluginUpdater.cpp
@@ -68,7 +68,7 @@ extern "C" __declspec(dllexport) int Load(void)
// Add cheking update menu item
InitCheck();
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xfa2cbe01, 0x3b37, 0x4a4c, 0xa6, 0x97, 0xe4, 0x6f, 0x31, 0xa9, 0xfc, 0x33);
mi.name.a = LPGEN("Check for updates");
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index aca148afb2..b50b1a1025 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -174,13 +174,13 @@ INT_PTR svcShowHistory(WPARAM, LPARAM)
void InitMenuItems(void)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE;
HANDLE hIcon = GetIconHandle(PopupOptions.ModuleIsEnabled ? IDI_POPUP : IDI_NOPOPUP);
// Build main menu
- hMenuRoot = mi.root = Menu_CreateRoot(MO_MAIN, MODULNAME_PLUW, -1000000000, hIcon);
+ hMenuRoot = mi.root = g_plugin.addRootMenu(MO_MAIN, MODULNAME_PLUW, -1000000000, hIcon);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "3F5B5AB5-46D8-469E-8951-50B287C59037");
// Add item to main menu
diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp
index 824edcba5d..ba38acd8a4 100644
--- a/plugins/ProfileManager/src/pmanagerEx.cpp
+++ b/plugins/ProfileManager/src/pmanagerEx.cpp
@@ -93,8 +93,8 @@ extern "C" __declspec(dllexport) int Load(void)
CreateServiceFunction(SRV_CHANGE_PM, ChangePM);
CreateServiceFunction(SRV_RESTART_ME, RestartMe);
- CMenuItem mi;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Database"), -500200000);
+ CMenuItem mi(g_plugin);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Database"), -500200000);
for (int i = 0; i < _countof(iconList); i++) {
mi.name.a = iconList[i].szDescr;
diff --git a/plugins/QuickContacts/src/quickcontacts.cpp b/plugins/QuickContacts/src/quickcontacts.cpp
index 5f9fadb248..a46ce04aec 100644
--- a/plugins/QuickContacts/src/quickcontacts.cpp
+++ b/plugins/QuickContacts/src/quickcontacts.cpp
@@ -128,7 +128,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
}
// Add menu item
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x3a3f768a, 0xcf47, 0x43d5, 0x92, 0x16, 0xe4, 0xeb, 0x93, 0xf6, 0x72, 0xfa);
mi.position = 500100001;
mi.flags = CMIF_UNICODE;
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp
index 3fdfb43896..43a1bea703 100644
--- a/plugins/Quotes/src/Forex.cpp
+++ b/plugins/Quotes/src/Forex.cpp
@@ -62,9 +62,9 @@ INT_PTR QuotesMenu_EnableDisable(WPARAM, LPARAM)
void InitMenu()
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Quotes"), 0, Quotes_GetIconHandle(IDI_ICON_MAIN));
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Quotes"), 0, Quotes_GetIconHandle(IDI_ICON_MAIN));
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "B474F556-22B6-42A1-A91E-22FE4F671388");
SET_UID(mi, 0x9de6716, 0x3591, 0x48c4, 0x9f, 0x64, 0x1b, 0xfd, 0xc6, 0xd1, 0x34, 0x97);
@@ -110,7 +110,7 @@ void InitMenu()
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, Quotes_PrebuildContactMenu);
- g_hMenuRoot = mi.root = Menu_CreateRoot(MO_CONTACT, _T(QUOTES_PROTOCOL_NAME), 0, Quotes_GetIconHandle(IDI_ICON_MAIN));
+ g_hMenuRoot = mi.root = g_plugin.addRootMenu(MO_CONTACT, _T(QUOTES_PROTOCOL_NAME), 0, Quotes_GetIconHandle(IDI_ICON_MAIN));
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "C259BE01-642C-461E-997D-0E756B2A3AD6");
SET_UID(mi, 0xb9812194, 0x3235, 0x4e76, 0xa3, 0xa4, 0x73, 0x32, 0x96, 0x1c, 0x1c, 0xf4);
diff --git a/plugins/RecentContacts/src/RecentContacts.cpp b/plugins/RecentContacts/src/RecentContacts.cpp
index 9c5be6eca8..8e657293a8 100644
--- a/plugins/RecentContacts/src/RecentContacts.cpp
+++ b/plugins/RecentContacts/src/RecentContacts.cpp
@@ -445,7 +445,7 @@ int Create_TopToolbarShowList(WPARAM, LPARAM)
int Create_MenuitemShowList(void)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xe22ce213, 0x362a, 0x444a, 0xa5, 0x82, 0xc, 0xcf, 0xf5, 0x4b, 0xd1, 0x8e);
mi.hIcolibItem = iconList[0].hIcolib;
mi.name.a = LPGEN("Recent Contacts");
diff --git a/plugins/RemovePersonalSettings/src/rps.cpp b/plugins/RemovePersonalSettings/src/rps.cpp
index 9d9174948d..56d9b99ace 100644
--- a/plugins/RemovePersonalSettings/src/rps.cpp
+++ b/plugins/RemovePersonalSettings/src/rps.cpp
@@ -594,7 +594,7 @@ static INT_PTR RemoveAllService(WPARAM, LPARAM)
extern "C" int __declspec(dllexport) Load()
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x2f9f21df, 0xf33c, 0x4640, 0xb9, 0x63, 0xd3, 0x26, 0x8a, 0xb8, 0xb1, 0xf0);
mi.position = -0x7FFFFFFF;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
diff --git a/plugins/Restart/src/restart.cpp b/plugins/Restart/src/restart.cpp
index 46566ed1c5..5217fbe478 100644
--- a/plugins/Restart/src/restart.cpp
+++ b/plugins/Restart/src/restart.cpp
@@ -53,7 +53,7 @@ extern "C" __declspec(dllexport) int Load(void)
hRestartMe = CreateServiceFunction("System/RestartMe", RestartMe);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x9181059, 0x5316, 0x4be3, 0x96, 0xb7, 0x80, 0x51, 0xa9, 0x3a, 0xd8, 0x49);
mi.position = -0x7FFFFFFF;
mi.hIcolibItem = iconList[0].hIcolib;
diff --git a/plugins/SMS/src/SMS_svc.cpp b/plugins/SMS/src/SMS_svc.cpp
index 153f70b92a..17f692252e 100644
--- a/plugins/SMS/src/SMS_svc.cpp
+++ b/plugins/SMS/src/SMS_svc.cpp
@@ -27,7 +27,7 @@ int LoadModules(void)
char szServiceFunction[MAX_PATH];
mir_snprintf(szServiceFunction, "%s%s", MODULENAME, SMS_SEND);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x3ce387db, 0xbaac, 0x490f, 0xac, 0xab, 0x8c, 0xf7, 0xe9, 0xcd, 0x86, 0xa1);
mi.position = 300050000;
diff --git a/plugins/Scriver/src/msgs.cpp b/plugins/Scriver/src/msgs.cpp
index fd2fa9ad8a..9f92022b07 100644
--- a/plugins/Scriver/src/msgs.cpp
+++ b/plugins/Scriver/src/msgs.cpp
@@ -570,7 +570,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
LoadMsgLogIcons();
ModuleLoad(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/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp
index 32b4189817..4f3c4719d9 100644
--- a/plugins/SecureIM/src/main.cpp
+++ b/plugins/SecureIM/src/main.cpp
@@ -32,7 +32,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda
static HGENMENU MyAddMenuItem(LPCWSTR name, int pos, LPCSTR szUid, HICON hicon, LPCSTR service, int flags = 0, WPARAM wParam = 0)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = flags | CMIF_HIDDEN | CMIF_UNICODE;
mi.position = pos;
mi.hIcolibItem = hicon;
@@ -45,7 +45,7 @@ static HGENMENU MyAddMenuItem(LPCWSTR name, int pos, LPCSTR szUid, HICON hicon,
static HGENMENU MyAddSubItem(HGENMENU hRoot, LPCSTR name, int pos, int poppos, LPCSTR service, WPARAM wParam = 0)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_HIDDEN | CMIF_SYSTEM;
mi.position = pos;
mi.name.a = (char*)name;
diff --git a/plugins/SeenPlugin/src/menu.cpp b/plugins/SeenPlugin/src/menu.cpp
index 4a385b67d6..aa5bcccfa2 100644
--- a/plugins/SeenPlugin/src/menu.cpp
+++ b/plugins/SeenPlugin/src/menu.cpp
@@ -69,7 +69,7 @@ void InitMenuitem()
{
CreateServiceFunction("LastSeenUserDetails", MenuitemClicked);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x7d9b9518, 0x85fa, 0x40f1, 0xb5, 0x3e, 0x3e, 0x3c, 0x68, 0xae, 0xda, 0x90);
mi.position = -0x7FFFFFFF;
mi.name.a = LPGEN("Last seen");
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index a1084f5eb4..a8a46e86fd 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -292,7 +292,7 @@ extern "C" __declspec(dllexport) int Load(void)
srv_reg(Send2ImageShack);
// menu items
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE;
mi.hIcolibItem = GetIconHandle(ICO_MAINXS);
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index e1643e681f..d7167fd294 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -778,9 +778,9 @@ static int PluginInit(WPARAM, LPARAM)
g_plugin.addHotkey(&hkd);
// Main menu
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.position = 1000000000;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Sessions Manager"), 1000000000);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Sessions Manager"), 1000000000);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "D77B9AB4-AF7E-43DB-A487-BD581704D635");
SET_UID(mi, 0xd35302fa, 0x8326, 0x4323, 0xa3, 0xe5, 0xb4, 0x41, 0xff, 0xfb, 0xaa, 0x2d);
diff --git a/plugins/SimpleAR/src/Main.cpp b/plugins/SimpleAR/src/Main.cpp
index dfe01b3c61..0530f487dd 100644
--- a/plugins/SimpleAR/src/Main.cpp
+++ b/plugins/SimpleAR/src/Main.cpp
@@ -255,7 +255,7 @@ extern "C" int __declspec(dllexport)Load(void)
CreateServiceFunction(MODULENAME"/ToggleEnable", ToggleEnable);
CreateServiceFunction(MODULENAME"/ToggleAutoanswer", Toggle);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xac1c64a, 0x82ca, 0x4845, 0x86, 0x89, 0x59, 0x76, 0x12, 0x74, 0x72, 0x7b);
mi.position = 500090000;
diff --git a/plugins/SimpleStatusMsg/src/awaymsg.cpp b/plugins/SimpleStatusMsg/src/awaymsg.cpp
index 6606f86a3d..72555d6130 100644
--- a/plugins/SimpleStatusMsg/src/awaymsg.cpp
+++ b/plugins/SimpleStatusMsg/src/awaymsg.cpp
@@ -382,7 +382,7 @@ int LoadAwayMsgModule(void)
hWindowList = WindowList_Create();
hWindowList2 = WindowList_Create();
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE;
SET_UID(mi, 0xd3282acc, 0x9ff1, 0x4ede, 0x8a, 0x1e, 0x36, 0x72, 0x3f, 0x44, 0x4f, 0x84);
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index 57725e0a64..ea68d2db5b 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -1276,7 +1276,7 @@ static int ChangeStatusMsgPrebuild(WPARAM, LPARAM)
if (!iStatusMsgFlags || !iStatusMenuItemCount)
return 0;
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE;
if (!db_get_b(NULL, MODULENAME, "ShowStatusMenuItem", 1))
mi.flags |= CMIF_HIDDEN;
@@ -1312,9 +1312,9 @@ static int ChangeStatusMsgPrebuild(WPARAM, LPARAM)
if (pa->IsLocked()) {
wchar_t szBuffer[256];
mir_snwprintf(szBuffer, TranslateT("%s (locked)"), pa->tszAccountName);
- mi.root = Menu_CreateRoot(MO_STATUS, szBuffer, mi.position);
+ mi.root = g_plugin.addRootMenu(MO_STATUS, szBuffer, mi.position);
}
- else mi.root = Menu_CreateRoot(MO_STATUS, pa->tszAccountName, mi.position);
+ else mi.root = g_plugin.addRootMenu(MO_STATUS, pa->tszAccountName, mi.position);
hProtoStatusMenuItem[i++] = Menu_AddStatusMenuItem(&mi);
}
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp
index a06ef5019b..6d0894c6b0 100644
--- a/plugins/SmileyAdd/src/main.cpp
+++ b/plugins/SmileyAdd/src/main.cpp
@@ -60,7 +60,7 @@ static IconItem iconList[] =
static int ModulesLoaded(WPARAM, LPARAM)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x5ba238de, 0xe16b, 0x4928, 0xa0, 0x70, 0xff, 0x43, 0xf6, 0x1f, 0x16, 0xd4);
mi.position = 2000070050;
mi.hIcolibItem = iconList[0].hIcolib;
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp
index 0bb2349dc5..ae9db94aed 100644
--- a/plugins/SmileyAdd/src/services.cpp
+++ b/plugins/SmileyAdd/src/services.cpp
@@ -287,7 +287,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM)
CMStringW cat;
opt.ReadContactCategory(wParam, cat);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.root = hContactMenuItem;
mi.flags = CMIF_UNICODE | CMIF_SYSTEM;
mi.pszService = MS_SMILEYADD_CUSTOMCATMENU;
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp
index 9feda84023..fd5523e304 100644
--- a/plugins/StartupSilence/src/main.cpp
+++ b/plugins/StartupSilence/src/main.cpp
@@ -246,7 +246,7 @@ static INT_PTR SilenceConnection(WPARAM wParam, LPARAM)
static INT_PTR InitMenu()
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x9100c881, 0x6f76, 0x4cb5, 0x97, 0x66, 0xeb, 0xf5, 0xc5, 0x22, 0x46, 0x1f);
mi.position = 100000000;
mi.hIcolibItem = GetIconHandle(MENU_NAME);
diff --git a/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp
index 46db3d1299..c0345e7441 100644
--- a/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp
+++ b/plugins/StatusManager/src/StartupStatus/ss_profiles.cpp
@@ -57,7 +57,7 @@ static INT_PTR profileService(WPARAM, LPARAM, LPARAM param)
static int CreateMainMenuItems(WPARAM, LPARAM)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.position = 2000100000;
mi.flags = CMIF_UNICODE;
mcount = 0;
@@ -68,7 +68,7 @@ static int CreateMainMenuItems(WPARAM, LPARAM)
continue;
if (db_get_b(0, SSMODULENAME, OptName(i, SETTING_INSUBMENU), 1) && !mi.root) {
- mi.root = Menu_CreateRoot(MO_STATUS, LPGENW("Status profiles"), 2000100000);
+ mi.root = g_plugin.addRootMenu(MO_STATUS, LPGENW("Status profiles"), 2000100000);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "1AB30D51-BABA-4B27-9288-1A12278BAD8D");
}
diff --git a/plugins/StopSpamMod/src/init.cpp b/plugins/StopSpamMod/src/init.cpp
index ede0d319ee..95d55a27aa 100755
--- a/plugins/StopSpamMod/src/init.cpp
+++ b/plugins/StopSpamMod/src/init.cpp
@@ -143,7 +143,7 @@ extern "C" int __declspec(dllexport) Load()
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnDbContactSettingChanged);
HookEvent(ME_OPT_INITIALISE, OnOptInit);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x60ce7660, 0x5a5, 0x4234, 0x99, 0xb6, 0x55, 0x21, 0xed, 0xa0, 0xb8, 0x32);
mi.position = -0x7FFFFFFF;
mi.hIcolibItem = Skin_LoadIcon(SKINICON_OTHER_MIRANDA);
diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp
index af8189e9f1..115afcb91b 100644
--- a/plugins/StopSpamPlus/src/stopspam.cpp
+++ b/plugins/StopSpamPlus/src/stopspam.cpp
@@ -44,7 +44,7 @@ extern "C" int __declspec(dllexport) Load(void)
HookEvent(ME_DB_CONTACT_SETTINGCHANGED, OnDbContactSettingchanged);
// Add deleting temporary contacts
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xf2164e17, 0xa4c1, 0x4b07, 0xae, 0x81, 0x9e, 0xae, 0x7f, 0xa2, 0x55, 0x13);
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_UNICODE;
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp
index d6db557e01..21f06355c8 100644
--- a/plugins/TabSRMM/src/globals.cpp
+++ b/plugins/TabSRMM/src/globals.cpp
@@ -115,7 +115,7 @@ void CGlobals::reloadSystemModulesChanged()
g_bPopupAvail = ServiceExists(MS_POPUP_ADDPOPUPT) != 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;
@@ -296,7 +296,7 @@ int CGlobals::ModulesLoaded(WPARAM, LPARAM)
if (nen_options.bTraySupport)
::CreateSystrayIcon(TRUE);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x9f68b822, 0xff97, 0x477d, 0xb7, 0x6d, 0xa5, 0x59, 0x33, 0x1c, 0x54, 0x40);
mi.position = -500050005;
mi.hIcolibItem = PluginConfig.g_iconContainer;
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index 8d1b3a1c9e..766c4121fa 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -531,7 +531,7 @@ int TN_ModuleInit()
if (PluginConfig.g_bPopupAvail && ShowMenu) {
CreateServiceFunction("TypingNotify/EnableDisableMenuCommand", EnableDisableMenuCommand);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xe18fd2cf, 0xcf90, 0x459e, 0xb6, 0xe6, 0x70, 0xec, 0xad, 0xc6, 0x73, 0xef);
if (!Disabled) {
mi.name.a = LPGEN("Disable &typing notification");
@@ -542,7 +542,7 @@ int TN_ModuleInit()
mi.hIcolibItem = IcoLib_GetIcon("tabSRMM_popups_disabled");
}
mi.pszService = "TypingNotify/EnableDisableMenuCommand";
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Popups"), 0);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Popups"), 0);
hDisableMenu = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index 782b99e40d..0f687b11d0 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -891,7 +891,7 @@ INT_PTR MenuCommand_TrafficShowHide(WPARAM, LPARAM)
void Traffic_AddMainMenuItem(void)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x7fe75b30, 0x3cf6, 0x4280, 0xb9, 0xd2, 0x88, 0x6b, 0xbb, 0x69, 0xa3, 0x7e);
mi.position = -0x7FFFFFFF;
mi.hIcolibItem = nullptr;
diff --git a/plugins/UserGuide/src/main.cpp b/plugins/UserGuide/src/main.cpp
index 7a7b84d9be..3ef4ccba6f 100644
--- a/plugins/UserGuide/src/main.cpp
+++ b/plugins/UserGuide/src/main.cpp
@@ -73,7 +73,7 @@ static INT_PTR ShowGuideFile(WPARAM, LPARAM)
extern "C" __declspec(dllexport) int Load(void)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x6787c12d, 0xdc85, 0x409d, 0xaa, 0x6c, 0x1f, 0xfe, 0x5f, 0xe8, 0xc1, 0x18);
mi.position = 500000;
mi.flags = CMIF_UNICODE;
diff --git a/plugins/UserInfoEx/src/mir_menuitems.cpp b/plugins/UserInfoEx/src/mir_menuitems.cpp
index a68a4f5058..dd84444186 100644
--- a/plugins/UserInfoEx/src/mir_menuitems.cpp
+++ b/plugins/UserInfoEx/src/mir_menuitems.cpp
@@ -83,7 +83,7 @@ void RebuildContact()
RemoveMenuItems(hMenuItem, _countof(hMenuItem));
// support new genmenu style
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
switch (flag) {
@@ -176,7 +176,7 @@ void RebuildMain()
RemoveMenuItems(hMenuItem, _countof(hMenuItem));
// support new genmenu style
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
switch (flag) {
case 3:
@@ -313,7 +313,7 @@ void RebuildGroup()
char text[200];
mir_strcpy(text, "UserInfo");
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.pszService = text;
switch (flag) {
@@ -404,7 +404,7 @@ void RebuildSubGroup()
char text[200];
mir_strcpy(text, "UserInfo");
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.pszService = text;
char* tDest = text + mir_strlen(text);
@@ -520,7 +520,7 @@ INT_PTR RebuildAccount(WPARAM, LPARAM lParam)
char text[200];
mir_strcpy(text, it->szProto);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.pszService = text;
char* tDest = text + mir_strlen(text);
diff --git a/plugins/UserInfoEx/src/svc_email.cpp b/plugins/UserInfoEx/src/svc_email.cpp
index a99613dec8..2d3960017b 100644
--- a/plugins/UserInfoEx/src/svc_email.cpp
+++ b/plugins/UserInfoEx/src/svc_email.cpp
@@ -183,7 +183,7 @@ void SvcEMailRebuildMenu()
if (!ghMenuItem) {
// insert contact menuitem
- 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 = IcoLib_GetIcon(ICO_BTN_EMAIL);
diff --git a/plugins/UserInfoEx/src/svc_homepage.cpp b/plugins/UserInfoEx/src/svc_homepage.cpp
index 6361eafcd0..12e3e33b4a 100644
--- a/plugins/UserInfoEx/src/svc_homepage.cpp
+++ b/plugins/UserInfoEx/src/svc_homepage.cpp
@@ -153,7 +153,7 @@ void SvcHomepageRebuildMenu()
if (!ghMenuItem) {
// insert contact menuitem
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xdb78c16e, 0x50db, 0x4a40, 0x80, 0x0, 0xd1, 0xa4, 0x1c, 0x1b, 0xa3, 0x2d);
mi.position = -2000010000;
mi.hIcolibItem = IcoLib_GetIcon(ICO_BTN_GOTO);
diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp
index 194975bd4a..6b7cd2c6fe 100644
--- a/plugins/Weather/src/weather_svcs.cpp
+++ b/plugins/Weather/src/weather_svcs.cpp
@@ -262,7 +262,7 @@ INT_PTR MenuitemNotifyCmd(WPARAM, LPARAM)
// copied and modified form "modified MSN Protocol"
void AddMenuItems(void)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
// contact menu
SET_UID(mi, 0x266ef52b, 0x869a, 0x4cac, 0xa9, 0xf8, 0xea, 0x5b, 0xb8, 0xab, 0xe0, 0x24);
@@ -322,7 +322,7 @@ void AddMenuItems(void)
Menu_AddContactMenuItem(&mi, WEATHERPROTONAME);
// adding main menu items
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Weather"), 500099000);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Weather"), 500099000);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "82809D2F-2CF0-4E15-9350-D257A7748552");
SET_UID(mi, 0x5ad16188, 0xe0a0, 0x4c31, 0x85, 0xc3, 0xe4, 0x85, 0x79, 0x7e, 0x4b, 0x9c);
@@ -357,7 +357,7 @@ void AddMenuItems(void)
mi.name.a = LPGEN("Weather Notification");
mi.hIcolibItem = GetIconHandle("popup");
mi.position = 0;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Popups"), 0);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Popups"), 0);
mi.pszService = WEATHERPROTONAME "/PopupMenu";
hEnableDisablePopupMenu = Menu_AddMainMenuItem(&mi);
UpdatePopupMenu(opt.UsePopup);
diff --git a/plugins/WebView/src/main.cpp b/plugins/WebView/src/main.cpp
index 1d2683e144..064d2760ae 100644
--- a/plugins/WebView/src/main.cpp
+++ b/plugins/WebView/src/main.cpp
@@ -132,13 +132,13 @@ extern "C" int __declspec(dllexport) Load()
//value is 1 if menu is disabled
db_set_b(NULL, MODULENAME, MENU_IS_DISABLED_KEY, 1);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE;
if ( db_get_b(NULL, MODULENAME, MENU_OFF, 0)) {
//value is 0 if menu is enabled
db_set_b(NULL, MODULENAME, MENU_IS_DISABLED_KEY, 0);
- mi.root = Menu_CreateRoot(MO_MAIN, _A2W(MODULENAME), 20200001);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, _A2W(MODULENAME), 20200001);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "403BE07B-7954-4F3E-B318-4301571776B8");
/*DISABLE WEBVIEW*/
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp
index 947a9a2de7..5dfac1e9d1 100644
--- a/plugins/WhenWasIt/src/WhenWasIt.cpp
+++ b/plugins/WhenWasIt/src/WhenWasIt.cpp
@@ -74,9 +74,9 @@ extern "C" int __declspec(dllexport) Load(void)
hAddBirthdayWndsList = WindowList_Create();
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.position = 10000000;
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Birthdays (When Was It)"), mi.position);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Birthdays (When Was It)"), mi.position);
Menu_ConfigureItem(mi.root, MCI_OPT_UID, "95D842AE-FCCE-43C9-87E3-C28546B7E00E");
SET_UID(mi, 0x4efbd640, 0xabbd, 0x470e, 0x9a, 0xa, 0x64, 0x76, 0x1a, 0x74, 0xf3, 0x24);
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
index cf5d594d9e..8259d85c45 100644
--- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp
+++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
@@ -229,10 +229,10 @@ extern "C" __declspec(dllexport) int Load(void)
CreateServiceFunction(MS_WUMF_SWITCHPOPUP, WumfMenuCommand);
CreateServiceFunction(MS_WUMF_CONNECTIONSSHOW, WumfShowConnections);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xcfce6487, 0x907b, 0x4822, 0xb0, 0x49, 0x18, 0x4e, 0x47, 0x17, 0x0, 0x69);
- mi.root = Menu_CreateRoot(MO_MAIN, LPGENW("Popups"), 1999990000);
+ mi.root = g_plugin.addRootMenu(MO_MAIN, LPGENW("Popups"), 1999990000);
if (WumfOptions.PopupsEnabled == FALSE) {
mi.name.a = LPGEN("Enable WUMF popups");
mi.hIcolibItem = LoadIcon(g_plugin.getInst(), MAKEINTRESOURCE(IDI_NOPOPUP));
diff --git a/plugins/XSoundNotify/src/xsn_main.cpp b/plugins/XSoundNotify/src/xsn_main.cpp
index 4dbf18b771..4351344d05 100644
--- a/plugins/XSoundNotify/src/xsn_main.cpp
+++ b/plugins/XSoundNotify/src/xsn_main.cpp
@@ -208,7 +208,7 @@ static int OnPlaySound(WPARAM, LPARAM)
static int OnLoadInit(WPARAM, LPARAM)
{
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x5d72ca1f, 0xc52, 0x436d, 0x81, 0x47, 0x29, 0xf6, 0xc3, 0x28, 0xb5, 0xd1);
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_UNICODE;
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp
index c162a2d4d0..e9030e03e4 100644
--- a/plugins/YAMN/src/main.cpp
+++ b/plugins/YAMN/src/main.cpp
@@ -129,7 +129,7 @@ void CheckMenuItems()
int SystemModulesLoaded(WPARAM, LPARAM)
{
//Insert "Check mail (YAMN)" item to Miranda's menu
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0xa01ff3d9, 0x53cb, 0x4406, 0x85, 0xd9, 0xf1, 0x90, 0x3a, 0x94, 0xed, 0xf4);
mi.position = 0xb0000000;
diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp
index ef0f94623c..93438dc65a 100644
--- a/plugins/YAPP/src/yapp.cpp
+++ b/plugins/YAPP/src/yapp.cpp
@@ -170,10 +170,10 @@ static void InitMenuItems(void)
{
bool isEnabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) == 1;
- hMenuRoot = Menu_CreateRoot(MO_MAIN, LPGENW("Popups"), 500010000, IcoLib_GetIcon(isEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0));
+ hMenuRoot = g_plugin.addRootMenu(MO_MAIN, LPGENW("Popups"), 500010000, IcoLib_GetIcon(isEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0));
Menu_ConfigureItem(hMenuRoot, MCI_OPT_UID, "043A641A-2767-4C57-AA57-9233D6F9DC54");
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
mi.flags = CMIF_UNICODE;
mi.root = hMenuRoot;
diff --git a/plugins/ZeroNotification/src/main.cpp b/plugins/ZeroNotification/src/main.cpp
index 39eb90c6f7..d7d906b6be 100644
--- a/plugins/ZeroNotification/src/main.cpp
+++ b/plugins/ZeroNotification/src/main.cpp
@@ -94,7 +94,7 @@ extern "C" __declspec(dllexport) int Load(void)
if (!db_get_b(NULL, MODULENAME, "HideMenu", 1)) {
CreateServiceFunction(MODULENAME "/MenuCommand", NoSoundMenuCommand);
- CMenuItem mi;
+ CMenuItem mi(g_plugin);
SET_UID(mi, 0x6bd635eb, 0xc4bb, 0x413b, 0xb9, 0x3, 0x81, 0x6d, 0x8f, 0xf1, 0x9b, 0xb0);
mi.position = -0x7FFFFFFF;
mi.flags = CMIF_UNICODE;