diff options
author | George Hazan <george.hazan@gmail.com> | 2015-06-26 22:03:02 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-06-26 22:03:02 +0000 |
commit | be616d81bdaf8fd4ae61b0a145fb81bbdf467994 (patch) | |
tree | c0d4798a8e882583f74eb166508e0f4ce96bd4e4 /plugins/Clist_modern | |
parent | c89c550677f40d8b2010de442053cba81ba06d96 (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/Clist_modern')
-rw-r--r-- | plugins/Clist_modern/src/CLUIFrames/cluiframes.cpp | 29 | ||||
-rw-r--r-- | plugins/Clist_modern/src/CLUIFrames/groupmenu.cpp | 5 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clistmenus.cpp | 10 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clisttray.cpp | 2 |
4 files changed, 20 insertions, 26 deletions
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 };
|