From ec35bbd307636ded865626eb13584e4ab0b9a4af Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 27 Feb 2014 19:17:59 +0000 Subject: direct access to MetaContacts/IsSubcontact removed everywhere git-svn-id: http://svn.miranda-ng.org/main/trunk@8312 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/BasicHistory/src/HistoryWindow.cpp | 17 ++++++----------- 1 file changed, 6 insertions(+), 11 deletions(-) (limited to 'plugins/BasicHistory') diff --git a/plugins/BasicHistory/src/HistoryWindow.cpp b/plugins/BasicHistory/src/HistoryWindow.cpp index 19b39af3bf..4236372df8 100644 --- a/plugins/BasicHistory/src/HistoryWindow.cpp +++ b/plugins/BasicHistory/src/HistoryWindow.cpp @@ -1634,28 +1634,23 @@ void HistoryWindow::EnableWindows(BOOL enable) void HistoryWindow::ReloadContacts() { HWND contactList = GetDlgItem(hWnd,IDC_LIST_CONTACTS); - if (EventList::GetContactMessageNumber(NULL)) - { - if (hSystem == NULL) - { - CLCINFOITEM cii = { 0 }; - cii.cbSize = sizeof(cii); + if (EventList::GetContactMessageNumber(NULL)) { + if (hSystem == NULL) { + CLCINFOITEM cii = { sizeof(cii) }; cii.flags = CLCIIF_GROUPFONT | CLCIIF_BELOWCONTACTS; cii.pszText = TranslateT("System"); hSystem = (MCONTACT)SendMessage(contactList, CLM_ADDINFOITEM, 0, (LPARAM) & cii); } } - else - { - if (hSystem != NULL) - { + else { + if (hSystem != NULL) { SendMessage(contactList, CLM_DELETEITEM, (WPARAM)hSystem, 0); hSystem = NULL; } } for (MCONTACT _hContact = db_find_first(); _hContact; _hContact = db_find_next(_hContact)) { - if (EventList::GetContactMessageNumber(_hContact) && (metaContactProto == NULL || db_get_b(_hContact, metaContactProto, "IsSubcontact", 0) == 0)) { + if (EventList::GetContactMessageNumber(_hContact) && (metaContactProto == NULL || !db_mc_isSub(_hContact))) { HANDLE hItem = (HANDLE)SendMessage(contactList, CLM_FINDCONTACT, (WPARAM)_hContact, 0); if (hItem == NULL) SendMessage(contactList, CLM_ADDCONTACT, (WPARAM)_hContact, 0); -- cgit v1.2.3