diff options
author | George Hazan <george.hazan@gmail.com> | 2016-06-01 16:39:34 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-06-01 16:39:34 +0000 |
commit | e983f96899f1103c4df3b47c5610e3dd1d81e6e0 (patch) | |
tree | c0a485c0b1bbc8bc329fb2bbc52a7228065302ad /src | |
parent | 3dbaef0eac24e4e50b6b8f7f26be00600e75b4f1 (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 'src')
-rw-r--r-- | src/mir_app/src/clcitems.cpp | 6 | ||||
-rw-r--r-- | src/mir_app/src/clistcore.cpp | 6 |
2 files changed, 10 insertions, 2 deletions
diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp index 6c15e45a43..407346a86a 100644 --- a/src/mir_app/src/clcitems.cpp +++ b/src/mir_app/src/clcitems.cpp @@ -362,6 +362,8 @@ void fnRebuildEntireList(HWND hwnd, ClcData *dat) for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { int nHiddenStatus = cli.pfnGetContactHiddenStatus(hContact, NULL, dat); if (((style & CLS_SHOWHIDDEN) && nHiddenStatus != -1) || !nHiddenStatus) { + ClcCacheEntry *pce = cli.pfnGetCacheEntry(hContact); + ClcGroup *group; ptrT tszGroupName(db_get_tsa(hContact, "CList", "Group")); if (tszGroupName == NULL) @@ -386,10 +388,10 @@ void fnRebuildEntireList(HWND hwnd, ClcData *dat) else if (!(style & CLS_NOHIDEOFFLINE) && (style & CLS_HIDEOFFLINE || group->hideOffline)) { char *szProto = GetContactProto(hContact); if (szProto == NULL) { - if (!cli.pfnIsHiddenMode(dat, ID_STATUS_OFFLINE)) + if (!cli.pfnIsHiddenMode(dat, ID_STATUS_OFFLINE) || cli.pfnIsVisibleContact(pce, group)) cli.pfnAddContactToGroup(dat, group, hContact); } - else if (!cli.pfnIsHiddenMode(dat, db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE))) + else if (!cli.pfnIsHiddenMode(dat, db_get_w(hContact, szProto, "Status", ID_STATUS_OFFLINE)) || cli.pfnIsVisibleContact(pce, group)) cli.pfnAddContactToGroup(dat, group, hContact); } else cli.pfnAddContactToGroup(dat, group, hContact); diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp index f381c3eb95..d34baadf52 100644 --- a/src/mir_app/src/clistcore.cpp +++ b/src/mir_app/src/clistcore.cpp @@ -55,6 +55,11 @@ static void fnOnCreateClc(void) {
}
+static int fnIsVisibleContact(ClcCacheEntry*, ClcGroup*)
+{
+ return false;
+}
+
static void fnReloadProtoMenus(void)
{
RebuildMenuOrder();
@@ -118,6 +123,7 @@ static INT_PTR srvRetrieveInterface(WPARAM, LPARAM) cli.pfnGetDropTargetInformation = fnGetDropTargetInformation;
cli.pfnClcStatusToPf2 = fnClcStatusToPf2;
cli.pfnIsHiddenMode = fnIsHiddenMode;
+ cli.pfnIsVisibleContact = fnIsVisibleContact;
cli.pfnHideInfoTip = fnHideInfoTip;
cli.pfnNotifyNewContact = fnNotifyNewContact;
cli.pfnGetDefaultExStyle = fnGetDefaultExStyle;
|