summaryrefslogtreecommitdiff
path: root/protocols/YAMN/src
diff options
context:
space:
mode:
authordartraiden <wowemuh@gmail.com>2019-07-21 19:59:18 +0300
committerdartraiden <wowemuh@gmail.com>2019-07-21 19:59:18 +0300
commitb078dfb78c89aea87cd422eae52694738e473cf3 (patch)
treeca896e82a8a5ce81f80d041f4aee7fdeeb007162 /protocols/YAMN/src
parentee7e29d02e94e969c1154515cd0c408c591a2414 (diff)
Restore "Free for chat" status support (fixes #1963)
Diffstat (limited to 'protocols/YAMN/src')
-rw-r--r--protocols/YAMN/src/proto/pop3/pop3opt.cpp14
-rw-r--r--protocols/YAMN/src/resource.h1
-rw-r--r--protocols/YAMN/src/yamn.cpp6
3 files changed, 17 insertions, 4 deletions
diff --git a/protocols/YAMN/src/proto/pop3/pop3opt.cpp b/protocols/YAMN/src/proto/pop3/pop3opt.cpp
index e22e966c57..fc111ef7c7 100644
--- a/protocols/YAMN/src/proto/pop3/pop3opt.cpp
+++ b/protocols/YAMN/src/proto/pop3/pop3opt.cpp
@@ -8,7 +8,7 @@
//--------------------------------------------------------------------------------------------------
-static BOOL Check0, Check1, Check2, Check3, Check4, Check5, Check6;
+static BOOL Check0, Check1, Check2, Check3, Check4, Check5, Check6, Check7;
static char DlgInput[MAX_PATH];
void CheckMenuItems();
@@ -192,6 +192,7 @@ BOOL DlgEnableAccountStatus(HWND hDlg, WPARAM wParam, LPARAM)
EnableWindow(GetDlgItem(hDlg, IDC_CHECKST4), (BOOL)wParam);
EnableWindow(GetDlgItem(hDlg, IDC_CHECKST5), (BOOL)wParam);
EnableWindow(GetDlgItem(hDlg, IDC_CHECKST6), (BOOL)wParam);
+ EnableWindow(GetDlgItem(hDlg, IDC_CHECKST7), (BOOL)wParam);
return TRUE;
}
@@ -239,7 +240,7 @@ BOOL DlgEnableAccount(HWND hDlg, WPARAM wParam, LPARAM)
EnableWindow(GetDlgItem(hDlg, IDC_CHECKFSND), (BOOL)wParam);
EnableWindow(GetDlgItem(hDlg, IDC_CHECKFMSG), (BOOL)wParam);
EnableWindow(GetDlgItem(hDlg, IDC_CHECKFICO), (BOOL)wParam);
-
+
EnableWindow(GetDlgItem(hDlg, IDC_CHECKSTART), (BOOL)wParam);
EnableWindow(GetDlgItem(hDlg, IDC_CHECKFORCE), (BOOL)wParam);
EnableWindow(GetDlgItem(hDlg, IDC_COMBOCP), (BOOL)wParam);
@@ -274,6 +275,7 @@ BOOL DlgShowAccountStatus(HWND hDlg, WPARAM wParam, LPARAM lParam)
CheckDlgButton(hDlg, IDC_CHECKST4, ActualAccount->StatusFlags & YAMN_ACC_ST4 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg, IDC_CHECKST5, ActualAccount->StatusFlags & YAMN_ACC_ST5 ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg, IDC_CHECKST6, ActualAccount->StatusFlags & YAMN_ACC_ST6 ? BST_CHECKED : BST_UNCHECKED);
+ CheckDlgButton(hDlg, IDC_CHECKST7, ActualAccount->StatusFlags & YAMN_ACC_ST7 ? BST_CHECKED : BST_UNCHECKED);
ReadDone(ActualAccount);
}
else {
@@ -284,6 +286,7 @@ BOOL DlgShowAccountStatus(HWND hDlg, WPARAM wParam, LPARAM lParam)
CheckDlgButton(hDlg, IDC_CHECKST4, BST_UNCHECKED);
CheckDlgButton(hDlg, IDC_CHECKST5, BST_UNCHECKED);
CheckDlgButton(hDlg, IDC_CHECKST6, BST_UNCHECKED);
+ CheckDlgButton(hDlg, IDC_CHECKST7, BST_CHECKED);
}
return TRUE;
}
@@ -389,7 +392,7 @@ BOOL DlgShowAccount(HWND hDlg, WPARAM wParam, LPARAM lParam)
CheckDlgButton(hDlg, IDC_CHECKNOTLS, ActualAccount->Flags & YAMN_ACC_NOTLS ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg, IDC_CHECKAPOP, ActualAccount->Flags & YAMN_ACC_APOP ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg, IDC_AUTOBODY, ActualAccount->Flags & YAMN_ACC_BODY ? BST_CHECKED : BST_UNCHECKED);
-
+
Check0 = ActualAccount->StatusFlags & YAMN_ACC_ST0;
Check1 = ActualAccount->StatusFlags & YAMN_ACC_ST1;
Check2 = ActualAccount->StatusFlags & YAMN_ACC_ST2;
@@ -397,6 +400,7 @@ BOOL DlgShowAccount(HWND hDlg, WPARAM wParam, LPARAM lParam)
Check4 = ActualAccount->StatusFlags & YAMN_ACC_ST4;
Check5 = ActualAccount->StatusFlags & YAMN_ACC_ST5;
Check6 = ActualAccount->StatusFlags & YAMN_ACC_ST6;
+ Check7 = ActualAccount->StatusFlags & YAMN_ACC_ST7;
CheckDlgButton(hDlg, IDC_CHECKSTART, ActualAccount->StatusFlags & YAMN_ACC_STARTS ? BST_CHECKED : BST_UNCHECKED);
CheckDlgButton(hDlg, IDC_CHECKFORCE, ActualAccount->StatusFlags & YAMN_ACC_FORCE ? BST_CHECKED : BST_UNCHECKED);
@@ -531,6 +535,7 @@ INT_PTR CALLBACK DlgProcPOP3AccStatusOpt(HWND hDlg, UINT msg, WPARAM wParam, LPA
CheckDlgButton(hDlg, IDC_CHECKST4, BST_CHECKED);
CheckDlgButton(hDlg, IDC_CHECKST5, BST_CHECKED);
CheckDlgButton(hDlg, IDC_CHECKST6, BST_CHECKED);
+ CheckDlgButton(hDlg, IDC_CHECKST7, BST_CHECKED);
}
TranslateDialogDefault(hDlg);
SendMessage(GetParent(hDlg), PSM_UNCHANGED, (WPARAM)hDlg, 0);
@@ -546,6 +551,7 @@ INT_PTR CALLBACK DlgProcPOP3AccStatusOpt(HWND hDlg, UINT msg, WPARAM wParam, LPA
Check4 = (IsDlgButtonChecked(hDlg, IDC_CHECKST4) == BST_CHECKED);
Check5 = (IsDlgButtonChecked(hDlg, IDC_CHECKST5) == BST_CHECKED);
Check6 = (IsDlgButtonChecked(hDlg, IDC_CHECKST6) == BST_CHECKED);
+ Check7 = (IsDlgButtonChecked(hDlg, IDC_CHECKST7) == BST_CHECKED);
WindowList_BroadcastAsync(YAMNVar.MessageWnds, WM_YAMN_CHANGESTATUSOPTION, 0, 0);
EndDialog(hDlg, 0);
DestroyWindow(hDlg);
@@ -708,6 +714,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
case IDC_CHECKST4:
case IDC_CHECKST5:
case IDC_CHECKST6:
+ case IDC_CHECKST7:
case IDC_CHECKSTART:
case IDC_CHECKFORCE:
case IDC_EDITAPPPARAM:
@@ -1012,6 +1019,7 @@ INT_PTR CALLBACK DlgProcPOP3AccOpt(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lP
(Check4 ? YAMN_ACC_ST4 : 0) |
(Check5 ? YAMN_ACC_ST5 : 0) |
(Check6 ? YAMN_ACC_ST6 : 0) |
+ (Check7 ? YAMN_ACC_ST7 : 0) |
(CheckStart ? YAMN_ACC_STARTS : 0) |
(CheckForce ? YAMN_ACC_FORCE : 0);
diff --git a/protocols/YAMN/src/resource.h b/protocols/YAMN/src/resource.h
index cac621bb44..096cc42f60 100644
--- a/protocols/YAMN/src/resource.h
+++ b/protocols/YAMN/src/resource.h
@@ -43,6 +43,7 @@
#define IDC_CHECKST4 1023
#define IDC_CHECKST5 1024
#define IDC_CHECKST6 1025
+#define IDC_CHECKST7 1026
#define IDC_EDITAPP 1027
#define IDC_CHECKCONTACT 1030
#define IDC_CHECKCONTACTNICK 1031
diff --git a/protocols/YAMN/src/yamn.cpp b/protocols/YAMN/src/yamn.cpp
index 1b4b9e4f01..d355ed3b13 100644
--- a/protocols/YAMN/src/yamn.cpp
+++ b/protocols/YAMN/src/yamn.cpp
@@ -160,6 +160,9 @@ void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD)
case ID_STATUS_OCCUPIED:
DebugLog(SynchroFile, "TimerProc:ActualAccountSO-read enter status occupied\n");
break;
+ case ID_STATUS_FREECHAT:
+ DebugLog(SynchroFile, "TimerProc:ActualAccountSO-read enter status freechat\n");
+ break;
case ID_STATUS_INVISIBLE:
DebugLog(SynchroFile, "TimerProc:ActualAccountSO-read enter status invisible\n");
break;
@@ -177,7 +180,8 @@ void CALLBACK TimerProc(HWND, UINT, UINT_PTR, DWORD)
((ActualAccount->StatusFlags & YAMN_ACC_ST3) && (Status==ID_STATUS_DND)) ||
((ActualAccount->StatusFlags & YAMN_ACC_ST4) && (Status==ID_STATUS_NA)) ||
((ActualAccount->StatusFlags & YAMN_ACC_ST5) && (Status==ID_STATUS_OCCUPIED)) ||
- ((ActualAccount->StatusFlags & YAMN_ACC_ST6) && (Status==ID_STATUS_INVISIBLE))))
+ ((ActualAccount->StatusFlags & YAMN_ACC_ST6) && (Status==ID_STATUS_FREECHAT)) ||
+ ((ActualAccount->StatusFlags & YAMN_ACC_ST7) && (Status==ID_STATUS_INVISIBLE))))
{
if ((!ActualAccount->Interval && !ActualAccount->TimeLeft) || ActualAccount->Plugin->Fcn->TimeoutFcnPtr==nullptr)