diff options
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/AssocMgr/src/assoclist.cpp | 4 | ||||
-rw-r--r-- | plugins/AvatarHistory/src/AvatarHistory.cpp | 2 | ||||
-rw-r--r-- | plugins/ClientChangeNotify/src/Misc.h | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_clcopts.cpp | 11 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_skineditor.cpp | 2 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_skinengine.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_modern/src/modern_skinopt.cpp | 6 | ||||
-rw-r--r-- | plugins/Clist_mw/src/clcopts.cpp | 20 | ||||
-rw-r--r-- | plugins/Clist_nicer/src/clcopts.cpp | 2 | ||||
-rw-r--r-- | plugins/IEView/src/Options.cpp | 47 | ||||
-rw-r--r-- | plugins/ModernOpt/src/mopt_selector.cpp | 2 | ||||
-rw-r--r-- | plugins/NewXstatusNotify/src/indsnd.cpp | 2 | ||||
-rw-r--r-- | plugins/NewsAggregator/Src/Utils.cpp | 5 | ||||
-rw-r--r-- | plugins/NotifyAnything/src/options.cpp | 2 | ||||
-rw-r--r-- | plugins/Scriver/src/chat/options.cpp | 4 | ||||
-rw-r--r-- | plugins/SmileyAdd/src/general.cpp | 2 | ||||
-rw-r--r-- | plugins/SplashScreen/src/options.cpp | 6 | ||||
-rw-r--r-- | plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp | 2 | ||||
-rw-r--r-- | plugins/VersionInfo/src/utils.cpp | 4 |
19 files changed, 53 insertions, 78 deletions
diff --git a/plugins/AssocMgr/src/assoclist.cpp b/plugins/AssocMgr/src/assoclist.cpp index cd9e001292..2ea9980597 100644 --- a/plugins/AssocMgr/src/assoclist.cpp +++ b/plugins/AssocMgr/src/assoclist.cpp @@ -62,8 +62,8 @@ static void SetAssocEnabled(const ASSOCDATA *assoc, BOOL fEnabled) DBWriteContactSettingByte(NULL, "AssocMgr", szSetting, (BYTE)fEnabled);
/* dll name for uninstall */
if(assoc->hInstance!= NULL && assoc->hInstance!= hInst && assoc->hInstance!= GetModuleHandle(NULL))
- if(GetModuleFileName(assoc->hInstance, szBuf, SIZEOF(szBuf)))
- if(CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)szBuf, (LPARAM)szDLL)) {
+ if( GetModuleFileName(assoc->hInstance, szBuf, SIZEOF(szBuf)))
+ if( PathToRelativeT(szBuf, szDLL)) {
mir_snprintf(szSetting, sizeof(szSetting), "module_%s", assoc->pszClassName);
DBWriteContactSettingTString(NULL, "AssocMgr", szSetting, szDLL);
}
diff --git a/plugins/AvatarHistory/src/AvatarHistory.cpp b/plugins/AvatarHistory/src/AvatarHistory.cpp index a7698bca12..dcc2679bcd 100644 --- a/plugins/AvatarHistory/src/AvatarHistory.cpp +++ b/plugins/AvatarHistory/src/AvatarHistory.cpp @@ -521,7 +521,7 @@ static int AvatarChanged(WPARAM wParam, LPARAM lParam) if (ContactEnabled(hContact, "LogToHistory", AVH_DEF_LOGTOHISTORY))
{
TCHAR rel_path[MAX_PATH] = _T("");
- CallService(MS_UTILS_PATHTORELATIVET,(WPARAM)history_filename,(LPARAM)rel_path);
+ PathToRelativeT(history_filename, rel_path);
char *blob = mir_utf8encodeT(rel_path);
int flags = DBEF_READ | DBEF_UTF;
if(ServiceExists(MS_HISTORYEVENTS_ADD_TO_HISTORY))
diff --git a/plugins/ClientChangeNotify/src/Misc.h b/plugins/ClientChangeNotify/src/Misc.h index 1dc43fbc51..9ef8337636 100644 --- a/plugins/ClientChangeNotify/src/Misc.h +++ b/plugins/ClientChangeNotify/src/Misc.h @@ -43,7 +43,7 @@ __inline TCString Path_ToRelative(TCString &Path) {
CString Str;
Str.GetBuffer(MAX_PATH);
- CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)(const char*)TCHAR2ANSI(Path), (LPARAM)(char*)Str);
+ PathToRelative(TCHAR2ANSI(Path), Str);
Str.ReleaseBuffer();
return ANSI2TCHAR(Str);
}
diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index 8f8b550683..107a46958f 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -677,13 +677,10 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w {
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))
- db_set_s(NULL,"StatusBar","BkBitmap",strrel);
- else db_set_s(NULL,"StatusBar","BkBitmap",str);
- }
- else db_set_s(NULL,"StatusBar","BkBitmap",str);
-
+ if ( PathToRelative(str, strrel))
+ db_set_s(NULL,"StatusBar","BkBitmap",strrel);
+ else
+ db_set_s(NULL,"StatusBar","BkBitmap",str);
}
{
WORD flags = 0;
diff --git a/plugins/Clist_modern/src/modern_skineditor.cpp b/plugins/Clist_modern/src/modern_skineditor.cpp index 6fb70ab4d0..7c8526c62c 100644 --- a/plugins/Clist_modern/src/modern_skineditor.cpp +++ b/plugins/Clist_modern/src/modern_skineditor.cpp @@ -356,7 +356,7 @@ int GetShortFileName(char * FullFile) return 1; //skin folder relative
}
- CallService(MS_UTILS_PATHTORELATIVE,(WPARAM)FullFile,(LPARAM)buf);
+ PathToRelative(FullFile, buf);
if (buf[0] != '\\' && buf[1] != ':')
_snprintf(FullFile,MAX_PATH,"\\%s",buf);
else
diff --git a/plugins/Clist_modern/src/modern_skinengine.cpp b/plugins/Clist_modern/src/modern_skinengine.cpp index 475760652f..d86d025d4a 100644 --- a/plugins/Clist_modern/src/modern_skinengine.cpp +++ b/plugins/Clist_modern/src/modern_skinengine.cpp @@ -228,7 +228,7 @@ HRESULT IniParser::WriteStrToDb( const char * szSection, const char * szName, co char bb[MAX_PATH*2] = {0};
int pp, i;
pp = -1;
- CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)szFileName, (LPARAM)fn);
+ PathToRelative(szFileName, fn);
{
for (i = strlen(fn); i >= 0; i--) if (fn[i] == '.') break;
if (i>0) fn[i] = '\0';
@@ -264,7 +264,7 @@ int IniParser::GetSkinFolder( IN const TCHAR * szFileName, OUT TCHAR * pszFolder _sntprintf(pszFolderName,MAX_PATH,_T("%s\\%s"),custom_folder,cus);
mir_free(szBuff);
- CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)pszFolderName, (LPARAM)pszFolderName);
+ PathToRelativeT(pszFolderName, pszFolderName);
return 0;
}
@@ -2411,7 +2411,7 @@ int ske_LoadSkinFromIniFile(TCHAR * szFileName, BOOL bOnlyObjects) ske_DeleteAllSettingInSection("ModernSkin");
IniParser::GetSkinFolder(szFileName,skinFolder);
- CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)szFileName, (LPARAM)skinFile);
+ PathToRelativeT(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 20d6db4cfb..522446fd62 100644 --- a/plugins/Clist_modern/src/modern_skinopt.cpp +++ b/plugins/Clist_modern/src/modern_skinopt.cpp @@ -335,8 +335,8 @@ INT_PTR CALLBACK DlgSkinOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara sd = ( SkinListData* )nmtv->itemNew.lParam;
{
TCHAR buf[MAX_PATH];
- CallService( MS_UTILS_PATHTORELATIVET, (WPARAM)sd->File, (LPARAM)buf );
- SendDlgItemMessage( hwndDlg, IDC_EDIT_SKIN_FILENAME, WM_SETTEXT, 0, (LPARAM)buf );
+ PathToRelativeT(sd->File, buf);
+ SendDlgItemMessage(hwndDlg, IDC_EDIT_SKIN_FILENAME, WM_SETTEXT, 0, (LPARAM)buf );
}
{
TCHAR prfn[MAX_PATH] = {0};
@@ -602,7 +602,7 @@ HTREEITEM AddItemToTree( HWND hTree, TCHAR * folder, TCHAR * itemName, void * da TCHAR * ptr;
TCHAR * ptrE;
BOOL ext = FALSE;
- CallService( MS_UTILS_PATHTORELATIVET, (WPARAM)folder, (LPARAM)path );
+ PathToRelativeT(folder, path);
ptrE = path;
while ( *ptrE != _T('\\') && *ptrE != _T('\0') && *ptrE != _T(':')) ptrE++;
if ( *ptrE == _T('\\'))
diff --git a/plugins/Clist_mw/src/clcopts.cpp b/plugins/Clist_mw/src/clcopts.cpp index a812638c09..5d74eddc72 100644 --- a/plugins/Clist_mw/src/clcopts.cpp +++ b/plugins/Clist_mw/src/clcopts.cpp @@ -408,12 +408,10 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w 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))
- db_set_s(NULL,"StatusBar","BkBitmap",strrel);
- else db_set_s(NULL,"StatusBar","BkBitmap",str);
- }
- else db_set_s(NULL,"StatusBar","BkBitmap",str);
+ if ( PathToRelative(str, strrel))
+ db_set_s(NULL,"StatusBar","BkBitmap",strrel);
+ else
+ db_set_s(NULL,"StatusBar","BkBitmap",str);
WORD flags = 0;
if (IsDlgButtonChecked(hwndDlg,IDC_STRETCHH)) flags |= CLB_STRETCHH;
@@ -530,12 +528,10 @@ 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))
- db_set_s(NULL,"CLC","BkBitmap",strrel);
- else db_set_s(NULL,"CLC","BkBitmap",str);
- }
- else db_set_s(NULL,"CLC","BkBitmap",str);
+ if ( PathToRelative(str, strrel))
+ db_set_s(NULL,"CLC","BkBitmap",strrel);
+ else
+ db_set_s(NULL,"CLC","BkBitmap",str);
}
{ WORD flags = 0;
if (IsDlgButtonChecked(hwndDlg,IDC_STRETCHH)) flags |= CLB_STRETCHH;
diff --git a/plugins/Clist_nicer/src/clcopts.cpp b/plugins/Clist_nicer/src/clcopts.cpp index be59b7af1e..bf2cb0c777 100644 --- a/plugins/Clist_nicer/src/clcopts.cpp +++ b/plugins/Clist_nicer/src/clcopts.cpp @@ -836,7 +836,7 @@ 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 (CallService(MS_UTILS_PATHTORELATIVE, (WPARAM) str, (LPARAM) strrel))
+ if ( PathToRelative(str, strrel))
cfg::writeString(NULL, "CLC", "BkBitmap", strrel);
else
cfg::writeString(NULL, "CLC", "BkBitmap", str);
diff --git a/plugins/IEView/src/Options.cpp b/plugins/IEView/src/Options.cpp index c29060fc18..e9ff0922f5 100644 --- a/plugins/IEView/src/Options.cpp +++ b/plugins/IEView/src/Options.cpp @@ -1729,23 +1729,20 @@ void Options::saveProtocolSettings() { sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_FLAGS);
DBWriteContactSettingDword(NULL, ieviewModuleName, dbsName, proto->getSRMMFlags());
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_BACKGROUND);
- strcpy (tmpPath, proto->getSRMMBackgroundFilename());
- if (ServiceExists(MS_UTILS_PATHTORELATIVE)) {
- CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)proto->getSRMMBackgroundFilename(), (LPARAM)tmpPath);
- }
+ strcpy(tmpPath, proto->getSRMMBackgroundFilename());
+ PathToRelative(proto->getSRMMBackgroundFilename(), tmpPath);
DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_CSS);
strcpy (tmpPath, proto->getSRMMCssFilename());
- if (ServiceExists(MS_UTILS_PATHTORELATIVE)) {
- CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)proto->getSRMMCssFilename(), (LPARAM)tmpPath);
- }
+ PathToRelative(proto->getSRMMCssFilename(), tmpPath);
DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_SRMM_TEMPLATE);
strcpy (tmpPath, proto->getSRMMTemplateFilename());
- if (ServiceExists(MS_UTILS_PATHTORELATIVE)) {
- CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)proto->getSRMMTemplateFilename(), (LPARAM)tmpPath);
- }
+ PathToRelative(proto->getSRMMTemplateFilename(), tmpPath);
DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+
/* Group Chat settings */
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_ENABLE);
DBWriteContactSettingByte(NULL, ieviewModuleName, dbsName, proto->isChatEnable());
@@ -1755,22 +1752,19 @@ void Options::saveProtocolSettings() { DBWriteContactSettingDword(NULL, ieviewModuleName, dbsName, proto->getChatFlags());
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_BACKGROUND);
strcpy (tmpPath, proto->getChatBackgroundFilename());
- if (ServiceExists(MS_UTILS_PATHTORELATIVE)) {
- CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)proto->getChatBackgroundFilename(), (LPARAM)tmpPath);
- }
+ PathToRelative(proto->getChatBackgroundFilename(), tmpPath);
DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_CSS);
strcpy (tmpPath, proto->getChatCssFilename());
- if (ServiceExists(MS_UTILS_PATHTORELATIVE)) {
- CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)proto->getChatCssFilename(), (LPARAM)tmpPath);
- }
+ PathToRelative(proto->getChatCssFilename(), tmpPath);
DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_CHAT_TEMPLATE);
strcpy (tmpPath, proto->getChatTemplateFilename());
- if (ServiceExists(MS_UTILS_PATHTORELATIVE)) {
- CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)proto->getChatTemplateFilename(), (LPARAM)tmpPath);
- }
+ PathToRelative(proto->getChatTemplateFilename(), tmpPath);
DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+
/* History settings */
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_ENABLE);
DBWriteContactSettingByte(NULL, ieviewModuleName, dbsName, proto->isHistoryEnable());
@@ -1780,22 +1774,17 @@ void Options::saveProtocolSettings() { DBWriteContactSettingDword(NULL, ieviewModuleName, dbsName, proto->getHistoryFlags());
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_BACKGROUND);
strcpy (tmpPath, proto->getHistoryBackgroundFilename());
- if (ServiceExists(MS_UTILS_PATHTORELATIVE)) {
- CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)proto->getHistoryBackgroundFilename(), (LPARAM)tmpPath);
- }
+ PathToRelative(proto->getHistoryBackgroundFilename(), tmpPath);
DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_CSS);
strcpy (tmpPath, proto->getHistoryCssFilename());
- if (ServiceExists(MS_UTILS_PATHTORELATIVE)) {
- CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)proto->getHistoryCssFilename(), (LPARAM)tmpPath);
- }
+ PathToRelative(proto->getHistoryCssFilename(), tmpPath);
DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
+
sprintf(dbsName, "%s.%s", proto->getProtocolName(), DBS_HISTORY_TEMPLATE);
strcpy (tmpPath, proto->getHistoryTemplateFilename());
- if (ServiceExists(MS_UTILS_PATHTORELATIVE)) {
- CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)proto->getHistoryTemplateFilename(), (LPARAM)tmpPath);
- }
+ PathToRelative(proto->getHistoryTemplateFilename(), tmpPath);
DBWriteContactSettingString(NULL, ieviewModuleName, dbsName, tmpPath);
-
}
}
diff --git a/plugins/ModernOpt/src/mopt_selector.cpp b/plugins/ModernOpt/src/mopt_selector.cpp index f29e662a98..126622113a 100644 --- a/plugins/ModernOpt/src/mopt_selector.cpp +++ b/plugins/ModernOpt/src/mopt_selector.cpp @@ -97,7 +97,7 @@ struct TSkinListItem GetCurrentDirectory(SIZEOF(curPath), curPath);
path = (TCHAR *)mir_alloc(MAX_PATH * sizeof(TCHAR));
- CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)curPath, (LPARAM)path);
+ PathToRelativeT(curPath, path);
int length = lstrlen(curPath)+lstrlen(fn)+2;
filename = (TCHAR *)mir_alloc(length * sizeof(TCHAR));
diff --git a/plugins/NewXstatusNotify/src/indsnd.cpp b/plugins/NewXstatusNotify/src/indsnd.cpp index dc47decc5c..80fdc8279d 100644 --- a/plugins/NewXstatusNotify/src/indsnd.cpp +++ b/plugins/NewXstatusNotify/src/indsnd.cpp @@ -281,7 +281,7 @@ INT_PTR CALLBACK DlgProcSoundUIPage(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA else
{
TCHAR stzSoundPath[MAX_PATH] = { 0 };
- CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)buff, (LPARAM)stzSoundPath);
+ PathToRelativeT(buff, stzSoundPath);
if (lvi.lParam == ID_STATUS_FROMOFFLINE)
db_set_ws(hContact, MODULE, "UserFromOffline", stzSoundPath);
else
diff --git a/plugins/NewsAggregator/Src/Utils.cpp b/plugins/NewsAggregator/Src/Utils.cpp index c88584a4b7..f55d1ea9b0 100644 --- a/plugins/NewsAggregator/Src/Utils.cpp +++ b/plugins/NewsAggregator/Src/Utils.cpp @@ -608,11 +608,6 @@ BOOL DownloadFile(LPCTSTR tszURL, LPCTSTR tszLocal) return ret;
}
-size_t PathToRelative(const TCHAR *pSrc, TCHAR *pOut)
-{
- return CallService( MS_UTILS_PATHTORELATIVET, (WPARAM)pSrc, (LPARAM)pOut );
-}
-
typedef HRESULT (MarkupCallback)(IHTMLDocument3*, BSTR& message);
HRESULT TestMarkupServices(BSTR bstrHtml, MarkupCallback* pCallback, BSTR& message)
diff --git a/plugins/NotifyAnything/src/options.cpp b/plugins/NotifyAnything/src/options.cpp index 53c06ecf23..7574cbf867 100644 --- a/plugins/NotifyAnything/src/options.cpp +++ b/plugins/NotifyAnything/src/options.cpp @@ -89,7 +89,7 @@ INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara ofn.Flags = OFN_PATHMUSTEXIST | OFN_HIDEREADONLY;
ofn.lpstrDefExt = _T("log");
if ( GetOpenFileName(&ofn)) {
- CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)(char*) szTemp, (LPARAM)(char*) szTemp1);
+ PathToRelativeT(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 3cb5352cc0..1057196dbf 100644 --- a/plugins/Scriver/src/chat/options.cpp +++ b/plugins/Scriver/src/chat/options.cpp @@ -383,7 +383,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa SendDlgItemMessage(hwndDlg,IDC_CHAT_SPIN3,UDM_SETPOS,0,MAKELONG(DBGetContactSettingWord(NULL,"Chat","LoggingLimit",100),0));
{
TCHAR tszTemp[MAX_PATH];
- CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)g_Settings.pszLogDir, (LPARAM)tszTemp );
+ PathToRelativeT(g_Settings.pszLogDir, tszTemp);
SetDlgItemText(hwndDlg, IDC_CHAT_LOGDIRECTORY, tszTemp);
}
if (ServiceExists(MS_UTILS_REPLACEVARS)) {
@@ -485,7 +485,7 @@ INT_PTR CALLBACK DlgProcOptions2(HWND hwndDlg,UINT uMsg,WPARAM wParam,LPARAM lPa if (idList) {
SHGetPathFromIDList(idList,tszDirectory);
lstrcat(tszDirectory, _T("\\"));
- CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)tszDirectory, (LPARAM)tszTemp );
+ PathToRelativeT(tszDirectory, tszTemp);
SetWindowText(GetDlgItem(hwndDlg, IDC_CHAT_LOGDIRECTORY), lstrlen(tszTemp) > 1?tszTemp:DEFLOGFILENAME);
}
psMalloc->Free(idList);
diff --git a/plugins/SmileyAdd/src/general.cpp b/plugins/SmileyAdd/src/general.cpp index 8b0b306998..4f5c86c811 100644 --- a/plugins/SmileyAdd/src/general.cpp +++ b/plugins/SmileyAdd/src/general.cpp @@ -150,7 +150,7 @@ HICON ImageList_GetIconFixed (HIMAGELIST himl, INT i, UINT fStyle) void pathToRelative(const bkstring& pSrc, bkstring& pOut)
{
TCHAR szOutPath[MAX_PATH];
- CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)pSrc.c_str(), (LPARAM)szOutPath);
+ PathToRelativeT(pSrc.c_str(), szOutPath);
pOut = szOutPath;
}
diff --git a/plugins/SplashScreen/src/options.cpp b/plugins/SplashScreen/src/options.cpp index 6d5cf7c553..c604d305f0 100644 --- a/plugins/SplashScreen/src/options.cpp +++ b/plugins/SplashScreen/src/options.cpp @@ -206,8 +206,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP #endif
// Make path relative
- int result = CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)szTempPath, (LPARAM)szPath2Spash);
-
+ int result = PathToRelativeT(szTempPath, szPath2Spash);
if(result && lstrlen(szPath2Spash) > 0)
{
if (options.random)
@@ -271,8 +270,7 @@ INT_PTR CALLBACK DlgProcOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lP #endif
// Make path relative
- int result = CallService(MS_UTILS_PATHTORELATIVET, (WPARAM)szTempPath, (LPARAM)szSoundFilePath);
-
+ int result = PathToRelativeT(szTempPath, szSoundFilePath);
if(result && lstrlen(szSoundFile) > 0)
SetWindowText(GetDlgItem(hwndDlg, IDC_SNDPATH),szSoundFilePath);
diff --git a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp index 14c6a0c261..c00751dabe 100644 --- a/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp +++ b/plugins/UserInfoEx/src/ex_import/dlg_ExImOpenSaveFile.cpp @@ -262,7 +262,7 @@ static VOID SaveInitialDir(LPSTR pszInitialDir) if (p = mir_strrchr(pszInitialDir, '\\')) {
*p = 0;
- if (CallService(MS_UTILS_PATHTORELATIVE, (WPARAM)pszInitialDir, (LPARAM)szRelative))
+ if ( PathToRelative(pszInitialDir, szRelative))
DB::Setting::WriteAString(0, MODNAME, "vCardPath", szRelative);
else
DB::Setting::WriteAString(0, MODNAME, "vCardPath", pszInitialDir);
diff --git a/plugins/VersionInfo/src/utils.cpp b/plugins/VersionInfo/src/utils.cpp index bb63a3cf3f..79ab0b564e 100644 --- a/plugins/VersionInfo/src/utils.cpp +++ b/plugins/VersionInfo/src/utils.cpp @@ -98,10 +98,10 @@ TCHAR *AbsolutePathToRelative(TCHAR *szAbsolute, TCHAR *szRelative, size_t size) {
if (size < MAX_PATH) {
TCHAR buffer[MAX_PATH];
- CallService(MS_UTILS_PATHTORELATIVET, (WPARAM) szAbsolute, (LPARAM) szRelative);
+ PathToRelativeT(szAbsolute, szRelative);
_tcsncpy(szRelative, buffer, size);
}
- else CallService(MS_UTILS_PATHTORELATIVET, (WPARAM) szAbsolute, (LPARAM) szRelative);
+ else PathToRelativeT(szAbsolute, szRelative);
return szRelative;
}
|