summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/theme.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/WhatsApp/src/theme.cpp')
-rw-r--r--protocols/WhatsApp/src/theme.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/protocols/WhatsApp/src/theme.cpp b/protocols/WhatsApp/src/theme.cpp
index e5285ddf0a..3e64694ade 100644
--- a/protocols/WhatsApp/src/theme.cpp
+++ b/protocols/WhatsApp/src/theme.cpp
@@ -40,7 +40,7 @@ char *GetIconDescription(const char* name)
HGENMENU g_hContactMenuItems[CMITEMS_COUNT];
// Helper functions
-static WhatsAppProto* GetInstanceByHContact(HANDLE hContact)
+static WhatsAppProto* GetInstanceByHContact(HCONTACT hContact)
{
char *proto = GetContactProto(hContact);
if( !proto )
@@ -56,14 +56,14 @@ static WhatsAppProto* GetInstanceByHContact(HANDLE hContact)
template<INT_PTR (__cdecl WhatsAppProto::*Fcn)(WPARAM,LPARAM)>
INT_PTR GlobalService(WPARAM wParam,LPARAM lParam)
{
- WhatsAppProto *proto = GetInstanceByHContact(reinterpret_cast<HANDLE>(wParam));
+ WhatsAppProto *proto = GetInstanceByHContact(reinterpret_cast<HCONTACT>(wParam));
return proto ? (proto->*Fcn)(wParam,lParam) : 0;
}
template<INT_PTR (__cdecl WhatsAppProto::*Fcn)(WPARAM,LPARAM,LPARAM)>
INT_PTR GlobalServiceParam(WPARAM wParam,LPARAM lParam, LPARAM lParam2)
{
- WhatsAppProto *proto = GetInstanceByHContact(reinterpret_cast<HANDLE>(wParam));
+ WhatsAppProto *proto = GetInstanceByHContact(reinterpret_cast<HCONTACT>(wParam));
return proto ? (proto->*Fcn)(wParam,lParam,lParam2) : 0;
}
@@ -72,7 +72,7 @@ static int PrebuildContactMenu(WPARAM wParam,LPARAM lParam)
for (size_t i=0; i<SIZEOF(g_hContactMenuItems); i++)
Menu_ShowItem(g_hContactMenuItems[i], false);
- WhatsAppProto *proto = GetInstanceByHContact(reinterpret_cast<HANDLE>(wParam));
+ WhatsAppProto *proto = GetInstanceByHContact(reinterpret_cast<HCONTACT>(wParam));
return proto ? proto->OnPrebuildContactMenu(wParam,lParam) : 0;
}
@@ -104,7 +104,7 @@ void WhatsAppProto::InitContactMenus()
int WhatsAppProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam)
{
- HANDLE hContact = reinterpret_cast<HANDLE>(wParam);
+ HCONTACT hContact = reinterpret_cast<HCONTACT>(wParam);
if (hContact)
debugLogA(this->GetContactDisplayName(hContact).c_str());
else
@@ -144,10 +144,10 @@ int WhatsAppProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam)
svcName += "/AddContactToGroup_";
DBVARIANT dbv;
- for (map<HANDLE, map<HANDLE, bool>>::iterator it = this->isMemberByGroupContact.begin();
+ for (map<HCONTACT, map<HCONTACT, bool>>::iterator it = this->isMemberByGroupContact.begin();
it != this->isMemberByGroupContact.end(); ++it)
{
- map<HANDLE, bool>::iterator memberIt = it->second.find(hContact);
+ map<HCONTACT, bool>::iterator memberIt = it->second.find(hContact);
// Only, if current contact is not already member of this group
if ((memberIt == it->second.end() || memberIt->second == false) && !getString(it->first, "ID", &dbv))
{
@@ -184,7 +184,7 @@ int WhatsAppProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam)
bool bShow = false;
if (isOnline() && getByte(hContact, "IsGroupMember", 0) == 1)
{
- map<HANDLE, map<HANDLE, bool>>::iterator groupsIt = this->isMemberByGroupContact.find(hContact);
+ map<HCONTACT, map<HCONTACT, bool>>::iterator groupsIt = this->isMemberByGroupContact.find(hContact);
if (groupsIt == this->isMemberByGroupContact.end())
{
debugLogA("Group exists only on contact list");
@@ -199,7 +199,7 @@ int WhatsAppProto::OnPrebuildContactMenu(WPARAM wParam,LPARAM lParam)
svcName += "/RemoveContactFromGroup_";
DBVARIANT dbv;
- for (map<HANDLE, bool>::iterator it = groupsIt->second.begin(); it != groupsIt->second.end(); ++it)
+ for (map<HCONTACT, bool>::iterator it = groupsIt->second.begin(); it != groupsIt->second.end(); ++it)
{
if (!getString(it->first, "ID", &dbv))
{