summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-06-26 22:03:02 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-06-26 22:03:02 +0000
commitbe616d81bdaf8fd4ae61b0a145fb81bbdf467994 (patch)
treec0d4798a8e882583f74eb166508e0f4ce96bd4e4 /plugins
parentc89c550677f40d8b2010de442053cba81ba06d96 (diff)
YEEHAW! CLISTMENUITEM::pszPopupName also died
git-svn-id: http://svn.miranda-ng.org/main/trunk@14404 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Actman/ua/i_uaplaces.inc2
-rw-r--r--plugins/Alarms/src/frame.cpp2
-rw-r--r--plugins/Alarms/src/options.cpp6
-rw-r--r--plugins/BasicHistory/src/BasicHistory.cpp3
-rw-r--r--plugins/CSList/src/cslist.cpp2
-rw-r--r--plugins/ClientChangeNotify/src/ClientChangeNotify.cpp2
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp29
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp5
-rw-r--r--plugins/Clist_modern/src/modern_clistmenus.cpp10
-rw-r--r--plugins/Clist_modern/src/modern_clisttray.cpp2
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp43
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp4
-rw-r--r--plugins/Clist_nicer/src/clistmenus.cpp1
-rw-r--r--plugins/CrashDumper/src/crshdmp.cpp27
-rw-r--r--plugins/Db3x_mmap/src/ui.cpp2
-rw-r--r--plugins/DbEditorPP/src/main.cpp2
-rw-r--r--plugins/Db_autobackups/src/main.cpp2
-rw-r--r--plugins/FTPFileYM/src/ftpfile.cpp10
-rw-r--r--plugins/HistoryStats/src/main.cpp21
-rw-r--r--plugins/HistoryStats/src/mu_common.cpp4
-rw-r--r--plugins/HistoryStats/src/mu_common.h2
-rw-r--r--plugins/ListeningTo/src/listeningto.cpp6
-rw-r--r--plugins/MenuItemEx/src/main.cpp5
-rw-r--r--plugins/MirOTR/src/mirotrmenu.cpp2
-rw-r--r--plugins/MyDetails/src/frame.cpp4
-rw-r--r--plugins/MyDetails/src/mydetails.cpp4
-rw-r--r--plugins/NewAwaySysMod/src/AwaySys.cpp5
-rw-r--r--plugins/NewEventNotify/src/menuitem.cpp2
-rw-r--r--plugins/NewXstatusNotify/src/main.cpp3
-rw-r--r--plugins/NewsAggregator/Src/Menus.cpp5
-rw-r--r--plugins/Non-IM Contact/src/main.cpp4
-rw-r--r--plugins/NotesAndReminders/src/main.cpp6
-rw-r--r--plugins/PasteIt/src/PasteIt.cpp6
-rw-r--r--plugins/Ping/src/menu.cpp4
-rw-r--r--plugins/Ping/src/pingthread.cpp4
-rw-r--r--plugins/Popup/src/main.cpp3
-rw-r--r--plugins/ProfileManager/src/pmanagerEx.cpp7
-rw-r--r--plugins/Quotes/src/Forex.cpp36
-rw-r--r--plugins/SecureIM/src/main.cpp10
-rw-r--r--plugins/SendScreenshotPlus/src/Main.cpp6
-rw-r--r--plugins/Sessions/Src/Main.cpp48
-rw-r--r--plugins/SimpleStatusMsg/src/main.cpp4
-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/StatusPlugins/StartupStatus/profiles.cpp4
-rw-r--r--plugins/TabSRMM/src/typingnotify.cpp2
-rw-r--r--plugins/UserInfoEx/src/mir_menuitems.cpp57
-rw-r--r--plugins/Watrack/i_gui.inc2
-rw-r--r--plugins/Watrack/lastfm/lastfm.pas4
-rw-r--r--plugins/Watrack/myshows/myshows.pas2
-rw-r--r--plugins/Watrack/popup/popups.pas2
-rw-r--r--plugins/Watrack/proto/proto.pas2
-rw-r--r--plugins/Watrack/stat/statlog.pas4
-rw-r--r--plugins/Weather/src/weather_svcs.cpp7
-rw-r--r--plugins/WebView/src/main.cpp3
-rw-r--r--plugins/WhenWasIt/src/WhenWasIt.cpp73
-rw-r--r--plugins/WhoUsesMyFiles/src/wumfplug.cpp6
-rw-r--r--plugins/YAMN/src/main.cpp1
-rw-r--r--plugins/YAPP/src/services.cpp1
-rw-r--r--plugins/YAPP/src/yapp.cpp15
-rw-r--r--plugins/mRadio/i_tray.inc6
62 files changed, 220 insertions, 332 deletions
diff --git a/plugins/Actman/ua/i_uaplaces.inc b/plugins/Actman/ua/i_uaplaces.inc
index 9b7dac8cf1..bd724bf406 100644
--- a/plugins/Actman/ua/i_uaplaces.inc
+++ b/plugins/Actman/ua/i_uaplaces.inc
@@ -455,7 +455,7 @@ begin
if UAMenuItem.hMenuRoot<>0 then
begin
clmi.flags:=clmi.flags or CMIF_ROOTHANDLE;
- clmi.szPopupName.w:=pWideChar(UAMenuItem.hMenuRoot);
+ clmi.hParentMenu:=UAMenuItem.hMenuRoot;
end;
clmi.pszService:=ActionItem.szNameID;
diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp
index 0f62257afa..5586cf4c0e 100644
--- a/plugins/Alarms/src/frame.cpp
+++ b/plugins/Alarms/src/frame.cpp
@@ -545,7 +545,7 @@ int CreateFrame()
mi.hIcon = hIconMenuShowHide;
mi.pszName = LPGEN("Show reminders");
mi.pszService = MODULE "/ShowHideReminders";
- mi.pszPopupName = LPGEN("Alarms");
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Alarms"), 0);
mi.position = 500010000;
hMenuShowReminders = Menu_AddMainMenuItem(&mi);
/////////////////////
diff --git a/plugins/Alarms/src/options.cpp b/plugins/Alarms/src/options.cpp
index 1f7ac9418c..15df78706c 100644
--- a/plugins/Alarms/src/options.cpp
+++ b/plugins/Alarms/src/options.cpp
@@ -698,11 +698,7 @@ void AddMenuItem()
mi.pszService = MODULE "/NewAlarm";
mi.position = 500010000;
if (!ServiceExists(MS_CLIST_FRAMES_ADDFRAME))
- mi.pszPopupName = "Alarms";
-
- GroupMenuParam gmp = {0};
- Menu_AddGroupMenuItem(&gmp, &mi);
-
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Alarms"), mi.position);
hMainMenuItem = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/BasicHistory/src/BasicHistory.cpp b/plugins/BasicHistory/src/BasicHistory.cpp
index 9c35ce146f..f95b352062 100644
--- a/plugins/BasicHistory/src/BasicHistory.cpp
+++ b/plugins/BasicHistory/src/BasicHistory.cpp
@@ -122,7 +122,6 @@ void InitTaskMenuItems()
if (hTaskMainMenu == NULL) {
CLISTMENUITEM mi = { 0 };
mi.position = 500060005;
- mi.flags = CMIF_ROOTHANDLE;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HISTORY);
mi.pszName = LPGEN("Execute history task");
hTaskMainMenu = Menu_AddMainMenuItem(&mi);
@@ -139,7 +138,7 @@ void InitTaskMenuItems()
int pos = (int)taskMenus.size();
for (; taskIt != Options::instance->taskOptions.end(); ++taskIt) {
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
+ mi.flags = CMIF_TCHAR | CMIF_KEEPUNTRANSLATED;
mi.pszService = MS_HISTORY_EXECUTE_TASK;
mi.hParentMenu = hTaskMainMenu;
mi.ptszName = (TCHAR*)taskIt->taskName.c_str();
diff --git a/plugins/CSList/src/cslist.cpp b/plugins/CSList/src/cslist.cpp
index 2c0fe38f0a..a51e18c032 100644
--- a/plugins/CSList/src/cslist.cpp
+++ b/plugins/CSList/src/cslist.cpp
@@ -239,7 +239,7 @@ void addProtoStatusMenuItem(char *protoName)
CreateServiceFunctionParam(buf, showList, (LPARAM)protoName);
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.icolibItem = forms[0].hIcoLibItem;
mi.ptszName = _T(MODULENAME);
mi.position = 2000040000;
diff --git a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
index f9483e7bd1..d04add9b62 100644
--- a/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/src/ClientChangeNotify.cpp
@@ -328,6 +328,7 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam)
HookEvent(ME_CLIST_PREBUILDMAINMENU, PrebuildMainMenu);
CLISTMENUITEM mi = { 0 };
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
mi.flags = CMIF_TCHAR;
if (g_PopupOptPage.GetDBValueCopy(IDC_POPUPOPTDLG_POPUPNOTIFY))
mi.ptszName = LPGENT("Disable c&lient change notification");
@@ -335,7 +336,6 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam)
mi.ptszName = LPGENT("Enable c&lient change notification");
mi.pszService = MS_CCN_TOGGLEPOPUPS;
- mi.ptszPopupName = LPGENT("Popups");
g_hTogglePopupsMenuItem = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
index 6128f93967..4174008b90 100644
--- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
@@ -68,7 +68,7 @@ static int _iNextFrameId = 100;
static HFONT _hTitleBarFont = NULL;
// menus
-static FrameMenuHandles cont = { HGENMENU_ROOT };
+static FrameMenuHandles cont = { NULL };
// others
static int _nContactListHeight = 0;
@@ -760,7 +760,7 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popupp
mi.hParentMenu = root;
mi.position = popuppos++;
mi.pszName = LPGEN("&Visible");
- mi.flags = CMIF_ROOTHANDLE | CMIF_CHECKED;
+ mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SHFRAME;
Menu_ConfigureItem(fmh.MIVisible = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
@@ -784,13 +784,13 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popupp
// floating
mi.position = popuppos++;
mi.pszName = LPGEN("&Floating mode");
- mi.flags = CMIF_ROOTHANDLE;
+ mi.flags = 0;
mi.pszService = "Set_Floating";
Menu_ConfigureItem(fmh.MIFloating = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
mi.position = popuppos++;
mi.pszName = LPGEN("&Border");
- mi.flags = CMIF_ROOTHANDLE | CMIF_CHECKED;
+ mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SETUNBORDER;
Menu_ConfigureItem(fmh.MIBorder = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
@@ -799,12 +799,10 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popupp
// alignment root
mi.position = popuppos++;
mi.pszName = LPGEN("&Align");
- mi.flags = CMIF_ROOTHANDLE;
+ mi.flags = 0;
mi.pszService = "";
fmh.MIAlignRoot = pfnAdd(&mi);
- mi.flags = CMIF_ROOTHANDLE;
-
// align top
mi.hParentMenu = fmh.MIAlignRoot;
mi.position = popuppos++;
@@ -831,7 +829,6 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popupp
mi.hParentMenu = root;
mi.position = popuppos++;
mi.pszName = LPGEN("&Position");
- mi.flags = CMIF_ROOTHANDLE;
mi.pszService = "";
mi.pszContactOwner = (char*)0;
fmh.MIPosRoot = pfnAdd(&mi);
@@ -839,7 +836,6 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popupp
mi.hParentMenu = fmh.MIPosRoot;
mi.position = popuppos++;
mi.pszName = LPGEN("&Up");
- mi.flags = CMIF_ROOTHANDLE;
mi.pszService = CLUIFRAMESMOVEUP;
mi.pszContactOwner = (char*)1;
Menu_ConfigureItem(fmh.MIPosUp = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
@@ -1512,14 +1508,13 @@ static int CLUIFramesLoadMainMenu()
if (_fCluiFramesModuleNotStarted)
return -1;
- if (cont.MainMenuItem != HGENMENU_ROOT) {
+ if (cont.MainMenuItem != NULL) {
Menu_RemoveItem(cont.MainMenuItem);
- cont.MainMenuItem = HGENMENU_ROOT;
+ cont.MainMenuItem = NULL;
}
// create root menu
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME);
mi.position = 3000090000;
mi.pszName = LPGEN("Frames");
@@ -1529,7 +1524,7 @@ static int CLUIFramesLoadMainMenu()
int separator = 3000200000;
for (int i = 0; i < g_nFramesCount; i++) {
mi.hIcon = g_pfwFrames[i].TitleBar.hicon;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.position = separator;
mi.hParentMenu = cont.MainMenuItem;
mi.ptszName = g_pfwFrames[i].TitleBar.tbname ? g_pfwFrames[i].TitleBar.tbname : g_pfwFrames[i].name;
@@ -1545,7 +1540,7 @@ static int CLUIFramesLoadMainMenu()
// create "show all frames" menu
mi.hIcon = NULL;
- mi.flags = CMIF_ROOTHANDLE;
+ mi.flags = 0;
mi.position = separator++;
mi.hParentMenu = cont.MainMenuItem;
mi.pszName = LPGEN("Show all frames");
@@ -3387,7 +3382,7 @@ int CLUIFrameOnModulesLoad(WPARAM, LPARAM)
{
/* HOOK */
CLUIFramesLoadMainMenu();
- CLUIFramesCreateMenuForFrame(-1, HGENMENU_ROOT, 000010000, Menu_AddContextFrameMenuItem);
+ CLUIFramesCreateMenuForFrame(-1, NULL, 000010000, Menu_AddContextFrameMenuItem);
return 0;
}
@@ -3478,9 +3473,9 @@ int LoadCLUIFramesModule(void)
static INT_PTR UnloadMainMenu()
{
CLUIFrameOnModulesUnload(0, 0);
- if (cont.MainMenuItem != HGENMENU_ROOT) {
+ if (cont.MainMenuItem != NULL) {
Menu_RemoveItem(cont.MainMenuItem);
- cont.MainMenuItem = HGENMENU_ROOT;
+ cont.MainMenuItem = NULL;
}
return (INT_PTR)cont.MainMenuItem;
diff --git a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
index b901fa7678..7bb10f52f3 100644
--- a/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp
@@ -27,7 +27,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "../hdr/modern_clc.h"
//////////////////////////////Group MENU/////////////////////////
-HANDLE hGroupMenuObject;
+int hGroupMenuObject;
HGENMENU hGroupMainMenuItemProxy;
HGENMENU hHideShowMainMenuItem;
@@ -305,7 +305,8 @@ void InitGroupMenus(void)
//////////////////////////////END Group MENU/////////////////////////
//////////////////////////////SubGroup MENU/////////////////////////
-HANDLE hSubGroupMenuObject;
+
+int hSubGroupMenuObject;
HANDLE hSubGroupMainMenuItemProxy;
HANDLE hSubGroupStatusMenuItemProxy;
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp
index fb18a985cd..aa68906097 100644
--- a/plugins/Clist_modern/src/modern_clistmenus.cpp
+++ b/plugins/Clist_modern/src/modern_clistmenus.cpp
@@ -101,9 +101,7 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM)
CLISTMENUITEM mi = { 0 };
mi.icolibItem = iconList[bContactRate].hIcolib;
- mi.hParentMenu = HGENMENU_ROOT;
- mi.position = 0;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
if (!bContactRate)
mi.ptszName = FAVMENUROOTNAME;
else {
@@ -121,7 +119,7 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM)
bModifyMenu = TRUE;
}
- Menu_ConfigureObject(hFavoriteContactMenu, MCI_OPT_UNIQUENAME, "ModernClistMenu_ContactRate");
+ Menu_ConfigureItem(hFavoriteContactMenu, MCI_OPT_UNIQUENAME, "ModernClistMenu_ContactRate");
mi.hParentMenu = hFavoriteContactMenu;
if (!hFavoriteContactMenuItems) {
@@ -131,7 +129,7 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM)
int i;
for (i = 0; i < _countof(rates); i++) {
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | ((bContactRate == i) ? CMIF_CHECKED : 0);
+ mi.flags = CMIF_TCHAR | ((bContactRate == i) ? CMIF_CHECKED : 0);
if (bModifyMenu && hFavoriteContactMenuItems[i])
Menu_ModifyItem(hFavoriteContactMenuItems[i], NULL, iconList[i].hIcolib, mi.flags);
else {
@@ -144,7 +142,7 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM)
}
mi.hIcon = NULL;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR | (db_get_b(hContact, "CList", "noOffline", 0) ? CMIF_CHECKED : 0);
+ mi.flags = CMIF_TCHAR | (db_get_b(hContact, "CList", "noOffline", 0) ? CMIF_CHECKED : 0);
if (bModifyMenu && hShowIfOflineItem)
Menu_ModifyItem(hShowIfOflineItem, NULL, INVALID_HANDLE_VALUE, mi.flags);
else {
diff --git a/plugins/Clist_modern/src/modern_clisttray.cpp b/plugins/Clist_modern/src/modern_clisttray.cpp
index 93ad8f1b2a..ac20d89b61 100644
--- a/plugins/Clist_modern/src/modern_clisttray.cpp
+++ b/plugins/Clist_modern/src/modern_clisttray.cpp
@@ -32,7 +32,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
int g_mutex_bOnTrayRightClick = 0;
BOOL g_bMultiConnectionMode = FALSE;
static HMENU hMainMenu, hStatusMenu;
-static HANDLE hTrayMenuObject;
+static int hTrayMenuObject;
BOOL IS_WM_MOUSE_DOWN_IN_TRAY;
BOOL g_trayTooltipActive = FALSE;
POINT tray_hover_pos = { 0 };
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
index c1dbc69c9c..951979c69f 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
@@ -89,7 +89,7 @@ static int TitleBarH = DEFAULT_TITLEBAR_HEIGHT;
static boolean resizing = FALSE;
// menus
-static FrameMenuHandles cont = { HGENMENU_ROOT };
+static FrameMenuHandles cont;
// others
static int ContactListHeight;
@@ -577,7 +577,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGE
mi.hParentMenu = root;
mi.position = popuppos++;
mi.pszName = LPGEN("&FrameTitle");
- mi.flags = CMIF_ROOTHANDLE | CMIF_GRAYED;
+ mi.flags = CMIF_GRAYED;
fmh.MITitle = pfnAdd(&mi);
popuppos += 100000;
@@ -585,13 +585,13 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGE
mi.hIcon = NULL;
mi.position = popuppos++;
mi.pszName = LPGEN("&Visible");
- mi.flags = CMIF_ROOTHANDLE | CMIF_CHECKED;
+ mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SHFRAME;
Menu_ConfigureItem(fmh.MIVisible = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
mi.position = popuppos++;
mi.pszName = LPGEN("&Show title bar");
- mi.flags = CMIF_ROOTHANDLE | CMIF_CHECKED;
+ mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SHFRAMETITLEBAR;
Menu_ConfigureItem(fmh.MITBVisible = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
@@ -599,20 +599,20 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGE
mi.position = popuppos++;
mi.pszName = LPGEN("&Locked");
- mi.flags = CMIF_ROOTHANDLE | CMIF_CHECKED;
+ mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_ULFRAME;
Menu_ConfigureItem(fmh.MILock = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
mi.position = popuppos++;
mi.pszName = LPGEN("&Collapsed");
- mi.flags = CMIF_ROOTHANDLE | CMIF_CHECKED;
+ mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_UCOLLFRAME;
Menu_ConfigureItem(fmh.MIColl = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
// floating
mi.position = popuppos++;
mi.pszName = LPGEN("&Floating mode");
- mi.flags = CMIF_ROOTHANDLE;
+ mi.flags = 0;
mi.pszService = "Set_Floating";
fmh.MIFloating = pfnAdd(&mi);
@@ -620,7 +620,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGE
mi.position = popuppos++;
mi.pszName = LPGEN("&Border");
- mi.flags = CMIF_ROOTHANDLE | CMIF_CHECKED;
+ mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SETUNBORDER;
Menu_ConfigureItem(fmh.MIBorder = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
@@ -628,7 +628,7 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGE
mi.position = popuppos++;
mi.pszName = LPGEN("&Skinned frame");
- mi.flags = CMIF_ROOTHANDLE | CMIF_CHECKED;
+ mi.flags = CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SETSKINNED;
Menu_ConfigureItem(fmh.MISkinned = pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
@@ -638,11 +638,10 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGE
mi.hParentMenu = root;
mi.position = popuppos++;
mi.pszName = LPGEN("&Align");
- mi.flags = CMIF_ROOTHANDLE;
+ mi.flags = 0;
mi.pszService = "";
fmh.MIAlignRoot = pfnAdd(&mi);
- mi.flags = CMIF_ROOTHANDLE;
// align top
mi.hParentMenu = fmh.MIAlignRoot;
mi.position = popuppos++;
@@ -669,7 +668,6 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGE
mi.hParentMenu = root;
mi.position = popuppos++;
mi.pszName = LPGEN("&Position");
- mi.flags = CMIF_ROOTHANDLE;
mi.pszService = "";
mi.pszContactOwner = (char*)0;
HGENMENU menuid = pfnAdd(&mi);
@@ -677,14 +675,12 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGE
mi.hParentMenu = menuid;
mi.position = popuppos++;
mi.pszName = LPGEN("&Up");
- mi.flags = CMIF_ROOTHANDLE;
mi.pszService = CLUIFRAMESMOVEUP;
mi.pszContactOwner = (char*)1;
Menu_ConfigureItem(pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
mi.position = popuppos++;
mi.pszName = LPGEN("&Down");
- mi.flags = CMIF_ROOTHANDLE;
mi.pszService = CLUIFRAMESMOVEDOWN;
mi.pszContactOwner = (char*)-1;
Menu_ConfigureItem(pfnAdd(&mi), MCI_OPT_EXECPARAM, frameid);
@@ -1333,17 +1329,15 @@ static int CLUIFramesLoadMainMenu()
if (FramesSysNotStarted)
return -1;
- if (cont.MainMenuItem != HGENMENU_ROOT) {
+ if (cont.MainMenuItem != NULL) {
Menu_RemoveItem(cont.MainMenuItem);
- cont.MainMenuItem = HGENMENU_ROOT;
+ cont.MainMenuItem = NULL;
}
// create root menu
CLISTMENUITEM mi = { 0 };
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME);
- mi.flags = CMIF_ROOTHANDLE;
mi.position = 3000090000;
- mi.hParentMenu = HGENMENU_ROOT;
mi.pszName = LPGEN("Frames");
mi.pszService = 0;
cont.MainMenuItem = Menu_AddMainMenuItem(&mi);
@@ -1352,7 +1346,7 @@ static int CLUIFramesLoadMainMenu()
int separator = (int)3000200000;
for (int i = 0; i < nFramescount; i++) {
mi.hIcon = Frames[i].TitleBar.hicon;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.position = separator;
mi.hParentMenu = cont.MainMenuItem;
mi.ptszName = Frames[i].TitleBar.tbname ? Frames[i].TitleBar.tbname : Frames[i].name;
@@ -1367,8 +1361,8 @@ static int CLUIFramesLoadMainMenu()
separator += 100000;
// create "show all frames" menu
- mi.hIcon = NULL;//LoadIcon(g_hInst,MAKEINTRESOURCE(IDI_MIRANDA));
- mi.flags = CMIF_ROOTHANDLE;
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
+ mi.flags = 0;
mi.position = separator++;
mi.hParentMenu = cont.MainMenuItem;
mi.pszName = LPGEN("Show all frames");
@@ -1376,17 +1370,14 @@ static int CLUIFramesLoadMainMenu()
Menu_AddMainMenuItem(&mi);
// create "show all titlebars" menu
- mi.hIcon = NULL;//LoadIcon(g_hInst,MAKEINTRESOURCE(IDI_HELP));
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_HELP);
mi.position = separator++;
- mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Show all title bars");
mi.pszService = MS_CLIST_FRAMES_SHOWALLFRAMESTB;
Menu_AddMainMenuItem(&mi);
// create "hide all titlebars" menu
- mi.hIcon = NULL;//LoadIcon(g_hInst,MAKEINTRESOURCE(IDI_HELP));
mi.position = separator++;
- mi.flags = CMIF_ROOTHANDLE;
mi.pszName = LPGEN("Hide all title bars");
mi.pszService = MS_CLIST_FRAMES_HIDEALLFRAMESTB;
Menu_AddMainMenuItem(&mi);
@@ -2949,7 +2940,7 @@ static int CLUIFrameOnModulesLoad(WPARAM, LPARAM)
hThreadMFUpdate = mir_forkthread(MF_UpdateThread, NULL);
SetThreadPriority(hThreadMFUpdate, THREAD_PRIORITY_IDLE);
CLUIFramesLoadMainMenu();
- CLUIFramesCreateMenuForFrame(-1, HGENMENU_ROOT, 000010000, Menu_AddContextFrameMenuItem);
+ CLUIFramesCreateMenuForFrame(-1, NULL, 000010000, Menu_AddContextFrameMenuItem);
return 0;
}
diff --git a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
index 86bff0d6a2..077d832549 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/groupmenu.cpp
@@ -25,7 +25,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include <commonheaders.h>
//////////////////////////////Group MENU/////////////////////////
-HANDLE hGroupMenuObject;
+int hGroupMenuObject;
HANDLE hPreBuildGroupMenuEvent;
HGENMENU hGroupMainMenuItemProxy;
@@ -314,7 +314,7 @@ void InitGroupMenus(void)
//////////////////////////////END Group MENU/////////////////////////
//////////////////////////////SubGroup MENU/////////////////////////
-HANDLE hSubGroupMenuObject;
+int hSubGroupMenuObject;
HANDLE hSubGroupMainMenuItemProxy;
HANDLE hSubGroupStatusMenuItemProxy;
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp
index d0b08d00d2..fd7b062dd3 100644
--- a/plugins/Clist_nicer/src/clistmenus.cpp
+++ b/plugins/Clist_nicer/src/clistmenus.cpp
@@ -383,7 +383,6 @@ int InitCustomMenus(void)
CLISTMENUITEM mi = { 0 };
mi.position = 200000;
- mi.hParentMenu = HGENMENU_ROOT;
mi.pszService = "CList/SetContactIgnore";
mi.icolibItem = iconItem[1].hIcolib;
mi.pszName = LPGEN("&Contact list settings...");
diff --git a/plugins/CrashDumper/src/crshdmp.cpp b/plugins/CrashDumper/src/crshdmp.cpp
index cbbc44a885..57a0ef06ee 100644
--- a/plugins/CrashDumper/src/crshdmp.cpp
+++ b/plugins/CrashDumper/src/crshdmp.cpp
@@ -256,63 +256,54 @@ static int ModulesLoaded(WPARAM, LPARAM)
}
CLISTMENUITEM mi = { 0 };
- // mi.popupPosition = 2000089999; !!!!!!!!!!!!!!!!!!!!!!!
- mi.position = 2000089999;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
- mi.icolibItem = GetIconHandle(IDI_VI);
- mi.ptszName = LPGENT("Version Information");
- mi.hParentMenu = HGENMENU_ROOT;
- HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
-
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
- mi.hParentMenu = hMenuRoot;
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Version Information"), 2000089999, GetIconHandle(IDI_VI));
mi.position = 2000089995;
- mi.ptszName = LPGENT("Copy to clipboard");
+ mi.pszName = LPGEN("Copy to clipboard");
mi.icolibItem = GetIconHandle(IDI_VITOCLIP);
mi.pszService = MS_CRASHDUMPER_STORETOCLIP;
Menu_AddMainMenuItem(&mi);
mi.position = 2000089996;
- mi.ptszName = LPGENT("Store to file");
+ mi.pszName = LPGEN("Store to file");
mi.icolibItem = GetIconHandle(IDI_VITOFILE);
mi.pszService = MS_CRASHDUMPER_STORETOFILE;
Menu_AddMainMenuItem(&mi);
mi.position = 2000089997;
- mi.ptszName = LPGENT("Show");
+ mi.pszName = LPGEN("Show");
mi.icolibItem = GetIconHandle(IDI_VISHOW);
mi.pszService = MS_CRASHDUMPER_VIEWINFO;
Menu_AddMainMenuItem(&mi);
mi.position = 2000089998;
- mi.ptszName = LPGENT("Show with DLLs");
+ mi.pszName = LPGEN("Show with DLLs");
mi.icolibItem = GetIconHandle(IDI_VIUPLOAD);
mi.pszService = MS_CRASHDUMPER_VIEWINFO;
Menu_ConfigureItem(Menu_AddMainMenuItem(&mi), MCI_OPT_EXECPARAM, 1);
mi.position = 2000089999;
- mi.ptszName = LPGENT("Upload");
+ mi.pszName = LPGEN("Upload");
mi.icolibItem = GetIconHandle(IDI_VIUPLOAD);
mi.pszService = MS_CRASHDUMPER_UPLOAD;
Menu_AddMainMenuItem(&mi);
mi.position = 2000089999;
- mi.ptszName = LPGENT("Copy link to clipboard");
+ mi.pszName = LPGEN("Copy link to clipboard");
mi.icolibItem = GetIconHandle(IDI_LINKTOCLIP);//need icon
mi.pszService = MS_CRASHDUMPER_URLTOCLIP;
Menu_AddMainMenuItem(&mi);
if (catchcrashes && !needrestart) {
mi.position = 2000099990;
- mi.ptszName = LPGENT("Open crash report directory");
+ mi.pszName = LPGEN("Open crash report directory");
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_FILE);
mi.pszService = MS_CRASHDUMPER_URL;
Menu_AddMainMenuItem(&mi);
}
mi.position = 2000099991;
- mi.ptszName = LPGENT("Open online Version Info");
+ mi.pszName = LPGEN("Open online Version Info");
mi.icolibItem = Skin_GetIconHandle(SKINICON_EVENT_URL);
mi.pszService = MS_CRASHDUMPER_URL;
Menu_ConfigureItem(Menu_AddMainMenuItem(&mi), MCI_OPT_EXECPARAM, 1);
diff --git a/plugins/Db3x_mmap/src/ui.cpp b/plugins/Db3x_mmap/src/ui.cpp
index c995a5c3f3..0fbbe2e031 100644
--- a/plugins/Db3x_mmap/src/ui.cpp
+++ b/plugins/Db3x_mmap/src/ui.cpp
@@ -314,7 +314,7 @@ static int OnModulesLoaded(PVOID obj, WPARAM, LPARAM)
CLISTMENUITEM mi = { 0 };
mi.ptszName = LPGENT("Database");
mi.position = 500000000;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[0].hIcolib;
HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/DbEditorPP/src/main.cpp b/plugins/DbEditorPP/src/main.cpp
index d34cc61906..840a49442c 100644
--- a/plugins/DbEditorPP/src/main.cpp
+++ b/plugins/DbEditorPP/src/main.cpp
@@ -114,9 +114,9 @@ int ModulesLoaded(WPARAM, LPARAM)
// Register menu item
CLISTMENUITEM mi = { 0 };
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), 1900000001);
mi.position = 1900000001;
mi.icolibItem = GetIcoLibHandle(ICO_DBE_BUTT);
- mi.pszPopupName = "Database";
mi.pszName = modFullname;
mi.pszService = "DBEditorpp/MenuCommand";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Db_autobackups/src/main.cpp b/plugins/Db_autobackups/src/main.cpp
index 7e1d9d76d4..99b4abe08b 100644
--- a/plugins/Db_autobackups/src/main.cpp
+++ b/plugins/Db_autobackups/src/main.cpp
@@ -100,7 +100,7 @@ int ModulesLoad(WPARAM, LPARAM)
CreateServiceFunction(MS_AB_SAVEAS, DBSaveAs);
CLISTMENUITEM mi = { 0 };
- mi.pszPopupName = LPGEN("Database");
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), 500100000);
mi.pszName = LPGEN("Backup profile");
mi.pszService = MS_AB_BACKUP;
diff --git a/plugins/FTPFileYM/src/ftpfile.cpp b/plugins/FTPFileYM/src/ftpfile.cpp
index f0f4efad27..bf5950cdae 100644
--- a/plugins/FTPFileYM/src/ftpfile.cpp
+++ b/plugins/FTPFileYM/src/ftpfile.cpp
@@ -92,7 +92,7 @@ void InitMenuItems()
TCHAR stzName[256];
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
mi.ptszName = LPGENT("FTP File");
@@ -105,7 +105,7 @@ void InitMenuItems()
mi.ptszName = stzName;
CLISTMENUITEM mi2 = { 0 };
- mi2.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi2.flags = CMIF_TCHAR;
mi2.pszService = MS_FTPFILE_CONTACTMENU;
for (int i = 0; i < ServerList::FTP_COUNT; i++)
@@ -116,16 +116,12 @@ void InitMenuItems()
mi.flags = CMIF_TCHAR;
mi.hParentMenu = 0;
if (opt.bUseSubmenu)
- {
- mi.flags |= CMIF_ROOTHANDLE;
mi.hParentMenu = hMenu;
- }
mi.icolibItem = iconList[i].hIcolib;
hSubMenu[i] = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(hSubMenu[i], MCI_OPT_EXECPARAM, i + 1000);
- mi.flags |= CMIF_ROOTHANDLE;
mi.hParentMenu = hMainMenu;
hMainSubMenu[i] = Menu_AddMainMenuItem(&mi);
@@ -161,7 +157,7 @@ void InitMenuItems()
}
memset(&mi, 0, sizeof(mi));
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[ServerList::FTP_COUNT].hIcolib;
mi.position = 3000090001;
mi.ptszName = LPGENT("FTP File manager");
diff --git a/plugins/HistoryStats/src/main.cpp b/plugins/HistoryStats/src/main.cpp
index 28536605e8..b468dd96bf 100644
--- a/plugins/HistoryStats/src/main.cpp
+++ b/plugins/HistoryStats/src/main.cpp
@@ -155,29 +155,18 @@ void AddMainMenu()
CreateServiceFunction(con::SvcShowStatistics, MenuShowStatistics);
CreateServiceFunction(con::SvcConfigure, MenuConfigure);
+ HGENMENU hRoot = bInPopup ? Menu_CreateRoot(MO_MAIN, LPGENT("Statistics"), 1910000000) : NULL;
+
g_hMenuCreateStatistics = mu::clist::addMainMenuItem(
- LPGENT("Create statistics"), // MEMO: implicit translation
- 0,
- 1910000000,
- IconLib::getIcon(IconLib::iiMenuCreateStatistics),
- con::SvcCreateStatistics,
- bInPopup ? LPGENT("Statistics") : NULL);
+ LPGENT("Create statistics"), 0, 1910000000, IconLib::getIcon(IconLib::iiMenuCreateStatistics), con::SvcCreateStatistics, hRoot);
g_hMenuShowStatistics = mu::clist::addMainMenuItem(
LPGENT("Show statistics"), // MEMO: implicit translation
- 0,
- 1910000001,
- IconLib::getIcon(IconLib::iiMenuShowStatistics),
- con::SvcShowStatistics,
- bInPopup ? LPGENT("Statistics") : NULL);
+ 0, 1910000001, IconLib::getIcon(IconLib::iiMenuShowStatistics), con::SvcShowStatistics, hRoot);
g_hMenuConfigure = mu::clist::addMainMenuItem(
bInPopup ? LPGENT("Configure...") : LPGENT("Configure statistics..."), // MEMO: implicit translation
- 0,
- 1910000002,
- IconLib::getIcon(IconLib::iiMenuConfigure),
- con::SvcConfigure,
- bInPopup ? LPGENT("Statistics") : NULL);
+ 0, 1910000002, IconLib::getIcon(IconLib::iiMenuConfigure), con::SvcConfigure, hRoot);
}
/*
diff --git a/plugins/HistoryStats/src/mu_common.cpp b/plugins/HistoryStats/src/mu_common.cpp
index 0446013c4d..7c344b2738 100644
--- a/plugins/HistoryStats/src/mu_common.cpp
+++ b/plugins/HistoryStats/src/mu_common.cpp
@@ -12,7 +12,7 @@ namespace mu
namespace clist
{
- HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const TCHAR* pszPopupName /* = NULL */)
+ HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, HGENMENU hRoot)
{
// TODO: support for unicode-core with unicode-aware CList
CLISTMENUITEM mi = { 0 };
@@ -21,7 +21,7 @@ namespace mu
mi.position = position;
mi.hIcon = hIcon;
mi.pszService = const_cast<char*>(pszService);
- mi.ptszPopupName = (TCHAR*)pszPopupName;
+ mi.hParentMenu = hRoot;
return Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/HistoryStats/src/mu_common.h b/plugins/HistoryStats/src/mu_common.h
index e05b36c078..9e1bf12eae 100644
--- a/plugins/HistoryStats/src/mu_common.h
+++ b/plugins/HistoryStats/src/mu_common.h
@@ -13,7 +13,7 @@ namespace mu
namespace clist
{
- HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const TCHAR* pszPopupName = NULL);
+ HGENMENU addMainMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, HGENMENU hRoot = 0);
HGENMENU addContactMenuItem(const TCHAR* pszName, DWORD flags, int position, HICON hIcon, const char* pszService, const char* pszContactOwner = NULL);
const TCHAR* getContactDisplayName(MCONTACT hContact);
const TCHAR* getStatusModeDescription(int nStatusMode);
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp
index 116786208f..c37f1de785 100644
--- a/plugins/ListeningTo/src/listeningto.cpp
+++ b/plugins/ListeningTo/src/listeningto.cpp
@@ -198,7 +198,7 @@ void RebuildMenu()
mi.position = 500080000 + i;
mi.pszService = MS_LISTENINGTO_MAINMENU;
mi.ptszName = text;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR
+ mi.flags = CMIF_TCHAR
| (ListeningToEnabled(info->proto, TRUE) ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
@@ -296,7 +296,7 @@ int ModulesLoaded(WPARAM, LPARAM)
CLISTMENUITEM mi = { 0 };
mi.position = 500080000;
mi.ptszName = LPGENT("Listening to");
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.icolibItem = iconList[0].hIcolib;
hMainMenuGroup = Menu_AddMainMenuItem(&mi);
@@ -308,7 +308,7 @@ int ModulesLoaded(WPARAM, LPARAM)
// Add all protos
mi.ptszName = LPGENT("Send to all protocols");
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR
+ mi.flags = CMIF_TCHAR
| (ListeningToEnabled(NULL, true) ? CMIF_CHECKED : 0)
| (opts.enable_sending ? 0 : CMIF_GRAYED);
proto_items.resize(1);
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 8937e6f198..55a3e2782c 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -740,7 +740,7 @@ static HGENMENU AddSubmenuItem(HGENMENU hRoot, TCHAR* name, HICON icon, DWORD fl
mi.position = pos;
mi.ptszName = name;
mi.hIcon = icon;
- mi.flags = CMIF_UNICODE | CMIF_ROOTHANDLE | flag;
+ mi.flags = CMIF_UNICODE | flag;
mi.pszService = service;
HGENMENU res = Menu_AddContactMenuItem(&mi);
@@ -979,10 +979,8 @@ static int PluginInit(WPARAM, LPARAM)
hmenuHide = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.hParentMenu = HGENMENU_ROOT;
mi.ptszName = LPGENT("Ignore");
mi.pszService = 0;
- mi.flags |= CMIF_ROOTHANDLE;
mi.hIcon = IcoLib_GetIcon("miex_ignore");
hmenuIgnore = Menu_AddContactMenuItem(&mi);
@@ -997,7 +995,6 @@ static int PluginInit(WPARAM, LPARAM)
ood.pszPage = "Ignore";
AddSubmenuItem(hmenuIgnore, LPGENT("Open ignore settings"), IcoLib_GetIcon("miex_ignore"), 0, "Opt/OpenOptions", pos, (int)&ood);
- mi.pszPopupName = 0;
mi.position++;
mi.ptszName = LPGENT("Copy to Account");
mi.pszService = MS_PROTO;
diff --git a/plugins/MirOTR/src/mirotrmenu.cpp b/plugins/MirOTR/src/mirotrmenu.cpp
index 377afc4547..b4459382f4 100644
--- a/plugins/MirOTR/src/mirotrmenu.cpp
+++ b/plugins/MirOTR/src/mirotrmenu.cpp
@@ -1,6 +1,6 @@
#include "stdafx.h"
-static HANDLE hMirOTRMenuObject;
+static int hMirOTRMenuObject;
static HGENMENU hStatusInfoItem, hHTMLConvMenuItem;
HWND hDummyPaintWin;
diff --git a/plugins/MyDetails/src/frame.cpp b/plugins/MyDetails/src/frame.cpp
index f4f98dd258..3345092557 100644
--- a/plugins/MyDetails/src/frame.cpp
+++ b/plugins/MyDetails/src/frame.cpp
@@ -329,8 +329,8 @@ int CreateFrame()
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
- mi.ptszPopupName = LPGENT("My details");
- mi.position = 1; // 500010000
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("My details"), 500010000);
+ mi.position = 1;
mi.hIcon = Skin_LoadIcon(SKINICON_OTHER_USERDETAILS);
mi.ptszName = LPGENT("Show my details");
mi.pszService = MODULE_NAME"/ShowHideMyDetails";
diff --git a/plugins/MyDetails/src/mydetails.cpp b/plugins/MyDetails/src/mydetails.cpp
index 9fb9ce467c..974b57a644 100644
--- a/plugins/MyDetails/src/mydetails.cpp
+++ b/plugins/MyDetails/src/mydetails.cpp
@@ -89,12 +89,12 @@ static int MainInit(WPARAM, LPARAM)
// Add options to menu
CLISTMENUITEM mi = { 0 };
mi.position = 500050000;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_USERDETAILS);
mi.ptszName = LPGENT("My details");
HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.hParentMenu = hMenuRoot;
mi.icolibItem = NULL;
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp
index 5a404dce92..72c63abb58 100644
--- a/plugins/NewAwaySysMod/src/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/src/AwaySys.cpp
@@ -636,14 +636,13 @@ int MirandaLoaded(WPARAM, LPARAM)
g_hContactMenuItem = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.flags = CMIF_TCHAR | CMIF_ROOTHANDLE;
+ mi.flags = CMIF_TCHAR;
mi.hIcon = NULL;
- mi.hParentMenu = HGENMENU_ROOT;
mi.position = 1000020000;
mi.ptszName = LPGENT("Autoreply");
g_hToggleSOEContactMenuItem = Menu_AddContactMenuItem(&mi);
- mi.flags = CMIF_TCHAR | CMIF_ROOTHANDLE;
+ mi.flags = CMIF_TCHAR;
mi.hParentMenu = g_hToggleSOEContactMenuItem;
mi.position = 1000020000;
diff --git a/plugins/NewEventNotify/src/menuitem.cpp b/plugins/NewEventNotify/src/menuitem.cpp
index 0aa91b51f7..34e2fa4b4b 100644
--- a/plugins/NewEventNotify/src/menuitem.cpp
+++ b/plugins/NewEventNotify/src/menuitem.cpp
@@ -51,9 +51,9 @@ int MenuitemInit(BOOL bStatus)
CreateServiceFunction(MS_NEN_MENUNOTIFY, MenuitemNotifyCmd);
CLISTMENUITEM mi = { 0 };
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
mi.position = 1;
mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_ENABLED));
- mi.pszPopupName = LPGEN("Popups");
mi.pszService = MS_NEN_MENUNOTIFY;
mi.flags = 0;
hMenuitemNotify = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp
index fafec319e8..6553001288 100644
--- a/plugins/NewXstatusNotify/src/main.cpp
+++ b/plugins/NewXstatusNotify/src/main.cpp
@@ -1075,7 +1075,8 @@ void InitMainMenuItem()
{
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
- mi.ptszPopupName = ServiceExists(MS_POPUP_ADDPOPUPT) ? _T("Popups") : NULL;
+ if (ServiceExists(MS_POPUP_ADDPOPUPT))
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
mi.pszService = MS_STATUSCHANGE_MENUCOMMAND;
hEnableDisableMenu = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/NewsAggregator/Src/Menus.cpp b/plugins/NewsAggregator/Src/Menus.cpp
index b92ec6f3e5..1748792c4e 100644
--- a/plugins/NewsAggregator/Src/Menus.cpp
+++ b/plugins/NewsAggregator/Src/Menus.cpp
@@ -26,10 +26,7 @@ void InitMenu()
CLISTMENUITEM mi = { 0 };
mi.pszContactOwner = MODULE;
mi.flags = CMIF_TCHAR | CMIF_NOTOFFLINE;
-
- // adding main menu items
- mi.ptszPopupName = LPGENT("News Aggregator");
- // mi.popupPosition = 500099000; !!!!!!!!!!!!!!!!!!!!!!!
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("News Aggregator"), 500099000);
mi.position = 10100001;
if (db_get_b(NULL, MODULE, "AutoUpdate", 1))
diff --git a/plugins/Non-IM Contact/src/main.cpp b/plugins/Non-IM Contact/src/main.cpp
index 35793bfe8d..4cdc4b3504 100644
--- a/plugins/Non-IM Contact/src/main.cpp
+++ b/plugins/Non-IM Contact/src/main.cpp
@@ -143,8 +143,7 @@ extern "C" __declspec(dllexport) int Load()
CLISTMENUITEM mi = { 0 };
mi.position = 600090000;
- mi.pszPopupName = LPGEN("&Non-IM Contact");
- // mi.popupPosition = 600090000; !!!!!!!!!!!!!!!!!!!!
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("&Non-IM Contact"), 600090000);
mi.pszName = LPGEN("&Add Non-IM Contact");
mi.pszService = "AddLCcontact";
mi.icolibItem = icoList[0].hIcolib;
@@ -168,7 +167,6 @@ extern "C" __declspec(dllexport) int Load()
}
mi.position = 600090000;
- mi.pszPopupName = LPGEN("&Non-IM Contact");
mi.pszName = LPGEN("&String Maker");
mi.pszService = "TestStringReplaceLine";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/NotesAndReminders/src/main.cpp b/plugins/NotesAndReminders/src/main.cpp
index 8906f1d651..b3654f4e39 100644
--- a/plugins/NotesAndReminders/src/main.cpp
+++ b/plugins/NotesAndReminders/src/main.cpp
@@ -181,10 +181,10 @@ int OnModulesLoaded(WPARAM wparam, LPARAM lparam)
RegisterKeyBindings();
g_AddContListMI = (BOOL)db_get_dw(0,MODULENAME,"AddContactMenuItems",1);
+
// register menus
CLISTMENUITEM mi = { 0 };
- mi.pszContactOwner = NULL;
- mi.ptszPopupName = LPGENT("Notes && Reminders");
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Notes && Reminders"), 1600000000);
mi.flags = CMIF_TCHAR;
mi.position = 1600000000;
@@ -244,13 +244,11 @@ int OnModulesLoaded(WPARAM wparam, LPARAM lparam)
Menu_AddMainMenuItem(&mi);
// register misc
-
hkOptInit = HookEvent(ME_OPT_INITIALISE, OnOptInitialise);
hkTopToolbarInit = HookEvent("TopToolBar/ModuleLoaded", OnTopToolBarInit);
UnhookEvent(hkModulesLoaded);
// init vars and load all data
-
InitSettings();
CreateMsgWindow();
LoadNotes(TRUE);
diff --git a/plugins/PasteIt/src/PasteIt.cpp b/plugins/PasteIt/src/PasteIt.cpp
index 21e4945c32..bd251a3ec4 100644
--- a/plugins/PasteIt/src/PasteIt.cpp
+++ b/plugins/PasteIt/src/PasteIt.cpp
@@ -292,7 +292,7 @@ INT_PTR ContactMenuService(WPARAM hContact, LPARAM lParam)
void InitMenuItems()
{
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.icolibItem = icon.hIcolib;
mi.position = 3000090005;
mi.ptszName = LPGENT("Paste It");
@@ -300,7 +300,7 @@ void InitMenuItems()
hContactMenu = Menu_AddContactMenuItem(&mi);
memset(&mi, 0, sizeof(mi));
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.pszService = MS_PASTEIT_CONTACTMENU;
mi.hParentMenu = hContactMenu;
mi.ptszName = LPGENT("Paste from clipboard");
@@ -318,7 +318,7 @@ void InitMenuItems()
mi2.hParentMenu = hDefWebMenu;
for (int i = 0; i < PasteToWeb::pages; ++i)
{
- mi2.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi2.flags = CMIF_TCHAR;
if (Options::instance->defWeb == i)
mi2.flags |= CMIF_CHECKED;
mi2.ptszName = pasteToWebs[i]->GetName();
diff --git a/plugins/Ping/src/menu.cpp b/plugins/Ping/src/menu.cpp
index 564d2ee8bf..263edf9656 100644
--- a/plugins/Ping/src/menu.cpp
+++ b/plugins/Ping/src/menu.cpp
@@ -8,8 +8,8 @@ void InitMenus()
// main menu
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
- // mi.popupPosition = 500099900; !!!!!!!!!!!!!!!!!!!!
- mi.ptszPopupName = LPGENT("Ping");
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Ping"), 500099900);
+
mi.position = 2000060000;
mi.hIcon = hIconResponding;
mi.ptszName = LPGENT("Enable all pings");
diff --git a/plugins/Ping/src/pingthread.cpp b/plugins/Ping/src/pingthread.cpp
index e5c6061d6b..a8ec7c89e1 100644
--- a/plugins/Ping/src/pingthread.cpp
+++ b/plugins/Ping/src/pingthread.cpp
@@ -993,10 +993,8 @@ void InitList()
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
- // mi.popupPosition = 1000200001; !!!!!!!!!!!!!
- mi.ptszPopupName = LPGENT("Ping");
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Ping"), 1000200001);
mi.position = 3000320001;
- mi.hIcon = 0;//LoadIcon( hInst, 0);
mi.ptszName = LPGENT("Show/Hide &Ping Window");
mi.pszService = PLUG "/ShowWindow";
Menu_AddMainMenuItem(&mi);
diff --git a/plugins/Popup/src/main.cpp b/plugins/Popup/src/main.cpp
index ab37a4f16b..ba6a9d21fc 100644
--- a/plugins/Popup/src/main.cpp
+++ b/plugins/Popup/src/main.cpp
@@ -181,8 +181,7 @@ void InitMenuItems(void)
{
CLISTMENUITEM mi = { 0 };
// support new genmenu style
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
- mi.hParentMenu = HGENMENU_ROOT;
+ mi.flags = CMIF_TCHAR;
// Build main menu
mi.position = -1000000000 /*1000001*/;
diff --git a/plugins/ProfileManager/src/pmanagerEx.cpp b/plugins/ProfileManager/src/pmanagerEx.cpp
index 05a94201c4..6679d13b15 100644
--- a/plugins/ProfileManager/src/pmanagerEx.cpp
+++ b/plugins/ProfileManager/src/pmanagerEx.cpp
@@ -95,19 +95,16 @@ static IconItem iconList[] =
static int OnModulesLoaded(WPARAM, LPARAM)
{
CLISTMENUITEM mi = { 0 };
- mi.position = -500200000;
- mi.pszPopupName = LPGEN("Database");
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Database"), -500200000);
for (int i = 0; i < _countof(iconList); i++) {
mi.pszName = iconList[i].szDescr;
mi.pszService = iconList[i].szName;
mi.icolibItem = iconList[i].hIcolib;
if (i == 3)
- mi.pszPopupName = NULL;
+ mi.hParentMenu = NULL;
Menu_AddMainMenuItem(&mi);
}
-
- Menu_AddTrayMenuItem(&mi);
return 0;
}
diff --git a/plugins/Quotes/src/Forex.cpp b/plugins/Quotes/src/Forex.cpp
index 837220368f..9dcc4a8618 100644
--- a/plugins/Quotes/src/Forex.cpp
+++ b/plugins/Quotes/src/Forex.cpp
@@ -84,32 +84,25 @@ namespace
void InitMenu()
{
CLISTMENUITEM mi = { 0 };
- mi.ptszName = LPGENT("Quotes");
- mi.flags = CMIF_TCHAR | CMIF_ROOTHANDLE;
- mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
- HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
+ mi.flags = CMIF_TCHAR;
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Quotes"), 0, Quotes_GetIconHandle(IDI_ICON_MAIN));
mi.ptszName = LPGENT("Enable/Disable Auto Update");
- mi.flags = CMIF_TCHAR | CMIF_ROOTHANDLE;
mi.position = 10100001;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
mi.pszService = g_pszAutoUpdateCmd;
- mi.hParentMenu = hMenuRoot;
g_hEnableDisableMenu = Menu_AddMainMenuItem(&mi);
CreateServiceFunction(mi.pszService, QuotesMenu_EnableDisable);
UpdateMenu(g_bAutoUpdate);
mi.ptszName = LPGENT("Refresh All Quotes\\Rates");
- mi.flags = CMIF_TCHAR | CMIF_ROOTHANDLE;
mi.position = 20100001;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
mi.pszService = "Quotes/RefreshAll";
- mi.hParentMenu = hMenuRoot;
Menu_AddMainMenuItem(&mi);
CreateServiceFunction(mi.pszService, QuotesMenu_RefreshAll);
mi.ptszName = LPGENT("Currency Converter...");
- //mi.flags = CMIF_TCHAR|CMIF_ICONFROMICOLIB|CMIF_ROOTHANDLE;
mi.position = 20100002;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_CURRENCY_CONVERTER);
mi.pszService = g_pszCurrencyConverter;
@@ -117,7 +110,6 @@ namespace
CreateServiceFunction(mi.pszService, QuotesMenu_CurrencyConverter);
mi.ptszName = LPGENT("Export All Quotes");
- //mi.flags = CMIF_TCHAR|CMIF_ICONFROMICOLIB|CMIF_ROOTHANDLE;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_EXPORT);
mi.pszService = "Quotes/ExportAll";
mi.position = 20100003;
@@ -125,7 +117,6 @@ namespace
CreateServiceFunction(mi.pszService, QuotesMenu_ExportAll);
mi.ptszName = LPGENT("Import All Quotes");
- //mi.flags = CMIF_TCHAR|CMIF_ICONFROMICOLIB|CMIF_ROOTHANDLE;
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_IMPORT);
mi.pszService = "Quotes/ImportAll";
mi.position = 20100004;
@@ -136,27 +127,10 @@ namespace
HookEvent(ME_CLIST_PREBUILDCONTACTMENU, Quotes_PrebuildContactMenu);
- memset(&mi, 0, sizeof(mi));
- mi.pszContactOwner = QUOTES_PROTOCOL_NAME;
- hMenuRoot = NULL;
if (bSubGroups)
- {
- mi.pszPopupName = (char *)-1;
- mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_MAIN);
- mi.flags = CMIF_TCHAR | CMIF_ROOTHANDLE;
- tstring sProtocolName = quotes_a2t(QUOTES_PROTOCOL_NAME);
- mi.ptszName = const_cast<TCHAR*>(sProtocolName.c_str());//A2T(QUOTES_PROTOCOL_NAME);
- mi.position = 0;
-
- hMenuRoot = Menu_AddContactMenuItem(&mi);
- }
-
- mi.flags = CMIF_TCHAR;
- if (bSubGroups)
- {
- mi.flags |= CMIF_ROOTHANDLE;
- mi.pszPopupName = (char*)hMenuRoot;
- }
+ mi.hParentMenu = Menu_CreateRoot(MO_CONTACT, _T(QUOTES_PROTOCOL_NAME), 20100004, Quotes_GetIconHandle(IDI_ICON_MAIN));
+ else
+ mi.hParentMenu = NULL;
mi.ptszName = LPGENT("Refresh");
mi.icolibItem = Quotes_GetIconHandle(IDI_ICON_REFRESH);
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp
index 7fb923a5bb..670b86fc79 100644
--- a/plugins/SecureIM/src/main.cpp
+++ b/plugins/SecureIM/src/main.cpp
@@ -48,13 +48,13 @@ static HGENMENU AddMenuItem(LPCSTR name, int pos, HICON hicon, LPCSTR service, i
return Menu_AddContactMenuItem(&mi);
}
-static HGENMENU AddSubItem(HANDLE rootid, LPCSTR name, int pos, int poppos, LPCSTR service, WPARAM wParam = 0)
+static HGENMENU AddSubItem(HGENMENU hRoot, LPCSTR name, int pos, int poppos, LPCSTR service, WPARAM wParam = 0)
{
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE | CMIF_HIDDEN;
+ mi.flags = CMIF_HIDDEN;
mi.position = pos;
mi.pszName = (char*)name;
- mi.pszPopupName = (char*)rootid;
+ mi.hParentMenu = hRoot;
mi.pszService = (char*)service;
HGENMENU res = Menu_AddContactMenuItem(&mi);
Menu_ConfigureItem(res, MCI_OPT_EXECPARAM, poppos);
@@ -235,7 +235,7 @@ static int onModulesLoaded(WPARAM, LPARAM)
g_hMenu[1] = AddMenuItem(sim302, 110001, g_hICO[ICO_CM_DIS], MODULENAME"/SIM_DIS", CMIF_NOTOFFLINE);
if (ServiceExists(MS_CLIST_MENUBUILDSUBGROUP)) {
- g_hMenu[2] = AddMenuItem(sim312[0], 110002, NULL, NULL, CMIF_ROOTHANDLE);
+ g_hMenu[2] = AddMenuItem(sim312[0], 110002, NULL, NULL);
g_hMenu[3] = AddSubItem(g_hMenu[2], sim232[0], 110003, 110002, MODULENAME"/SIM_ST_DIS");
g_hMenu[4] = AddSubItem(g_hMenu[2], sim232[1], 110004, 110002, MODULENAME"/SIM_ST_ENA");
g_hMenu[5] = AddSubItem(g_hMenu[2], sim232[2], 110005, 110002, MODULENAME"/SIM_ST_TRY");
@@ -258,7 +258,7 @@ static int onModulesLoaded(WPARAM, LPARAM)
}
if (ServiceExists(MS_CLIST_MENUBUILDSUBGROUP)) {
- g_hMenu[10] = AddMenuItem(sim311[0], 110010, NULL, NULL, CMIF_ROOTHANDLE);
+ g_hMenu[10] = AddMenuItem(sim311[0], 110010, NULL, NULL);
g_hMenu[11] = AddSubItem(g_hMenu[10], sim231[0], 110011, 110010, MODULENAME"/MODE_NAT");
g_hMenu[12] = AddSubItem(g_hMenu[10], sim231[1], 110012, 110010, MODULENAME"/MODE_PGP");
g_hMenu[13] = AddSubItem(g_hMenu[10], sim231[2], 110013, 110010, MODULENAME"/MODE_GPG");
diff --git a/plugins/SendScreenshotPlus/src/Main.cpp b/plugins/SendScreenshotPlus/src/Main.cpp
index e08fb1b63b..39709c0b3f 100644
--- a/plugins/SendScreenshotPlus/src/Main.cpp
+++ b/plugins/SendScreenshotPlus/src/Main.cpp
@@ -272,9 +272,9 @@ DLL_EXPORT int Load(void)
srv_reg(Send2ImageShack);
/// menu items
CLISTMENUITEM mi = { 0 };
- mi.flags=CMIF_ROOTHANDLE|CMIF_TCHAR/*|CMIF_ICONFROMICOLIB*/;
- mi.hParentMenu=HGENMENU_ROOT;
- mi.icolibItem=GetIconHandle(ICO_MAINXS);
+ mi.flags = CMIF_TCHAR;
+ mi.hParentMenu = HGENMENU_ROOT;
+ mi.icolibItem = GetIconHandle(ICO_MAINXS);
#define _Menu_AddMainMenuItemEx(name,srv,pos) do{mi.ptszName=name;mi.pszService=srv;mi.position=pos;Menu_AddMainMenuItem(&mi);}while(0)
#define _Menu_AddContactMenuItemEx(name,srv,pos) do{mi.ptszName=name;mi.pszService=srv;mi.position=pos;Menu_AddContactMenuItem(&mi);}while(0)
_Menu_AddMainMenuItemEx(LPGENT("Take a screenshot"),MS_SENDSS_OPENDIALOG,1000001);
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index 153ab20540..525e276465 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -793,30 +793,30 @@ static int PluginInit(WPARAM, LPARAM)
Hotkey_Register(&hkd);
// Main menu
- CLISTMENUITEM cl = { 0 };
- cl.position = 1000000000;
-
- cl.pszName = LPGEN("Save session...");
- cl.pszPopupName = LPGEN("Sessions Manager");
- cl.icolibItem = iconList[4].hIcolib;
- cl.pszService = MS_SESSIONS_SAVEUSERSESSION;
- hmSaveCurrentSession = Menu_AddMainMenuItem(&cl);
-
- cl.pszName = LPGEN("Load session...");
- cl.pszService = MS_SESSIONS_OPENMANAGER;
- cl.icolibItem = iconList[3].hIcolib;
- Menu_AddMainMenuItem(&cl);
-
- cl.pszName = LPGEN("Close session");
- cl.pszService = MS_SESSIONS_CLOSESESSION;
- cl.icolibItem = 0;
- Menu_AddMainMenuItem(&cl);
-
- cl.pszName = LPGEN("Load last session");
- cl.pszService = MS_SESSIONS_RESTORELASTSESSION;
- cl.icolibItem = iconList[5].hIcolib;
- cl.position = 10100000;
- Menu_AddMainMenuItem(&cl);
+ CLISTMENUITEM mi = { 0 };
+ mi.position = 1000000000;
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Sessions Manager"), 1000000000);
+
+ mi.pszName = LPGEN("Save session...");
+ mi.icolibItem = iconList[4].hIcolib;
+ mi.pszService = MS_SESSIONS_SAVEUSERSESSION;
+ hmSaveCurrentSession = Menu_AddMainMenuItem(&mi);
+
+ mi.pszName = LPGEN("Load session...");
+ mi.pszService = MS_SESSIONS_OPENMANAGER;
+ mi.icolibItem = iconList[3].hIcolib;
+ Menu_AddMainMenuItem(&mi);
+
+ mi.pszName = LPGEN("Close session");
+ mi.pszService = MS_SESSIONS_CLOSESESSION;
+ mi.icolibItem = 0;
+ Menu_AddMainMenuItem(&mi);
+
+ mi.pszName = LPGEN("Load last session");
+ mi.pszService = MS_SESSIONS_RESTORELASTSESSION;
+ mi.icolibItem = iconList[5].hIcolib;
+ mi.position = 10100000;
+ Menu_AddMainMenuItem(&mi);
return 0;
}
diff --git a/plugins/SimpleStatusMsg/src/main.cpp b/plugins/SimpleStatusMsg/src/main.cpp
index 2eb4e4f36b..9bf3cb4eb0 100644
--- a/plugins/SimpleStatusMsg/src/main.cpp
+++ b/plugins/SimpleStatusMsg/src/main.cpp
@@ -1490,9 +1490,9 @@ static int ChangeStatusMsgPrebuild(WPARAM wParam, LPARAM lParam)
if (Proto_IsAccountLocked(pa[i]))
{
mir_sntprintf(szBuffer, TranslateT("%s (locked)"), pa[i]->tszAccountName);
- mi.ptszPopupName = szBuffer;
+ mi.hParentMenu = Menu_CreateRoot(MO_STATUS, szBuffer, mi.position);
}
- else mi.ptszPopupName = pa[i]->tszAccountName;
+ else mi.hParentMenu = Menu_CreateRoot(MO_STATUS, pa[i]->tszAccountName, mi.position);
hProtoStatusMenuItem[i] = Menu_AddStatusMenuItem(&mi);
}
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp
index 51c13ae50d..1cc9974b79 100644
--- a/plugins/SmileyAdd/src/main.cpp
+++ b/plugins/SmileyAdd/src/main.cpp
@@ -51,10 +51,8 @@ static IconItem icon = { LPGEN("Button smiley"), "SmileyAdd_ButtonSmiley", IDI_S
static int ModulesLoaded(WPARAM, LPARAM)
{
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE;
mi.position = 2000070050;
mi.icolibItem = icon.hIcolib;
- mi.hParentMenu = HGENMENU_ROOT;
mi.pszName = LPGEN("Assign smiley category");
hContactMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp
index 44de589741..2cc5413753 100644
--- a/plugins/SmileyAdd/src/services.cpp
+++ b/plugins/SmileyAdd/src/services.cpp
@@ -294,7 +294,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM)
CLISTMENUITEM mi = { 0 };
mi.hParentMenu = hContactMenuItem;
- mi.flags = CMIF_ROOTHANDLE | CMIF_TCHAR;
+ mi.flags = CMIF_TCHAR;
mi.pszService = MS_SMILEYADD_CUSTOMCATMENU;
bool nonecheck = true;
diff --git a/plugins/StartupSilence/src/main.cpp b/plugins/StartupSilence/src/main.cpp
index 3595e1884d..2d4aaaa8d6 100644
--- a/plugins/StartupSilence/src/main.cpp
+++ b/plugins/StartupSilence/src/main.cpp
@@ -292,7 +292,7 @@ static INT_PTR InitMenu()
CLISTMENUITEM mi = { 0 };
mi.position = 100000000;
mi.icolibItem = GetIconHandle(MENU_NAME);
- mi.pszPopupName = MENU_NAME;
+ mi.pszName = MENU_NAME;
mi.pszService = SS_SERVICE_NAME;
hSSMenuToggleOnOff = Menu_AddMainMenuItem(&mi);
UpdateMenu();
diff --git a/plugins/StatusPlugins/StartupStatus/profiles.cpp b/plugins/StatusPlugins/StartupStatus/profiles.cpp
index 697793b8da..957836adcd 100644
--- a/plugins/StatusPlugins/StartupStatus/profiles.cpp
+++ b/plugins/StatusPlugins/StartupStatus/profiles.cpp
@@ -102,8 +102,8 @@ static int CreateMainMenuItems(WPARAM, LPARAM)
if ( !db_get_b(NULL, MODULENAME, OptName(i, SETTING_CREATEMMITEM), 0) || GetProfileName(i, (LPARAM)profilename))
continue;
- if ( db_get_b(NULL, MODULENAME, OptName(i, SETTING_INSUBMENU), 1))
- mi.ptszPopupName = LPGENT("Status profiles");
+ if (db_get_b(NULL, MODULENAME, OptName(i, SETTING_INSUBMENU), 1))
+ mi.hParentMenu = Menu_CreateRoot(MO_STATUS, LPGENT("Status profiles"), 2000100000);
mi.ptszName = profilename;
mi.position = 2000100000 + mcount;
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp
index c34ed8328f..c1637a6f0f 100644
--- a/plugins/TabSRMM/src/typingnotify.cpp
+++ b/plugins/TabSRMM/src/typingnotify.cpp
@@ -546,7 +546,7 @@ int TN_ModuleInit()
mi.hIcon = LoadIcon(g_hInst, MAKEINTRESOURCE(IDI_DISABLED));
}
mi.pszService = "TypingNotify/EnableDisableMenuCommand";
- mi.pszPopupName = LPGEN("Popups");
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 0);
hDisableMenu = Menu_AddMainMenuItem(&mi);
}
diff --git a/plugins/UserInfoEx/src/mir_menuitems.cpp b/plugins/UserInfoEx/src/mir_menuitems.cpp
index aebdd2bdd1..e3891a5f65 100644
--- a/plugins/UserInfoEx/src/mir_menuitems.cpp
+++ b/plugins/UserInfoEx/src/mir_menuitems.cpp
@@ -67,8 +67,8 @@ void RebuildContact()
{
BYTE item = 0;
- HGENMENU mhRoot = HGENMENU_ROOT;
- HGENMENU mhExIm = HGENMENU_ROOT;
+ HGENMENU mhRoot = NULL;
+ HGENMENU mhExIm = NULL;
static HGENMENU hMenuItem[4] = {NULL, NULL, NULL, NULL };
SvcEMailRebuildMenu();
@@ -86,13 +86,11 @@ void RebuildContact()
// support new genmenu style
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE;
- mi.hParentMenu = HGENMENU_ROOT;
switch (flag) {
case 3:
//cascade off
- mhRoot = mhExIm = HGENMENU_ROOT;
+ mhRoot = mhExIm = NULL;
hMenuItem[0] = NULL;
break;
case 5:
@@ -111,7 +109,7 @@ void RebuildContact()
mi.pszName = LPGEN("Export/import contact");
mhExIm = Menu_AddContactMenuItem(&mi);
hMenuItem[0] = mhExIm;
- mhRoot = HGENMENU_ROOT;
+ mhRoot = NULL;
break;
default:
//disable Menu
@@ -133,14 +131,14 @@ void RebuildContact()
// Export
mi.pszService = MS_USERINFO_VCARD_EXPORT;
- mi.pszName = mhExIm != HGENMENU_ROOT ? LPGEN("&Export") : LPGEN("&Export user details");
+ mi.pszName = mhExIm != NULL ? LPGEN("&Export") : LPGEN("&Export user details");
mi.position = 1000050200;
mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
hMenuItem[2] = Menu_AddContactMenuItem(&mi);
// Import
mi.pszService = MS_USERINFO_VCARD_IMPORT;
- mi.pszName = mhExIm != HGENMENU_ROOT ? LPGEN("&Import") : LPGEN("&Import user details");
+ mi.pszName = mhExIm != NULL ? LPGEN("&Import") : LPGEN("&Import user details");
mi.position = 1000050300;
mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
hMenuItem[3] = Menu_AddContactMenuItem(&mi);
@@ -159,8 +157,8 @@ void RebuildMain()
{
BYTE item = 0;
- HGENMENU mhRoot = HGENMENU_ROOT;
- HGENMENU mhExIm = HGENMENU_ROOT;
+ HGENMENU mhRoot = NULL;
+ HGENMENU mhExIm = NULL;
static HGENMENU hMenuItem[8] = {NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL};
// load options
@@ -175,14 +173,12 @@ void RebuildMain()
// support new genmenu style
CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE;
- mi.hParentMenu = HGENMENU_ROOT;
switch (flag)
{
case 3:
//cascade off
- mhRoot = mhExIm = HGENMENU_ROOT;
+ mhRoot = mhExIm = NULL;
hMenuItem[item++] = NULL;
break;
case 5:
@@ -201,7 +197,7 @@ void RebuildMain()
mi.pszName = LPGEN("Export/import contact");
mhExIm = Menu_AddMainMenuItem(&mi);
hMenuItem[item++] = mhExIm;
- mhRoot = HGENMENU_ROOT;
+ mhRoot = NULL;
break;
default:
//disable Menue
@@ -294,8 +290,8 @@ void RebuildGroup()
BYTE item = 0;
GroupMenuParam gmp = { 0 };
- HGENMENU mhRoot = HGENMENU_ROOT;
- HGENMENU mhExIm = HGENMENU_ROOT;
+ HGENMENU mhRoot = NULL;
+ HGENMENU mhExIm = NULL;
static HGENMENU hMenuItem[3] = {NULL, NULL, NULL };
// load options
@@ -316,15 +312,11 @@ void RebuildGroup()
mi.pszService = text;
char* tDest = text + mir_strlen(text);
- // support new genmenu style
- mi.flags = CMIF_ROOTHANDLE;
- mi.hParentMenu = HGENMENU_ROOT;
-
switch (flag)
{
case 3:
//cascade off
- mhRoot = mhExIm = HGENMENU_ROOT;
+ mhRoot = mhExIm = NULL;
hMenuItem[item++] = NULL;
break;
case 5:
@@ -343,7 +335,7 @@ void RebuildGroup()
mi.pszName = LPGEN("Export/import contact");
mhExIm = Menu_AddGroupMenuItem(0, &mi);
hMenuItem[item++] = mhExIm;
- mhRoot = HGENMENU_ROOT;
+ mhRoot = NULL;
break;
default:
//disable Menue
@@ -388,8 +380,8 @@ void RebuildSubGroup()
BYTE item = 0;
GroupMenuParam gmp = { 0 };
- HGENMENU mhRoot = HGENMENU_ROOT;
- HGENMENU mhExIm = HGENMENU_ROOT;
+ HGENMENU mhRoot = NULL;
+ HGENMENU mhExIm = NULL;
static HGENMENU hMenuItem[3] = {NULL, NULL, NULL };
// load options
@@ -410,15 +402,11 @@ void RebuildSubGroup()
mi.pszService = text;
char* tDest = text + mir_strlen(text);
- // support new genmenu style
- mi.flags = CMIF_ROOTHANDLE;
- mi.hParentMenu = HGENMENU_ROOT;
-
switch (flag)
{
case 3:
//cascade off
- mhRoot = mhExIm = HGENMENU_ROOT;
+ mhRoot = mhExIm = NULL;
hMenuItem[item++] = NULL;
break;
case 5:
@@ -437,7 +425,7 @@ void RebuildSubGroup()
mi.pszName = LPGEN("Export/import group");
mhExIm = Menu_AddSubGroupMenuItem(0, &mi);
hMenuItem[item++] = mhExIm;
- mhRoot = HGENMENU_ROOT;
+ mhRoot = NULL;
break;
default:
//disable Menue
@@ -450,7 +438,7 @@ void RebuildSubGroup()
// Export
mir_strcpy(tDest, "/ExportGroup"); //mi.pszService
if (!ServiceExists(mi.pszService)) CreateServiceFunction(mi.pszService, svcExIm_Group_Service);
- mi.pszName = mhExIm != HGENMENU_ROOT ? LPGEN("&Export") : LPGEN("&Export group");
+ mi.pszName = mhExIm != NULL ? LPGEN("&Export") : LPGEN("&Export group");
mi.position = 1050200;
mi.hIcon = IcoLib_GetIcon(ICO_BTN_EXPORT);
gmp.lParam=0;
@@ -460,7 +448,7 @@ void RebuildSubGroup()
// Import
mir_strcpy(tDest, "/ImportGroup"); //mi.pszService
if (!ServiceExists(mi.pszService)) CreateServiceFunction(mi.pszService, svcExIm_Group_Service);
- mi.pszName = mhExIm != HGENMENU_ROOT ? LPGEN("&Import") : LPGEN("&Import group");
+ mi.pszName = mhExIm != NULL ? LPGEN("&Import") : LPGEN("&Import group");
mi.position = 1050300;
mi.hIcon = IcoLib_GetIcon(ICO_BTN_IMPORT);
gmp.lParam=0;
@@ -494,8 +482,8 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam)
int mProtoCount = pcli->menuProtoCount;
- HGENMENU mhRoot = HGENMENU_ROOT;
- HGENMENU mhExIm = HGENMENU_ROOT;
+ HGENMENU mhRoot = NULL;
+ HGENMENU mhExIm = NULL;
// on call by hook or first start
if (!lParam || !hMenuItemAccount) {
@@ -538,7 +526,6 @@ INT_PTR RebuildAccount(WPARAM wParam, LPARAM lParam)
char* tDest = text + mir_strlen( text );
// support new genmenu style
- mi.flags = CMIF_ROOTHANDLE;
mi.hParentMenu = mhRoot;
switch (flag) {
diff --git a/plugins/Watrack/i_gui.inc b/plugins/Watrack/i_gui.inc
index 81e4c35beb..fa10a41062 100644
--- a/plugins/Watrack/i_gui.inc
+++ b/plugins/Watrack/i_gui.inc
@@ -34,7 +34,7 @@ var
mi:TCListMenuItem;
begin
FillChar(mi, sizeof(mi), 0);
- mi.szPopupName.a:=PluginShort;
+ mi.hParentMenu:=Menu_CreateRoot(MO_MAIN, 'Watrack', 0, 0, 0);
mi.hIcon :=IcoLib_GetIcon(IcoBtnEnable,0);
mi.szName.a :='Disable WATrack';
diff --git a/plugins/Watrack/lastfm/lastfm.pas b/plugins/Watrack/lastfm/lastfm.pas
index ae56647617..8cb51a855c 100644
--- a/plugins/Watrack/lastfm/lastfm.pas
+++ b/plugins/Watrack/lastfm/lastfm.pas
@@ -181,12 +181,12 @@ begin
DestroyIcon(sid.hDefaultIcon);
FillChar(mi, sizeof(mi), 0);
- mi.szPopupName.a:=PluginShort;
+ mi.hParentMenu:=Menu_CreateRoot(MO_MAIN, 'Watrack', 500050000, 0, 0);
mi.hIcon :=IcoLib_GetIcon(IcoLastFM,0);
mi.szName.a :='Disable scrobbling';
mi.pszService:=MS_WAT_LASTFM;
- mi.position :=500050000; // !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+ mi.position :=500050000;
hMenuLast:=Menu_AddMainMenuItem(@mi);
end;
diff --git a/plugins/Watrack/myshows/myshows.pas b/plugins/Watrack/myshows/myshows.pas
index e6c5c6cb21..054d9a6010 100644
--- a/plugins/Watrack/myshows/myshows.pas
+++ b/plugins/Watrack/myshows/myshows.pas
@@ -212,7 +212,7 @@ begin
DestroyIcon(sid.hDefaultIcon);
FillChar(mi, sizeof(mi), 0);
- mi.szPopupName.a:=PluginShort;
+ mi.hParentMenu:=Menu_CreateRoot(MO_MAIN, 'Watrack', 500050000, 0, 0);
mi.hIcon :=IcoLib_GetIcon(IcoMyShows,0);
mi.szName.a :='Disable scrobbling';
diff --git a/plugins/Watrack/popup/popups.pas b/plugins/Watrack/popup/popups.pas
index cd548e9e88..a75264cf7c 100644
--- a/plugins/Watrack/popup/popups.pas
+++ b/plugins/Watrack/popup/popups.pas
@@ -473,7 +473,7 @@ begin
HookEvent(ME_SKIN2_ICONSCHANGED,@IconChanged);
FillChar(mi,SizeOf(mi),0);
- mi.szPopupName.a:=PluginShort;
+ mi.hParentMenu:=Menu_CreateRoot(MO_MAIN, 'Watrack', MenuInfoPos, 0, 0);
mi.hIcon :=IcoLib_GetIcon(IcoBtnInfo,0);
mi.szName.a :='Music Info';
mi.pszService:=MS_WAT_SHOWMUSICINFO;
diff --git a/plugins/Watrack/proto/proto.pas b/plugins/Watrack/proto/proto.pas
index 2d4e488d41..25408aeba0 100644
--- a/plugins/Watrack/proto/proto.pas
+++ b/plugins/Watrack/proto/proto.pas
@@ -354,7 +354,7 @@ begin
RegisterIcons;
FillChar(mi, sizeof(mi), 0);
- mi.szPopupName.a:=PluginShort;
+ mi.hParentMenu:=Menu_CreateRoot(MO_MAIN, 'Watrack', 0, 0, 0);
mi.flags :=CMIF_NOTOFFLINE or CMIF_NOTOFFLIST;
mi.hIcon :=IcoLib_GetIcon(IcoBtnContext,0);
mi.szName.a :='Get user''s Music Info';
diff --git a/plugins/Watrack/stat/statlog.pas b/plugins/Watrack/stat/statlog.pas
index ea6b5baf54..fe5418017f 100644
--- a/plugins/Watrack/stat/statlog.pas
+++ b/plugins/Watrack/stat/statlog.pas
@@ -582,11 +582,11 @@ begin
DestroyIcon(sid.hDefaultIcon);
FillChar(mi, sizeof(mi), 0);
- mi.szPopupName.a:=PluginShort;
+ mi.hParentMenu:=Menu_CreateRoot(MO_MAIN, 'Watrack', MenuReportPos, 0, 0);
mi.hIcon :=IcoLib_GetIcon(IcoBtnReport,0);
mi.szName.a :='Create WATrack report';
mi.pszService:=MS_WAT_MAKEREPORT;
- mi.position :=MenuReportPos; // !!!!!!!!!!!!!!!!!!!!!
+ mi.position :=MenuReportPos;
hMenuReport:=Menu_AddMainMenuItem(@mi);
plStatusHook:=HookEvent(ME_WAT_NEWSTATUS,@NewPlStatus);
end;
diff --git a/plugins/Weather/src/weather_svcs.cpp b/plugins/Weather/src/weather_svcs.cpp
index b4ea9a0f6c..fbd0d965ae 100644
--- a/plugins/Weather/src/weather_svcs.cpp
+++ b/plugins/Weather/src/weather_svcs.cpp
@@ -322,8 +322,7 @@ void AddMenuItems(void)
Menu_AddContactMenuItem(&mi);
// adding main menu items
- mi.pszPopupName = LPGEN("Weather");
- // mi.popupPosition = 500099000; !!!!!!!!!!!!!!!!!!!!!
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Weather"), 500099000);
CreateServiceFunction(MS_WEATHER_ENABLED, EnableDisableCmd);
mi.pszName = LPGEN("Enable/Disable Weather Update");
@@ -348,12 +347,12 @@ void AddMenuItems(void)
Menu_AddMainMenuItem(&mi);
// only run if popup service exists
- if ( ServiceExists(MS_POPUP_ADDPOPUPT)) {
+ if (ServiceExists(MS_POPUP_ADDPOPUPT)) {
CreateServiceFunction(WEATHERPROTONAME "/PopupMenu", MenuitemNotifyCmd);
mi.pszName = LPGEN("Weather Notification");
mi.icolibItem = GetIconHandle("popup");
mi.position = 0;
- mi.pszPopupName = LPGEN("Popups");
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("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 1becb0a577..a0cb6460e7 100644
--- a/plugins/WebView/src/main.cpp
+++ b/plugins/WebView/src/main.cpp
@@ -178,8 +178,7 @@ extern "C" int __declspec(dllexport) Load()
/*DISABLE WEBVIEW*/
CreateServiceFunction("DisableWebview", AutoUpdateMCmd);
- mi.position = 20200001;
- mi.ptszPopupName = _T(MODULENAME);
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, _T(MODULENAME), 20200001);
mi.hIcon = LoadIcon(hInst, MAKEINTRESOURCE(IDI_SITE));
if (db_get_b(NULL, MODULENAME, DISABLE_AUTOUPDATE_KEY, 0))
mi.ptszName = LPGENT("Auto update disabled");
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp
index e4d8d73a5b..b47593aaeb 100644
--- a/plugins/WhenWasIt/src/WhenWasIt.cpp
+++ b/plugins/WhenWasIt/src/WhenWasIt.cpp
@@ -72,42 +72,43 @@ extern "C" int __declspec(dllexport) Load(void)
hAddBirthdayWndsList = WindowList_Create();
- CLISTMENUITEM cl = { 0 };
- cl.position = 10000000;
- cl.pszPopupName = LPGEN("Birthdays (When Was It)");
-
- cl.pszService = MS_WWI_CHECK_BIRTHDAYS;
- cl.icolibItem = hCheckMenu;
- cl.pszName = LPGEN("Check for birthdays");
- Menu_AddMainMenuItem(&cl);
-
- cl.pszService = MS_WWI_LIST_SHOW;
- cl.pszName = LPGEN("Birthday list");
- cl.icolibItem = hListMenu;
- Menu_AddMainMenuItem(&cl);
-
- cl.pszService = MS_WWI_REFRESH_USERDETAILS;
- cl.position = 10100000;
- cl.pszName = LPGEN("Refresh user details");
- cl.icolibItem = hRefreshUserDetails;
- Menu_AddMainMenuItem(&cl);
-
- cl.pszService = MS_WWI_IMPORT_BIRTHDAYS;
- cl.position = 10200000;
- cl.pszName = LPGEN("Import birthdays");
- cl.icolibItem = hImportBirthdays;
- Menu_AddMainMenuItem(&cl);
-
- cl.pszService = MS_WWI_EXPORT_BIRTHDAYS;
- cl.pszName = LPGEN("Export birthdays");
- cl.icolibItem = hExportBirthdays;
- Menu_AddMainMenuItem(&cl);
-
- cl.pszService = MS_WWI_ADD_BIRTHDAY;
- cl.position = 10000000;
- cl.icolibItem = hAddBirthdayContact;
- cl.pszName = LPGEN("Add/change user &birthday");
- Menu_AddContactMenuItem(&cl);
+ CLISTMENUITEM mi = { 0 };
+ mi.position = 10000000;
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Birthdays (When Was It)"), mi.position);
+
+ mi.pszService = MS_WWI_CHECK_BIRTHDAYS;
+ mi.icolibItem = hCheckMenu;
+ mi.pszName = LPGEN("Check for birthdays");
+ Menu_AddMainMenuItem(&mi);
+
+ mi.pszService = MS_WWI_LIST_SHOW;
+ mi.pszName = LPGEN("Birthday list");
+ mi.icolibItem = hListMenu;
+ Menu_AddMainMenuItem(&mi);
+
+ mi.pszService = MS_WWI_REFRESH_USERDETAILS;
+ mi.position = 10100000;
+ mi.pszName = LPGEN("Refresh user details");
+ mi.icolibItem = hRefreshUserDetails;
+ Menu_AddMainMenuItem(&mi);
+
+ mi.pszService = MS_WWI_IMPORT_BIRTHDAYS;
+ mi.position = 10200000;
+ mi.pszName = LPGEN("Import birthdays");
+ mi.icolibItem = hImportBirthdays;
+ Menu_AddMainMenuItem(&mi);
+
+ mi.pszService = MS_WWI_EXPORT_BIRTHDAYS;
+ mi.pszName = LPGEN("Export birthdays");
+ mi.icolibItem = hExportBirthdays;
+ Menu_AddMainMenuItem(&mi);
+
+ mi.hParentMenu = 0;
+ mi.pszService = MS_WWI_ADD_BIRTHDAY;
+ mi.position = 10000000;
+ mi.icolibItem = hAddBirthdayContact;
+ mi.pszName = LPGEN("Add/change user &birthday");
+ Menu_AddContactMenuItem(&mi);
// Register hotkeys
HOTKEYDESC hotkey = { sizeof(hotkey) };
diff --git a/plugins/WhoUsesMyFiles/src/wumfplug.cpp b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
index 3fa6e3d6dc..fe9ce91b60 100644
--- a/plugins/WhoUsesMyFiles/src/wumfplug.cpp
+++ b/plugins/WhoUsesMyFiles/src/wumfplug.cpp
@@ -493,6 +493,7 @@ extern "C" __declspec(dllexport) int Load(void)
CreateServiceFunction(MS_WUMF_CONNECTIONSSHOW, WumfShowConnections);
CLISTMENUITEM mi = { 0 };
+ mi.hParentMenu = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 1999990000);
if (WumfOptions.PopupsEnabled == FALSE) {
mi.pszName = LPGEN("Enable WUMF popups");
mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_NOPOPUP));
@@ -501,10 +502,9 @@ extern "C" __declspec(dllexport) int Load(void)
mi.pszName = LPGEN("Disable WUMF popups");
mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_POPUP));
}
+
mi.pszService = MS_WUMF_SWITCHPOPUP;
- // mi.popupPosition = 1999990000; !!!!!!!!!!!!!!!!!!!!!!!!!
- mi.pszPopupName = LPGEN("Popups");
- hMenuItem = Menu_AddMainMenuItem(&mi);
+ hMenuItem = Menu_AddMainMenuItem(&mi);
mi.pszName = LPGEN("WUMF: Show connections");
mi.hIcon = LoadIcon(hInst,MAKEINTRESOURCE(IDI_DRIVE));
diff --git a/plugins/YAMN/src/main.cpp b/plugins/YAMN/src/main.cpp
index e4520895a1..ecb739d653 100644
--- a/plugins/YAMN/src/main.cpp
+++ b/plugins/YAMN/src/main.cpp
@@ -145,7 +145,6 @@ int SystemModulesLoaded(WPARAM, LPARAM)
mi.position = 0xb0000000;
mi.icolibItem = g_GetIconHandle(0);
mi.pszName = LPGEN("Check &mail (All Account)");
- mi.pszPopupName = NULL;//YAMN_DBMODULE;
mi.pszService = MS_YAMN_FORCECHECK;
hMenuItemMain = Menu_AddMainMenuItem(&mi);
diff --git a/plugins/YAPP/src/services.cpp b/plugins/YAPP/src/services.cpp
index c314328c05..e80b50203a 100644
--- a/plugins/YAPP/src/services.cpp
+++ b/plugins/YAPP/src/services.cpp
@@ -194,7 +194,6 @@ static INT_PTR GetOpaque(WPARAM wParam, LPARAM lParam)
void UpdateMenu()
{
bool isEnabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) == 1;
-
if (isEnabled) {
Menu_ModifyItem(hMenuItem, LPGENT("Disable Popups"), IcoLib_GetIcon(ICO_POPUP_ON));
Menu_ModifyItem(hMenuRoot, NULL, IcoLib_GetIcon(ICO_POPUP_ON));
diff --git a/plugins/YAPP/src/yapp.cpp b/plugins/YAPP/src/yapp.cpp
index 323712e943..c937996dcf 100644
--- a/plugins/YAPP/src/yapp.cpp
+++ b/plugins/YAPP/src/yapp.cpp
@@ -168,18 +168,11 @@ void InitMenuItems(void)
{
bool isEnabled = db_get_b(0, "Popup", "ModuleIsEnabled", 1) == 1;
- CLISTMENUITEM mi = { 0 };
- mi.flags = CMIF_ROOTHANDLE|CMIF_TCHAR;
- mi.hParentMenu = HGENMENU_ROOT;
-
- // Build main menu
- mi.position = 500010000;
- mi.ptszName = LPGENT("Popups");
- mi.hIcon = IcoLib_GetIcon(isEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0);
- hMenuRoot = Menu_AddMainMenuItem(&mi);
+ hMenuRoot = Menu_CreateRoot(MO_MAIN, LPGENT("Popups"), 500010000, IcoLib_GetIcon(isEnabled ? ICO_POPUP_ON : ICO_POPUP_OFF, 0));
- // Add item to main menu
- mi.hParentMenu = (HGENMENU)hMenuRoot;
+ CLISTMENUITEM mi = { 0 };
+ mi.flags = CMIF_TCHAR;
+ mi.hParentMenu = hMenuRoot;
mi.hIcon = IcoLib_GetIcon(ICO_HISTORY, 0);
mi.pszService= MS_POPUP_SHOWHISTORY;
diff --git a/plugins/mRadio/i_tray.inc b/plugins/mRadio/i_tray.inc
index 4a32675903..0406bf311f 100644
--- a/plugins/mRadio/i_tray.inc
+++ b/plugins/mRadio/i_tray.inc
@@ -2,7 +2,7 @@
var
doTray:bool;
var
- trayradioparent:THANDLE;
+ trayradioparent:HGENMENU;
trayprotoh:THANDLE;
trayparent:THANDLE;
traymute :THANDLE;
@@ -91,7 +91,7 @@ begin
// build menu from sorted list
FillChar(mi,SizeOf(mi),0);
mi.Flags :=CMIF_KEEPUNTRANSLATED or CMIF_UNICODE or CMIF_ROOTHANDLE;
- mi.szPopupName:=TChar(trayparent);
+ mi.hParentMenu:=trayparent;
pc:=StrCopyE(@buf,'mRadio/Choose');
for i:=0 to trayStations.realCount-1 do
begin
@@ -146,7 +146,7 @@ begin
trayradioparent:=Menu_AddMainMenuItem(@mi);
FillChar(mi, sizeof(mi), 0);
- mi.szPopupName:=TChar(trayradioparent);
+ mi.hParentMenu:=trayradioparent;
if PluginStatus=ID_STATUS_ONLINE then
begin