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/Yahoo | |
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/Yahoo')
-rw-r--r-- | protocols/Yahoo/src/avatar.cpp | 27 | ||||
-rw-r--r-- | protocols/Yahoo/src/proto.cpp | 1 | ||||
-rw-r--r-- | protocols/Yahoo/src/proto.h | 4 |
3 files changed, 1 insertions, 31 deletions
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<CYahooProto> g_instances;
|