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/Gadu-Gadu/src/avatar.cpp | 10 +--------- protocols/Gadu-Gadu/src/gg.cpp | 8 ++------ protocols/Gadu-Gadu/src/gg_proto.cpp | 3 --- protocols/Gadu-Gadu/src/gg_proto.h | 1 - 4 files changed, 3 insertions(+), 19 deletions(-) (limited to 'protocols/Gadu-Gadu/src') diff --git a/protocols/Gadu-Gadu/src/avatar.cpp b/protocols/Gadu-Gadu/src/avatar.cpp index 33418c0fcd..c3e2448567 100644 --- a/protocols/Gadu-Gadu/src/avatar.cpp +++ b/protocols/Gadu-Gadu/src/avatar.cpp @@ -28,15 +28,7 @@ void GGPROTO::getAvatarFilename(HANDLE hContact, TCHAR *pszDest, int cbLen) { - int tPathLen; - TCHAR *path = (TCHAR*)alloca(cbLen * sizeof(TCHAR)); - - if (hAvatarsFolder == NULL || FoldersGetCustomPathT(hAvatarsFolder, path, cbLen, _T(""))) - tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST( _T("%miranda_avatarcache%")), m_szModuleName); - else { - _tcscpy(pszDest, path); - tPathLen = (int)_tcslen(pszDest); - } + int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST( _T("%miranda_avatarcache%")), m_szModuleName); if (_taccess(pszDest, 0)) { int ret = CreateDirectoryTreeT(pszDest); diff --git a/protocols/Gadu-Gadu/src/gg.cpp b/protocols/Gadu-Gadu/src/gg.cpp index e10057af73..932d3410a1 100644 --- a/protocols/Gadu-Gadu/src/gg.cpp +++ b/protocols/Gadu-Gadu/src/gg.cpp @@ -147,20 +147,16 @@ extern "C" __declspec(dllexport) const MUUID MirandaInterfaces[] = {MIID_PROTOCO void GGPROTO::cleanuplastplugin(DWORD version) { - // Store current plugin version setDword(GG_PLUGINVERSION, pluginInfo.version); - //1. clean files: %miranda_avatarcache%\GG\*.(null) if (version < PLUGIN_MAKE_VERSION(0, 11, 0, 2)){ netlog("cleanuplastplugin() 1: version=%d Cleaning junk avatar files from < 0.11.0.2", version); TCHAR avatarsPath[MAX_PATH]; - if (hAvatarsFolder == NULL || FoldersGetCustomPathT(hAvatarsFolder, avatarsPath, MAX_PATH, _T(""))) { - ptrT tmpPath( Utils_ReplaceVarsT( _T("%miranda_avatarcache%"))); - mir_sntprintf(avatarsPath, MAX_PATH, _T("%s\\%s"), (TCHAR*)tmpPath, m_tszUserName); - } + mir_sntprintf(avatarsPath, MAX_PATH, _T("%s\\%s"), VARST( _T("%miranda_avatarcache%")), m_tszUserName); + netlog("cleanuplastplugin() 1: miranda_avatarcache = %S", avatarsPath); if (avatarsPath != NULL){ diff --git a/protocols/Gadu-Gadu/src/gg_proto.cpp b/protocols/Gadu-Gadu/src/gg_proto.cpp index 991b30ee5f..d8dabc0b56 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.cpp +++ b/protocols/Gadu-Gadu/src/gg_proto.cpp @@ -69,9 +69,6 @@ GGPROTO::GGPROTO(const char* pszProtoName, const TCHAR* tszUserName) : db_set_resident(m_szModuleName, GG_KEY_AVATARREQUESTED); TCHAR szPath[MAX_PATH]; - mir_sntprintf(szPath, MAX_PATH, _T("%s\\%s"), (TCHAR*)VARST( _T("%miranda_avatarcache%")), m_tszUserName); - hAvatarsFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), m_szModuleName, szPath, m_tszUserName); - mir_sntprintf(szPath, MAX_PATH, _T("%s\\%s\\ImageCache"), (TCHAR*)VARST( _T("%miranda_userdata%")), m_tszUserName); hImagesFolder = FoldersRegisterCustomPathT(LPGEN("Images"), m_szModuleName, szPath, m_tszUserName); diff --git a/protocols/Gadu-Gadu/src/gg_proto.h b/protocols/Gadu-Gadu/src/gg_proto.h index f10435168d..1f91546bce 100644 --- a/protocols/Gadu-Gadu/src/gg_proto.h +++ b/protocols/Gadu-Gadu/src/gg_proto.h @@ -267,7 +267,6 @@ struct GGPROTO : public PROTO HGENMENU hMainMenu[7]; HGENMENU hBlockMenuItem, hImageMenuItem, hInstanceMenuItem; HANDLE hPrebuildMenuHook; - HANDLE hAvatarsFolder; HANDLE hImagesFolder; HWND hwndSessionsDlg; HANDLE hPopupNotify, hPopupError; -- cgit v1.2.3