diff options
author | George Hazan <george.hazan@gmail.com> | 2012-10-10 07:46:53 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-10-10 07:46:53 +0000 |
commit | f90be5cdeec5875d1022e1ef35f5b101bd76ac84 (patch) | |
tree | 59e5e8bf3b6a87dbee148bd63f841a8a62daac5f /plugins/TabSRMM/src | |
parent | ed10055737300c07e485eb22b27ccf92ffadab7c (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/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/container.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/globals.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgoptions.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/sendqueue.cpp | 8 | ||||
-rw-r--r-- | plugins/TabSRMM/src/templates.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/trayicon.cpp | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/typingnotify.cpp | 4 |
7 files changed, 22 insertions, 22 deletions
diff --git a/plugins/TabSRMM/src/container.cpp b/plugins/TabSRMM/src/container.cpp index a359a1379e..afe5c85fd6 100644 --- a/plugins/TabSRMM/src/container.cpp +++ b/plugins/TabSRMM/src/container.cpp @@ -2476,7 +2476,7 @@ void TSAPI DeleteContainer(int iIndex) { TCHAR *wszContainerName = dbv.ptszVal;
M->WriteTString(NULL, szKey, szIndex, _T("**free**"));
- hhContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hhContact = db_find_first();
while (hhContact) {
DBVARIANT dbv_c;
if (!M->GetTString(hhContact, SRMSGMOD_T, szSubKey, &dbv_c)) {
@@ -2485,7 +2485,7 @@ void TSAPI DeleteContainer(int iIndex) { DBDeleteContactSetting(hhContact, SRMSGMOD_T, "containerW");
DBFreeVariant(&dbv_c);
}
- hhContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hhContact, 0);
+ hhContact = db_find_next(hhContact);
}
_snprintf(szSetting, CONTAINER_NAMELEN + 15, "%s%d_Flags", szSettingP, iIndex);
DBDeleteContactSetting(NULL, SRMSGMOD_T, szSetting);
@@ -2518,7 +2518,7 @@ void TSAPI RenameContainer(int iIndex, const TCHAR *szNew) { if (lstrlen(szNew) != 0)
M->WriteTString(NULL, szKey, szIndex, szNew);
}
- hhContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hhContact = db_find_first();
while (hhContact) {
DBVARIANT dbv_c;
if (!M->GetTString(hhContact, SRMSGMOD_T, szSubKey, &dbv_c)) {
@@ -2530,7 +2530,7 @@ void TSAPI RenameContainer(int iIndex, const TCHAR *szNew) { }
DBFreeVariant(&dbv_c);
}
- hhContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hhContact, 0);
+ hhContact = db_find_next(hhContact);
}
DBFreeVariant(&dbv);
}
diff --git a/plugins/TabSRMM/src/globals.cpp b/plugins/TabSRMM/src/globals.cpp index 07c5819064..548068794d 100644 --- a/plugins/TabSRMM/src/globals.cpp +++ b/plugins/TabSRMM/src/globals.cpp @@ -612,10 +612,10 @@ int CGlobals::PreshutdownSendRecv(WPARAM wParam, LPARAM lParam) ::SendMessage(pFirstContainer->hwnd, WM_CLOSE, 0, 1);
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
while (hContact) {
M->WriteDword(hContact, SRMSGMOD_T, "messagecount", 0);
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
for (i=0; i < SERVICE_LAST; i++) {
@@ -722,7 +722,7 @@ void CGlobals::RestoreUnreadMessageAlerts(void) cle.pszService = "SRMsg/ReadMessage";
cle.flags = CLEF_TCHAR;
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
while (hContact) {
if (M->GetDword(hContact, "SendLater", "count", 0))
@@ -746,7 +746,7 @@ void CGlobals::RestoreUnreadMessageAlerts(void) }
hDbEvent = (HANDLE) CallService(MS_DB_EVENT_FINDNEXT, (WPARAM) hDbEvent, 0);
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
}
diff --git a/plugins/TabSRMM/src/msgoptions.cpp b/plugins/TabSRMM/src/msgoptions.cpp index 8617a138d7..ceb8d2fa33 100644 --- a/plugins/TabSRMM/src/msgoptions.cpp +++ b/plugins/TabSRMM/src/msgoptions.cpp @@ -865,13 +865,13 @@ static void RebuildList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown) if (hItemUnknown && M->GetByte(SRMSGMOD, SRMSGSET_TYPINGUNKNOWN, SRMSGDEFSET_TYPINGUNKNOWN)) {
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM) hItemUnknown, 1);
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
do {
hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM) hContact, 0);
if (hItem && M->GetByte(hContact, SRMSGMOD, SRMSGSET_TYPING, defType)) {
SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_SETCHECKMARK, (WPARAM) hItem, 1);
}
- } while (hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0));
+ } while (hContact = db_find_next(hContact));
}
static void SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown)
@@ -884,13 +884,13 @@ static void SaveList(HWND hwndDlg, HANDLE hItemNew, HANDLE hItemUnknown) if (hItemUnknown) {
M->WriteByte(SRMSGMOD, SRMSGSET_TYPINGUNKNOWN, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM) hItemUnknown, 0) ? 1 : 0));
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
do {
hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM) hContact, 0);
if (hItem) {
DBWriteContactSettingByte(hContact, SRMSGMOD, SRMSGSET_TYPING, (BYTE)(SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM) hItem, 0) ? 1 : 0));
}
- } while (hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0));
+ } while (hContact = db_find_next(hContact));
}
static INT_PTR CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
diff --git a/plugins/TabSRMM/src/sendqueue.cpp b/plugins/TabSRMM/src/sendqueue.cpp index 8dffa1f622..a00b5a9445 100644 --- a/plugins/TabSRMM/src/sendqueue.cpp +++ b/plugins/TabSRMM/src/sendqueue.cpp @@ -385,7 +385,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry) int iMinLength = 0;
CContactCache* c = 0;
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
m_jobs[iEntry].hOwner = dat->hContact;
m_jobs[iEntry].iStatus = SQ_INPROGRESS;
@@ -400,7 +400,7 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry) if (c)
iMinLength = (iMinLength == 0 ? c->getMaxMessageLength() : min(c->getMaxMessageLength(), iMinLength));
}
- } while (hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0));
+ } while (hContact = db_find_next(hContact));
if (iSendLength >= iMinLength) {
TCHAR tszError[256];
@@ -411,14 +411,14 @@ int SendQueue::sendQueued(TWindowData *dat, const int iEntry) return 0;
}
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
do {
hItem = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_FINDCONTACT, (WPARAM) hContact, 0);
if (hItem && SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_GETCHECKMARK, (WPARAM) hItem, 0)) {
doSendLater(iEntry, 0, hContact, false);
iJobs++;
}
- } while (hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0));
+ } while (hContact = db_find_next(hContact));
sendQueue->clearJob(iEntry);
if (iJobs)
diff --git a/plugins/TabSRMM/src/templates.cpp b/plugins/TabSRMM/src/templates.cpp index 8924f58013..d71a99dc60 100644 --- a/plugins/TabSRMM/src/templates.cpp +++ b/plugins/TabSRMM/src/templates.cpp @@ -163,10 +163,10 @@ INT_PTR CALLBACK DlgProcTemplateEditor(HWND hwndDlg, UINT msg, WPARAM wParam, LP SendDlgItemMessage(hwndDlg, IDC_PREVIEW, EM_SETEDITSTYLE, SES_EXTENDBACKCOLOR, SES_EXTENDBACKCOLOR);
SendDlgItemMessage(hwndDlg, IDC_PREVIEW, EM_EXLIMITTEXT, 0, 0x80000000);
- dat->hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ dat->hContact = db_find_first();
dat->szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)dat->hContact, 0);
while(dat->szProto == 0 && dat->hContact != 0) {
- dat->hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)dat->hContact, 0);
+ dat->hContact = db_find_next(dat->hContact);
dat->szProto = (char *)CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)dat->hContact, 0);
}
dat->dwFlags = dat->pContainer->theme.dwFlags;
diff --git a/plugins/TabSRMM/src/trayicon.cpp b/plugins/TabSRMM/src/trayicon.cpp index b7a7aa4dc4..9da43b2472 100644 --- a/plugins/TabSRMM/src/trayicon.cpp +++ b/plugins/TabSRMM/src/trayicon.cpp @@ -339,7 +339,7 @@ void TSAPI LoadFavoritesAndRecent() RCENTRY *recentEntries, rceTemp;
DWORD dwRecent;
int iIndex = 0, i, j;
- HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
recentEntries = new RCENTRY[nen_options.wMaxRecent + 1];
if (recentEntries != NULL) {
while (hContact != 0) {
@@ -349,7 +349,7 @@ void TSAPI LoadFavoritesAndRecent() recentEntries[iIndex].dwTimestamp = dwRecent;
recentEntries[iIndex++].hContact = hContact;
}
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
if (iIndex == 0) {
free(recentEntries);
diff --git a/plugins/TabSRMM/src/typingnotify.cpp b/plugins/TabSRMM/src/typingnotify.cpp index 1d2fcd573e..adfdbfee5c 100644 --- a/plugins/TabSRMM/src/typingnotify.cpp +++ b/plugins/TabSRMM/src/typingnotify.cpp @@ -283,7 +283,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA char *szProto = NULL;
int i, notyping;
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
if (!PopupService)
break;
@@ -292,7 +292,7 @@ static INT_PTR CALLBACK DlgProcOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARA szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM)hContact, 0);
if (szProto != NULL)
break;
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
for (i=0; i < 2; i++) {
|