summaryrefslogtreecommitdiff
path: root/plugins/Clist_mw
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-10-10 07:46:53 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-10-10 07:46:53 +0000
commitf90be5cdeec5875d1022e1ef35f5b101bd76ac84 (patch)
tree59e5e8bf3b6a87dbee148bd63f841a8a62daac5f /plugins/Clist_mw
parented10055737300c07e485eb22b27ccf92ffadab7c (diff)
service call replaced with the direct function call
git-svn-id: http://svn.miranda-ng.org/main/trunk@1857 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_mw')
-rw-r--r--plugins/Clist_mw/src/CLUIFrames/extraimage.cpp8
-rw-r--r--plugins/Clist_mw/src/clc.cpp6
-rw-r--r--plugins/Clist_mw/src/clcitems.cpp4
-rw-r--r--plugins/Clist_mw/src/clistmod.cpp4
-rw-r--r--plugins/Clist_mw/src/clistsettings.cpp4
-rw-r--r--plugins/Clist_mw/src/contact.cpp4
6 files changed, 15 insertions, 15 deletions
diff --git a/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp b/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp
index 4cec640ebb..ca993eb818 100644
--- a/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp
+++ b/plugins/Clist_mw/src/CLUIFrames/extraimage.cpp
@@ -247,7 +247,7 @@ void ClearExtraIcons()
//SendMessage(pcli->hwndContactTree,CLM_SETEXTRACOLUMNS,EnabledColumnCount,0);
SetNewExtraColumnCount();
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact = db_find_first();
do {
hItem = (HANDLE)SendMessage(pcli->hwndContactTree,CLM_FINDCONTACT,(WPARAM)hContact,0);
@@ -257,7 +257,7 @@ void ClearExtraIcons()
SendMessage(pcli->hwndContactTree,CLM_SETEXTRAIMAGE,(WPARAM)hItem,MAKELPARAM(i,0xFF));
};
- } while(hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0));
+ } while(hContact = db_find_next(hContact));
};
void SetAllExtraIcons(HWND hwndList,HANDLE hContact)
@@ -304,7 +304,7 @@ void SetAllExtraIcons(HWND hwndList,HANDLE hContact)
}
if ( hContact == NULL )
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact = db_find_first();
do {
szProto = NULL;
@@ -385,7 +385,7 @@ void SetAllExtraIcons(HWND hwndList,HANDLE hContact)
if (hcontgiven) break;
Sleep(0);
}
- while(hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0));
+ while(hContact = db_find_next(hContact));
tick = GetTickCount()-tick;
InvalidateRect(hwndList,NULL,FALSE);
diff --git a/plugins/Clist_mw/src/clc.cpp b/plugins/Clist_mw/src/clc.cpp
index 305a9a9ded..386fa06f11 100644
--- a/plugins/Clist_mw/src/clc.cpp
+++ b/plugins/Clist_mw/src/clc.cpp
@@ -49,7 +49,7 @@ static int stopStatusUpdater = 0;
void StatusUpdaterThread(void*)
{
int i,curdelay,lastcheck = 0;
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
SetThreadPriority(GetCurrentThread(),THREAD_PRIORITY_LOWEST);
@@ -67,10 +67,10 @@ void StatusUpdaterThread(void*)
if (pdnce && !pdnce->protoNotExists && pdnce->szProto)
CallContactService(hContact, PSS_GETAWAYMSG, 0, 0);
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
if (hContact == NULL) {
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
if (hContact == NULL)
break;
}
diff --git a/plugins/Clist_mw/src/clcitems.cpp b/plugins/Clist_mw/src/clcitems.cpp
index 788cc8f3fd..cf3909024f 100644
--- a/plugins/Clist_mw/src/clcitems.cpp
+++ b/plugins/Clist_mw/src/clcitems.cpp
@@ -354,7 +354,7 @@ void RebuildEntireList(HWND hwnd,struct ClcData *dat)
}
}
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact = db_find_first();
while(hContact) {
pdisplayNameCacheEntry cacheEntry;
@@ -393,7 +393,7 @@ void RebuildEntireList(HWND hwnd,struct ClcData *dat)
if (strcmp(cont->proto,"MetaContacts") == 0)
AddSubcontacts(cont);
}
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0);
+ hContact = db_find_next(hContact);
}
if (style&CLS_HIDEEMPTYGROUPS) {
diff --git a/plugins/Clist_mw/src/clistmod.cpp b/plugins/Clist_mw/src/clistmod.cpp
index 5f769427f8..2c0561fd7c 100644
--- a/plugins/Clist_mw/src/clistmod.cpp
+++ b/plugins/Clist_mw/src/clistmod.cpp
@@ -129,10 +129,10 @@ static int ContactListShutdownProc(WPARAM wParam,LPARAM lParam)
int LoadContactListModule(void)
{
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact != NULL) {
DBWriteContactSettingString(hContact, "CList", "StatusMsg", "");
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
hCListImages = (HIMAGELIST)CallService(MS_CLIST_GETICONSIMAGELIST, 0, 0);
diff --git a/plugins/Clist_mw/src/clistsettings.cpp b/plugins/Clist_mw/src/clistsettings.cpp
index f18a4452f2..d3a9be197a 100644
--- a/plugins/Clist_mw/src/clistsettings.cpp
+++ b/plugins/Clist_mw/src/clistsettings.cpp
@@ -46,7 +46,7 @@ void InitDisplayNameCache(SortedList *list)
list->sortFunc = (FSortFunc)handleCompare;
list->increment = CallService(MS_DB_CONTACT_GETCOUNT,0,0)+1;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact = db_find_first();
i = 0;
while (hContact != 0)
{
@@ -55,7 +55,7 @@ void InitDisplayNameCache(SortedList *list)
InvalidateDisplayNameCacheEntryByPDNE(hContact,pdnce,0);
List_GetIndex(list,pdnce,&idx);
List_Insert(list,pdnce,idx);
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0);
+ hContact = db_find_next(hContact);
i++;
} }
diff --git a/plugins/Clist_mw/src/contact.cpp b/plugins/Clist_mw/src/contact.cpp
index d8cf0f37d4..c3c75ec8f4 100644
--- a/plugins/Clist_mw/src/contact.cpp
+++ b/plugins/Clist_mw/src/contact.cpp
@@ -89,7 +89,7 @@ void LoadContactTree(void)
}
hideOffline = DBGetContactSettingByte(NULL,"CList","HideOffline",SETTING_HIDEOFFLINE_DEFAULT);
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST,0,0);
+ hContact = db_find_first();
while(hContact != NULL) {
cacheEntry = GetContactFullCacheEntry(hContact);
@@ -101,7 +101,7 @@ void LoadContactTree(void)
status = cacheEntry->status;
if ((!hideOffline || status != ID_STATUS_OFFLINE) && !cacheEntry->bIsHidden)
ChangeContactIcon(hContact,ExtIconFromStatusMode(hContact,(char*)cacheEntry->szProto,status),1);
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT,(WPARAM)hContact,0);
+ hContact = db_find_next(hContact);
}
sortByStatus = DBGetContactSettingByte(NULL,"CList","SortByStatus",SETTING_SORTBYSTATUS_DEFAULT);
sortByProto = DBGetContactSettingByte(NULL,"CList","SortByProto",SETTING_SORTBYPROTO_DEFAULT);