summaryrefslogtreecommitdiff
path: root/plugins/Clist_mw/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 /plugins/Clist_mw/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 'plugins/Clist_mw/src')
-rw-r--r--plugins/Clist_mw/src/BkgrCfg.cpp6
-rw-r--r--plugins/Clist_mw/src/clcopts.cpp26
-rw-r--r--plugins/Clist_mw/src/clui.cpp4
3 files changed, 16 insertions, 20 deletions
diff --git a/plugins/Clist_mw/src/BkgrCfg.cpp b/plugins/Clist_mw/src/BkgrCfg.cpp
index 33932c7e5f..5dced4e4db 100644
--- a/plugins/Clist_mw/src/BkgrCfg.cpp
+++ b/plugins/Clist_mw/src/BkgrCfg.cpp
@@ -71,7 +71,7 @@ static INT_PTR CALLBACK DlgProcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
DBVARIANT dbv;
if ( !DBGetContactSettingString(NULL,module,"BkBitmap",&dbv))
{
- int retval = CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)dbv.pszVal, (LPARAM)dat->item[indx].filename);
+ int retval = PathToAbsolute(dbv.pszVal, dat->item[indx].filename);
if ( !retval || retval == CALLSERVICE_NOTFOUND)
lstrcpynA(dat->item[indx].filename, dbv.pszVal, MAX_PATH);
mir_free(dbv.pszVal);
@@ -232,9 +232,7 @@ static INT_PTR CALLBACK DlgProcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LP
}
{
char str[MAX_PATH];
- int retval = CallService(MS_UTILS_PATHTOABSOLUTE,
- (WPARAM)dat->item[indx].filename,
- (LPARAM)str);
+ int retval = PathToAbsolute(dat->item[indx].filename, str);
if ( !retval || retval == CALLSERVICE_NOTFOUND)
db_set_s(NULL, module, "BkBitmap", dat->item[indx].filename);
else
diff --git a/plugins/Clist_mw/src/clcopts.cpp b/plugins/Clist_mw/src/clcopts.cpp
index 5d74eddc72..63ee91a856 100644
--- a/plugins/Clist_mw/src/clcopts.cpp
+++ b/plugins/Clist_mw/src/clcopts.cpp
@@ -327,14 +327,12 @@ static INT_PTR CALLBACK DlgProcStatusBarBkgOpts(HWND hwndDlg, UINT msg, WPARAM w
DBVARIANT dbv;
if ( !DBGetContactSettingString(NULL,"StatusBar","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);
- }
- else
- mir_free(dbv.pszVal);
+ char szPath[MAX_PATH];
+ if ( PathToAbsolute(dbv.pszVal, szPath))
+ SetDlgItemTextA(hwndDlg, IDC_FILENAME, szPath);
+
+ mir_free(dbv.pszVal);
}
WORD bmpUse = db_get_w(NULL,"StatusBar","BkBmpUse",CLCDEFAULT_BKBMPUSE);
@@ -447,16 +445,16 @@ static INT_PTR CALLBACK DlgProcClcBkgOpts(HWND hwndDlg, UINT msg, WPARAM wParam,
SendDlgItemMessage(hwndDlg,IDC_BKGCOLOUR,CPM_SETCOLOUR,0,DBGetContactSettingDword(NULL,"CLC","BkColour",CLCDEFAULT_BKCOLOUR));
SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETDEFAULTCOLOUR,0,CLCDEFAULT_SELBKCOLOUR);
SendDlgItemMessage(hwndDlg,IDC_SELCOLOUR,CPM_SETCOLOUR,0,DBGetContactSettingDword(NULL,"CLC","SelBkColour",CLCDEFAULT_SELBKCOLOUR));
- { DBVARIANT dbv;
+ {
+ 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);
- }
- else mir_free(dbv.pszVal);
+ char szPath[MAX_PATH];
+ if ( PathToAbsolute(dbv.pszVal, szPath))
+ SetDlgItemTextA(hwndDlg,IDC_FILENAME,szPath);
+
+ mir_free(dbv.pszVal);
}
}
diff --git a/plugins/Clist_mw/src/clui.cpp b/plugins/Clist_mw/src/clui.cpp
index f30e910dd3..3e63f9ceff 100644
--- a/plugins/Clist_mw/src/clui.cpp
+++ b/plugins/Clist_mw/src/clui.cpp
@@ -139,7 +139,7 @@ int GetConnectingIconForProtoCount(char *szProto)
_snprintf(szFullPath, SIZEOF(szFullPath), "%s\\Icons\\proto_conn_%s.dll", szPath, szProto);
lstrcpynA(file,szFullPath,SIZEOF(file));
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)file, (LPARAM)fileFull);
+ PathToAbsolute(file, fileFull);
ret = ExtractIconExA(fileFull,-1,NULL,NULL,1);
if (ret == 0&&!strcmp(szProto,"ICQ")) ret = 8;
return ret;
@@ -160,7 +160,7 @@ static HICON ExtractIconFromPath(const char *path)
comma = strrchr(file,',');
if (comma == NULL) n = 0;
else {n = atoi(comma+1); *comma = 0;}
- CallService(MS_UTILS_PATHTOABSOLUTE, (WPARAM)file, (LPARAM)fileFull);
+ PathToAbsolute(file, fileFull);
#ifdef _DEBUG
{