From db10ee4ebb7f047c72f70828c89c95d62ee482cd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 27 May 2016 10:08:00 +0000 Subject: - fixes #1242 (for subgroups) git-svn-id: http://svn.miranda-ng.org/main/trunk@16874 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_clc.cpp | 16 +++------------- 1 file changed, 3 insertions(+), 13 deletions(-) (limited to 'plugins/Clist_modern/src') diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 61a07f0e63..b4fdd72147 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -326,21 +326,11 @@ static LRESULT clcOnCommand(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM { ClcContact *contact; int hit = pcli->pfnGetRowByIndex(dat, dat->selection, &contact, NULL); - if (hit != -1) { + if (hit != -1 && contact->type == CLCIT_GROUP) { switch (LOWORD(wParam)) { - case POPUP_NEWSUBGROUP: - if (contact->type == CLCIT_GROUP) { - SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) & ~CLS_HIDEEMPTYGROUPS); - SetWindowLongPtr(hwnd, GWL_STYLE, GetWindowLongPtr(hwnd, GWL_STYLE) | CLS_USEGROUPS); - Clist_GroupCreate(contact->groupId, 0); - } - return 0; - case POPUP_GROUPSHOWOFFLINE: - if (contact->type == CLCIT_GROUP) { - Clist_GroupSetFlags(contact->groupId, MAKELPARAM(CLCItems_IsShowOfflineGroup(contact->group) ? 0 : GROUPF_SHOWOFFLINE, GROUPF_SHOWOFFLINE)); - pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0); - } + Clist_GroupSetFlags(contact->groupId, MAKELPARAM(CLCItems_IsShowOfflineGroup(contact->group) ? 0 : GROUPF_SHOWOFFLINE, GROUPF_SHOWOFFLINE)); + pcli->pfnClcBroadcast(CLM_AUTOREBUILD, 0, 0); return 0; } } -- cgit v1.2.3