diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-01 22:15:29 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-01 22:15:29 +0000 |
commit | ec4498ee255a018ccb16061de4594618e7ab5690 (patch) | |
tree | 4d11ae3444c95fba70568b56897acee497a7e6f9 /plugins/Clist_modern/src | |
parent | 12012a3ea4d58c6624f8065c2ca2afb96090b70f (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 'plugins/Clist_modern/src')
-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 |
4 files changed, 11 insertions, 14 deletions
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('\\'))
|