diff options
author | George Hazan <george.hazan@gmail.com> | 2013-10-08 18:28:51 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-10-08 18:28:51 +0000 |
commit | a075d35ca850f06170553d17ca464f0f5feadd97 (patch) | |
tree | 5a86b9dd53d495f6ab987fe72ad2d4f06a85caa2 /protocols/IcqOscarJ/src/icq_avatar.cpp | |
parent | 5ba216d4b0d9a98ff6dfe0e4dd3117dcd417ce3a (diff) |
separate Folders handles removed from protocols
git-svn-id: http://svn.miranda-ng.org/main/trunk@6405 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/IcqOscarJ/src/icq_avatar.cpp')
-rw-r--r-- | protocols/IcqOscarJ/src/icq_avatar.cpp | 27 |
1 files changed, 2 insertions, 25 deletions
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);
|