summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/BossKeyPlus/src/BossKey.cpp1
-rw-r--r--plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp175
-rw-r--r--plugins/Clist_modern/src/modern_clistmenus.cpp2
-rw-r--r--plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp176
-rw-r--r--plugins/Clist_nicer/src/clistmenus.cpp2
-rw-r--r--plugins/CrashDumper/src/crshdmp.cpp6
-rw-r--r--plugins/CyrTranslit/src/MirandaContact.cpp6
-rw-r--r--plugins/ListeningTo/src/listeningto.cpp2
-rw-r--r--plugins/MenuItemEx/src/main.cpp2
-rw-r--r--plugins/MirLua/src/m_genmenu.cpp1
-rw-r--r--plugins/NewAwaySysMod/src/AwaySys.cpp2
-rw-r--r--plugins/SecureIM/src/main.cpp2
-rw-r--r--plugins/SmileyAdd/src/main.cpp2
-rw-r--r--plugins/WhenWasIt/src/WhenWasIt.cpp21
14 files changed, 158 insertions, 242 deletions
diff --git a/plugins/BossKeyPlus/src/BossKey.cpp b/plugins/BossKeyPlus/src/BossKey.cpp
index 9ef985d950..096bb7060d 100644
--- a/plugins/BossKeyPlus/src/BossKey.cpp
+++ b/plugins/BossKeyPlus/src/BossKey.cpp
@@ -538,7 +538,6 @@ void BossKeyMenuItemInit(void) // Add menu item
CLISTMENUITEM mi = { 0 };
mi.flags = CMIF_TCHAR;
mi.position = 2000100000;
- mi.pszPopupName = 0;
mi.hIcon = IcoLib_GetIcon("hidemim");
mi.ptszName = LPGENT("Hide");
mi.pszService = MS_BOSSKEY_HIDE;
diff --git a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
index 6bb4984b54..2d1b9bf74a 100644
--- a/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp
@@ -752,7 +752,7 @@ static int CLUIFramesGetalClientFrame(void)
return -1;
}
-static HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU(*pfnAdd)(CLISTMENUITEM*))
+static HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGENMENU(*pfnAdd)(CLISTMENUITEM*))
{
//TMO_MenuItem tmi;
HGENMENU menuid;
@@ -762,12 +762,11 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, H
return NULL;
CLISTMENUITEM mi = { 0 };
- mi.pszPopupName = (char *)root;
+ mi.hParentMenu = root;
mi.popupPosition = frameid;
mi.position = popuppos++;
mi.pszName = LPGEN("&Visible");
mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED;
- mi.pszContactOwner = (char *)0;
mi.pszService = MS_CLIST_FRAMES_SHFRAME;
menuid = pfnAdd(&mi);
if (frameid == -1) _hmiVisible = menuid;
@@ -775,146 +774,114 @@ static HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, H
popuppos += 100000;
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
mi.position = popuppos++;
mi.pszName = LPGEN("&Show title");
- mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SHFRAMETITLEBAR;
- mi.pszContactOwner = (char *)0;
menuid = pfnAdd(&mi);
if (frameid == -1) _hmiTBVisible = menuid;
else g_pfwFrames[framepos].MenuHandles.MITBVisible = menuid;
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
mi.position = popuppos++;
mi.pszName = LPGEN("&Locked");
- mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_ULFRAME;
- mi.pszContactOwner = (char *)0;
menuid = pfnAdd(&mi);
if (frameid == -1) _hmiLock = menuid;
else g_pfwFrames[framepos].MenuHandles.MILock = menuid;
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
mi.position = popuppos++;
mi.pszName = LPGEN("&Expanded");
- mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_UCOLLFRAME;
- mi.pszContactOwner = (char *)0;
menuid = pfnAdd(&mi);
if (frameid == -1) _hmiColl = menuid;
else g_pfwFrames[framepos].MenuHandles.MIColl = menuid;
- //floating
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
+ // floating
mi.position = popuppos++;
mi.pszName = LPGEN("&Floating mode");
mi.flags = CMIF_CHILDPOPUP;
mi.pszService = "Set_Floating";
- mi.pszContactOwner = (char *)0;
menuid = pfnAdd(&mi);
if (frameid == -1) _hmiFloating = menuid;
else g_pfwFrames[framepos].MenuHandles.MIFloating = menuid;
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
mi.position = popuppos++;
mi.pszName = LPGEN("&Border");
mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SETUNBORDER;
- mi.pszContactOwner = (char *)0;
menuid = pfnAdd(&mi);
if (frameid == -1) _hmiBorder = menuid;
else g_pfwFrames[framepos].MenuHandles.MIBorder = menuid;
popuppos += 100000;
- {
- //alignment root
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
- mi.position = popuppos++;
- mi.pszName = LPGEN("&Align");
- mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTPOPUP;
- mi.pszService = "";
- mi.pszContactOwner = (char *)0;
- menuid = pfnAdd(&mi);
- if (frameid == -1) _hmiAlignRoot = menuid;
- else g_pfwFrames[framepos].MenuHandles.MIAlignRoot = menuid;
-
- mi.flags = CMIF_CHILDPOPUP;
- //align top
- mi.pszPopupName = (char *)menuid;
- mi.popupPosition = frameid;
- mi.position = popuppos++;
- mi.pszName = LPGEN("&Top");
- mi.pszService = CLUIFRAMESSETALIGNALTOP;
- mi.pszContactOwner = (char *)alTop;
- menuid = pfnAdd(&mi);
- if (frameid == -1) _hmiAlignTop = menuid;
- else g_pfwFrames[framepos].MenuHandles.MIAlignTop = menuid;
-
-
- //align client
- mi.position = popuppos++;
- mi.pszName = LPGEN("&Client");
- mi.pszService = CLUIFRAMESSETALIGNALCLIENT;
- mi.pszContactOwner = (char *)alClient;
- menuid = pfnAdd(&mi);
- if (frameid == -1) _hmiAlignClient = menuid;
- else g_pfwFrames[framepos].MenuHandles.MIAlignClient = menuid;
-
- //align bottom
- mi.position = popuppos++;
- mi.pszName = LPGEN("&Bottom");
- mi.pszService = CLUIFRAMESSETALIGNALBOTTOM;
- mi.pszContactOwner = (char *)alBottom;
- menuid = pfnAdd(&mi);
- if (frameid == -1) _hmiAlignBottom = menuid;
- else g_pfwFrames[framepos].MenuHandles.MIAlignBottom = menuid;
-
- }
-
- { //position
- //position root
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
- mi.position = popuppos++;
- mi.pszName = LPGEN("&Position");
- mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTPOPUP;
- mi.pszService = "";
- mi.pszContactOwner = (char *)0;
- menuid = pfnAdd(&mi);
- if (frameid == -1) _hmiPosRoot = menuid;
- else g_pfwFrames[framepos].MenuHandles.MIPosRoot = menuid;
- //??????
- mi.pszPopupName = (char *)menuid;
- mi.popupPosition = frameid;
- mi.position = popuppos++;
- mi.pszName = LPGEN("&Up");
- mi.flags = CMIF_CHILDPOPUP;
- mi.pszService = CLUIFRAMESMOVEUP;
- mi.pszContactOwner = (char *)1;
- menuid = pfnAdd(&mi);
- if (frameid == -1) _hmiPosUp = menuid;
- else g_pfwFrames[framepos].MenuHandles.MIPosUp = menuid;
-
- mi.popupPosition = frameid;
- mi.position = popuppos++;
- mi.pszName = LPGEN("&Down");
- mi.flags = CMIF_CHILDPOPUP;
- mi.pszService = CLUIFRAMESMOVEDOWN;
- mi.pszContactOwner = (char *)-1;
- menuid = pfnAdd(&mi);
- if (frameid == -1) _hmiPosDown = menuid;
- else g_pfwFrames[framepos].MenuHandles.MIPosDown = menuid;
+ // alignment root
+ mi.position = popuppos++;
+ mi.pszName = LPGEN("&Align");
+ mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTPOPUP;
+ mi.pszService = "";
+ menuid = pfnAdd(&mi);
+ if (frameid == -1) _hmiAlignRoot = menuid;
+ else g_pfwFrames[framepos].MenuHandles.MIAlignRoot = menuid;
- }
+ mi.flags = CMIF_CHILDPOPUP;
+ // align top
+ mi.hParentMenu = menuid;
+ mi.position = popuppos++;
+ mi.pszName = LPGEN("&Top");
+ mi.pszService = CLUIFRAMESSETALIGNALTOP;
+ mi.pszContactOwner = (char *)alTop;
+ menuid = pfnAdd(&mi);
+ if (frameid == -1) _hmiAlignTop = menuid;
+ else g_pfwFrames[framepos].MenuHandles.MIAlignTop = menuid;
+
+
+ // align client
+ mi.position = popuppos++;
+ mi.pszName = LPGEN("&Client");
+ mi.pszService = CLUIFRAMESSETALIGNALCLIENT;
+ mi.pszContactOwner = (char *)alClient;
+ menuid = pfnAdd(&mi);
+ if (frameid == -1) _hmiAlignClient = menuid;
+ else g_pfwFrames[framepos].MenuHandles.MIAlignClient = menuid;
+
+ // align bottom
+ mi.position = popuppos++;
+ mi.pszName = LPGEN("&Bottom");
+ mi.pszService = CLUIFRAMESSETALIGNALBOTTOM;
+ mi.pszContactOwner = (char *)alBottom;
+ menuid = pfnAdd(&mi);
+ if (frameid == -1) _hmiAlignBottom = menuid;
+ else g_pfwFrames[framepos].MenuHandles.MIAlignBottom = menuid;
+
+ // position root
+ mi.hParentMenu = root;
+ mi.position = popuppos++;
+ mi.pszName = LPGEN("&Position");
+ mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTPOPUP;
+ mi.pszService = "";
+ mi.pszContactOwner = (char *)0;
+ menuid = pfnAdd(&mi);
+ if (frameid == -1) _hmiPosRoot = menuid;
+ else g_pfwFrames[framepos].MenuHandles.MIPosRoot = menuid;
+
+ mi.hParentMenu = menuid;
+ mi.position = popuppos++;
+ mi.pszName = LPGEN("&Up");
+ mi.flags = CMIF_CHILDPOPUP;
+ mi.pszService = CLUIFRAMESMOVEUP;
+ mi.pszContactOwner = (char *)1;
+ menuid = pfnAdd(&mi);
+ if (frameid == -1) _hmiPosUp = menuid;
+ else g_pfwFrames[framepos].MenuHandles.MIPosUp = menuid;
+
+ mi.position = popuppos++;
+ mi.pszName = LPGEN("&Down");
+ mi.pszService = CLUIFRAMESMOVEDOWN;
+ mi.pszContactOwner = (char *)-1;
+ menuid = pfnAdd(&mi);
+ if (frameid == -1) _hmiPosDown = menuid;
+ else g_pfwFrames[framepos].MenuHandles.MIPosDown = menuid;
return 0;
}
@@ -1648,7 +1615,7 @@ static int CLUIFramesLoadMainMenu()
mi.ptszName = g_pfwFrames[i].TitleBar.tbname ? g_pfwFrames[i].TitleBar.tbname : g_pfwFrames[i].name;
mi.pszService = 0;
g_pfwFrames[i].MenuHandles.MainMenuItem = Menu_AddMainMenuItem(&mi);
- CLUIFramesCreateMenuForFrame(g_pfwFrames[i].id, (int)g_pfwFrames[i].MenuHandles.MainMenuItem, separator, Menu_AddMainMenuItem);
+ CLUIFramesCreateMenuForFrame(g_pfwFrames[i].id, g_pfwFrames[i].MenuHandles.MainMenuItem, separator, Menu_AddMainMenuItem);
CLUIFramesModifyMainMenuItems(g_pfwFrames[i].id, 0);
CallService(MS_CLIST_FRAMEMENUNOTIFY, (WPARAM)g_pfwFrames[i].id, (LPARAM)g_pfwFrames[i].MenuHandles.MainMenuItem);
separator++;
@@ -3564,7 +3531,7 @@ int CLUIFrameOnModulesLoad(WPARAM, LPARAM)
{
/* HOOK */
CLUIFramesLoadMainMenu();
- CLUIFramesCreateMenuForFrame(-1, -1, 000010000, Menu_AddContextFrameMenuItem);
+ CLUIFramesCreateMenuForFrame(-1, HGENMENU_ROOT, 000010000, Menu_AddContextFrameMenuItem);
return 0;
}
diff --git a/plugins/Clist_modern/src/modern_clistmenus.cpp b/plugins/Clist_modern/src/modern_clistmenus.cpp
index b2bbe07d35..f9d532d532 100644
--- a/plugins/Clist_modern/src/modern_clistmenus.cpp
+++ b/plugins/Clist_modern/src/modern_clistmenus.cpp
@@ -101,7 +101,7 @@ static int FAV_OnContactMenuBuild(WPARAM hContact, LPARAM)
CLISTMENUITEM mi = { 0 };
mi.icolibItem = iconList[bContactRate].hIcolib;
- mi.pszPopupName = (char *)-1;
+ mi.hParentMenu = HGENMENU_ROOT;
mi.position = 0;
mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR;
if (!bContactRate)
diff --git a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
index af7a4dad79..9a501b12d6 100644
--- a/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
+++ b/plugins/Clist_nicer/src/CLUIFrames/cluiframes.cpp
@@ -572,7 +572,7 @@ int CLUIFramesGetalClientFrame(void)
return -1;
}
-HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU (*pfnAdd )( CLISTMENUITEM* ))
+HMENU CLUIFramesCreateMenuForFrame(int frameid, HGENMENU root, int popuppos, HGENMENU (*pfnAdd )( CLISTMENUITEM* ))
{
HGENMENU menuid;
int framepos = id2pos(frameid);
@@ -581,182 +581,148 @@ HMENU CLUIFramesCreateMenuForFrame(int frameid, int root, int popuppos, HGENMENU
return NULL;
CLISTMENUITEM mi = { 0 };
- mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
- mi.pszPopupName = (char *)root;
mi.popupPosition = frameid;
+
+ mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_MIRANDA);
+ mi.hParentMenu = root;
mi.position = popuppos++;
mi.pszName = LPGEN("&FrameTitle");
mi.flags = CMIF_CHILDPOPUP | CMIF_GRAYED;
- mi.pszContactOwner = 0;
menuid = pfnAdd(&mi);
if (frameid == -1) contMITitle = menuid;
else Frames[framepos].MenuHandles.MITitle = menuid;
popuppos += 100000;
+
mi.hIcon = NULL;
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
mi.position = popuppos++;
mi.pszName = LPGEN("&Visible");
mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED;
- mi.pszContactOwner = 0;
mi.pszService = MS_CLIST_FRAMES_SHFRAME;
menuid = pfnAdd(&mi);
if (frameid == -1) contMIVisible = menuid;
else Frames[framepos].MenuHandles.MIVisible = menuid;
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
mi.position = popuppos++;
mi.pszName = LPGEN("&Show title bar");
mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SHFRAMETITLEBAR;
- mi.pszContactOwner = 0;
menuid = pfnAdd(&mi);
if (frameid == -1) contMITBVisible = menuid;
else Frames[framepos].MenuHandles.MITBVisible = menuid;
-
popuppos += 100000;
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
mi.position = popuppos++;
mi.pszName = LPGEN("&Locked");
mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_ULFRAME;
- mi.pszContactOwner = 0;
menuid = pfnAdd(&mi);
if (frameid == -1) contMILock = menuid;
else Frames[framepos].MenuHandles.MILock = menuid;
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
mi.position = popuppos++;
mi.pszName = LPGEN("&Collapsed");
mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_UCOLLFRAME;
- mi.pszContactOwner = 0;
menuid = pfnAdd(&mi);
if (frameid == -1) contMIColl = menuid;
else Frames[framepos].MenuHandles.MIColl = menuid;
- //floating
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
+ // floating
mi.position = popuppos++;
mi.pszName = LPGEN("&Floating mode");
mi.flags = CMIF_CHILDPOPUP;
mi.pszService = "Set_Floating";
- mi.pszContactOwner = 0;
menuid = pfnAdd(&mi);
if (frameid == -1) contMIFloating = menuid;
else Frames[framepos].MenuHandles.MIFloating = menuid;
-
popuppos += 100000;
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
mi.position = popuppos++;
mi.pszName = LPGEN("&Border");
mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SETUNBORDER;
- mi.pszContactOwner = 0;
menuid = pfnAdd(&mi);
if (frameid == -1) contMIBorder = menuid;
else Frames[framepos].MenuHandles.MIBorder = menuid;
popuppos += 100000;
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
mi.position = popuppos++;
mi.pszName = LPGEN("&Skinned frame");
mi.flags = CMIF_CHILDPOPUP | CMIF_CHECKED;
mi.pszService = MS_CLIST_FRAMES_SETSKINNED;
- mi.pszContactOwner = 0;
menuid = pfnAdd(&mi);
if (frameid == -1) contMISkinned = menuid;
else Frames[framepos].MenuHandles.MISkinned = menuid;
popuppos += 100000;
- {
- //alignment root
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
- mi.position = popuppos++;
- mi.pszName = LPGEN("&Align");
- mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTPOPUP;
- mi.pszService = "";
- mi.pszContactOwner = (char *)0;
- menuid = pfnAdd(&mi);
- if (frameid == -1) contMIAlignRoot = menuid;
- else Frames[framepos].MenuHandles.MIAlignRoot = menuid;
-
- mi.flags = CMIF_CHILDPOPUP;
- //align top
- mi.pszPopupName = (char *)menuid;
- mi.popupPosition = frameid;
- mi.position = popuppos++;
- mi.pszName = LPGEN("&Top");
- mi.pszService = CLUIFRAMESSETALIGNALTOP;
- mi.pszContactOwner = (char *)alTop;
- menuid = pfnAdd(&mi);
- if (frameid == -1) contMIAlignTop = menuid;
- else Frames[framepos].MenuHandles.MIAlignTop = menuid;
-
-
- //align client
- mi.position = popuppos++;
- mi.pszName = LPGEN("&Client");
- mi.pszService = CLUIFRAMESSETALIGNALCLIENT;
- mi.pszContactOwner = (char *)alClient;
- menuid = pfnAdd(&mi);
- if (frameid == -1) contMIAlignClient = menuid;
- else Frames[framepos].MenuHandles.MIAlignClient = menuid;
-
- //align bottom
- mi.position = popuppos++;
- mi.pszName = LPGEN("&Bottom");
- mi.pszService = CLUIFRAMESSETALIGNALBOTTOM;
- mi.pszContactOwner = (char *)alBottom;
- menuid = pfnAdd(&mi);
- if (frameid == -1) contMIAlignBottom = menuid;
- else Frames[framepos].MenuHandles.MIAlignBottom = menuid;
- }
-
- { //position
- //position root
- mi.pszPopupName = (char *)root;
- mi.popupPosition = frameid;
- mi.position = popuppos++;
- mi.pszName = LPGEN("&Position");
- mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTPOPUP;
- mi.pszService = "";
- mi.pszContactOwner = (char *)0;
- menuid = pfnAdd(&mi);
-
- mi.pszPopupName = (char *)menuid;
- mi.popupPosition = frameid;
- mi.position = popuppos++;
- mi.pszName = LPGEN("&Up");
- mi.flags = CMIF_CHILDPOPUP;
- mi.pszService = CLUIFRAMESMOVEUP;
- mi.pszContactOwner = (char *)1;
- pfnAdd(&mi);
-
- mi.pszPopupName = (char *)menuid;
- mi.popupPosition = frameid;
- mi.position = popuppos++;
- mi.pszName = LPGEN("&Down");
- mi.flags = CMIF_CHILDPOPUP;
- mi.pszService = CLUIFRAMESMOVEDOWN;
- mi.pszContactOwner = (char *) - 1;
- pfnAdd(&mi);
- }
+ // alignment root
+ mi.hParentMenu = root;
+ mi.position = popuppos++;
+ mi.pszName = LPGEN("&Align");
+ mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTPOPUP;
+ mi.pszService = "";
+ menuid = pfnAdd(&mi);
+ if (frameid == -1) contMIAlignRoot = menuid;
+ else Frames[framepos].MenuHandles.MIAlignRoot = menuid;
+
+ mi.flags = CMIF_CHILDPOPUP;
+ // align top
+ mi.hParentMenu = menuid;
+ mi.position = popuppos++;
+ mi.pszName = LPGEN("&Top");
+ mi.pszService = CLUIFRAMESSETALIGNALTOP;
+ mi.pszContactOwner = (char *)alTop;
+ menuid = pfnAdd(&mi);
+ if (frameid == -1) contMIAlignTop = menuid;
+ else Frames[framepos].MenuHandles.MIAlignTop = menuid;
+
+ // align client
+ mi.position = popuppos++;
+ mi.pszName = LPGEN("&Client");
+ mi.pszService = CLUIFRAMESSETALIGNALCLIENT;
+ mi.pszContactOwner = (char *)alClient;
+ menuid = pfnAdd(&mi);
+ if (frameid == -1) contMIAlignClient = menuid;
+ else Frames[framepos].MenuHandles.MIAlignClient = menuid;
+
+ // align bottom
+ mi.position = popuppos++;
+ mi.pszName = LPGEN("&Bottom");
+ mi.pszService = CLUIFRAMESSETALIGNALBOTTOM;
+ mi.pszContactOwner = (char *)alBottom;
+ menuid = pfnAdd(&mi);
+ if (frameid == -1) contMIAlignBottom = menuid;
+ else Frames[framepos].MenuHandles.MIAlignBottom = menuid;
+ // position root
+ mi.hParentMenu = root;
+ mi.popupPosition = frameid;
+ mi.position = popuppos++;
+ mi.pszName = LPGEN("&Position");
+ mi.flags = CMIF_CHILDPOPUP | CMIF_ROOTPOPUP;
+ mi.pszService = "";
+ mi.pszContactOwner = (char *)0;
+ menuid = pfnAdd(&mi);
+
+ mi.hParentMenu = menuid;
+ mi.position = popuppos++;
+ mi.pszName = LPGEN("&Up");
+ mi.flags = CMIF_CHILDPOPUP;
+ mi.pszService = CLUIFRAMESMOVEUP;
+ mi.pszContactOwner = (char *)1;
+ pfnAdd(&mi);
+
+ mi.position = popuppos++;
+ mi.pszName = LPGEN("&Down");
+ mi.flags = CMIF_CHILDPOPUP;
+ mi.pszService = CLUIFRAMESMOVEDOWN;
+ mi.pszContactOwner = (char *)-1;
+ pfnAdd(&mi);
return 0;
}
@@ -1480,7 +1446,7 @@ static int CLUIFramesLoadMainMenu()
mi.icolibItem = Skin_GetIconHandle(SKINICON_OTHER_FRAME);
mi.flags = CMIF_ROOTHANDLE;
mi.position = 3000090000;
- mi.pszPopupName = (char*)-1;
+ mi.hParentMenu = HGENMENU_ROOT;
mi.pszName = LPGEN("Frames");
mi.pszService = 0;
MainMIRoot = Menu_AddMainMenuItem(&mi);
@@ -1495,7 +1461,7 @@ static int CLUIFramesLoadMainMenu()
mi.ptszName = Frames[i].TitleBar.tbname ? Frames[i].TitleBar.tbname : Frames[i].name;
mi.pszService = 0;
Frames[i].MenuHandles.MainMenuItem = Menu_AddMainMenuItem(&mi);
- CLUIFramesCreateMenuForFrame(Frames[i].id, (int)Frames[i].MenuHandles.MainMenuItem, separator, Menu_AddMainMenuItem);
+ CLUIFramesCreateMenuForFrame(Frames[i].id, Frames[i].MenuHandles.MainMenuItem, separator, Menu_AddMainMenuItem);
CLUIFramesModifyMainMenuItems(Frames[i].id, 0);
//NotifyEventHooks(hPreBuildFrameMenuEvent,i,(LPARAM)Frames[i].MenuHandles.MainMenuItem);
CallService(MS_CLIST_FRAMEMENUNOTIFY, (WPARAM)Frames[i].id, (LPARAM)Frames[i].MenuHandles.MainMenuItem);
@@ -3089,7 +3055,7 @@ static int CLUIFrameOnModulesLoad(WPARAM, LPARAM)
hThreadMFUpdate = mir_forkthread(MF_UpdateThread, NULL);
SetThreadPriority(hThreadMFUpdate, THREAD_PRIORITY_IDLE);
CLUIFramesLoadMainMenu();
- CLUIFramesCreateMenuForFrame(-1, -1, 000010000, Menu_AddContextFrameMenuItem);
+ CLUIFramesCreateMenuForFrame(-1, HGENMENU_ROOT, 000010000, Menu_AddContextFrameMenuItem);
return 0;
}
diff --git a/plugins/Clist_nicer/src/clistmenus.cpp b/plugins/Clist_nicer/src/clistmenus.cpp
index e9d4461e99..d0b08d00d2 100644
--- a/plugins/Clist_nicer/src/clistmenus.cpp
+++ b/plugins/Clist_nicer/src/clistmenus.cpp
@@ -383,7 +383,7 @@ int InitCustomMenus(void)
CLISTMENUITEM mi = { 0 };
mi.position = 200000;
- mi.pszPopupName = (char *)-1;
+ 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 b7ce54db1b..1362e43908 100644
--- a/plugins/CrashDumper/src/crshdmp.cpp
+++ b/plugins/CrashDumper/src/crshdmp.cpp
@@ -261,11 +261,11 @@ static int ModulesLoaded(WPARAM, LPARAM)
mi.flags = CMIF_ROOTPOPUP | CMIF_TCHAR;
mi.icolibItem = GetIconHandle(IDI_VI);
mi.ptszName = LPGENT("Version Information");
- mi.pszPopupName = (char *)-1;
- HANDLE hMenuRoot = Menu_AddMainMenuItem(&mi);
+ mi.hParentMenu = HGENMENU_ROOT;
+ HGENMENU hMenuRoot = Menu_AddMainMenuItem(&mi);
mi.flags = CMIF_CHILDPOPUP | CMIF_TCHAR;
- mi.pszPopupName = (char *)hMenuRoot;
+ mi.hParentMenu = hMenuRoot;
mi.popupPosition = 0;
mi.position = 2000089995;
diff --git a/plugins/CyrTranslit/src/MirandaContact.cpp b/plugins/CyrTranslit/src/MirandaContact.cpp
index d7b32a9f8a..358b313ba6 100644
--- a/plugins/CyrTranslit/src/MirandaContact.cpp
+++ b/plugins/CyrTranslit/src/MirandaContact.cpp
@@ -65,14 +65,8 @@ void MirandaContact::addMenuItem()
{
CLISTMENUITEM mi = { 0 };
mi.pszName = MENU_ITEM_TEXT;
- mi.flags = 0;
mi.position = 65535;
- mi.hIcon = NULL;
mi.pszService = MENU_COMMAND_CALLBACK_SERVICE;
- mi.pszPopupName = NULL;
- mi.popupPosition = 0;
- mi.hotKey = 0;
- mi.pszContactOwner = NULL;
hTransliterateCmdMenuItem = Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/ListeningTo/src/listeningto.cpp b/plugins/ListeningTo/src/listeningto.cpp
index 875c4e11e6..95ccdbc1d3 100644
--- a/plugins/ListeningTo/src/listeningto.cpp
+++ b/plugins/ListeningTo/src/listeningto.cpp
@@ -195,7 +195,7 @@ void RebuildMenu()
CLISTMENUITEM mi = { 0 };
mi.position = 100000 + i;
- mi.pszPopupName = (char *) hMainMenuGroup;
+ mi.hParentMenu = hMainMenuGroup;
mi.popupPosition = 500080000 + i;
mi.pszService = MS_LISTENINGTO_MAINMENU;
mi.ptszName = text;
diff --git a/plugins/MenuItemEx/src/main.cpp b/plugins/MenuItemEx/src/main.cpp
index 1693a1490c..532736da54 100644
--- a/plugins/MenuItemEx/src/main.cpp
+++ b/plugins/MenuItemEx/src/main.cpp
@@ -992,7 +992,7 @@ static int PluginInit(WPARAM, LPARAM)
hmenuHide = Menu_AddContactMenuItem(&mi);
mi.position++;
- mi.pszPopupName = (char*)-1; // for Miranda 0.7
+ mi.hParentMenu = HGENMENU_ROOT;
mi.ptszName = LPGENT("Ignore");
mi.pszService = 0;
mi.flags |= CMIF_ROOTHANDLE;
diff --git a/plugins/MirLua/src/m_genmenu.cpp b/plugins/MirLua/src/m_genmenu.cpp
index 4f1162ba9b..63339b53b5 100644
--- a/plugins/MirLua/src/m_genmenu.cpp
+++ b/plugins/MirLua/src/m_genmenu.cpp
@@ -3,7 +3,6 @@
static CLISTMENUITEM* MakeMenuItem(lua_State *L)
{
CLISTMENUITEM *pmi = (CLISTMENUITEM*)mir_calloc(sizeof(CLISTMENUITEM));
- pmi->cbSize = sizeof(CLISTMENUITEM);
pmi->hLangpack = hScriptsLangpack;
lua_pushstring(L, "Flags");
diff --git a/plugins/NewAwaySysMod/src/AwaySys.cpp b/plugins/NewAwaySysMod/src/AwaySys.cpp
index e6c8f32234..8fe18b2ebe 100644
--- a/plugins/NewAwaySysMod/src/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/src/AwaySys.cpp
@@ -650,7 +650,7 @@ int MirandaLoaded(WPARAM, LPARAM)
memset(&mi, 0, sizeof(mi));
mi.flags = CMIF_TCHAR | CMIF_ROOTPOPUP;
mi.hIcon = NULL;
- mi.pszPopupName = (char*)-1;
+ mi.hParentMenu = HGENMENU_ROOT;
mi.position = 1000020000;
mi.ptszName = LPGENT("Autoreply");
g_hToggleSOEContactMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/SecureIM/src/main.cpp b/plugins/SecureIM/src/main.cpp
index 085870dd16..5f1eb6be5b 100644
--- a/plugins/SecureIM/src/main.cpp
+++ b/plugins/SecureIM/src/main.cpp
@@ -43,7 +43,7 @@ static HGENMENU AddMenuItem(LPCSTR name, int pos, HICON hicon, LPCSTR service, i
mi.position = pos;
mi.hIcon = hicon;
mi.pszName = (char*)name;
- mi.pszPopupName = (char*)-1;
+ mi.hParentMenu = HGENMENU_ROOT;
mi.pszService = (char*)service;
return Menu_AddContactMenuItem(&mi);
}
diff --git a/plugins/SmileyAdd/src/main.cpp b/plugins/SmileyAdd/src/main.cpp
index 27d071f390..b658a5333d 100644
--- a/plugins/SmileyAdd/src/main.cpp
+++ b/plugins/SmileyAdd/src/main.cpp
@@ -55,7 +55,7 @@ static int ModulesLoaded(WPARAM, LPARAM)
mi.popupPosition = 2000070050;
mi.position = 2000070050;
mi.icolibItem = icon.hIcolib;
- mi.pszPopupName = (char*)-1;
+ mi.hParentMenu = HGENMENU_ROOT;
mi.pszName = LPGEN("Assign smiley category");
hContactMenuItem = Menu_AddContactMenuItem(&mi);
diff --git a/plugins/WhenWasIt/src/WhenWasIt.cpp b/plugins/WhenWasIt/src/WhenWasIt.cpp
index f3b4f8d1d3..e4d8d73a5b 100644
--- a/plugins/WhenWasIt/src/WhenWasIt.cpp
+++ b/plugins/WhenWasIt/src/WhenWasIt.cpp
@@ -27,14 +27,6 @@ HWND hUpcomingDlg = NULL;
MWindowList hAddBirthdayWndsList = NULL;
int hLangpack;
-HANDLE hmCheckBirthdays = NULL;
-HANDLE hmBirthdayList = NULL;
-HANDLE hmRefreshDetails = NULL;
-HANDLE hmAddChangeBirthday = NULL;
-HANDLE hmImportBirthdays = NULL;
-HANDLE hmExportBirthdays = NULL;
-
-
CommonData commonData = { 0 };
CLIST_INTERFACE *pcli;
@@ -87,35 +79,35 @@ extern "C" int __declspec(dllexport) Load(void)
cl.pszService = MS_WWI_CHECK_BIRTHDAYS;
cl.icolibItem = hCheckMenu;
cl.pszName = LPGEN("Check for birthdays");
- hmCheckBirthdays = Menu_AddMainMenuItem(&cl);
+ Menu_AddMainMenuItem(&cl);
cl.pszService = MS_WWI_LIST_SHOW;
cl.pszName = LPGEN("Birthday list");
cl.icolibItem = hListMenu;
- hmBirthdayList = Menu_AddMainMenuItem(&cl);
+ Menu_AddMainMenuItem(&cl);
cl.pszService = MS_WWI_REFRESH_USERDETAILS;
cl.position = 10100000;
cl.pszName = LPGEN("Refresh user details");
cl.icolibItem = hRefreshUserDetails;
- hmRefreshDetails = Menu_AddMainMenuItem(&cl);
+ Menu_AddMainMenuItem(&cl);
cl.pszService = MS_WWI_IMPORT_BIRTHDAYS;
cl.position = 10200000;
cl.pszName = LPGEN("Import birthdays");
cl.icolibItem = hImportBirthdays;
- hmImportBirthdays = Menu_AddMainMenuItem(&cl);
+ Menu_AddMainMenuItem(&cl);
cl.pszService = MS_WWI_EXPORT_BIRTHDAYS;
cl.pszName = LPGEN("Export birthdays");
cl.icolibItem = hExportBirthdays;
- hmExportBirthdays = Menu_AddMainMenuItem(&cl);
+ Menu_AddMainMenuItem(&cl);
cl.pszService = MS_WWI_ADD_BIRTHDAY;
cl.position = 10000000;
cl.icolibItem = hAddBirthdayContact;
cl.pszName = LPGEN("Add/change user &birthday");
- hmAddChangeBirthday = Menu_AddContactMenuItem(&cl);
+ Menu_AddContactMenuItem(&cl);
// Register hotkeys
HOTKEYDESC hotkey = { sizeof(hotkey) };
@@ -131,7 +123,6 @@ extern "C" int __declspec(dllexport) Load(void)
hotkey.pszService = MS_WWI_CHECK_BIRTHDAYS;
Hotkey_Register(&hotkey);
-
SkinAddNewSoundExT(BIRTHDAY_NEAR_SOUND, LPGENT("WhenWasIt"), LPGENT("Birthday near"));
SkinAddNewSoundExT(BIRTHDAY_TODAY_SOUND, LPGENT("WhenWasIt"), LPGENT("Birthday today"));