summaryrefslogtreecommitdiff
path: root/protocols
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-05-25 12:40:15 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-05-25 12:40:15 +0000
commit477ffda3aaa80512826a1196ca3819640e0a879c (patch)
tree5716fb6659b12f0d593f1182bce199fd56563dd4 /protocols
parent77bad43daad9f8db2cfcc9a91681e3bdb8cf890d (diff)
- fix for default avatars' names;
- minor code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@174 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r--protocols/MRA/MraAvatars.cpp9
-rw-r--r--protocols/MRA/MraConstans.h2
2 files changed, 4 insertions, 7 deletions
diff --git a/protocols/MRA/MraAvatars.cpp b/protocols/MRA/MraAvatars.cpp
index 38cb16c32d..1916f5ab16 100644
--- a/protocols/MRA/MraAvatars.cpp
+++ b/protocols/MRA/MraAvatars.cpp
@@ -120,10 +120,8 @@ DWORD MraAvatarsQueueInitialize(HANDLE *phAvatarsQueueHandle)
if (pmraaqAvatarsQueue->hNetlibUser) {
if (bFoldersPresent) {
TCHAR tszPath[ MAX_PATH ];
- LPTSTR lpszPathToAvatarsCache = Utils_ReplaceVarsT( _T("%miranda_avatarcache%"));
- mir_sntprintf( tszPath, SIZEOF(tszPath), _T("%s\\%d"), lpszPathToAvatarsCache, PROTOCOL_NAMEW);
- pmraaqAvatarsQueue->hAvatarsPath = FoldersRegisterCustomPathT(MRA_AVT_SECT_NAME, "AvatarsPath", lpszPathToAvatarsCache);
- mir_free(lpszPathToAvatarsCache);
+ mir_sntprintf( tszPath, SIZEOF(tszPath), _T("%%miranda_avatarcache%%\\%s"), PROTOCOL_NAMEW);
+ pmraaqAvatarsQueue->hAvatarsPath = FoldersRegisterCustomPathT(MRA_AVT_SECT_NAME, "AvatarsPath", tszPath);
}
else pmraaqAvatarsQueue->hAvatarsPath = NULL;
@@ -679,9 +677,8 @@ DWORD MraAvatarsGetFileName(HANDLE hAvatarsQueueHandle, HANDLE hContact, DWORD d
}
else {
if ( DB_GetStaticStringW(NULL, MRA_AVT_SECT_NAME, "DefaultAvatarFileName", lpszCurPath, dwPathSize-5, &dwEMailSize ) == FALSE) {
- memmove(lpszCurPath, MRA_AVT_DEFAULT_AVT_FILENAME, sizeof(MRA_AVT_DEFAULT_AVT_FILENAME));
+ _tcscpy(lpszCurPath, MRA_AVT_DEFAULT_AVT_FILENAME);
lpszCurPath += SIZEOF( MRA_AVT_DEFAULT_AVT_FILENAME )-1;
- *lpszCurPath = 0;
if (pdwPathSizeRet)
*pdwPathSizeRet = lpszCurPath - lpszPath;
diff --git a/protocols/MRA/MraConstans.h b/protocols/MRA/MraConstans.h
index f045c7d8b5..59fd2382a5 100644
--- a/protocols/MRA/MraConstans.h
+++ b/protocols/MRA/MraConstans.h
@@ -258,7 +258,7 @@ static const GUI_DISPLAY_ITEM gdiExtraStatusIconsItems[] =
#define MRA_AVT_DEFAULT_TIMEOUT_RECV 30
#define MRA_AVT_DEFAULT_USE_KEEPALIVE_CONN TRUE
#define MRA_AVT_DEFAULT_CHK_INTERVAL 60
-#define MRA_AVT_DEFAULT_AVT_FILENAME "_default.jpg"
+#define MRA_AVT_DEFAULT_AVT_FILENAME _T("_default.jpg")
#define MRA_AVT_DEFAULT_RET_ABC_PATH TRUE
#define MRA_DELETE_AVT_ON_CONTACT_DELETE TRUE
#define MRA_AVT_DEFAULT_QE_CHK_INTERVAL 1000 //internal