diff options
author | George Hazan <george.hazan@gmail.com> | 2015-07-03 08:43:58 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-07-03 08:43:58 +0000 |
commit | 1ac5dafa951f57dfca5cf0dd6e7d2eeeea2f6772 (patch) | |
tree | 7f7adfefbd54d284072b98dc18bbd2bb26a165d4 /src/core | |
parent | 6c1c4268578dcd59fc78f2ec8336bee991213a93 (diff) |
- IDR_CONTEXT resource removed from all clists;
- all menu control rewritten using Menu_* functions, thus making group & tray menu customizable in StdClist & Clist_Nicer;
- major gdi resource leak fixed
git-svn-id: http://svn.miranda-ng.org/main/trunk@14483 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/stdclist/res/resource.rc | 29 | ||||
-rw-r--r-- | src/core/stdclist/src/clistmenus.cpp | 14 | ||||
-rw-r--r-- | src/core/stdclist/src/commonheaders.h | 2 | ||||
-rw-r--r-- | src/core/stdclist/src/init.cpp | 1 | ||||
-rw-r--r-- | src/core/stdclist/src/resource.h | 1 |
5 files changed, 1 insertions, 46 deletions
diff --git a/src/core/stdclist/res/resource.rc b/src/core/stdclist/res/resource.rc index 562231512f..29003698d6 100644 --- a/src/core/stdclist/res/resource.rc +++ b/src/core/stdclist/res/resource.rc @@ -486,35 +486,6 @@ BEGIN END
END
-IDR_CONTEXT MENU
-BEGIN
- POPUP "Tray"
- BEGIN
- MENUITEM "&Hide/Show", ID_TRAY_HIDE
- MENUITEM SEPARATOR
- MENUITEM "E&xit", ID_TRAY_EXIT
- END
- POPUP "Nowhere"
- BEGIN
- MENUITEM "&New group", POPUP_NEWGROUP
- MENUITEM SEPARATOR
- MENUITEM "&Hide offline users", POPUP_HIDEOFFLINE
- MENUITEM "Hide &offline users out here", POPUP_HIDEOFFLINEROOT
- MENUITEM "Hide &empty groups", POPUP_HIDEEMPTYGROUPS
- MENUITEM "Disable &groups", POPUP_DISABLEGROUPS
- MENUITEM SEPARATOR
- MENUITEM "Hide Miranda", POPUP_HIDEMIRANDA
- END
- POPUP "Group"
- BEGIN
- MENUITEM "&New subgroup", POPUP_NEWSUBGROUP
- MENUITEM "&Hide offline users in here", POPUP_GROUPHIDEOFFLINE
- MENUITEM SEPARATOR
- MENUITEM "&Rename group", POPUP_RENAMEGROUP
- MENUITEM "&Delete group", POPUP_DELETEGROUP
- END
-END
-
#endif // English (U.S.) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/src/core/stdclist/src/clistmenus.cpp b/src/core/stdclist/src/clistmenus.cpp index 89b4e8f7f4..312ceeec8d 100644 --- a/src/core/stdclist/src/clistmenus.cpp +++ b/src/core/stdclist/src/clistmenus.cpp @@ -24,7 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "commonheaders.h"
-INT_PTR CloseAction(WPARAM wParam, LPARAM lParam)
+static INT_PTR CloseAction(WPARAM wParam, LPARAM lParam)
{
if (CallService(MS_SYSTEM_OKTOEXIT, 0, 0))
DestroyWindow(pcli->hwndContactList);
@@ -36,15 +36,3 @@ 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 36f7a7bb33..deff5b4d14 100644 --- a/src/core/stdclist/src/commonheaders.h +++ b/src/core/stdclist/src/commonheaders.h @@ -63,5 +63,3 @@ 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 be4175b8e9..efb6a00d7c 100644 --- a/src/core/stdclist/src/init.cpp +++ b/src/core/stdclist/src/init.cpp @@ -139,7 +139,6 @@ extern "C" __declspec(dllexport) int CListInitialise() pcli->hInst = g_hInst;
pcli->pfnPaintClc = PaintClc;
pcli->pfnLoadClcOptions = LoadClcOptions;
- pcli->pfnBuildGroupPopupMenu = fnBuildGroupPopupMenu;
CreateServiceFunction(MS_CLIST_GETSTATUSMODE, GetStatusMode);
diff --git a/src/core/stdclist/src/resource.h b/src/core/stdclist/src/resource.h index 541c69b212..149f8ec214 100644 --- a/src/core/stdclist/src/resource.h +++ b/src/core/stdclist/src/resource.h @@ -3,7 +3,6 @@ // Used by resource.rc
//
#define IDD_OPT_CLIST 126
-#define IDR_CONTEXT 180
#define IDC_DROP 183
#define IDD_OPT_HOTKEY 184
#define IDR_CLISTMENU 199
|