From 70c8a5106f992a68148fccf4187602a662e4f4da Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Mon, 22 Dec 2014 07:08:03 +0000 Subject: =?UTF-8?q?VKontakte:=20separate=20intervals=20for=20news=20and=20?= =?UTF-8?q?notifications=20add=20options=20for=20safe=20special=20contact?= =?UTF-8?q?=20if=20news=20and=20notification=20is=20disabled=20fix=20for?= =?UTF-8?q?=20move=20special=20contact=20to=20non-default=20group=20add=20?= =?UTF-8?q?=E2=80=98load=20news=20from=20vk=E2=80=99=20to=20protocol=20men?= =?UTF-8?q?u=20and=20contact=20menu=20for=20special=20contact=20version=20?= =?UTF-8?q?bump?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: http://svn.miranda-ng.org/main/trunk@11572 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_options.cpp | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'protocols/VKontakte/src/vk_options.cpp') diff --git a/protocols/VKontakte/src/vk_options.cpp b/protocols/VKontakte/src/vk_options.cpp index 7b5c51b0a1..a6f4aa46b0 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -354,22 +354,28 @@ INT_PTR CALLBACK CVkProto::OptionsFeedsProc(HWND hwndDlg, UINT uMsg, WPARAM wPar CheckDlgButton(hwndDlg, IDC_NEWS_ENBL, ppro->m_bNewsEnabled ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_NOTIF_ENBL, ppro->m_bNotificationsEnabled ? BST_CHECKED : BST_UNCHECKED); + CheckDlgButton(hwndDlg, IDC_SPEC_CONT_ENBL, ppro->m_bSpecialContactAlwaysEnabled ? BST_CHECKED : BST_UNCHECKED); CheckDlgButton(hwndDlg, IDC_BBC_NEWS, ppro->m_bBBCOnNews ? BST_CHECKED : BST_UNCHECKED); - SendDlgItemMessage(hwndDlg, IDC_SPIN_INT, UDM_SETRANGE, 0, MAKELONG(60*24, 1)); - SendDlgItemMessage(hwndDlg, IDC_SPIN_INT, UDM_SETPOS, 0, ppro->m_iNewsInterval); + SendDlgItemMessage(hwndDlg, IDC_SPIN_INT_NEWS, UDM_SETRANGE, 0, MAKELONG(60*24, 1)); + SendDlgItemMessage(hwndDlg, IDC_SPIN_INT_NEWS, UDM_SETPOS, 0, ppro->m_iNewsInterval); + + SendDlgItemMessage(hwndDlg, IDC_SPIN_INT_NOTIF, UDM_SETRANGE, 0, MAKELONG(60 * 24, 1)); + SendDlgItemMessage(hwndDlg, IDC_SPIN_INT_NOTIF, UDM_SETPOS, 0, ppro->m_iNotificationsInterval); return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { - case IDC_ED_INT: + case IDC_ED_INT_NEWS: + case IDC_ED_INT_NOTIF: if ((HWND)lParam == GetFocus() && (HIWORD(wParam) == EN_CHANGE)) SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); break; case IDC_NEWS_ENBL: case IDC_NOTIF_ENBL: + case IDC_SPEC_CONT_ENBL: case IDC_BBC_NEWS: if (HIWORD(wParam) == BN_CLICKED && (HWND)lParam == GetFocus()) SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); @@ -388,12 +394,18 @@ INT_PTR CALLBACK CVkProto::OptionsFeedsProc(HWND hwndDlg, UINT uMsg, WPARAM wPar ppro->m_bNotificationsEnabled = IsDlgButtonChecked(hwndDlg, IDC_NOTIF_ENBL) == BST_CHECKED; ppro->setByte("NotificationsEnabled", ppro->m_bNotificationsEnabled); + ppro->m_bSpecialContactAlwaysEnabled = IsDlgButtonChecked(hwndDlg, IDC_SPEC_CONT_ENBL) == BST_CHECKED; + ppro->setByte("SpecialContactAlwaysEnabled", ppro->m_bSpecialContactAlwaysEnabled); + ppro->m_bBBCOnNews = IsDlgButtonChecked(hwndDlg, IDC_BBC_NEWS) == BST_CHECKED; ppro->setByte("BBCOnNews", ppro->m_bBBCOnNews); TCHAR buffer[5] = { 0 }; - GetDlgItemText(hwndDlg, IDC_ED_INT, buffer, SIZEOF(buffer)); + GetDlgItemText(hwndDlg, IDC_ED_INT_NEWS, buffer, SIZEOF(buffer)); ppro->setDword("NewsInterval", ppro->m_iNewsInterval = _ttoi(buffer)); + + GetDlgItemText(hwndDlg, IDC_ED_INT_NOTIF, buffer, SIZEOF(buffer)); + ppro->setDword("NotificationsInterval", ppro->m_iNotificationsInterval = _ttoi(buffer)); } break; -- cgit v1.2.3