From aa7e0aa1859e017780d250d3c7b8190f309b450b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 26 Sep 2012 11:32:52 +0000 Subject: final fix for EVENTTYPE_ADDED git-svn-id: http://svn.miranda-ng.org/main/trunk@1663 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/ignore/ignore.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/modules/ignore') diff --git a/src/modules/ignore/ignore.cpp b/src/modules/ignore/ignore.cpp index 819cac6070..5cb9f64651 100644 --- a/src/modules/ignore/ignore.cpp +++ b/src/modules/ignore/ignore.cpp @@ -2,8 +2,8 @@ Miranda IM: the free IM client for Microsoft* Windows* -Copyright 2000-2009 Miranda ICQ/IM project, -all portions of this codebase are copyrighted to the people +Copyright 2000-2009 Miranda ICQ/IM project, +all portions of this codebase are copyrighted to the people listed in contributors.txt. This program is free software; you can redistribute it and/or @@ -11,7 +11,7 @@ modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. -This program is distributed in the hope that it will be useful, +This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. @@ -143,7 +143,7 @@ static void InitialiseItem(HWND hwndList, HANDLE hContact, HANDLE hItem, DWORD p { DWORD mask; int i; - + mask = GetMask(hContact); for (i=0;ieventType == EVENTTYPE_ADDED && dbei->pBlob != NULL) { - HANDLE hContact; - - hContact = *((PHANDLE)(dbei->pBlob+sizeof(DWORD))); - if (CallService(MS_DB_CONTACT_IS, (WPARAM)hContact, 0) && IsIgnored((WPARAM)hContact, IGNOREEVENT_YOUWEREADDED)) + HANDLE hContact = DbGetAuthEventContact(dbei); + if (CallService(MS_DB_CONTACT_IS, (WPARAM)hContact, 0) && IsIgnored((WPARAM)hContact, IGNOREEVENT_YOUWEREADDED)) return 1; } return 0; @@ -429,9 +427,9 @@ static int IgnoreAddedNotify(WPARAM, LPARAM lParam) static int IgnoreModernOptInit(WPARAM wParam, LPARAM) { - static int iBoldControls[] = + static int iBoldControls[] = { - IDC_TXT_TITLE1, IDC_TXT_TITLE2, IDC_TXT_TITLE3, + IDC_TXT_TITLE1, IDC_TXT_TITLE2, IDC_TXT_TITLE3, MODERNOPT_CTRL_LAST }; @@ -460,7 +458,7 @@ int LoadIgnoreModule(void) HANDLE hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0); while (hContact != NULL) { - if ( !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)"Ignore")) + if ( !CallService(MS_PROTO_ISPROTOONCONTACT, (WPARAM)hContact, (LPARAM)"Ignore")) CallService(MS_PROTO_ADDTOCONTACT, (WPARAM)hContact, (LPARAM)"Ignore"); hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM)hContact, 0); } -- cgit v1.2.3