From e983f96899f1103c4df3b47c5610e3dd1d81e6e0 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 1 Jun 2016 16:39:34 +0000 Subject: extended visibility control for contacts git-svn-id: http://svn.miranda-ng.org/main/trunk@16899 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/init.cpp | 3 ++- plugins/Clist_modern/src/modern_clc.h | 1 + plugins/Clist_modern/src/modern_clcitems.cpp | 11 +++++++++++ 3 files changed, 14 insertions(+), 1 deletion(-) (limited to 'plugins/Clist_modern') diff --git a/plugins/Clist_modern/src/init.cpp b/plugins/Clist_modern/src/init.cpp index 182a0129b2..72b297c2bc 100644 --- a/plugins/Clist_modern/src/init.cpp +++ b/plugins/Clist_modern/src/init.cpp @@ -157,6 +157,7 @@ static HRESULT SubclassClistInterface() pcli->pfnOnCreateClc = CLUI::cliOnCreateClc; pcli->pfnPaintClc = CLCPaint::cliPaintClc; pcli->pfnRebuildEntireList = cliRebuildEntireList; + pcli->pfnIsVisibleContact = cliIsVisibleContact; pcli->pfnRecalcScrollBar = cliRecalcScrollBar; pcli->pfnRowHitTest = cliRowHitTest; pcli->pfnScrollTo = cliScrollTo; @@ -171,7 +172,7 @@ static HRESULT SubclassClistInterface() pcli->pfnFindRowByText = cliFindRowByText; pcli->pfnGetContactHiddenStatus = CLVM_GetContactHiddenStatus; - //partialy overloaded - call default handlers from inside + // partialy overloaded - call default handlers from inside pcli->pfnGetContactIcon = cli_GetContactIcon; pcli->pfnIconFromStatusMode = cli_IconFromStatusMode; pcli->pfnLoadCluiGlobalOpts = CLUI_cli_LoadCluiGlobalOpts; diff --git a/plugins/Clist_modern/src/modern_clc.h b/plugins/Clist_modern/src/modern_clc.h index 03e05d44b6..a895e46231 100644 --- a/plugins/Clist_modern/src/modern_clc.h +++ b/plugins/Clist_modern/src/modern_clc.h @@ -346,6 +346,7 @@ int cliGetRowByIndex(ClcData *dat, int testindex, ClcContact **contact, ClcGrou // clcitems.c ClcContact* cli_AddContactToGroup(ClcData *dat, ClcGroup *group, MCONTACT hContact); +int cliIsVisibleContact(ClcCacheEntry *pce, ClcGroup *group); void cliRebuildEntireList(HWND hwnd, ClcData *dat); void cli_AddContactToTree(HWND hwnd, ClcData *dat, MCONTACT hContact, int updateTotalCount, int checkHideOffline); void cli_SortCLC(HWND hwnd, ClcData *dat, int useInsertionSort); diff --git a/plugins/Clist_modern/src/modern_clcitems.cpp b/plugins/Clist_modern/src/modern_clcitems.cpp index 9340e05877..889effd163 100644 --- a/plugins/Clist_modern/src/modern_clcitems.cpp +++ b/plugins/Clist_modern/src/modern_clcitems.cpp @@ -228,6 +228,17 @@ int RestoreSelection(ClcData *dat, MCONTACT hSelected) return dat->selection; } +int cliIsVisibleContact(ClcCacheEntry *pce, ClcGroup *group) +{ + if (pce->m_bNoHiddenOffline) + return true; + + if (CLCItems_IsShowOfflineGroup(group)) + return true; + + return false; +} + void cliRebuildEntireList(HWND hwnd, ClcData *dat) { KillTimer(hwnd, TIMERID_REBUILDAFTER); -- cgit v1.2.3