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/JabberG | |
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/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber_misc.cpp | 21 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_proto.cpp | 1 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_proto.h | 4 |
3 files changed, 1 insertions, 25 deletions
diff --git a/protocols/JabberG/src/jabber_misc.cpp b/protocols/JabberG/src/jabber_misc.cpp index 4a94d5fd70..1a50b27e70 100644 --- a/protocols/JabberG/src/jabber_misc.cpp +++ b/protocols/JabberG/src/jabber_misc.cpp @@ -178,28 +178,9 @@ BOOL CJabberProto::AddDbPresenceEvent(HANDLE hContact, BYTE btEventType) ///////////////////////////////////////////////////////////////////////////////
// JabberGetAvatarFileName() - gets a file name for the avatar image
-void CJabberProto::InitCustomFolders(void)
-{
- if (m_bFoldersInitDone)
- return;
-
- m_bFoldersInitDone = true;
- TCHAR AvatarsFolder[MAX_PATH];
- mir_sntprintf(AvatarsFolder, SIZEOF(AvatarsFolder), _T("%%miranda_avatarcache%%\\%S"), m_szModuleName);
- m_hJabberAvatarsFolder = FoldersRegisterCustomPathT(LPGEN("Avatars"), m_szModuleName, AvatarsFolder, m_tszUserName);
-}
-
void CJabberProto::GetAvatarFileName(HANDLE hContact, TCHAR* pszDest, size_t cbLen)
{
- size_t tPathLen;
- TCHAR *path = (TCHAR*)alloca(cbLen * sizeof(TCHAR));
-
- InitCustomFolders();
-
- if (m_hJabberAvatarsFolder == NULL || FoldersGetCustomPathT(m_hJabberAvatarsFolder, path, (int)cbLen, _T("")))
- tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), (TCHAR*)VARST(_T("%miranda_avatarcache%")), m_szModuleName);
- else
- tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s"), path);
+ int tPathLen = mir_sntprintf(pszDest, cbLen, _T("%s\\%S"), VARST(_T("%miranda_avatarcache%")), m_szModuleName);
DWORD dwAttributes = GetFileAttributes(pszDest);
if (dwAttributes == 0xffffffff || (dwAttributes & FILE_ATTRIBUTE_DIRECTORY) == 0)
diff --git a/protocols/JabberG/src/jabber_proto.cpp b/protocols/JabberG/src/jabber_proto.cpp index 11524d4b56..f1004adeda 100644 --- a/protocols/JabberG/src/jabber_proto.cpp +++ b/protocols/JabberG/src/jabber_proto.cpp @@ -140,7 +140,6 @@ CJabberProto::CJabberProto(const char *aProtoName, const TCHAR *aUserName) : GlobalMenuInit();
WsInit();
ConsoleInit();
- InitCustomFolders();
m_pepServices.insert(new CPepMood(this));
m_pepServices.insert(new CPepActivity(this));
diff --git a/protocols/JabberG/src/jabber_proto.h b/protocols/JabberG/src/jabber_proto.h index 5ddaf38618..9f60bc998b 100644 --- a/protocols/JabberG/src/jabber_proto.h +++ b/protocols/JabberG/src/jabber_proto.h @@ -612,7 +612,6 @@ struct CJabberProto : public PROTO<CJabberProto>, public IJabberInterface void UpdateMirVer(HANDLE hContact, pResourceStatus &resource);
void UpdateSubscriptionInfo(HANDLE hContact, JABBER_LIST_ITEM *item);
void SetContactOfflineStatus(HANDLE hContact);
- void InitCustomFolders(void);
void InitPopups(void);
void MsgPopup(HANDLE hContact, const TCHAR *szMsg, const TCHAR *szTitle);
@@ -849,9 +848,6 @@ private: HANDLE m_hPopupClass;
- HANDLE m_hJabberAvatarsFolder;
- BOOL m_bFoldersInitDone;
-
LONG m_nSerial;
HGENMENU m_hPrivacyMenuRoot;
|