diff options
author | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-10 07:01:31 +0000 |
---|---|---|
committer | Sergey Bolhovskoy <elzorfox@ya.ru> | 2014-10-10 07:01:31 +0000 |
commit | 3e604c7a2542790b5a3f22f2ddd714af520190be (patch) | |
tree | b70dd13151b4d3be3ffc6b1f4652ab1a521ebdba /protocols/VKontakte/src/vk_options.cpp | |
parent | 16b6caa0a8b5e80c75a93b67db1ae5812a81fc80 (diff) |
VKontakte: reworked mark as read process
git-svn-id: http://svn.miranda-ng.org/main/trunk@10752 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/VKontakte/src/vk_options.cpp')
-rw-r--r-- | protocols/VKontakte/src/vk_options.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp index 6df6285e7f..b4d1dbfd45 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -122,15 +122,17 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L CheckDlgButton(hwndDlg, IDC_HIDECHATS, ppro->m_bHideChats);
CheckDlgButton(hwndDlg, IDC_AUTOCLEAN, ppro->getByte("AutoClean", 0));
CheckDlgButton(hwndDlg, IDC_MESASUREAD, ppro->m_bMesAsUnread);
- CheckDlgButton(hwndDlg, IDC_MARKREADONREPLY, ppro->m_bMarkReadOnReply);
- EnableWindow(GetDlgItem(hwndDlg, IDC_MARKREADONTYPING), ppro->m_bMarkReadOnReply);
- CheckDlgButton(hwndDlg, IDC_MARKREADONTYPING, ppro->m_bMarkReadOnTyping);
CheckDlgButton(hwndDlg, IDC_SYNCHISTOTYONONLINE, ppro->m_bAutoSyncHistory);
CheckDlgButton(hwndDlg, IDC_USE_LOCAL_TIME, ppro->m_bUseLocalTime);
CheckDlgButton(hwndDlg, IDC_REPORT_ABUSE, ppro->m_bReportAbuse);
CheckDlgButton(hwndDlg, IDC_CLEAR_SERVER_HISTORY, ppro->m_bClearServerHistory);
CheckDlgButton(hwndDlg, IDC_REMOVE_FROM_FRENDLIST, ppro->m_bRemoveFromFrendlist);
CheckDlgButton(hwndDlg, IDC_REMOVE_FROM_CLIST, ppro->m_bRemoveFromClist);
+
+ CheckDlgButton(hwndDlg, IDC_ONREAD, (ppro->m_iMarkMessageReadOn == markOnRead));
+ CheckDlgButton(hwndDlg, IDC_ONRECEIVE, (ppro->m_iMarkMessageReadOn == markOnReceive));
+ CheckDlgButton(hwndDlg, IDC_ONREPLY, (ppro->m_iMarkMessageReadOn == markOnReply));
+ CheckDlgButton(hwndDlg, IDC_ONTYPING, (ppro->m_iMarkMessageReadOn == markOnTyping));
return TRUE;
case WM_COMMAND:
@@ -150,22 +152,19 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L case IDC_HIDECHATS:
case IDC_AUTOCLEAN:
case IDC_MESASUREAD:
- case IDC_MARKREADONTYPING:
case IDC_SYNCHISTOTYONONLINE:
case IDC_USE_LOCAL_TIME:
case IDC_REPORT_ABUSE:
case IDC_CLEAR_SERVER_HISTORY:
case IDC_REMOVE_FROM_FRENDLIST:
case IDC_REMOVE_FROM_CLIST:
+ case IDC_ONREAD:
+ case IDC_ONRECEIVE:
+ case IDC_ONREPLY:
+ case IDC_ONTYPING:
if (HIWORD(wParam) == BN_CLICKED && (HWND)lParam == GetFocus())
SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
break;
- case IDC_MARKREADONREPLY:
- if (HIWORD(wParam) == BN_CLICKED && (HWND)lParam == GetFocus()){
- SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0);
- EnableWindow(GetDlgItem(hwndDlg, IDC_MARKREADONTYPING), (IsDlgButtonChecked(hwndDlg, IDC_MARKREADONREPLY) == BST_CHECKED));
- }
- break;
}
break;
@@ -197,12 +196,6 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L ppro->m_bMesAsUnread = IsDlgButtonChecked(hwndDlg, IDC_MESASUREAD) == BST_CHECKED;
ppro->setByte("MesAsUnread", ppro->m_bMesAsUnread);
- ppro->m_bMarkReadOnReply = IsDlgButtonChecked(hwndDlg, IDC_MARKREADONREPLY) == BST_CHECKED;
- ppro->setByte("MarkReadOnReply", ppro->m_bMarkReadOnReply);
-
- ppro->m_bMarkReadOnTyping = (IsDlgButtonChecked(hwndDlg, IDC_MARKREADONREPLY) == BST_CHECKED) && (IsDlgButtonChecked(hwndDlg, IDC_MARKREADONTYPING) == BST_CHECKED);
- ppro->setByte("MarkReadOnTyping", ppro->m_bMarkReadOnTyping);
-
ppro->m_bAutoSyncHistory = IsDlgButtonChecked(hwndDlg, IDC_SYNCHISTOTYONONLINE) == BST_CHECKED;
ppro->setByte("AutoSyncHistory", ppro->m_bAutoSyncHistory);
@@ -220,7 +213,16 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L ppro->m_bRemoveFromClist = IsDlgButtonChecked(hwndDlg, IDC_REMOVE_FROM_CLIST) == BST_CHECKED;
ppro->setByte("RemoveFromClistOnBanUser", ppro->m_bRemoveFromClist);
-
+
+ if (IsDlgButtonChecked(hwndDlg, IDC_ONREAD) == BST_CHECKED)
+ ppro->m_iMarkMessageReadOn = markOnRead;
+ if (IsDlgButtonChecked(hwndDlg, IDC_ONRECEIVE) == BST_CHECKED)
+ ppro->m_iMarkMessageReadOn = markOnReceive;
+ if (IsDlgButtonChecked(hwndDlg, IDC_ONREPLY) == BST_CHECKED)
+ ppro->m_iMarkMessageReadOn = markOnReply;
+ if (IsDlgButtonChecked(hwndDlg, IDC_ONTYPING) == BST_CHECKED)
+ ppro->m_iMarkMessageReadOn = markOnTyping;
+ ppro->setByte("MarkMessageReadOn", ppro->m_iMarkMessageReadOn);
}
break;
|