diff options
author | George Hazan <ghazan@miranda.im> | 2016-11-17 22:24:00 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2016-11-17 22:24:00 +0300 |
commit | f7d5fcc117aaeccfdc98bce2a4280641ee7e52c9 (patch) | |
tree | 18da75eb5431b7c913f6893a7dce98740436487b | |
parent | 3079a6563ebc5887839ec29984206f2950638a4d (diff) |
PathToRelativeT - forgotten macro
29 files changed, 35 insertions, 37 deletions
diff --git a/include/m_utils.h b/include/m_utils.h index 65f2bd2dbe..066b328cc9 100644 --- a/include/m_utils.h +++ b/include/m_utils.h @@ -263,8 +263,6 @@ EXTERN_C MIR_CORE_DLL(int) PathToRelative(const char *pszSrc, char *pszOut, cons EXTERN_C MIR_CORE_DLL(int) PathToRelativeW(const wchar_t *pwszSrc, wchar_t *pwszOut, const wchar_t* pwszBase);
#endif
-#define PathToRelativeT PathToRelativeW
-
/////////////////////////////////////////////////////////////////////////////////////////
// Saves a path to a absolute path (from the miranda directory)
//
diff --git a/plugins/AVS/src/options.cpp b/plugins/AVS/src/options.cpp index cd5fc11f54..28d87ec713 100644 --- a/plugins/AVS/src/options.cpp +++ b/plugins/AVS/src/options.cpp @@ -120,7 +120,7 @@ static void SetProtoPic(char *szProto) return; wchar_t szNewPath[MAX_PATH]; - PathToRelativeT(FileName, szNewPath, g_szDataPath); + PathToRelativeW(FileName, szNewPath, g_szDataPath); db_set_ws(NULL, PPICT_MODULE, szProto, szNewPath); if (!mir_strcmp(AVS_DEFAULT, szProto)) { diff --git a/plugins/AVS/src/services.cpp b/plugins/AVS/src/services.cpp index cb27c8d98e..24d80dd7bb 100644 --- a/plugins/AVS/src/services.cpp +++ b/plugins/AVS/src/services.cpp @@ -160,7 +160,7 @@ static INT_PTR avSetAvatar(MCONTACT hContact, wchar_t *tszPath) // file exists...
wchar_t szBackupName[MAX_PATH];
- PathToRelativeT(szFinalName, szBackupName, g_szDataPath);
+ PathToRelativeW(szFinalName, szBackupName, g_szDataPath);
db_set_ws(hContact, "ContactPhoto", "Backup", szBackupName);
db_set_b(hContact, "ContactPhoto", "Locked", is_locked);
@@ -589,7 +589,7 @@ static int InternalSetMyAvatar(char *protocol, wchar_t *szFinalName, SetMyAvatar if (saved) {
wchar_t relFile[1024];
- if (PathToRelativeT(globalFile, relFile, g_szDataPath))
+ if (PathToRelativeW(globalFile, relFile, g_szDataPath))
db_set_ws(NULL, AVS_MODULE, "GlobalUserAvatarFile", relFile);
else
db_set_ws(NULL, AVS_MODULE, "GlobalUserAvatarFile", globalFile);
diff --git a/plugins/AVS/src/utils.cpp b/plugins/AVS/src/utils.cpp index 7fcbd8435f..a47b3f15c1 100644 --- a/plugins/AVS/src/utils.cpp +++ b/plugins/AVS/src/utils.cpp @@ -42,7 +42,7 @@ void MakePathRelative(MCONTACT hContact, wchar_t *path) wchar_t szFinalPath[MAX_PATH];
szFinalPath[0] = '\0';
- size_t result = PathToRelativeT(path, szFinalPath, g_szDataPath);
+ size_t result = PathToRelativeW(path, szFinalPath, g_szDataPath);
if (result && szFinalPath[0] != '\0') {
db_set_ws(hContact, "ContactPhoto", "RFile", szFinalPath);
if (!db_get_b(hContact, "ContactPhoto", "Locked", 0))
diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp index c1c34f528e..b8273c7903 100644 --- a/plugins/AssocMgr/src/assoclist.cpp +++ b/plugins/AssocMgr/src/assoclist.cpp @@ -64,7 +64,7 @@ static void SetAssocEnabled(const ASSOCDATA *assoc, BOOL fEnabled) // dll name for uninstall
if (assoc->hInstance != NULL && assoc->hInstance != hInst && assoc->hInstance != GetModuleHandle(NULL))
if (GetModuleFileName(assoc->hInstance, szBuf, _countof(szBuf)))
- if (PathToRelativeT(szBuf, szDLL)) {
+ if (PathToRelativeW(szBuf, szDLL)) {
mir_snprintf(szSetting, "module_%s", assoc->pszClassName);
db_set_ws(NULL, "AssocMgr", szSetting, szDLL);
}
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index 129eb1e468..2c6c498834 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -211,7 +211,7 @@ static int AvatarChanged(WPARAM hContact, LPARAM lParam) if (ContactEnabled(hContact, "LogToHistory", AVH_DEF_LOGTOHISTORY)) {
wchar_t rel_path[MAX_PATH];
- PathToRelativeT(history_filename, rel_path);
+ PathToRelativeW(history_filename, rel_path);
T2Utf blob(rel_path);
DBEVENTINFO dbei = { sizeof(dbei) };
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index efe7ff5ba1..0e58fc5233 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -220,7 +220,7 @@ int IniParser::GetSkinFolder(IN const wchar_t * szFileName, OUT wchar_t * pszFol mir_snwprintf(pszFolderName, MAX_PATH, L"%s\\%s", custom_folder, cus); mir_free(szBuff); - PathToRelativeT(pszFolderName, pszFolderName); + PathToRelativeW(pszFolderName, pszFolderName); return 0; } @@ -1966,7 +1966,7 @@ int ske_LoadSkinFromIniFile(wchar_t *szFileName, BOOL bOnlyObjects) wchar_t skinFolder[MAX_PATH], skinFile[MAX_PATH]; IniParser::GetSkinFolder(szFileName, skinFolder); - PathToRelativeT(szFileName, skinFile); + PathToRelativeW(szFileName, skinFile); db_set_ws(NULL, SKIN, "SkinFolder", skinFolder); db_set_ws(NULL, SKIN, "SkinFile", skinFile); diff --git a/plugins/Clist_modern/src/modern_skinopt.cpp b/plugins/Clist_modern/src/modern_skinopt.cpp index e47add0db3..58f9c05aea 100644 --- a/plugins/Clist_modern/src/modern_skinopt.cpp +++ b/plugins/Clist_modern/src/modern_skinopt.cpp @@ -255,7 +255,7 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara SkinListData *sd = (SkinListData*)nmtv->itemNew.lParam; wchar_t buf[MAX_PATH]; - PathToRelativeT(sd->File, buf); + PathToRelativeW(sd->File, buf); SetDlgItemText(hwndDlg, IDC_EDIT_SKIN_FILENAME, buf); wchar_t prfn[MAX_PATH] = { 0 }, imfn[MAX_PATH] = { 0 }, skinfolder[MAX_PATH] = { 0 }; diff --git a/plugins/MirLua/src/mlua_options.cpp b/plugins/MirLua/src/mlua_options.cpp index 86eb481ebb..65325e00dc 100644 --- a/plugins/MirLua/src/mlua_options.cpp +++ b/plugins/MirLua/src/mlua_options.cpp @@ -61,7 +61,7 @@ void CMLuaOptions::OnInitDialog() wchar_t scriptDir[MAX_PATH], relativeScriptDir[MAX_PATH], header[MAX_PATH + 100];
FoldersGetCustomPathT(g_hScriptsFolder, scriptDir, _countof(scriptDir), VARSW(MIRLUA_PATHT));
- PathToRelativeT(scriptDir, relativeScriptDir, NULL);
+ PathToRelativeW(scriptDir, relativeScriptDir, NULL);
mir_snwprintf(header, L"%s (%s)", TranslateT("Common scripts"), relativeScriptDir);
m_scripts.AddColumn(0, L"Script", 380);
diff --git a/plugins/MirLua/src/mlua_script_loader.cpp b/plugins/MirLua/src/mlua_script_loader.cpp index 758422b9f4..9f9386a95e 100644 --- a/plugins/MirLua/src/mlua_script_loader.cpp +++ b/plugins/MirLua/src/mlua_script_loader.cpp @@ -8,7 +8,7 @@ void CMLuaScriptLoader::LoadScript(const wchar_t *scriptDir, const wchar_t *file {
wchar_t fullPath[MAX_PATH], path[MAX_PATH];
mir_snwprintf(fullPath, L"%s\\%s", scriptDir, file);
- PathToRelativeT(fullPath, path);
+ PathToRelativeW(fullPath, path);
CMLuaScript *script = new CMLuaScript(L, path);
g_mLua->Scripts.insert(script);
diff --git a/plugins/ModernOpt/src/mopt_selector.cpp b/plugins/ModernOpt/src/mopt_selector.cpp index 6af988e4ae..e00abd2efd 100644 --- a/plugins/ModernOpt/src/mopt_selector.cpp +++ b/plugins/ModernOpt/src/mopt_selector.cpp @@ -89,7 +89,7 @@ struct TSkinListItem GetCurrentDirectory(_countof(curPath), curPath);
path = (wchar_t *)mir_alloc(MAX_PATH * sizeof(wchar_t));
- PathToRelativeT(curPath, path);
+ PathToRelativeW(curPath, path);
size_t length = mir_wstrlen(curPath) + mir_wstrlen(fn) + 2;
filename = (wchar_t *)mir_alloc(length * sizeof(wchar_t));
diff --git a/plugins/NewAwaySysMod/src/Path.h b/plugins/NewAwaySysMod/src/Path.h index a6356b2b6f..baaa54f879 100644 --- a/plugins/NewAwaySysMod/src/Path.h +++ b/plugins/NewAwaySysMod/src/Path.h @@ -27,7 +27,7 @@ __inline TCString Path_ToRelative(TCString &Path) {
TCString Str;
Str.GetBuffer(MAX_PATH);
- PathToRelativeT(Path, Str);
+ PathToRelativeW(Path, Str);
Str.ReleaseBuffer();
return Str;
}
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index 78034ff7f4..b3f0ed90a9 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -244,7 +244,7 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA }
else {
wchar_t stzSoundPath[MAX_PATH] = { 0 };
- PathToRelativeT(buff, stzSoundPath);
+ PathToRelativeW(buff, stzSoundPath);
if (lvi.lParam < ID_STATUS_MIN)
db_set_ws(hContact, MODULE, StatusListEx[lvi.lParam].lpzSkinSoundName, stzSoundPath);
else
diff --git a/plugins/NotifyAnything/src/options.cpp b/plugins/NotifyAnything/src/options.cpp index 1cd464447b..84929e4c7e 100644 --- a/plugins/NotifyAnything/src/options.cpp +++ b/plugins/NotifyAnything/src/options.cpp @@ -71,7 +71,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara ofn.Flags = OFN_PATHMUSTEXIST | OFN_HIDEREADONLY;
ofn.lpstrDefExt = L"log";
if (GetOpenFileName(&ofn)) {
- PathToRelativeT(szTemp, szTemp1);
+ PathToRelativeW(szTemp, szTemp1);
SetDlgItemText(hwndDlg, NA_LOG_FILENAME, szTemp1);
SendMessage(GetParent(hwndDlg), PSM_CHANGED, (WPARAM)hwndDlg, 0);
}
diff --git a/plugins/Scriver/src/chat/options.cpp b/plugins/Scriver/src/chat/options.cpp index 596a6fd8eb..3108e26592 100644 --- a/plugins/Scriver/src/chat/options.cpp +++ b/plugins/Scriver/src/chat/options.cpp @@ -358,7 +358,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa SendDlgItemMessage(hwndDlg,IDC_CHAT_SPIN3,UDM_SETPOS,0,MAKELONG(db_get_w(NULL,CHAT_MODULE,"LoggingLimit",100),0));
{
wchar_t tszTemp[MAX_PATH];
- PathToRelativeT(g_Settings.pszLogDir, tszTemp);
+ PathToRelativeW(g_Settings.pszLogDir, tszTemp);
SetDlgItemText(hwndDlg, IDC_CHAT_LOGDIRECTORY, tszTemp);
}
@@ -465,7 +465,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa if (idList) {
SHGetPathFromIDList(idList, tszDirectory);
mir_wstrcat(tszDirectory, L"\\");
- PathToRelativeT(tszDirectory, tszTemp);
+ PathToRelativeW(tszDirectory, tszTemp);
SetDlgItemText(hwndDlg, IDC_CHAT_LOGDIRECTORY, mir_wstrlen(tszTemp) > 1 ? tszTemp : DEFLOGFILENAME);
}
psMalloc->Free(idList);
diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp index 3071b83494..5878735006 100644 --- a/plugins/SmileyAdd/src/general.cpp +++ b/plugins/SmileyAdd/src/general.cpp @@ -127,7 +127,7 @@ HICON ImageList_GetIconFixed(HIMAGELIST himl, INT i, UINT fStyle) void pathToRelative(const CMStringW &pSrc, CMStringW &pOut)
{
wchar_t szOutPath[MAX_PATH];
- PathToRelativeT(pSrc.c_str(), szOutPath);
+ PathToRelativeW(pSrc.c_str(), szOutPath);
pOut = szOutPath;
}
diff --git a/plugins/SplashScreen/src/options.cpp b/plugins/SplashScreen/src/options.cpp index 4fcef6b257..a3d9b9405c 100644 --- a/plugins/SplashScreen/src/options.cpp +++ b/plugins/SplashScreen/src/options.cpp @@ -201,7 +201,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP logMessage(L"Set path", szSplashFile);
#endif
// Make path relative
- int result = PathToRelativeT(szTempPath, szPath2Spash);
+ int result = PathToRelativeW(szTempPath, szPath2Spash);
if (result && mir_wstrlen(szPath2Spash) > 0) {
if (options.random) {
wchar_t *pos = wcsrchr(szPath2Spash, '\\');
@@ -258,7 +258,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP #endif
// Make path relative
- int result = PathToRelativeT(szTempPath, szSoundFilePath);
+ int result = PathToRelativeW(szTempPath, szSoundFilePath);
if (result && mir_wstrlen(szSoundFile) > 0)
SetDlgItemText(hwndDlg, IDC_SNDPATH, szSoundFilePath);
diff --git a/plugins/TabSRMM/src/chat/options.cpp b/plugins/TabSRMM/src/chat/options.cpp index f5e487e4d9..4c919e984f 100644 --- a/plugins/TabSRMM/src/chat/options.cpp +++ b/plugins/TabSRMM/src/chat/options.cpp @@ -798,7 +798,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM mir_wstrcat(tszDirectory, L"\\");
wchar_t tszTemp[MAX_PATH];
- PathToRelativeT(tszDirectory, tszTemp, szUserDir);
+ PathToRelativeW(tszDirectory, tszTemp, szUserDir);
SetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, mir_wstrlen(tszTemp) > 1 ? tszTemp : DEFLOGFILENAME);
}
psMalloc->Free(idList);
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index 49b60e07c4..4fcf61befd 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -1720,7 +1720,7 @@ panel_found: mir_snprintf(szCName, "%s_theme", CONTAINER_PREFIX);
if (mir_wstrlen(pContainer->szRelThemeFile) > 1) {
if (pContainer->fPrivateThemeChanged == TRUE) {
- PathToRelativeT(pContainer->szRelThemeFile, pContainer->szAbsThemeFile, M.getDataPath());
+ PathToRelativeW(pContainer->szRelThemeFile, pContainer->szAbsThemeFile, M.getDataPath());
db_set_ws(hContact, SRMSGMOD_T, szCName, pContainer->szRelThemeFile);
pContainer->fPrivateThemeChanged = FALSE;
}
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 0227613009..31245d3391 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -125,7 +125,7 @@ static int TSAPI ScanSkinDir(const wchar_t* tszFolder, HWND hwndCombobox) wcsncpy_s(szBuf, fd.cFileName, _TRUNCATE);
}
- PathToRelativeT(tszFinalName, tszRel, M.getSkinPath());
+ PathToRelativeW(tszFinalName, tszRel, M.getSkinPath());
if ((lr = SendMessage(hwndCombobox, CB_INSERTSTRING, -1, (LPARAM)szBuf)) != CB_ERR) {
wchar_t *idata = (wchar_t*)mir_alloc((mir_wstrlen(tszRel) + 1) * sizeof(wchar_t));
diff --git a/plugins/TabSRMM/src/utils.cpp b/plugins/TabSRMM/src/utils.cpp index 6877134d6e..45493f83b5 100644 --- a/plugins/TabSRMM/src/utils.cpp +++ b/plugins/TabSRMM/src/utils.cpp @@ -572,7 +572,7 @@ void Utils::SaveContainerSettings(TContainerData *pContainer, const char *szSett mir_snprintf(szCName, "%s%d_theme", szSetting, pContainer->iContainerIndex);
if (mir_wstrlen(pContainer->szRelThemeFile) > 1) {
if (pContainer->fPrivateThemeChanged == TRUE) {
- PathToRelativeT(pContainer->szRelThemeFile, pContainer->szAbsThemeFile, M.getDataPath());
+ PathToRelativeW(pContainer->szRelThemeFile, pContainer->szAbsThemeFile, M.getDataPath());
db_set_ws(NULL, SRMSGMOD_T, szCName, pContainer->szAbsThemeFile);
pContainer->fPrivateThemeChanged = FALSE;
}
diff --git a/plugins/XSoundNotify/src/dialog.cpp b/plugins/XSoundNotify/src/dialog.cpp index 7529110f34..4623ef27b6 100644 --- a/plugins/XSoundNotify/src/dialog.cpp +++ b/plugins/XSoundNotify/src/dialog.cpp @@ -81,7 +81,7 @@ static INT_PTR CALLBACK DlgProcContactsOptions(HWND hwndDlg, UINT msg, WPARAM wP if (p != NULL) {
if (mir_wstrcmpi(p->path, L"")) {
wchar_t shortpath[MAX_PATH];
- PathToRelativeT(p->path, shortpath);
+ PathToRelativeW(p->path, shortpath);
db_set_ws(hContact, SETTINGSNAME, SETTINGSKEY, shortpath);
}
db_set_b(hContact, SETTINGSNAME, SETTINGSIGNOREKEY, p->ignore);
diff --git a/plugins/XSoundNotify/src/options.cpp b/plugins/XSoundNotify/src/options.cpp index 62ff836c1e..ebdff5cacf 100644 --- a/plugins/XSoundNotify/src/options.cpp +++ b/plugins/XSoundNotify/src/options.cpp @@ -226,7 +226,7 @@ static INT_PTR CALLBACK OptsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM l for (int i = 0; i < XSN_Users.getCount(); i++) {
if (mir_wstrcmpi(XSN_Users[i]->path, L"")) {
wchar_t shortpath[MAX_PATH];
- PathToRelativeT(XSN_Users[i]->path, shortpath);
+ PathToRelativeW(XSN_Users[i]->path, shortpath);
db_set_ws(XSN_Users[i]->hContact, SETTINGSNAME, SETTINGSKEY, shortpath);
}
db_set_b(XSN_Users[i]->hContact, SETTINGSNAME, SETTINGSIGNOREKEY, XSN_Users[i]->ignore);
diff --git a/protocols/IcqOscarJ/src/icq_avatar.cpp b/protocols/IcqOscarJ/src/icq_avatar.cpp index 0ba204700d..57616ecde7 100644 --- a/protocols/IcqOscarJ/src/icq_avatar.cpp +++ b/protocols/IcqOscarJ/src/icq_avatar.cpp @@ -1225,7 +1225,7 @@ void avatars_server_connection::handleAvatarFam(BYTE *pBuffer, size_t wBufferLen if (!pCookieData->hContact) { // our avatar, set filename
wchar_t tmp[MAX_PATH * 2];
- PathToRelativeT(tszImageFile, tmp);
+ PathToRelativeW(tszImageFile, tmp);
ppro->setWString(NULL, "AvatarFile", tmp);
}
else { // contact's avatar set hash
diff --git a/protocols/IcqOscarJ/src/icqosc_svcs.cpp b/protocols/IcqOscarJ/src/icqosc_svcs.cpp index fad62bf3e7..55b78d8bfe 100644 --- a/protocols/IcqOscarJ/src/icqosc_svcs.cpp +++ b/protocols/IcqOscarJ/src/icqosc_svcs.cpp @@ -523,7 +523,7 @@ INT_PTR CIcqProto::SetMyAvatar(WPARAM, LPARAM lParam) debugLogA("Failed to save avatar hash.");
wchar_t tmp[MAX_PATH];
- PathToRelativeT(tszMyFile, tmp);
+ PathToRelativeW(tszMyFile, tmp);
setWString(NULL, "AvatarFile", tmp);
SAFE_FREE((void**)&hash);
}
diff --git a/protocols/MRA/src/MraAvatars.cpp b/protocols/MRA/src/MraAvatars.cpp index 8986f6e781..4e4183c1f3 100644 --- a/protocols/MRA/src/MraAvatars.cpp +++ b/protocols/MRA/src/MraAvatars.cpp @@ -318,7 +318,7 @@ void CMraProto::MraAvatarsThreadProc(LPVOID lpParameter) if (db_get_b(NULL, MRA_AVT_SECT_NAME, "ReturnAbsolutePath", MRA_AVT_DEFAULT_RET_ABC_PATH))
wcsncpy_s(ai.filename, wszFileName, _TRUNCATE);
else
- PathToRelativeT(wszFileName, ai.filename);
+ PathToRelativeW(wszFileName, ai.filename);
SetContactAvatarFormat(pmraaqiAvatarsQueueItem->hContact, dwAvatarFormat);
MraAvatarsSetContactTime(pmraaqiAvatarsQueueItem->hContact, "AvatarLastModifiedTime", &itAvatarLastModifiedTimeServer.stTime);
@@ -532,7 +532,7 @@ DWORD CMraProto::MraAvatarsQueueGetAvatar(HANDLE hQueue, DWORD dwFlags, MCONTACT if (db_get_b(NULL, MRA_AVT_SECT_NAME, "ReturnAbsolutePath", MRA_AVT_DEFAULT_RET_ABC_PATH))
mir_wstrncpy(lpszPath, wszFileName, MAX_PATH);
else
- PathToRelativeT(wszFileName, lpszPath);
+ PathToRelativeW(wszFileName, lpszPath);
}
if (pdwFormat)
*pdwFormat = ProtoGetAvatarFormat(lpszPath);
diff --git a/src/core/stdmsg/src/chat_options.cpp b/src/core/stdmsg/src/chat_options.cpp index f9b14c814f..11456ce2a9 100644 --- a/src/core/stdmsg/src/chat_options.cpp +++ b/src/core/stdmsg/src/chat_options.cpp @@ -491,7 +491,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, } { wchar_t szTemp[MAX_PATH]; - PathToRelativeT(g_Settings.pszLogDir, szTemp); + PathToRelativeW(g_Settings.pszLogDir, szTemp); SetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, szTemp); } SetDlgItemText(hwndDlg, IDC_HIGHLIGHTWORDS, g_Settings.pszHighlightWords); @@ -543,7 +543,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (idList) { SHGetPathFromIDList(idList, szDirectory); mir_wstrcat(szDirectory, L"\\"); - PathToRelativeT(szDirectory, szTemp); + PathToRelativeW(szDirectory, szTemp); SetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, mir_wstrlen(szTemp) > 1 ? szTemp : L"Logs\\"); CoTaskMemFree(idList); } diff --git a/src/mir_app/src/skin2opts.cpp b/src/mir_app/src/skin2opts.cpp index 2b7f77bfef..f3cb06356f 100644 --- a/src/mir_app/src/skin2opts.cpp +++ b/src/mir_app/src/skin2opts.cpp @@ -673,7 +673,7 @@ public: wchar_t filetmp[1] = { 0 };
if (wchar_t *file = OpenFileDlg(m_hwnd, filetmp, FALSE)) {
wchar_t filename[MAX_PATH];
- PathToRelativeT(file, filename);
+ PathToRelativeW(file, filename);
mir_free(file);
MySetCursor(IDC_WAIT);
@@ -940,7 +940,7 @@ INT_PTR CIconImportDlg::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) if (m_iDropHiLite != -1) {
wchar_t fullPath[MAX_PATH], filename[MAX_PATH];
m_iconSet.GetText(fullPath, _countof(fullPath));
- PathToRelativeT(fullPath, filename);
+ PathToRelativeW(fullPath, filename);
LVITEM lvi;
lvi.mask = LVIF_PARAM;
diff --git a/src/mir_app/src/sounds.cpp b/src/mir_app/src/sounds.cpp index 0aec43e34c..8c60ee3b62 100644 --- a/src/mir_app/src/sounds.cpp +++ b/src/mir_app/src/sounds.cpp @@ -330,7 +330,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM if (!GetOpenFileName(&ofn))
break;
- PathToRelativeT(str, strFull);
+ PathToRelativeW(str, strFull);
snd.ptszTempFile = mir_wstrdup(strFull);
SetDlgItemText(hwndDlg, IDC_LOCATION, strFull);
}
|