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/Yahoo/src/avatar.cpp | 27 +-------------------------- protocols/Yahoo/src/proto.cpp | 1 - protocols/Yahoo/src/proto.h | 4 ---- 3 files changed, 1 insertion(+), 31 deletions(-) (limited to 'protocols/Yahoo/src') diff --git a/protocols/Yahoo/src/avatar.cpp b/protocols/Yahoo/src/avatar.cpp index adb05e8e08..2e3c71cacf 100644 --- a/protocols/Yahoo/src/avatar.cpp +++ b/protocols/Yahoo/src/avatar.cpp @@ -607,34 +607,9 @@ void CYahooProto::request_avatar(const char* who) else LOG(("Avatar Not Available for: %s Last Check: %ld Current: %ld (Flood Check in Effect)", who, last_chk, cur_time)); } -void CYahooProto::InitCustomFolders(void) -{ - if (InitCstFldRan) - return; - - InitCstFldRan = true; - - TCHAR AvatarsFolder[MAX_PATH]; - mir_sntprintf(AvatarsFolder, MAX_PATH, _T("%%miranda_avatarcache%%\\%S"), m_szModuleName); - hYahooAvatarsFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), m_szModuleName, AvatarsFolder, m_tszUserName); -} - void CYahooProto::GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, int cbLen, int type) { - size_t tPathLen; - - InitCustomFolders(); - - TCHAR* path = ( TCHAR* )alloca( sizeof(TCHAR)*( cbLen+1 )); - if ( hYahooAvatarsFolder != NULL && !FoldersGetCustomPathT( hYahooAvatarsFolder, path, (int)cbLen, _T(""))) - { - _tcscpy( pszDest, path ); - tPathLen = _tcslen( pszDest ); - } else { - TCHAR *tmpPath = Utils_ReplaceVarsT( _T("%miranda_avatarcache%")); - tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), tmpPath, m_szModuleName); - mir_free(tmpPath); - } + int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST( _T("%miranda_avatarcache%")), m_szModuleName); if ( _taccess(pszDest, 0)) CreateDirectoryTreeT(pszDest); diff --git a/protocols/Yahoo/src/proto.cpp b/protocols/Yahoo/src/proto.cpp index 4bf27e2cbf..4769e91e22 100644 --- a/protocols/Yahoo/src/proto.cpp +++ b/protocols/Yahoo/src/proto.cpp @@ -39,7 +39,6 @@ CYahooProto::CYahooProto( const char* aProtoName, const TCHAR* aUserName ) : LoadYahooServices(); IconsInit(); - InitCustomFolders(); } CYahooProto::~CYahooProto() diff --git a/protocols/Yahoo/src/proto.h b/protocols/Yahoo/src/proto.h index ea358abdbd..4124737890 100644 --- a/protocols/Yahoo/src/proto.h +++ b/protocols/Yahoo/src/proto.h @@ -298,10 +298,6 @@ private: HGENMENU mainMenuRoot; HGENMENU hShowProfileMenuItem; HGENMENU menuItemsAll[ 8 ]; - - HANDLE hYahooAvatarsFolder; - bool InitCstFldRan; - void InitCustomFolders(void); }; extern LIST g_instances; -- cgit v1.2.3