summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2013-03-01 22:15:29 +0000
committerGeorge Hazan <george.hazan@gmail.com>2013-03-01 22:15:29 +0000
commitec4498ee255a018ccb16061de4594618e7ab5690 (patch)
tree4d11ae3444c95fba70568b56897acee497a7e6f9 /src
parent12012a3ea4d58c6624f8065c2ca2afb96090b70f (diff)
service call replaced with helper: MS_UTILS_PATHTORELATIVE
git-svn-id: http://svn.miranda-ng.org/main/trunk@3826 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.cpp8
-rw-r--r--src/modules/icolib/skin2opts.cpp4
-rw-r--r--src/modules/skin/sounds.cpp2
4 files changed, 7 insertions, 11 deletions
diff --git a/src/core/stdchat/src/options.cpp b/src/core/stdchat/src/options.cpp
index 6eb8721533..75e56a0f60 100644
--- a/src/core/stdchat/src/options.cpp
+++ b/src/core/stdchat/src/options.cpp
@@ -657,7 +657,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPA
}
{
TCHAR szTemp[MAX_PATH];
- CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)g_Settings.pszLogDir, (LPARAM)szTemp );
+ PathToRelativeT(g_Settings.pszLogDir, szTemp);
SetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, szTemp);
}
SetDlgItemText(hwndDlg, IDC_HIGHLIGHTWORDS, g_Settings.pszHighlightWords);
@@ -710,7 +710,7 @@ static INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPA
if ( idList ) {
SHGetPathFromIDList(idList,szDirectory);
lstrcat(szDirectory, _T("\\"));
- CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)szDirectory, (LPARAM)szTemp);
+ PathToRelativeT(szDirectory, szTemp);
SetDlgItemText(hwndDlg, IDC_LOGDIRECTORY, lstrlen(szTemp) > 1 ? szTemp : _T("Logs\\"));
CoTaskMemFree(idList);
}
diff --git a/src/core/stdclist/src/clcopts.cpp b/src/core/stdclist/src/clcopts.cpp
index 2f29d8570a..61c69e5849 100644
--- a/src/core/stdclist/src/clcopts.cpp
+++ b/src/core/stdclist/src/clcopts.cpp
@@ -391,12 +391,8 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
{
char str[MAX_PATH], strrel[MAX_PATH];
GetDlgItemTextA(hwndDlg, IDC_FILENAME, str, SIZEOF(str));
- if (ServiceExists(MS_UTILS_PATHTORELATIVE)) {
- if (CallService(MS_UTILS_PATHTORELATIVE, (WPARAM) str, (LPARAM) strrel))
- DBWriteContactSettingString(NULL, "CLC", "BkBitmap", strrel);
- else
- DBWriteContactSettingString(NULL, "CLC", "BkBitmap", str);
- }
+ if ( PathToRelative(str, strrel))
+ DBWriteContactSettingString(NULL, "CLC", "BkBitmap", strrel);
else
DBWriteContactSettingString(NULL, "CLC", "BkBitmap", str);
}
diff --git a/src/modules/icolib/skin2opts.cpp b/src/modules/icolib/skin2opts.cpp
index e18382844d..bea305bf78 100644
--- a/src/modules/icolib/skin2opts.cpp
+++ b/src/modules/icolib/skin2opts.cpp
@@ -547,7 +547,7 @@ INT_PTR CALLBACK DlgProcIconImport(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
LVITEM lvi;
GetDlgItemText(hwndDlg, IDC_ICONSET, fullPath, SIZEOF(fullPath));
- CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)fullPath, (LPARAM)filename);
+ PathToRelativeT(fullPath, filename);
lvi.mask = LVIF_PARAM;
lvi.iItem = dragItem; lvi.iSubItem = 0;
ListView_GetItem(hPreview, &lvi);
@@ -874,7 +874,7 @@ INT_PTR CALLBACK DlgProcIcoLibOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
HWND htv = GetDlgItem(hwndDlg, IDC_CATEGORYLIST);
TCHAR filename[ MAX_PATH ];
- CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)file, (LPARAM)filename);
+ PathToRelativeT(file, filename);
SAFE_FREE((void**)&file);
MySetCursor(IDC_WAIT);
diff --git a/src/modules/skin/sounds.cpp b/src/modules/skin/sounds.cpp
index fc9443cf4d..19a469a13e 100644
--- a/src/modules/skin/sounds.cpp
+++ b/src/modules/skin/sounds.cpp
@@ -311,7 +311,7 @@ INT_PTR CALLBACK DlgProcSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM
if ( !GetOpenFileName(&ofn))
break;
- CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)str, (LPARAM)strFull);
+ PathToRelativeT(str, strFull);
snd.ptszTempFile = mir_tstrdup(strFull);
SetDlgItemText(hwndDlg, IDC_LOCATION, strFull);
}