summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-01 22:52:26 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-01 22:52:26 +0000
commit427891e0d28becb428ae8435954399f2e4daa9fe (patch)
treed4ec79359e9b35293c3ff7ca25ccda6fd71f23b4 /src
parentec4498ee255a018ccb16061de4594618e7ab5690 (diff)
service call replaced with helper: MS_UTILS_PATHTOABSOLUTEW
git-svn-id: http://svn.miranda-ng.org/main/trunk@3827 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src')
-rw-r--r--src/core/stdchat/src/options.cpp4
-rw-r--r--src/core/stdclist/src/clcopts.cpp9
-rw-r--r--src/mir_core/langpack.cpp4
-rw-r--r--src/modules/database/database.cpp4
-rw-r--r--src/modules/database/dbini.cpp6
-rw-r--r--src/modules/icolib/skin2icons.cpp8
-rw-r--r--src/modules/icolib/skin2opts.cpp2
-rw-r--r--src/modules/netlib/netliblog.cpp4
-rw-r--r--src/modules/plugins/newplugins.cpp2
-rw-r--r--src/modules/skin/sounds.cpp8
-rw-r--r--src/modules/utils/bmpfilter.cpp2
-rw-r--r--src/modules/utils/path.cpp2
12 files changed, 27 insertions, 28 deletions
diff --git a/src/core/stdchat/src/options.cpp b/src/core/stdchat/src/options.cpp
index 75e56a0f60..d184b976ef 100644
--- a/src/core/stdchat/src/options.cpp
+++ b/src/core/stdchat/src/options.cpp
@@ -756,7 +756,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPA
}
else db_unset(NULL, "Chat", "LogDirectory");
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)pszText, (LPARAM)g_Settings.pszLogDir);
+ PathToAbsoluteT(pszText, g_Settings.pszLogDir);
iLen = GetWindowTextLength(GetDlgItem(hwndDlg, IDC_LOGTIMESTAMP));
if ( iLen > 0 ) {
@@ -991,7 +991,7 @@ void LoadGlobalSettings(void)
mir_free(tmpPath);
}
- CallService(MS_UTILS_PATHTOABSOLUTET, (WPARAM)pszTemp, (LPARAM)g_Settings.pszLogDir);
+ PathToAbsoluteT(pszTemp, g_Settings.pszLogDir);
}
g_Settings.LogIndentEnabled = (DBGetContactSettingByte(NULL, "Chat", "LogIndentEnabled", 1) != 0)?TRUE:FALSE;
diff --git a/src/core/stdclist/src/clcopts.cpp b/src/core/stdclist/src/clcopts.cpp
index 61c69e5849..fe578c6fd9 100644
--- a/src/core/stdclist/src/clcopts.cpp
+++ b/src/core/stdclist/src/clcopts.cpp
@@ -295,12 +295,11 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
DBVARIANT dbv;
if (!DBGetContactSettingString(NULL, "CLC", "BkBitmap", &dbv)) {
SetDlgItemTextA(hwndDlg, IDC_FILENAME, dbv.pszVal);
- if (ServiceExists(MS_UTILS_PATHTOABSOLUTE)) {
- char szPath[MAX_PATH];
- if (CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM) dbv.pszVal, (LPARAM) szPath))
- SetDlgItemTextA(hwndDlg, IDC_FILENAME, szPath);
- }
+ char szPath[MAX_PATH];
+ if ( PathToAbsolute(dbv.pszVal, szPath))
+ SetDlgItemTextA(hwndDlg, IDC_FILENAME, szPath);
+
DBFreeVariant(&dbv);
}
}
diff --git a/src/mir_core/langpack.cpp b/src/mir_core/langpack.cpp
index d9e7676345..7eb2ad7d9e 100644
--- a/src/mir_core/langpack.cpp
+++ b/src/mir_core/langpack.cpp
@@ -580,12 +580,12 @@ MIR_CORE_DLL(int) LoadLangPackModule(void)
hevChanged = CreateHookableEvent(ME_LANGPACK_CHANGED);
TCHAR szSearch[MAX_PATH];
- PathToAbsoluteT(_T("langpack_*.txt"), szSearch, NULL);
+ PathToAbsoluteT(_T("langpack_*.txt"), szSearch);
WIN32_FIND_DATA fd;
HANDLE hFind = FindFirstFile(szSearch, &fd);
if (hFind != INVALID_HANDLE_VALUE) {
- PathToAbsoluteT(fd.cFileName, szSearch, NULL);
+ PathToAbsoluteT(fd.cFileName, szSearch);
FindClose(hFind);
LoadLangPack(szSearch);
}
diff --git a/src/modules/database/database.cpp b/src/modules/database/database.cpp
index adea9e0caa..f9718181cf 100644
--- a/src/modules/database/database.cpp
+++ b/src/modules/database/database.cpp
@@ -71,7 +71,7 @@ int getProfilePath(TCHAR *buf, size_t cch)
if (profiledir[0] == 0)
_tcscpy(profiledir, _T("%miranda_path%\\Profiles"));
- size_t len = PathToAbsoluteT( VARST(profiledir), buf, NULL);
+ size_t len = PathToAbsoluteT( VARST(profiledir), buf);
if (buf[len-1] == '/' || buf[len-1] == '\\')
buf[len-1] = 0;
@@ -427,7 +427,7 @@ static int FindMirandaForProfile(TCHAR *szProfile)
int LoadDatabaseModule(void)
{
TCHAR szProfile[MAX_PATH];
- PathToAbsoluteT(_T("."), szProfile, NULL);
+ PathToAbsoluteT(_T("."), szProfile);
_tchdir(szProfile);
szProfile[0] = 0;
diff --git a/src/modules/database/dbini.cpp b/src/modules/database/dbini.cpp
index 0445da160e..442bd35567 100644
--- a/src/modules/database/dbini.cpp
+++ b/src/modules/database/dbini.cpp
@@ -415,11 +415,11 @@ static void DoAutoExec(void)
GetPrivateProfileString(_T("AutoExec"), _T("Glob"), _T("autoexec_*.ini"), szFindPath, SIZEOF(szFindPath), mirandabootini);
if (g_bDbCreated && szOnCreateFilename[0]) {
- PathToAbsoluteT( VARST(szOnCreateFilename), szIniPath, NULL);
+ PathToAbsoluteT( VARST(szOnCreateFilename), szIniPath);
ProcessIniFile(szIniPath, szSafeSections, szUnsafeSections, 0, 1);
}
- PathToAbsoluteT( VARST(szFindPath), szFindPath, NULL);
+ PathToAbsoluteT( VARST(szFindPath), szFindPath);
WIN32_FIND_DATA fd;
HANDLE hFind = FindFirstFile(szFindPath, &fd);
@@ -494,7 +494,7 @@ int InitIni(void)
DoAutoExec();
TCHAR szMirandaDir[MAX_PATH];
- PathToAbsoluteT(_T("."), szMirandaDir, NULL);
+ PathToAbsoluteT(_T("."), szMirandaDir);
hIniChangeNotification = FindFirstChangeNotification(szMirandaDir, 0, FILE_NOTIFY_CHANGE_FILE_NAME);
if (hIniChangeNotification != INVALID_HANDLE_VALUE) {
CreateServiceFunction("DB/Ini/CheckImportNow", CheckIniImportNow);
diff --git a/src/modules/icolib/skin2icons.cpp b/src/modules/icolib/skin2icons.cpp
index 9570709115..51b443197d 100644
--- a/src/modules/icolib/skin2icons.cpp
+++ b/src/modules/icolib/skin2icons.cpp
@@ -118,7 +118,7 @@ IconSourceFile* IconSourceFile_Get(const TCHAR* file, bool isPath)
return NULL;
if (isPath)
- PathToAbsoluteT(file, fileFull, NULL);
+ PathToAbsoluteT(file, fileFull);
/// TODO: convert path to long - eliminate duplicate items
else
_tcscpy(fileFull, file);
@@ -539,9 +539,9 @@ HANDLE IcoLib_AddNewIcon(int hLangpack, SKINICONDESC* sid)
if (sid->pszDefaultFile) {
WCHAR fileFull[ MAX_PATH ];
if (utf_path)
- PathToAbsoluteT(sid->pwszDefaultFile, fileFull, NULL);
+ PathToAbsoluteT(sid->pwszDefaultFile, fileFull);
else
- PathToAbsoluteT( StrConvT(sid->pszDefaultFile), fileFull, NULL);
+ PathToAbsoluteT( StrConvT(sid->pszDefaultFile), fileFull);
item->default_file = mir_wstrdup(fileFull);
}
item->default_indx = sid->iDefaultIndex;
@@ -681,7 +681,7 @@ HICON IconItem_GetIcon(IcolibItem* item, bool big)
if ( !source && !DBGetContactSettingTString(NULL, "SkinIcons", item->name, &dbv)) {
TCHAR tszFullPath[MAX_PATH];
- PathToAbsoluteT(dbv.ptszVal, tszFullPath, NULL);
+ PathToAbsoluteT(dbv.ptszVal, tszFullPath);
int cx = item->cx ? item->cx : GetSystemMetrics(big ? SM_CXICON : SM_CXSMICON);
int cy = item->cy ? item->cy : GetSystemMetrics(big ? SM_CYICON : SM_CYSMICON);
source = GetIconSourceItemFromPath(tszFullPath, cx, cy);
diff --git a/src/modules/icolib/skin2opts.cpp b/src/modules/icolib/skin2opts.cpp
index bea305bf78..107149f087 100644
--- a/src/modules/icolib/skin2opts.cpp
+++ b/src/modules/icolib/skin2opts.cpp
@@ -56,7 +56,7 @@ static HICON ExtractIconFromPath(const TCHAR *path, int cxIcon, int cyIcon)
n = _ttoi(comma+1);
*comma = 0;
}
- PathToAbsoluteT(file, fileFull, NULL);
+ PathToAbsoluteT(file, fileFull);
hIcon = NULL;
//SHOULD BE REPLACED WITH GOOD ENOUGH FUNCTION
diff --git a/src/modules/netlib/netliblog.cpp b/src/modules/netlib/netliblog.cpp
index 81ae80c604..76331b51e3 100644
--- a/src/modules/netlib/netliblog.cpp
+++ b/src/modules/netlib/netliblog.cpp
@@ -145,7 +145,7 @@ static INT_PTR CALLBACK LogOptionsDlgProc(HWND hwndDlg, UINT message, WPARAM wPa
TCHAR path[MAX_PATH];
GetWindowText((HWND)lParam, path, MAX_PATH);
- PathToAbsoluteT( VARST(path), path, NULL);
+ PathToAbsoluteT( VARST(path), path);
SetDlgItemText(hwndDlg, IDC_PATH, path);
}
break;
@@ -567,7 +567,7 @@ void NetlibLogInit(void)
logOptions.szUserFile = mir_tstrdup(dbv.ptszVal);
TCHAR path[MAX_PATH];
- PathToAbsoluteT( VARST(dbv.ptszVal), path, NULL);
+ PathToAbsoluteT( VARST(dbv.ptszVal), path);
logOptions.szFile = mir_tstrdup(path);
db_free(&dbv);
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp
index 94c04b23e2..b3c46d4482 100644
--- a/src/modules/plugins/newplugins.cpp
+++ b/src/modules/plugins/newplugins.cpp
@@ -836,7 +836,7 @@ int LoadNewPluginsModuleInfos(void)
mirandaVersion = (DWORD)CallService(MS_SYSTEM_GETVERSION, 0, 0);
// remember where the mirandaboot.ini goes
- PathToAbsoluteT(_T("mirandaboot.ini"), mirandabootini, NULL);
+ PathToAbsoluteT(_T("mirandaboot.ini"), mirandabootini);
// look for all *.dll's
enumPlugins(scanPluginsDir, 0, 0);
return 0;
diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp
index 19a469a13e..8133a7e5ef 100644
--- a/src/modules/skin/sounds.cpp
+++ b/src/modules/skin/sounds.cpp
@@ -127,7 +127,7 @@ static INT_PTR ServiceSkinPlaySound(WPARAM, LPARAM lParam)
DBVARIANT dbv;
if ( DBGetContactSettingTString(NULL, "SkinSounds", pszSoundName, &dbv) == 0) {
TCHAR szFull[MAX_PATH];
- PathToAbsoluteT(dbv.ptszVal, szFull, NULL);
+ PathToAbsoluteT(dbv.ptszVal, szFull);
NotifyEventHooks(hPlayEvent, 0, (LPARAM)szFull);
db_free(&dbv);
}
@@ -251,7 +251,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
DBVARIANT dbv;
if ( !DBGetContactSettingTString(NULL, "SkinSounds", arSounds[tvi.lParam].name, &dbv)) {
TCHAR szPathFull[MAX_PATH];
- PathToAbsoluteT(dbv.ptszVal, szPathFull, NULL);
+ PathToAbsoluteT(dbv.ptszVal, szPathFull);
NotifyEventHooks(hPlayEvent, 1, (LPARAM)szPathFull);
db_free(&dbv);
}
@@ -281,12 +281,12 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
if (db_get_b(NULL, "SkinSoundsOff", snd.name, 0) == 0) {
DBVARIANT dbv;
if (DBGetContactSettingTString(NULL, "SkinSounds", snd.name, &dbv) == 0) {
- PathToAbsoluteT(dbv.ptszVal, strdir, NULL);
+ PathToAbsoluteT(dbv.ptszVal, strdir);
db_free(&dbv);
} } }
mir_sntprintf(strFull, SIZEOF(strFull), _T("%s"), snd.ptszTempFile ? snd.ptszTempFile : _T(""));
- PathToAbsoluteT(strFull, strdir, NULL);
+ PathToAbsoluteT(strFull, strdir);
OPENFILENAME ofn;
ZeroMemory(&ofn, sizeof(ofn));
diff --git a/src/modules/utils/bmpfilter.cpp b/src/modules/utils/bmpfilter.cpp
index 2f111f8ae6..411c822e33 100644
--- a/src/modules/utils/bmpfilter.cpp
+++ b/src/modules/utils/bmpfilter.cpp
@@ -37,7 +37,7 @@ static INT_PTR sttBitmapLoader(const TCHAR* ptszFileName)
short picType;
TCHAR szFilename[MAX_PATH];
- if ( !PathToAbsoluteT(ptszFileName, szFilename, NULL))
+ if ( !PathToAbsoluteT(ptszFileName, szFilename))
mir_sntprintf(szFilename, SIZEOF(szFilename), _T("%s"), ptszFileName);
int filenameLen = lstrlen(szFilename);
diff --git a/src/modules/utils/path.cpp b/src/modules/utils/path.cpp
index 0e9f38eb42..75fad634e8 100644
--- a/src/modules/utils/path.cpp
+++ b/src/modules/utils/path.cpp
@@ -35,7 +35,7 @@ static INT_PTR pathToRelative(WPARAM wParam, LPARAM lParam)
static INT_PTR pathToAbsolute(WPARAM wParam, LPARAM lParam)
{
- return PathToAbsolute((char*)wParam, (char*)lParam, NULL);
+ return PathToAbsolute((char*)wParam, (char*)lParam);
}
static INT_PTR createDirTree(WPARAM, LPARAM lParam)