summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src/contact.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-04-26 14:54:58 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-04-26 14:54:58 +0000
commit2105de2e1be94d18a1cb5dfd6afcc33a788bc640 (patch)
treeb3685df860dc3fb265974d0cfb33ed9cabbcd36e /plugins/Clist_nicer/src/contact.cpp
parent14b3e00732b7f8b23c3e194815a9a0d3a6f2723f (diff)
R.I.P m_clui.h, you helped us alot
git-svn-id: http://svn.miranda-ng.org/main/trunk@16767 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src/contact.cpp')
-rw-r--r--plugins/Clist_nicer/src/contact.cpp27
1 files changed, 5 insertions, 22 deletions
diff --git a/plugins/Clist_nicer/src/contact.cpp b/plugins/Clist_nicer/src/contact.cpp
index 26dc01f498..382ae75e70 100644
--- a/plugins/Clist_nicer/src/contact.cpp
+++ b/plugins/Clist_nicer/src/contact.cpp
@@ -124,31 +124,14 @@ void MF_UpdateThread(LPVOID)
CloseHandle(hEvent);
}
-void LoadContactTree(void)
+void MF_InitCheck(void)
{
- int i, status, hideOffline;
BYTE bMsgFrequency = cfg::getByte("CList", "fhistdata", 0);
-
- CallService(MS_CLUI_LISTBEGINREBUILD, 0, 0);
- for (i = 1;; i++) {
- if (Clist_GroupGetName(i, NULL) == NULL)
- break;
- CallService(MS_CLUI_GROUPADDED, i, 0);
- }
-
- hideOffline = cfg::getByte("CList", "HideOffline", SETTING_HIDEOFFLINE_DEFAULT);
-
- for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- status = GetContactStatus(hContact);
- if ((!hideOffline || status != ID_STATUS_OFFLINE) && !CLVM_GetContactHiddenStatus(hContact, NULL, NULL))
- pcli->pfnChangeContactIcon(hContact, IconFromStatusMode(GetContactProto(hContact), status, hContact, NULL));
-
- // build initial data for message frequency
- if (!bMsgFrequency)
+ if (!bMsgFrequency) {
+ for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact))
MF_CalcFrequency(hContact, 100, 0);
+ cfg::writeByte("CList", "fhistdata", 1);
}
- cfg::writeByte("CList", "fhistdata", 1);
- CallService(MS_CLUI_LISTENDREBUILD, 0, 0);
}
DWORD INTSORT_GetLastMsgTime(MCONTACT hContact)
@@ -281,6 +264,6 @@ int SetHideOffline(WPARAM wParam, LPARAM)
}
SetButtonStates();
ClcSetButtonState(IDC_TBHIDEOFFLINE, newVal);
- LoadContactTree();
+ pcli->pfnLoadContactTree();
return 0;
}