From b078dfb78c89aea87cd422eae52694738e473cf3 Mon Sep 17 00:00:00 2001 From: dartraiden Date: Sun, 21 Jul 2019 19:59:18 +0300 Subject: Restore "Free for chat" status support (fixes #1963) --- plugins/YARelay/src/main.cpp | 1 + plugins/YARelay/src/options.cpp | 6 ++++-- plugins/YARelay/src/resource.h | 1 + plugins/YARelay/src/stdafx.h | 3 ++- 4 files changed, 8 insertions(+), 3 deletions(-) (limited to 'plugins/YARelay/src') diff --git a/plugins/YARelay/src/main.cpp b/plugins/YARelay/src/main.cpp index db2ddb9847..4a29fedc9f 100644 --- a/plugins/YARelay/src/main.cpp +++ b/plugins/YARelay/src/main.cpp @@ -105,6 +105,7 @@ static int MessageEventAdded(WPARAM hContact, LPARAM hDBEvent) case ID_STATUS_NA: statMask = STATUS_NA ;break; case ID_STATUS_OCCUPIED: statMask = STATUS_OCCUPIED ;break; case ID_STATUS_DND: statMask = STATUS_DND ;break; + case ID_STATUS_FREECHAT: statMask = STATUS_FREECHAT ;break; case ID_STATUS_INVISIBLE:statMask = STATUS_INVISIBLE;break; default: return 0; } diff --git a/plugins/YARelay/src/options.cpp b/plugins/YARelay/src/options.cpp index 3f0f2639d2..7e4d1eceef 100644 --- a/plugins/YARelay/src/options.cpp +++ b/plugins/YARelay/src/options.cpp @@ -95,7 +95,8 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (iForwardOnStatus & STATUS_NA ) CheckDlgButton(hwndDlg, IDC_CHECK4, BST_CHECKED); if (iForwardOnStatus & STATUS_OCCUPIED ) CheckDlgButton(hwndDlg, IDC_CHECK5, BST_CHECKED); if (iForwardOnStatus & STATUS_DND ) CheckDlgButton(hwndDlg, IDC_CHECK6, BST_CHECKED); - if (iForwardOnStatus & STATUS_INVISIBLE) CheckDlgButton(hwndDlg, IDC_CHECK7, BST_CHECKED); + if (iForwardOnStatus & STATUS_FREECHAT ) CheckDlgButton(hwndDlg, IDC_CHECK7, BST_CHECKED); + if (iForwardOnStatus & STATUS_INVISIBLE) CheckDlgButton(hwndDlg, IDC_CHECK8, BST_CHECKED); // template SetDlgItemText(hwndDlg, IDC_EDIT_TEMPLATE, tszForwardTemplate); @@ -155,7 +156,8 @@ static INT_PTR CALLBACK OptionsFrameProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, if (IsDlgButtonChecked(hwndDlg, IDC_CHECK4) == BST_CHECKED) iForwardOnStatus |= STATUS_NA; if (IsDlgButtonChecked(hwndDlg, IDC_CHECK5) == BST_CHECKED) iForwardOnStatus |= STATUS_OCCUPIED; if (IsDlgButtonChecked(hwndDlg, IDC_CHECK6) == BST_CHECKED) iForwardOnStatus |= STATUS_DND; - if (IsDlgButtonChecked(hwndDlg, IDC_CHECK7) == BST_CHECKED) iForwardOnStatus |= STATUS_INVISIBLE; + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK7) == BST_CHECKED) iForwardOnStatus |= STATUS_FREECHAT; + if (IsDlgButtonChecked(hwndDlg, IDC_CHECK8) == BST_CHECKED) iForwardOnStatus |= STATUS_INVISIBLE; GetDlgItemText(hwndDlg, IDC_EDIT_TEMPLATE, tszForwardTemplate, _countof(tszForwardTemplate)); if (IsDlgButtonChecked(hwndDlg, IDC_CHECK_SPLIT) == BST_CHECKED) iSplit = 1; else iSplit = 0; iSplitMaxSize = GetDlgItemInt(hwndDlg, IDC_EDIT_MAXSIZE, nullptr, FALSE); diff --git a/plugins/YARelay/src/resource.h b/plugins/YARelay/src/resource.h index b894e2d895..b9104ff1a1 100644 --- a/plugins/YARelay/src/resource.h +++ b/plugins/YARelay/src/resource.h @@ -16,6 +16,7 @@ #define IDC_CHECK5 1008 #define IDC_CHECK6 1009 #define IDC_CHECK7 1010 +#define IDC_CHECK8 1011 #define IDC_EDIT_TEMPLATE 1012 #define IDC_CHECK_SPLIT 1013 #define IDC_EDIT_MAXSIZE 1014 diff --git a/plugins/YARelay/src/stdafx.h b/plugins/YARelay/src/stdafx.h index 11a4d8fe31..85acbb020a 100644 --- a/plugins/YARelay/src/stdafx.h +++ b/plugins/YARelay/src/stdafx.h @@ -41,7 +41,8 @@ Features: #define STATUS_NA 0x8 #define STATUS_OCCUPIED 0x10 #define STATUS_DND 0x20 -#define STATUS_INVISIBLE 0x40 +#define STATUS_FREECHAT 0x40 +#define STATUS_INVISIBLE 0x80 #define MAXTEMPLATESIZE 1024 -- cgit v1.2.3