diff options
Diffstat (limited to 'plugins/BasicHistory/src/HistoryWindow.cpp')
-rw-r--r-- | plugins/BasicHistory/src/HistoryWindow.cpp | 17 |
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);
|