diff options
author | MikalaiR <nikolay.romanovich@narod.ru> | 2016-04-23 13:41:08 +0000 |
---|---|---|
committer | MikalaiR <nikolay.romanovich@narod.ru> | 2016-04-23 13:41:08 +0000 |
commit | cad229b2e631c7811035ab37ea1a49736dd08f22 (patch) | |
tree | 862abf8f83fccd7540a87292cf9f964f6206c197 /protocols/VKontakte/src | |
parent | f5d6192d48ca8b3fa745cb89d74366d087bb980c (diff) |
VK: fix contacts filter
git-svn-id: http://svn.miranda-ng.org/main/trunk@16757 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src')
-rw-r--r-- | protocols/VKontakte/src/vk_dialogs.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/protocols/VKontakte/src/vk_dialogs.cpp b/protocols/VKontakte/src/vk_dialogs.cpp index fb637faa54..ed601d1a76 100644 --- a/protocols/VKontakte/src/vk_dialogs.cpp +++ b/protocols/VKontakte/src/vk_dialogs.cpp @@ -185,6 +185,7 @@ CVkGCCreateForm::CVkGCCreateForm(CVkProto *proto) : m_edtTitle(this, IDC_TITLE)
{
m_btnOk.OnClick = Callback(this, &CVkGCCreateForm::btnOk_OnOk);
+ m_clCList.OnListRebuilt = Callback(this, &CVkGCCreateForm::FilterList);
}
void CVkGCCreateForm::OnInitDialog()
@@ -194,7 +195,6 @@ void CVkGCCreateForm::OnInitDialog() m_clCList.SendMsg(CLM_SETEXSTYLE, CLS_EX_DISABLEDRAGDROP | CLS_EX_TRACKSELECT, 0);
ResetListOptions(&m_clCList);
- FilterList(&m_clCList);
}
void CVkGCCreateForm::btnOk_OnOk(CCtrlButton*)
@@ -222,16 +222,13 @@ void CVkGCCreateForm::btnOk_OnOk(CCtrlButton*) EndDialog(m_hwnd, bRes);
}
-void CVkGCCreateForm::FilterList(CCtrlClc *clCList)
+void CVkGCCreateForm::FilterList(CCtrlClc*)
{
- if (!clCList)
- return;
-
for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
char *proto = GetContactProto(hContact);
- if (mir_strcmp(proto, m_proto->m_szModuleName) || m_proto->isChatRoom(hContact))
- if (HANDLE hItem = clCList->FindContact(hContact))
- clCList->DeleteItem(hItem);
+ if (mir_strcmp(proto, m_proto->m_szModuleName) || m_proto->isChatRoom(hContact) || m_proto->getDword(hContact, "ID") == VK_FEED_USER)
+ if (HANDLE hItem = m_clCList.FindContact(hContact))
+ m_clCList.DeleteItem(hItem);
}
}
|