summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-06-01 16:39:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-06-01 16:39:34 +0000
commite983f96899f1103c4df3b47c5610e3dd1d81e6e0 (patch)
treec0a485c0b1bbc8bc329fb2bbc52a7228065302ad /plugins/Clist_modern
parent3dbaef0eac24e4e50b6b8f7f26be00600e75b4f1 (diff)
extended visibility control for contacts
git-svn-id: http://svn.miranda-ng.org/main/trunk@16899 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern')
-rw-r--r--plugins/Clist_modern/src/init.cpp3
-rw-r--r--plugins/Clist_modern/src/modern_clc.h1
-rw-r--r--plugins/Clist_modern/src/modern_clcitems.cpp11
3 files changed, 14 insertions, 1 deletions
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);