summaryrefslogtreecommitdiff
path: root/plugins/AVS
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-07-27 14:23:31 +0000
commit2f261839b60692e33d0e160344d0d636d49c90ba (patch)
tree187921722698b681d29df3f6e60fb18394a5e9d5 /plugins/AVS
parent2e931a0b2780587d85f3902468c935f5adba70c8 (diff)
less TCHARs
git-svn-id: http://svn.miranda-ng.org/main/trunk@17138 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/AVS')
-rw-r--r--plugins/AVS/src/acc.cpp2
-rw-r--r--plugins/AVS/src/cache.cpp2
-rw-r--r--plugins/AVS/src/image_utils.cpp2
-rw-r--r--plugins/AVS/src/main.cpp12
-rw-r--r--plugins/AVS/src/options.cpp6
-rw-r--r--plugins/AVS/src/services.cpp16
-rw-r--r--plugins/AVS/src/utils.cpp6
7 files changed, 23 insertions, 23 deletions
diff --git a/plugins/AVS/src/acc.cpp b/plugins/AVS/src/acc.cpp
index 96935ace4f..38e62a954f 100644
--- a/plugins/AVS/src/acc.cpp
+++ b/plugins/AVS/src/acc.cpp
@@ -469,7 +469,7 @@ static LRESULT CALLBACK ACCWndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lP
return TRUE;
case AVATAR_SETNOAVATARTEXT:
- mir_tstrncpy(data->noAvatarText, TranslateTS((wchar_t*)lParam), _countof(data->noAvatarText));
+ mir_wstrncpy(data->noAvatarText, TranslateTS((wchar_t*)lParam), _countof(data->noAvatarText));
Invalidate(hwnd);
return TRUE;
diff --git a/plugins/AVS/src/cache.cpp b/plugins/AVS/src/cache.cpp
index c4702ae89c..2f521cc01d 100644
--- a/plugins/AVS/src/cache.cpp
+++ b/plugins/AVS/src/cache.cpp
@@ -150,7 +150,7 @@ void NotifyMetaAware(MCONTACT hContact, CacheNode *node, AVATARCACHEENTRY *ace)
// Default value
if (cacn.hash[0] == '\0')
- mir_sntprintf(cacn.hash, L"AVS-HASH-%x", GetFileHash(cacn.filename));
+ mir_snwprintf(cacn.hash, L"AVS-HASH-%x", GetFileHash(cacn.filename));
NotifyEventHooks(hEventContactAvatarChanged, hContact, (LPARAM)&cacn);
}
diff --git a/plugins/AVS/src/image_utils.cpp b/plugins/AVS/src/image_utils.cpp
index 61c548c96b..70fe12713e 100644
--- a/plugins/AVS/src/image_utils.cpp
+++ b/plugins/AVS/src/image_utils.cpp
@@ -212,7 +212,7 @@ int BmpFilterSaveBitmap(HBITMAP hBmp, const wchar_t *ptszFile, int flags)
if (!PathToAbsoluteT(ptszFile, tszFilename))
wcsncpy_s(tszFilename, ptszFile, _TRUNCATE);
- if (mir_tstrlen(tszFilename) <= 4)
+ if (mir_wstrlen(tszFilename) <= 4)
return -1;
IMGSRVC_INFO i = { 0 };
diff --git a/plugins/AVS/src/main.cpp b/plugins/AVS/src/main.cpp
index 516d6a204b..a52cd78b6a 100644
--- a/plugins/AVS/src/main.cpp
+++ b/plugins/AVS/src/main.cpp
@@ -132,7 +132,7 @@ static void LoadDefaultInfo()
db_unset(0, PPICT_MODULE, AVS_DEFAULT);
pce->szProtoname = mir_strdup(AVS_DEFAULT);
- pce->tszAccName = mir_tstrdup(TranslateT("Global avatar"));
+ pce->tszAccName = mir_wstrdup(TranslateT("Global avatar"));
g_ProtoPictures.insert(pce);
}
@@ -145,13 +145,13 @@ static void LoadProtoInfo(PROTOCOLDESCRIPTOR *proto)
mir_snprintf(protoName, "Global avatar for %s accounts", proto->szName);
wchar_t protoNameTmp[MAX_PATH];
- mir_sntprintf(protoNameTmp, TranslateT("Global avatar for %s accounts"), _A2T(proto->szName));
+ mir_snwprintf(protoNameTmp, TranslateT("Global avatar for %s accounts"), _A2T(proto->szName));
protoPicCacheEntry *pce = new protoPicCacheEntry;
if (CreateAvatarInCache(0, pce, protoName) != 1)
db_unset(0, PPICT_MODULE, protoName);
pce->szProtoname = mir_strdup(protoName);
- pce->tszAccName = mir_tstrdup(protoNameTmp);
+ pce->tszAccName = mir_wstrdup(protoNameTmp);
g_ProtoPictures.insert(pce);
}
@@ -162,13 +162,13 @@ static void LoadAccountInfo(PROTOACCOUNT *acc)
db_unset(0, PPICT_MODULE, acc->szModuleName);
pce->szProtoname = mir_strdup(acc->szModuleName);
- pce->tszAccName = mir_tstrdup(acc->tszAccountName);
+ pce->tszAccName = mir_wstrdup(acc->tszAccountName);
g_ProtoPictures.insert(pce);
pce = new protoPicCacheEntry;
CreateAvatarInCache(INVALID_CONTACT_ID, pce, acc->szModuleName);
pce->szProtoname = mir_strdup(acc->szModuleName);
- pce->tszAccName = mir_tstrdup(acc->tszAccountName);
+ pce->tszAccName = mir_wstrdup(acc->tszAccountName);
g_MyAvatars.insert(pce);
}
@@ -323,7 +323,7 @@ void InternalDrawAvatar(AVATARDRAWREQUEST *r, HBITMAP hbm, LONG bmWidth, LONG bm
static int ModulesLoaded(WPARAM, LPARAM)
{
wchar_t szEventName[100];
- mir_sntprintf(szEventName, L"avs_loaderthread_%d", GetCurrentThreadId());
+ mir_snwprintf(szEventName, L"avs_loaderthread_%d", GetCurrentThreadId());
hLoaderEvent = CreateEvent(NULL, TRUE, FALSE, szEventName);
SetThreadPriority(mir_forkthread(PicLoader, 0), THREAD_PRIORITY_IDLE);
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp
index 7254543bb3..cead97c735 100644
--- a/plugins/AVS/src/options.cpp
+++ b/plugins/AVS/src/options.cpp
@@ -388,7 +388,7 @@ static INT_PTR CALLBACK DlgProcOptionsProtos(HWND hwndDlg, UINT msg, WPARAM wPar
if (!db_get_ts(NULL, PPICT_MODULE, g_selectedProto, &dbv)) {
if (!PathIsAbsoluteT(VARST(dbv.ptszVal))) {
wchar_t szFinalPath[MAX_PATH];
- mir_sntprintf(szFinalPath, L"%%miranda_path%%\\%s", dbv.ptszVal);
+ mir_snwprintf(szFinalPath, L"%%miranda_path%%\\%s", dbv.ptszVal);
SetDlgItemText(hwndDlg, IDC_PROTOAVATARNAME, szFinalPath);
}
else SetDlgItemText(hwndDlg, IDC_PROTOAVATARNAME, dbv.ptszVal);
@@ -489,7 +489,7 @@ INT_PTR CALLBACK DlgProcAvatarOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPA
TranslateDialogDefault(hwndDlg);
if (hContact) {
wchar_t szTitle[512];
- mir_sntprintf(szTitle, TranslateT("Set avatar options for %s"), pcli->pfnGetContactDisplayName(hContact, 0));
+ mir_snwprintf(szTitle, TranslateT("Set avatar options for %s"), pcli->pfnGetContactDisplayName(hContact, 0));
SetWindowText(hwndDlg, szTitle);
}
SendMessage(hwndDlg, DM_SETAVATARNAME, 0, 0);
@@ -1082,7 +1082,7 @@ static INT_PTR CALLBACK DlgProcAvatarProtoInfo(HWND hwndDlg, UINT msg, WPARAM wP
char description[256];
CallProtoService(proto, PS_GETNAME, _countof(description), (LPARAM)description);
- wchar_t *descr = mir_a2t(description);
+ wchar_t *descr = mir_a2u(description);
if (MessageBox(hwndDlg, TranslateT("Are you sure you want to remove your avatar?"), descr, MB_YESNO) == IDYES)
avSetMyAvatar(proto, L"");
mir_free(descr);
diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp
index 79a21f3b8a..817c15630e 100644
--- a/plugins/AVS/src/services.cpp
+++ b/plugins/AVS/src/services.cpp
@@ -347,7 +347,7 @@ void SaveImage(SaveProtocolData &d, char *protocol, int format)
if (!Proto_IsAvatarFormatSupported(protocol, format))
return;
- mir_sntprintf(d.image_file_name, L"%s%s", d.temp_file, ProtoGetAvatarExtension(format));
+ mir_snwprintf(d.image_file_name, L"%s%s", d.temp_file, ProtoGetAvatarExtension(format));
if (BmpFilterSaveBitmap(d.hBmpProto, d.image_file_name, format == PA_FORMAT_JPEG ? JPEG_QUALITYSUPERB : 0))
return;
@@ -550,13 +550,13 @@ static int InternalSetMyAvatar(char *protocol, wchar_t *szFinalName, SetMyAvatar
wchar_t globalFile[1024];
BOOL saved = TRUE;
if (FoldersGetCustomPathT(hGlobalAvatarFolder, globalFile, _countof(globalFile), L"")) {
- mir_sntprintf(globalFile, L"%s%s", g_szDataPath, L"GlobalAvatar");
+ mir_snwprintf(globalFile, L"%s%s", g_szDataPath, L"GlobalAvatar");
CreateDirectory(globalFile, NULL);
}
wchar_t *ext = wcsrchr(szFinalName, '.'); // Can't be NULL here
if (format == PA_FORMAT_XML || format == PA_FORMAT_SWF) {
- mir_sntprintf(globalFile, L"%s\\my_global_avatar%s", globalFile, ext);
+ mir_snwprintf(globalFile, L"%s\\my_global_avatar%s", globalFile, ext);
CopyFile(szFinalName, globalFile, FALSE);
}
else {
@@ -574,12 +574,12 @@ static int InternalSetMyAvatar(char *protocol, wchar_t *szFinalName, SetMyAvatar
// Check if need to resize
if (hBmpTmp == hBmp || hBmpTmp == NULL) {
// Use original image
- mir_sntprintf(globalFile, L"%s\\my_global_avatar%s", globalFile, ext);
+ mir_snwprintf(globalFile, L"%s\\my_global_avatar%s", globalFile, ext);
CopyFile(szFinalName, globalFile, FALSE);
}
else {
// Save as PNG
- mir_sntprintf(globalFile, L"%s\\my_global_avatar.png", globalFile);
+ mir_snwprintf(globalFile, L"%s\\my_global_avatar.png", globalFile);
if (BmpFilterSaveBitmap(hBmpTmp, globalFile, 0))
saved = FALSE;
@@ -685,10 +685,10 @@ INT_PTR avSetMyAvatar(char* protocol, wchar_t* tszPath)
wchar_t title[256];
if (protocol == NULL)
- mir_sntprintf(title, TranslateT("Set my avatar"));
+ mir_snwprintf(title, TranslateT("Set my avatar"));
else {
- wchar_t* prototmp = mir_a2t(protocol);
- mir_sntprintf(title, TranslateT("Set my avatar for %s"), prototmp);
+ wchar_t* prototmp = mir_a2u(protocol);
+ mir_snwprintf(title, TranslateT("Set my avatar for %s"), prototmp);
mir_free(prototmp);
}
ofn.lpstrTitle = title;
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp
index c46fff6a58..4cfc38d67f 100644
--- a/plugins/AVS/src/utils.cpp
+++ b/plugins/AVS/src/utils.cpp
@@ -56,7 +56,7 @@ void MakePathRelative(MCONTACT hContact, wchar_t *path)
void MakePathRelative(MCONTACT hContact)
{
- ptrT tszPath(db_get_tsa(hContact, "ContactPhoto", "File"));
+ ptrW tszPath(db_get_tsa(hContact, "ContactPhoto", "File"));
if (tszPath)
MakePathRelative(hContact, tszPath);
}
@@ -67,7 +67,7 @@ void MakePathRelative(MCONTACT hContact)
int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto)
{
- ptrT tszValue;
+ ptrW tszValue;
wchar_t tszFilename[MAX_PATH]; tszFilename[0] = 0;
ace->hbmPic = 0;
@@ -136,7 +136,7 @@ int CreateAvatarInCache(MCONTACT hContact, avatarCacheEntry *ace, char *szProto)
}
}
- if (mir_tstrlen(tszFilename) < 4)
+ if (mir_wstrlen(tszFilename) < 4)
return -1;
wcsncpy_s(tszFilename, VARST(tszFilename), _TRUNCATE);