From ea68d4474bb7329a5e59e0388b88155b96f31f7c Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 1 Jun 2016 09:11:39 +0000 Subject: - view modes support incorporated into the CLIST_INTERFACE; - fix for the broken search by protocols in clist_nicer; - numerous Unicode fixes in clist_nicer; git-svn-id: http://svn.miranda-ng.org/main/trunk@16893 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/mir_app/src/clc.h | 1 + src/mir_app/src/clcitems.cpp | 8 +++++++- src/mir_app/src/clistcore.cpp | 2 ++ 3 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/mir_app/src/clc.h b/src/mir_app/src/clc.h index 1ab8c2fefb..901468a042 100644 --- a/src/mir_app/src/clc.h +++ b/src/mir_app/src/clc.h @@ -67,6 +67,7 @@ void fnRebuildEntireList(HWND hwnd, struct ClcData *dat); int fnGetGroupContentsCount(ClcGroup *group, int visibleOnly); void fnSortCLC(HWND hwnd, struct ClcData *dat, int useInsertionSort); void fnSaveStateAndRebuildList(HWND hwnd, struct ClcData *dat); +int fnGetContactHiddenStatus(MCONTACT hContact, char *szProto, ClcData *dat); /* clcmsgs.c */ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPARAM wParam, LPARAM lParam); diff --git a/src/mir_app/src/clcitems.cpp b/src/mir_app/src/clcitems.cpp index 37ddd166ee..6c15e45a43 100644 --- a/src/mir_app/src/clcitems.cpp +++ b/src/mir_app/src/clcitems.cpp @@ -336,6 +336,11 @@ void fnDeleteItemFromTree(HWND hwnd, MCONTACT hItem) else cli.pfnRemoveItemFromGroup(hwnd, group, contact, 1); } +int fnGetContactHiddenStatus(MCONTACT hContact, char*, ClcData*) +{ + return db_get_b(hContact, "CList", "Hidden", 0); +} + void fnRebuildEntireList(HWND hwnd, ClcData *dat) { DWORD style = GetWindowLongPtr(hwnd, GWL_STYLE); @@ -355,7 +360,8 @@ void fnRebuildEntireList(HWND hwnd, ClcData *dat) } for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { - if (style & CLS_SHOWHIDDEN || !db_get_b(hContact, "CList", "Hidden", 0)) { + int nHiddenStatus = cli.pfnGetContactHiddenStatus(hContact, NULL, dat); + if (((style & CLS_SHOWHIDDEN) && nHiddenStatus != -1) || !nHiddenStatus) { ClcGroup *group; ptrT tszGroupName(db_get_tsa(hContact, "CList", "Group")); if (tszGroupName == NULL) diff --git a/src/mir_app/src/clistcore.cpp b/src/mir_app/src/clistcore.cpp index 7fc033e22c..f381c3eb95 100644 --- a/src/mir_app/src/clistcore.cpp +++ b/src/mir_app/src/clistcore.cpp @@ -81,6 +81,8 @@ static INT_PTR srvRetrieveInterface(WPARAM, LPARAM) cli.pfnGetRowsPriorTo = fnGetRowsPriorTo; cli.pfnFindItem = fnFindItem; cli.pfnGetRowByIndex = fnGetRowByIndex; + cli.pfnGetContactHiddenStatus = fnGetContactHiddenStatus; + cli.pfnAddGroup = fnAddGroup; cli.pfnAddItemToGroup = fnAddItemToGroup; -- cgit v1.2.3