From 6be9b9c1dd00da5ecd33cbc20ece4162ba56c402 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 19 Jul 2014 14:11:25 +0000 Subject: db_mc_tryMeta applied git-svn-id: http://svn.miranda-ng.org/main/trunk@9860 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Nudge/src/headers.h | 5 ----- plugins/Nudge/src/main.cpp | 16 +--------------- plugins/Nudge/src/shake.cpp | 2 +- 3 files changed, 2 insertions(+), 21 deletions(-) (limited to 'plugins/Nudge') diff --git a/plugins/Nudge/src/headers.h b/plugins/Nudge/src/headers.h index 919d8fdb22..0fdc683385 100644 --- a/plugins/Nudge/src/headers.h +++ b/plugins/Nudge/src/headers.h @@ -63,11 +63,6 @@ int NudgeOptInit(WPARAM wParam,LPARAM lParam); ****************************/ int Preview(); -/* -* -****************************/ -MCONTACT Nudge_GethContact(MCONTACT); - /* * ****************************/ diff --git a/plugins/Nudge/src/main.cpp b/plugins/Nudge/src/main.cpp index 9605bb1072..03f5628709 100644 --- a/plugins/Nudge/src/main.cpp +++ b/plugins/Nudge/src/main.cpp @@ -430,7 +430,7 @@ int Preview() void Nudge_ShowPopup(CNudgeElement n, MCONTACT hContact, TCHAR * Message) { - hContact = Nudge_GethContact(hContact); + hContact = db_mc_tryMeta(hContact); TCHAR * lpzContactName = (TCHAR*)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, hContact, GCDNF_TCHAR); if (ServiceExists(MS_POPUP_ADDPOPUPCLASS)) { @@ -473,11 +473,6 @@ void Nudge_SentStatus(CNudgeElement n, MCONTACT hContact) dbei.eventType = 1; dbei.cbBlob = (DWORD)strlen(buff) + 1; dbei.pBlob = (PBYTE)buff; - - MCONTACT hMetaContact = db_mc_getMeta(hContact); - if (hMetaContact != NULL) // metacontact - db_event_add(hMetaContact, &dbei); - db_event_add(hContact, &dbei); mir_free(buff); } @@ -497,15 +492,6 @@ void Nudge_ShowStatus(CNudgeElement n, MCONTACT hContact, DWORD timestamp) mir_free(buff); } -MCONTACT Nudge_GethContact(MCONTACT hContact) -{ - MCONTACT hMetaContact = db_mc_getMeta(hContact); - if (hMetaContact != NULL) - return hMetaContact; - - return hContact; -} - void Nudge_AddAccount(PROTOACCOUNT *proto) { char str[MAXMODULELABELLENGTH + 10]; diff --git a/plugins/Nudge/src/shake.cpp b/plugins/Nudge/src/shake.cpp index 946768fd44..44d44ff919 100644 --- a/plugins/Nudge/src/shake.cpp +++ b/plugins/Nudge/src/shake.cpp @@ -50,7 +50,7 @@ INT_PTR ShakeChat(WPARAM wParam, LPARAM lParam) MessageWindowInputData mwid; mwd.cbSize = sizeof(MessageWindowData); - mwd.hContact = Nudge_GethContact(wParam); + mwd.hContact = db_mc_tryMeta(wParam); mwd.uFlags = MSG_WINDOW_UFLAG_MSG_BOTH; mwid.cbSize = sizeof(MessageWindowInputData); -- cgit v1.2.3