diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/clc.h | 1 | ||||
-rw-r--r-- | src/mir_app/src/clcitems.cpp | 8 | ||||
-rw-r--r-- | src/mir_app/src/clistcore.cpp | 2 |
3 files changed, 10 insertions, 1 deletions
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;
|