summaryrefslogtreecommitdiff
path: root/plugins/MirandaG15/src/CContactList.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-02-21 19:53:10 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-02-21 19:53:10 +0000
commit7f142a51cd32e024a1fd9d95b1311542febaf179 (patch)
treea5432ea92bc2ea821110a7875af6c626c642f8b4 /plugins/MirandaG15/src/CContactList.cpp
parent40318351c43f59747b2b22db47a2f6db78ca9878 (diff)
Attempt to make MirandaG15 work with IRC and other groupchats
git-svn-id: http://svn.miranda-ng.org/main/trunk@8205 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/MirandaG15/src/CContactList.cpp')
-rw-r--r--plugins/MirandaG15/src/CContactList.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/plugins/MirandaG15/src/CContactList.cpp b/plugins/MirandaG15/src/CContactList.cpp
index 046582e2e0..f457542ec0 100644
--- a/plugins/MirandaG15/src/CContactList.cpp
+++ b/plugins/MirandaG15/src/CContactList.cpp
@@ -103,7 +103,7 @@ void CContactList::AddContact(MCONTACT hContact)
CListContainer<CContactListEntry*,CContactListGroup*> *pGroup = NULL;
tstring strName = CAppletManager::GetContactDisplayname(hContact);
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO,(UINT)hContact,0);
+ char *szProto = GetContactProto(hContact);
tstring strGroup = GetContactGroupPath(hContact);
// ignore contacts without a valid protocoll
@@ -207,7 +207,7 @@ bool CContactList::IsVisible(CContactListEntry *pEntry) {
DWORD dwNumContacts = (DWORD)CallService(MS_MC_GETNUMCONTACTS,(WPARAM)pEntry->hHandle,0);
for(DWORD i = 0; i < dwNumContacts; i++) {
MCONTACT hSubContact = (MCONTACT)CallService(MS_MC_GETSUBCONTACT,(WPARAM)pEntry->hHandle,i);
- char *szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO,(UINT)hSubContact,0);
+ char *szProto = GetContactProto(hSubContact);
if(db_get_w(hSubContact,szProto,"Status",ID_STATUS_OFFLINE) != ID_STATUS_OFFLINE) {
return true;
}
@@ -540,14 +540,14 @@ bool CContactList::CompareEntries(CListEntry<CContactListEntry*,CContactListGrou
//************************************************************************
void CContactList::RefreshList()
{
- if(db_get_b(NULL,"MetaContacts","Enabled",1) != m_bUseMetaContacts ||
+ if((db_get_b(NULL,"MetaContacts","Enabled",1) != 0) != m_bUseMetaContacts ||
CConfig::GetBoolSetting(CLIST_USEGROUPS) != m_bUseGroups)
{
InitializeGroupObjects();
Clear();
}
m_bUseGroups = CConfig::GetBoolSetting(CLIST_USEGROUPS);
- m_bUseMetaContacts = db_get_b(NULL,"MetaContacts","Enabled",1);
+ m_bUseMetaContacts = db_get_b(NULL,"MetaContacts","Enabled",1) != 0;
CListEntry<CContactListEntry*,CContactListGroup*> *pContactEntry = NULL;
MCONTACT hContact = db_find_first();
@@ -1019,7 +1019,7 @@ void CContactList::InitializeGroupObjects()
while(hContact != NULL)
{
tstring strGroup = GetContactGroupPath(hContact);
- szProto = (char*)CallService(MS_PROTO_GETCONTACTBASEPROTO,(UINT)hContact,0);
+ szProto = GetContactProto(hContact);
if(szProto && db_get_b(NULL,"MetaContacts","Enabled",1) && !stricmp(szProto,"MetaContacts"))
{
tstring strName = CAppletManager::GetContactDisplayname(hContact);