summaryrefslogtreecommitdiff
path: root/protocols/AimOscar
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-02 12:02:34 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-02 12:02:34 +0000
commit71eabf9174e4829e85d84f1098ef0d70b3674300 (patch)
tree4275d4c331032c306779faa97863b4ab25d8637a /protocols/AimOscar
parenta0bd83dbb96a4e45005fdab38fb7b3a17cdcb012 (diff)
- avatars' Folders settings moved to the "Avatars" section;
- TCHAR_STR_PARAM is replaced by %S (we don't need the ansi version) git-svn-id: http://svn.miranda-ng.org/main/trunk@3830 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/AimOscar')
-rw-r--r--protocols/AimOscar/src/avatars.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/protocols/AimOscar/src/avatars.cpp b/protocols/AimOscar/src/avatars.cpp
index a2277658de..91b5ccec23 100644
--- a/protocols/AimOscar/src/avatars.cpp
+++ b/protocols/AimOscar/src/avatars.cpp
@@ -98,10 +98,10 @@ void CAimProto::avatar_retrieval_handler(const char* sn, const char* hash, const
AI.cbSize = sizeof(AI);
AI.hContact = contact_from_sn(sn);
-
+
if (data_len > 0)
{
- const TCHAR *type;
+ const TCHAR *type;
AI.format = detect_image_type(data, type);
get_avatar_filename(AI.hContact, AI.filename, SIZEOF(AI.filename), type);
@@ -153,7 +153,7 @@ int detect_image_type(const char* stream, const TCHAR* &type_ret)
int detect_image_type(const TCHAR* file)
{
const TCHAR *ext = _tcsrchr(file, '.');
- if (ext == NULL)
+ if (ext == NULL)
return PA_FORMAT_UNKNOWN;
if (_tcsicmp(ext, _T(".gif")) == 0)
return PA_FORMAT_GIF;
@@ -167,13 +167,13 @@ int detect_image_type(const TCHAR* file)
void CAimProto::init_custom_folders(void)
{
- if (init_cst_fld_ran) return;
+ if (init_cst_fld_ran) return;
TCHAR AvatarsFolder[MAX_PATH];
TCHAR *tszModuleName = mir_a2t(m_szModuleName);
mir_sntprintf(AvatarsFolder, SIZEOF(AvatarsFolder), _T("%%miranda_avatarcache%%\\%s"), tszModuleName);
- hAvatarsFolder = FoldersRegisterCustomPathT(m_szModuleName, "Avatars", AvatarsFolder);
+ hAvatarsFolder = FoldersRegisterCustomPathT("Avatars", m_szModuleName, AvatarsFolder);
mir_free(tszModuleName);
init_cst_fld_ran = true;
@@ -195,7 +195,7 @@ int CAimProto::get_avatar_filename(HANDLE hContact, TCHAR* pszDest, size_t cbLen
mir_free(tszModuleName);
mir_free(tmpPath);
}
- else
+ else
{
_tcscpy(pszDest, path);
tPathLen = _tcslen(pszDest);
@@ -205,7 +205,7 @@ int CAimProto::get_avatar_filename(HANDLE hContact, TCHAR* pszDest, size_t cbLen
CreateDirectoryTreeT(pszDest);
size_t tPathLen2 = tPathLen;
-
+
DBVARIANT dbv;
if (getTString(hContact, AIM_KEY_AH, &dbv)) return GAIR_NOAVATAR;
tPathLen += mir_sntprintf(pszDest + tPathLen, cbLen - tPathLen, _T("\\%s"), dbv.ptszVal);
@@ -228,7 +228,7 @@ int CAimProto::get_avatar_filename(HANDLE hContact, TCHAR* pszDest, size_t cbLen
} while (_tfindnext(hFile, &c_file) == 0);
_findclose( hFile );
}
-
+
if (!found) pszDest[0] = 0;
}
else