summaryrefslogtreecommitdiff
path: root/plugins/BasicHistory/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-27 19:17:59 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-27 19:17:59 +0000
commitec35bbd307636ded865626eb13584e4ab0b9a4af (patch)
tree24b68bfb7574a763ed5ebcfb56e5c6b86d047324 /plugins/BasicHistory/src
parent0800db775a4da41507478a02fa8cb9e58f35b0c9 (diff)
direct access to MetaContacts/IsSubcontact removed everywhere
git-svn-id: http://svn.miranda-ng.org/main/trunk@8312 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/BasicHistory/src')
-rw-r--r--plugins/BasicHistory/src/HistoryWindow.cpp17
1 files changed, 6 insertions, 11 deletions
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);