diff options
Diffstat (limited to 'plugins/DbEditorPP')
-rw-r--r-- | plugins/DbEditorPP/src/copymodule.cpp | 2 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/exportimport.cpp | 2 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/main_window.cpp | 2 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/modsettingenum.cpp | 13 | ||||
-rw-r--r-- | plugins/DbEditorPP/src/moduletree.cpp | 2 |
5 files changed, 7 insertions, 14 deletions
diff --git a/plugins/DbEditorPP/src/copymodule.cpp b/plugins/DbEditorPP/src/copymodule.cpp index faa42d29ea..ae2430bb68 100644 --- a/plugins/DbEditorPP/src/copymodule.cpp +++ b/plugins/DbEditorPP/src/copymodule.cpp @@ -91,7 +91,7 @@ void copyModuleMenuItem(MCONTACT hContact, const char *module) int CloneContact(MCONTACT hContact)
{
- MCONTACT newContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT newContact = db_add_contact();
if (!newContact)
return 0;
diff --git a/plugins/DbEditorPP/src/exportimport.cpp b/plugins/DbEditorPP/src/exportimport.cpp index f87b9af57a..6f33002d52 100644 --- a/plugins/DbEditorPP/src/exportimport.cpp +++ b/plugins/DbEditorPP/src/exportimport.cpp @@ -330,7 +330,7 @@ void importSettings(MCONTACT hContact, char *utf8) }
if (hContact == INVALID_CONTACT_ID) {
- MCONTACT temp = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT temp = db_add_contact();
if (temp)
hContact = temp;
}
diff --git a/plugins/DbEditorPP/src/main_window.cpp b/plugins/DbEditorPP/src/main_window.cpp index ba44c3fa20..da31dd2eb1 100644 --- a/plugins/DbEditorPP/src/main_window.cpp +++ b/plugins/DbEditorPP/src/main_window.cpp @@ -134,7 +134,7 @@ LRESULT CALLBACK ModuleTreeSubclassProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR if (dlg(str, MB_YESNO | MB_ICONEXCLAMATION) == IDNO)
break;
}
- CallService(MS_DB_CONTACT_DELETE, hContact, 0);
+ db_delete_contact(hContact);
freeTree(mtis->hContact);
TreeView_DeleteItem(hwnd, tvi.hItem);
}
diff --git a/plugins/DbEditorPP/src/modsettingenum.cpp b/plugins/DbEditorPP/src/modsettingenum.cpp index dc30d2f473..e1e7de6e33 100644 --- a/plugins/DbEditorPP/src/modsettingenum.cpp +++ b/plugins/DbEditorPP/src/modsettingenum.cpp @@ -51,7 +51,7 @@ int EnumModules(ModuleSettingLL *msll) // 1 = success, 0 = fail {
msll->first = 0;
msll->last = 0;
- if (CallService(MS_DB_MODULES_ENUM, (WPARAM)msll, (WPARAM)enumModulesSettingsProc)) {
+ if (db_enum_modules(enumModulesSettingsProc, msll)) {
msg(TranslateT("Error loading module list"));
return 0;
}
@@ -67,14 +67,10 @@ int enumSettingsProc(const char *setting, LPARAM lParam) int EnumSettings(MCONTACT hContact, const char *module, ModuleSettingLL *msll)
{
- DBCONTACTENUMSETTINGS dbces;
// enum all setting the contact has for the module
- dbces.pfnEnumProc = enumSettingsProc;
- dbces.szModule = module;
- dbces.lParam = (LPARAM)msll;
msll->first = 0;
msll->last = 0;
- if (CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces)) {
+ if (db_enum_settings(hContact, enumSettingsProc, module, msll)) {
msg(TranslateT("Error loading setting list"));
return 0;
}
@@ -90,10 +86,7 @@ int CheckIfModuleIsEmptyProc(const char *, LPARAM) int IsModuleEmpty(MCONTACT hContact, const char *module)
{
- DBCONTACTENUMSETTINGS dbces;
- dbces.pfnEnumProc = CheckIfModuleIsEmptyProc;
- dbces.szModule = module;
- return 0 > CallService(MS_DB_CONTACT_ENUMSETTINGS, hContact, (LPARAM)&dbces);
+ return 0 > db_enum_settings(hContact, CheckIfModuleIsEmptyProc, module);
}
diff --git a/plugins/DbEditorPP/src/moduletree.cpp b/plugins/DbEditorPP/src/moduletree.cpp index 2853c4a57c..34c43fb7e8 100644 --- a/plugins/DbEditorPP/src/moduletree.cpp +++ b/plugins/DbEditorPP/src/moduletree.cpp @@ -723,7 +723,7 @@ void moduleListRightClick(HWND hwnd, WPARAM, LPARAM lParam) // hwnd here is to t if (dlg(str, MB_YESNO | MB_ICONEXCLAMATION) == IDNO)
break;
}
- CallService(MS_DB_CONTACT_DELETE, hContact, 0);
+ db_delete_contact(hContact);
freeTree(hContact);
TreeView_DeleteItem(hwnd2Tree, tvi.hItem);
break;
|