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/DbEditorPP/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/DbEditorPP/src')
-rw-r--r-- | plugins/DbEditorPP/src/copymodule.cpp | 10 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/deletemodule.cpp | 6 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/exportimport.cpp | 10 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/findwindow.cpp | 4 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/modules.cpp | 4 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/moduletree.cpp | 12 |
6 files changed, 23 insertions, 23 deletions
diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp index 25489a7f52..7dad7a6934 100644 --- a/plugins/DbEditorPP/src/copymodule.cpp +++ b/plugins/DbEditorPP/src/copymodule.cpp @@ -48,7 +48,7 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara {
int index, loaded;
char szProto[256];
- HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact)
{
@@ -60,7 +60,7 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara // filter
if ((loaded && Mode == MODE_UNLOADED) || (!loaded && Mode == MODE_LOADED))
{
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
continue;
}
@@ -127,7 +127,7 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_SETITEMDATA, index, (LPARAM)hContact);
}
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)(HANDLE)hContact, 0);
+ hContact = db_find_next(hContact);
}
index = (int)SendMessage(GetDlgItem(hwnd, IDC_CONTACTS), CB_INSERTSTRING, 0, (LPARAM)(char*)Translate("Settings"));
@@ -157,12 +157,12 @@ INT_PTR CALLBACK copyModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara else
{
SetCursor(LoadCursor(NULL,IDC_WAIT));
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
while (hContact)
{
copyModule(mac->module, mac->hContact, hContact);
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)(HANDLE)hContact, 0);
+ hContact = db_find_next(hContact);
}
SetCursor(LoadCursor(NULL,IDC_ARROW));
diff --git a/plugins/DbEditorPP/src/deletemodule.cpp b/plugins/DbEditorPP/src/deletemodule.cpp index a0eddf73a1..c4a3fba820 100644 --- a/plugins/DbEditorPP/src/deletemodule.cpp +++ b/plugins/DbEditorPP/src/deletemodule.cpp @@ -53,7 +53,7 @@ void __cdecl PopulateModuleDropListThreadFunc(LPVOID di) module = (struct ModSetLinkLinkItem *)module->next;
continue;
}
- for (hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);moduleEmpty && hContact;hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0))
+ for (hContact = db_find_first();moduleEmpty && hContact;hContact = db_find_next(hContact))
{
if (!IsModuleEmpty(hContact,module->name))
{
@@ -103,13 +103,13 @@ INT_PTR CALLBACK DeleteModuleDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM case IDOK:
{
char text[128];
- HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
GetDlgItemText(hwnd,IDC_CONTACTS,text,128);
SetCursor(LoadCursor(NULL,IDC_WAIT));
while (hContact)
{
deleteModule(text,hContact,1);
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
// do the null
deleteModule(text,NULL,1);
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index ad9f508a21..ee5f6762f8 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -243,7 +243,7 @@ void exportDB(HANDLE hContact, char* module) // hContact == -1 export entire db. if (module == "") module = NULL; // reset module for all contacts export
}
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
while (hContact)
{
@@ -260,7 +260,7 @@ void exportDB(HANDLE hContact, char* module) // hContact == -1 export entire db. if ((loaded && Mode == MODE_UNLOADED) || (!loaded && Mode == MODE_LOADED))
{
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
continue;
}
}
@@ -287,7 +287,7 @@ void exportDB(HANDLE hContact, char* module) // hContact == -1 export entire db. {
exportModule(hContact, module, file);
}
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)(HANDLE)hContact, 0);
+ hContact = db_find_next(hContact);
}
}
// exporting a contact
@@ -337,7 +337,7 @@ HANDLE CheckNewContact(char *myProto, char *uid, char *myName) {
char szProto[256], szName[256];
HANDLE resultHandle = INVALID_HANDLE_VALUE;
- HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact)
{
@@ -358,7 +358,7 @@ HANDLE CheckNewContact(char *myProto, char *uid, char *myName) }
}
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
return resultHandle;
diff --git a/plugins/DbEditorPP/src/findwindow.cpp b/plugins/DbEditorPP/src/findwindow.cpp index b9957cd246..e8fd22aa70 100644 --- a/plugins/DbEditorPP/src/findwindow.cpp +++ b/plugins/DbEditorPP/src/findwindow.cpp @@ -563,10 +563,10 @@ void __cdecl FindSettings(LPVOID di) else
{
NULLContactDone = 1;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
}
}
- else hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ else hContact = db_find_next(hContact);
module = ModuleList.first;
while (module)
diff --git a/plugins/DbEditorPP/src/modules.cpp b/plugins/DbEditorPP/src/modules.cpp index 4053180038..2e650b2fe4 100644 --- a/plugins/DbEditorPP/src/modules.cpp +++ b/plugins/DbEditorPP/src/modules.cpp @@ -63,13 +63,13 @@ INT_PTR CALLBACK AddModDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam GetDlgItemText(hwnd, IDC_MODNAME, modulename, 256);
if (IsDlgButtonChecked(hwnd,CHK_ADD2ALL))
{
- HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
// null contact
DBWriteContactSettingByte(NULL, modulename, "(Default)", 0);
while (hContact)
{
DBWriteContactSettingByte(hContact, modulename, "(Default)", 0);
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)(HANDLE)hContact, 0);
+ hContact = db_find_next(hContact);
}
}
else
diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp index b5554cabc5..292e3a6af6 100644 --- a/plugins/DbEditorPP/src/moduletree.cpp +++ b/plugins/DbEditorPP/src/moduletree.cpp @@ -24,7 +24,7 @@ int doContacts(HWND hwnd2Tree,HTREEITEM contactsRoot,ModuleSettingLL *modlist, H // mir_snprintf(title, sizeof(title),Translate("Loading contacts..."));
SetWindowText(hwnd2mainWindow, Translate("Loading contacts..."));
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
tvi.hInsertAfter = TVI_SORT;
tvi.item.cChildren = 1;
@@ -48,7 +48,7 @@ int doContacts(HWND hwnd2Tree,HTREEITEM contactsRoot,ModuleSettingLL *modlist, H // filter
if ((loaded && Mode == MODE_UNLOADED) || (!loaded && Mode == MODE_LOADED))
{
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
continue;
}
@@ -177,7 +177,7 @@ int doContacts(HWND hwnd2Tree,HTREEITEM contactsRoot,ModuleSettingLL *modlist, H }
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
@@ -795,7 +795,7 @@ void moduleListWM_NOTIFY(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)// hwnd if (mtis->type == CONTACT_ROOT_ITEM && !hContact)
{
multi = 1;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ hContact = db_find_first();
}
while(hContact && hwnd2mainWindow)
@@ -810,7 +810,7 @@ void moduleListWM_NOTIFY(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)// hwnd if ((loaded && Mode == MODE_UNLOADED) || (!loaded && Mode == MODE_LOADED))
{
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
continue;
}
}
@@ -831,7 +831,7 @@ void moduleListWM_NOTIFY(HWND hwnd,UINT msg,WPARAM wParam,LPARAM lParam)// hwnd if (!multi) break;
- hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0);
+ hContact = db_find_next(hContact);
}
}
|