From 209e1040e34c50e424a7aa0a7c860c7fc279a76f Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 2 Jul 2015 19:04:21 +0000 Subject: group menu services moved to core git-svn-id: http://svn.miranda-ng.org/main/trunk@14472 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/core/stdclist/src/clistmenus.cpp | 12 ++++++++++++ src/core/stdclist/src/commonheaders.h | 2 ++ src/core/stdclist/src/init.cpp | 1 + 3 files changed, 15 insertions(+) (limited to 'src/core') diff --git a/src/core/stdclist/src/clistmenus.cpp b/src/core/stdclist/src/clistmenus.cpp index 3903953df5..89b4e8f7f4 100644 --- a/src/core/stdclist/src/clistmenus.cpp +++ b/src/core/stdclist/src/clistmenus.cpp @@ -36,3 +36,15 @@ void InitCustomMenus() { CreateServiceFunction("CloseAction", CloseAction); } + +HMENU fnBuildGroupPopupMenu(ClcGroup *group) +{ + HMENU hMenu = LoadMenu(pcli->hInst, MAKEINTRESOURCE(IDR_CONTEXT)); + HMENU hGroupMenu = GetSubMenu(hMenu, 2); + RemoveMenu(hMenu, 2, MF_BYPOSITION); + DestroyMenu(hMenu); + TranslateMenu(hGroupMenu); + + CheckMenuItem(hGroupMenu, POPUP_GROUPHIDEOFFLINE, group->hideOffline ? MF_CHECKED : MF_UNCHECKED); + return hGroupMenu; +} diff --git a/src/core/stdclist/src/commonheaders.h b/src/core/stdclist/src/commonheaders.h index deff5b4d14..36f7a7bb33 100644 --- a/src/core/stdclist/src/commonheaders.h +++ b/src/core/stdclist/src/commonheaders.h @@ -63,3 +63,5 @@ extern HINSTANCE g_hInst; extern CLIST_INTERFACE coreCli; void LoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst); + +HMENU fnBuildGroupPopupMenu(ClcGroup *group); diff --git a/src/core/stdclist/src/init.cpp b/src/core/stdclist/src/init.cpp index efb6a00d7c..be4175b8e9 100644 --- a/src/core/stdclist/src/init.cpp +++ b/src/core/stdclist/src/init.cpp @@ -139,6 +139,7 @@ extern "C" __declspec(dllexport) int CListInitialise() pcli->hInst = g_hInst; pcli->pfnPaintClc = PaintClc; pcli->pfnLoadClcOptions = LoadClcOptions; + pcli->pfnBuildGroupPopupMenu = fnBuildGroupPopupMenu; CreateServiceFunction(MS_CLIST_GETSTATUSMODE, GetStatusMode); -- cgit v1.2.3