diff options
author | George Hazan <george.hazan@gmail.com> | 2016-09-14 18:01:49 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-09-14 18:01:49 +0000 |
commit | 7bdb598e26e7e98788933af43090d34027166969 (patch) | |
tree | 65c215c0693c86134e471f0746e9726b645b51bb /plugins/Non-IM Contact | |
parent | 9f285a935709f4dda1065d6450739476168c43af (diff) |
second major wipeout of database services & structures:
- DBCONTACTENUMSETTINGS removed;
- all helpers moved to mir_core.dll
git-svn-id: http://svn.miranda-ng.org/main/trunk@17296 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Non-IM Contact')
-rw-r--r-- | plugins/Non-IM Contact/src/contactinfo.cpp | 6 | ||||
-rw-r--r-- | plugins/Non-IM Contact/src/dialog.cpp | 8 |
2 files changed, 7 insertions, 7 deletions
diff --git a/plugins/Non-IM Contact/src/contactinfo.cpp b/plugins/Non-IM Contact/src/contactinfo.cpp index 0dc717daef..11ac955a3a 100644 --- a/plugins/Non-IM Contact/src/contactinfo.cpp +++ b/plugins/Non-IM Contact/src/contactinfo.cpp @@ -338,7 +338,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) i++;
}
free(replace);
- MCONTACT hContact2 = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hContact2 = db_add_contact();
Proto_AddToContact(hContact2, MODNAME);
CallService(MS_IGNORE_IGNORE, (WPARAM)hContact2, IGNOREEVENT_USERONLINE);
db_set_s(hContact2, MODNAME, "Nick", Translate("New Non-IM Contact"));
@@ -394,7 +394,7 @@ INT_PTR CALLBACK DlgProcCopy(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam) char dbVar1[2000];
MCONTACT hContact1 = (MCONTACT)GetWindowLongPtr(hwnd, GWLP_USERDATA);
if (!db_get_static(hContact1, MODNAME, "Name", dbVar1, _countof(dbVar1))) {
- MCONTACT hContact2 = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hContact2 = db_add_contact();
if (!hContact2) {
msg("contact did not get created", "");
return 0;
@@ -632,7 +632,7 @@ INT_PTR ImportContacts(WPARAM, LPARAM) }
if (MessageBoxA(0, msg, modFullname, MB_YESNO) == IDYES) {
- if (!(hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0))) {
+ if (!(hContact = db_add_contact())) {
msg("contact did get created", "");
continue;
}
diff --git a/plugins/Non-IM Contact/src/dialog.cpp b/plugins/Non-IM Contact/src/dialog.cpp index 8ead40caf2..482bd9674f 100644 --- a/plugins/Non-IM Contact/src/dialog.cpp +++ b/plugins/Non-IM Contact/src/dialog.cpp @@ -303,13 +303,13 @@ void DoPropertySheet(MCONTACT hContact) INT_PTR addContact(WPARAM, LPARAM)
{
char tmp[256];
- MCONTACT hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ MCONTACT hContact = db_add_contact();
Proto_AddToContact(hContact, MODNAME);
CallService(MS_IGNORE_IGNORE, hContact, IGNOREEVENT_USERONLINE);
db_set_ws(hContact, MODNAME, "Nick", TranslateT("New Non-IM Contact"));
DoPropertySheet(hContact);
if (db_get_static(hContact, MODNAME, "Name", tmp, _countof(tmp)))
- CallService(MS_DB_CONTACT_DELETE, hContact, 0);
+ db_delete_contact(hContact);
replaceAllStrings(hContact);
return 0;
}
@@ -319,14 +319,14 @@ INT_PTR editContact(WPARAM wParam, LPARAM) MCONTACT hContact = wParam;
char tmp[256];
if (!hContact) {
- hContact = (MCONTACT)CallService(MS_DB_CONTACT_ADD, 0, 0);
+ hContact = db_add_contact();
Proto_AddToContact(hContact, MODNAME);
CallService(MS_IGNORE_IGNORE, hContact, IGNOREEVENT_USERONLINE);
db_set_s(hContact, MODNAME, "Nick", Translate("New Non-IM Contact"));
}
DoPropertySheet(hContact);
if (db_get_static(hContact, MODNAME, "Name", tmp, _countof(tmp)))
- CallService(MS_DB_CONTACT_DELETE, hContact, 0);
+ db_delete_contact(hContact);
replaceAllStrings(hContact);
return 0;
}
|