From a075d35ca850f06170553d17ca464f0f5feadd97 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 8 Oct 2013 18:28:51 +0000 Subject: separate Folders handles removed from protocols git-svn-id: http://svn.miranda-ng.org/main/trunk@6405 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/IcqOscarJ/src/icq_avatar.cpp | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) (limited to 'protocols/IcqOscarJ/src/icq_avatar.cpp') diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp index 07dd17fc0f..b50330a1b9 100644 --- a/protocols/IcqOscarJ/src/icq_avatar.cpp +++ b/protocols/IcqOscarJ/src/icq_avatar.cpp @@ -83,20 +83,6 @@ avatars_request* CIcqProto::ReleaseAvatarRequestInQueue(avatars_request *request } -void CIcqProto::InitAvatars() -{ - if (bAvatarsFolderInited) - return; - - bAvatarsFolderInited = TRUE; - - // check if it does make sense - TCHAR tszPath[MAX_PATH * 2]; - mir_sntprintf(tszPath, MAX_PATH * 2, _T("%%miranda_avatarcache%%\\%S"), m_szModuleName); - hAvatarsFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), m_szModuleName, tszPath, m_tszUserName); -} - - TCHAR* CIcqProto::GetOwnAvatarFileName() { DBVARIANT dbvFile = {DBVT_DELETED}; @@ -123,22 +109,13 @@ void CIcqProto::GetFullAvatarFileName(int dwUin, const char *szUid, int dwFormat void CIcqProto::GetAvatarFileName(int dwUin, const char *szUid, TCHAR *pszDest, int cbLen) { TCHAR szPath[MAX_PATH * 2]; - FOLDERSGETDATA fgd = {0}; - - InitAvatars(); + mir_sntprintf(szPath, MAX_PATH * 2, _T("%s\\%S\\"), VARST(_T("%miranda_avatarcache%")), m_szModuleName); + FOLDERSGETDATA fgd = {0}; fgd.cbSize = sizeof(FOLDERSGETDATA); fgd.nMaxPathSize = MAX_PATH * 2; fgd.szPathT = szPath; fgd.flags = FF_TCHAR; - if (CallService(MS_FOLDERS_GET_PATH, (WPARAM)hAvatarsFolder, (LPARAM)&fgd)) - { - TCHAR *tmpPath = Utils_ReplaceVarsT(_T("%miranda_avatarcache%")); - mir_sntprintf(szPath, MAX_PATH * 2, _T("%s\\%S\\"), tmpPath, m_szModuleName); - mir_free(tmpPath); - } - else - _tcscat(szPath, _T("\\")); // fill the destination lstrcpyn(pszDest, szPath, cbLen - 1); -- cgit v1.2.3