From ec35bbd307636ded865626eb13584e4ab0b9a4af Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 27 Feb 2014 19:17:59 +0000 Subject: direct access to MetaContacts/IsSubcontact removed everywhere git-svn-id: http://svn.miranda-ng.org/main/trunk@8312 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/metacontacts/meta_menu.cpp | 2 -- src/modules/metacontacts/meta_services.cpp | 2 -- src/modules/metacontacts/meta_utils.cpp | 7 ------- 3 files changed, 11 deletions(-) (limited to 'src/modules') diff --git a/src/modules/metacontacts/meta_menu.cpp b/src/modules/metacontacts/meta_menu.cpp index 545042a443..7fbcf128a7 100644 --- a/src/modules/metacontacts/meta_menu.cpp +++ b/src/modules/metacontacts/meta_menu.cpp @@ -129,7 +129,6 @@ void Meta_RemoveContactNumber(MCONTACT hMeta, int number) // make sure this contact thinks it's part of this metacontact if ((MCONTACT)db_get_dw(hContact, META_PROTO, "Handle", 0) == hMeta) { // remove link to meta contact - db_unset(hContact, META_PROTO, "IsSubcontact"); db_unset(hContact, META_PROTO, META_LINK); db_unset(hContact, META_PROTO, "Handle"); db_unset(hContact, META_PROTO, "ContactNumber"); @@ -228,7 +227,6 @@ INT_PTR Meta_Delete(WPARAM wParam, LPARAM lParam) for (MCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { // This contact is assigned to the MetaContact that will be deleted, clear the "MetaContacts" information if (db_get_dw(hContact, META_PROTO, META_LINK, (DWORD)-1) == metaID) { - db_unset(hContact, META_PROTO, "IsSubcontact"); db_unset(hContact, META_PROTO, META_LINK); db_unset(hContact, META_PROTO, "Handle"); db_unset(hContact, META_PROTO, "ContactNumber"); diff --git a/src/modules/metacontacts/meta_services.cpp b/src/modules/metacontacts/meta_services.cpp index f718756750..7d6bd1228e 100644 --- a/src/modules/metacontacts/meta_services.cpp +++ b/src/modules/metacontacts/meta_services.cpp @@ -768,8 +768,6 @@ int Meta_ContactDeleted(WPARAM wParam, LPARAM lParam) for (int i = 0; i < num_contacts; i++) { MCONTACT hContact = Meta_GetContactHandle(wParam, i); if (hContact && (HANDLE)db_get_dw(hContact, META_PROTO, "Handle", 0) == (HANDLE)wParam) { - if (db_get_b(hContact, META_PROTO, "IsSubcontact", 0) == 1) - db_unset(hContact, META_PROTO, "IsSubcontact"); db_unset(hContact, META_PROTO, META_LINK); db_unset(hContact, META_PROTO, "Handle"); db_unset(hContact, META_PROTO, "ContactNumber"); diff --git a/src/modules/metacontacts/meta_utils.cpp b/src/modules/metacontacts/meta_utils.cpp index 8a307bbb6c..1f5530fc19 100644 --- a/src/modules/metacontacts/meta_utils.cpp +++ b/src/modules/metacontacts/meta_utils.cpp @@ -331,7 +331,6 @@ BOOL Meta_Assign(MCONTACT src, MCONTACT dest, BOOL set_as_default) NotifyEventHooks(hEventDefaultChanged, (WPARAM)dest, (LPARAM)src); } - db_set_b(src, META_PROTO, "IsSubcontact", 1); // set nick to most online contact that can message most_online = Meta_GetMostOnline(dest); Meta_CopyContactNick(dest, most_online); @@ -766,7 +765,6 @@ int Meta_SetHandles(void) MessageBox(0, TranslateT("Subcontact's MetaContact not found - deleting MetaContact data"), nick_buffer, MB_OK | MB_ICONERROR); // delete meta data - db_unset(hContact, META_PROTO, "IsSubcontact"); db_unset(hContact, META_PROTO, META_LINK); db_unset(hContact, META_PROTO, "Handle"); db_unset(hContact, META_PROTO, "ContactNumber"); @@ -776,11 +774,6 @@ int Meta_SetHandles(void) // stop ignoring, if we were if (options.suppress_status) CallService(MS_IGNORE_UNIGNORE, hContact, (WPARAM)IGNOREEVENT_USERONLINE); - - } - else { - if (!db_get_b(hContact, META_PROTO, "IsSubcontact", 0)) - db_set_b(hContact, META_PROTO, "IsSubcontact", 1); } } else db_unset(hContact, META_PROTO, "Handle"); -- cgit v1.2.3