summaryrefslogtreecommitdiff
path: root/protocols/WhatsApp/src/chat.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-31 11:46:05 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-31 11:46:05 +0000
commit1ce3da1cca093143d9629bc46e221dd8be962e12 (patch)
treeb99d12d635a65f8c78499137137df2bd591b50be /protocols/WhatsApp/src/chat.cpp
parent03512ff2ed0f3d1ed6857ee85b0eb7268931ec3f (diff)
- MAllStrings: a handy union to hold an incoming string parameter of any type;
- FNAMECHAR: atavism extincted; - PROTOSEARCHRESULT: structure prepared to use results of any type, including utf git-svn-id: http://svn.miranda-ng.org/main/trunk@13932 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/WhatsApp/src/chat.cpp')
-rw-r--r--protocols/WhatsApp/src/chat.cpp38
1 files changed, 19 insertions, 19 deletions
diff --git a/protocols/WhatsApp/src/chat.cpp b/protocols/WhatsApp/src/chat.cpp
index e768dde43c..1910128775 100644
--- a/protocols/WhatsApp/src/chat.cpp
+++ b/protocols/WhatsApp/src/chat.cpp
@@ -165,20 +165,20 @@ void WhatsAppProto::EditChatSubject(WAChatInfo *pInfo)
void WhatsAppProto::SetChatAvatar(WAChatInfo *pInfo)
{
- TCHAR tszFileName[MAX_PATH], filter[256];
+ TCHAR tszFileName[MAX_PATH], filter[256];
BmpFilterGetStrings(filter, SIZEOF(filter));
-
- OPENFILENAME ofn = { 0 };
- ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
- ofn.lpstrFilter = filter;
- ofn.hwndOwner = 0;
- ofn.lpstrFile = tszFileName;
- ofn.nMaxFile = ofn.nMaxFileTitle = SIZEOF(tszFileName);
- ofn.Flags = OFN_HIDEREADONLY;
- ofn.lpstrInitialDir = _T(".");
- ofn.lpstrDefExt = _T("");
- if (GetOpenFileName(&ofn))
- if (_taccess(tszFileName, 4) != -1)
+
+ OPENFILENAME ofn = { 0 };
+ ofn.lStructSize = OPENFILENAME_SIZE_VERSION_400;
+ ofn.lpstrFilter = filter;
+ ofn.hwndOwner = 0;
+ ofn.lpstrFile = tszFileName;
+ ofn.nMaxFile = ofn.nMaxFileTitle = SIZEOF(tszFileName);
+ ofn.Flags = OFN_HIDEREADONLY;
+ ofn.lpstrInitialDir = _T(".");
+ ofn.lpstrDefExt = _T("");
+ if (GetOpenFileName(&ofn))
+ if (_taccess(tszFileName, 4) != -1)
InternalSetAvatar(pInfo->hContact, _T2A(pInfo->tszJid), tszFileName);
}
@@ -223,16 +223,16 @@ void WhatsAppProto::AddChatUser(WAChatInfo *pInfo, const TCHAR *ptszJid)
if (hContact && !db_get_b(hContact, "CList", "NotInList", 0))
return;
- PROTOSEARCHRESULT sr = { 0 };
- sr.cbSize = sizeof(sr);
- sr.flags = PSR_TCHAR;
- sr.id = (TCHAR*)ptszJid;
- sr.nick = GetChatUserNick(jid);
+ PROTOSEARCHRESULT psr = { 0 };
+ psr.cbSize = sizeof(psr);
+ psr.flags = PSR_TCHAR;
+ psr.id.t = (TCHAR*)ptszJid;
+ psr.nick.t = GetChatUserNick(jid);
ADDCONTACTSTRUCT acs = { 0 };
acs.handleType = HANDLE_SEARCHRESULT;
acs.szProto = m_szModuleName;
- acs.psr = (PROTOSEARCHRESULT*)&sr;
+ acs.psr = &psr;
CallService(MS_ADDCONTACT_SHOW, (WPARAM)CallService(MS_CLUI_GETHWND, 0, 0), (LPARAM)&acs);
}