summaryrefslogtreecommitdiff
path: root/src/modules/ignore
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-02-10 08:04:30 +0000
commitddba4ede6b451d0cfcd0d32b5180fbd0689966bf (patch)
tree5d74f37a7013d13b92c182628d6b68a58e148ae4 /src/modules/ignore
parentc39340bf493a1745a41317bbf937fc7eb6cbb26a (diff)
- HANDLE hContact => HCONTACT
- GCF_* prefix was added to chat constants to avoid name conflicts git-svn-id: http://svn.miranda-ng.org/main/trunk@8078 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/ignore')
-rw-r--r--src/modules/ignore/ignore.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/modules/ignore/ignore.cpp b/src/modules/ignore/ignore.cpp
index 3b63ba8b8c..74683b5c18 100644
--- a/src/modules/ignore/ignore.cpp
+++ b/src/modules/ignore/ignore.cpp
@@ -29,7 +29,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
static const DWORD ignoreIdToPf1[IGNOREEVENT_MAX] = {PF1_IMRECV, PF1_URLRECV, PF1_FILERECV, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF};
static const DWORD ignoreIdToPf4[IGNOREEVENT_MAX] = {0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, 0xFFFFFFFF, PF4_SUPPORTTYPING};
-static DWORD GetMask(HANDLE hContact)
+static DWORD GetMask(HCONTACT hContact)
{
DWORD mask = db_get_dw(hContact, "Ignore", "Mask1", (DWORD)(-1));
if (mask == (DWORD)(-1)) {
@@ -145,7 +145,7 @@ static void SetIconsForColumn(HWND hwndList, HANDLE hItem, HANDLE hItemAll, int
}
}
-static void InitialiseItem(HWND hwndList, HANDLE hContact, HANDLE hItem, DWORD proto1Caps, DWORD proto4Caps)
+static void InitialiseItem(HWND hwndList, HCONTACT hContact, HANDLE hItem, DWORD proto1Caps, DWORD proto4Caps)
{
DWORD mask = GetMask(hContact);
for (int i=0; i < IGNOREEVENT_MAX; i++)
@@ -156,7 +156,7 @@ static void InitialiseItem(HWND hwndList, HANDLE hContact, HANDLE hItem, DWORD p
SendMessage(hwndList, CLM_SETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(IGNOREEVENT_MAX+1, 2));
}
-static void SaveItemMask(HWND hwndList, HANDLE hContact, HANDLE hItem, const char *pszSetting)
+static void SaveItemMask(HWND hwndList, HCONTACT hContact, HANDLE hItem, const char *pszSetting)
{
DWORD mask = 0;
for (int i=0; i < IGNOREEVENT_MAX; i++) {
@@ -169,7 +169,7 @@ static void SaveItemMask(HWND hwndList, HANDLE hContact, HANDLE hItem, const cha
static void SetAllContactIcons(HWND hwndList)
{
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendMessage(hwndList, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem && SendMessage(hwndList, CLM_GETEXTRAIMAGE, (WPARAM)hItem, MAKELPARAM(IGNOREEVENT_MAX, 0)) == EMPTY_EXTRA_ICON) {
DWORD proto1Caps, proto4Caps;
@@ -296,7 +296,7 @@ static INT_PTR CALLBACK DlgProcIgnoreOpts(HWND hwndDlg, UINT msg, WPARAM, LPARAM
case 0:
switch (((LPNMHDR)lParam)->code) {
case PSN_APPLY:
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ for (HCONTACT hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
HANDLE hItem = (HANDLE)SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_FINDCONTACT, (WPARAM)hContact, 0);
if (hItem) SaveItemMask( GetDlgItem(hwndDlg, IDC_LIST), hContact, hItem, "Mask1");
if (SendDlgItemMessage(hwndDlg, IDC_LIST, CLM_GETCHECKMARK, (WPARAM)hItem, 0))
@@ -338,7 +338,7 @@ static int IgnoreOptInitialise(WPARAM wParam, LPARAM)
static INT_PTR IsIgnored(WPARAM wParam, LPARAM lParam)
{
- DWORD mask = GetMask((HANDLE)wParam);
+ DWORD mask = GetMask((HCONTACT)wParam);
if (lParam < 1 || lParam > IGNOREEVENT_MAX)
return 1;
return (mask >> (lParam-1))&1;
@@ -346,20 +346,20 @@ static INT_PTR IsIgnored(WPARAM wParam, LPARAM lParam)
static INT_PTR Ignore(WPARAM wParam, LPARAM lParam)
{
- DWORD mask = GetMask((HANDLE)wParam);
+ DWORD mask = GetMask((HCONTACT)wParam);
if ((lParam < 1 || lParam > IGNOREEVENT_MAX) && lParam != IGNOREEVENT_ALL)
return 1;
if (lParam == IGNOREEVENT_ALL)
mask = (1 << IGNOREEVENT_MAX)-1;
else
mask |= 1 << (lParam-1);
- db_set_dw((HANDLE)wParam, "Ignore", "Mask1", mask);
+ db_set_dw((HCONTACT)wParam, "Ignore", "Mask1", mask);
return 0;
}
static INT_PTR Unignore(WPARAM wParam, LPARAM lParam)
{
- DWORD mask = GetMask((HANDLE)wParam);
+ DWORD mask = GetMask((HCONTACT)wParam);
if ((lParam < 1 || lParam > IGNOREEVENT_MAX) && lParam != IGNOREEVENT_ALL)
return 1;
@@ -367,7 +367,7 @@ static INT_PTR Unignore(WPARAM wParam, LPARAM lParam)
mask = 0;
else
mask &= ~(1 << (lParam-1));
- db_set_dw((HANDLE)wParam, "Ignore", "Mask1", mask);
+ db_set_dw((HCONTACT)wParam, "Ignore", "Mask1", mask);
return 0;
}
@@ -403,7 +403,7 @@ static int IgnoreAddedNotify(WPARAM, LPARAM lParam)
{
DBEVENTINFO *dbei = (DBEVENTINFO*)lParam;
if (dbei && dbei->eventType == EVENTTYPE_ADDED && dbei->pBlob != NULL) {
- HANDLE hContact = DbGetAuthEventContact(dbei);
+ HCONTACT hContact = DbGetAuthEventContact(dbei);
if (CallService(MS_DB_CONTACT_IS, (WPARAM)hContact, 0) && IsIgnored((WPARAM)hContact, IGNOREEVENT_YOUWEREADDED))
return 1;
}