From 1ce3da1cca093143d9629bc46e221dd8be962e12 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 31 May 2015 11:46:05 +0000 Subject: - 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 --- protocols/WhatsApp/src/chat.cpp | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) (limited to 'protocols/WhatsApp/src/chat.cpp') 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); } -- cgit v1.2.3