From 2e1ccca56dcd321148ac0e233dc88e553a951d0b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 7 Jan 2014 11:55:18 +0000 Subject: VK: group name became tunable git-svn-id: http://svn.miranda-ng.org/main/trunk@7530 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/VKontakte/src/vk_options.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (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 3ce73d7f72..6228cb3fae 100644 --- a/protocols/VKontakte/src/vk_options.cpp +++ b/protocols/VKontakte/src/vk_options.cpp @@ -96,7 +96,7 @@ INT_PTR CVkProto::SvcCreateAccMgrUI(WPARAM wParam, LPARAM lParam) INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam) { - CVkProto* ppro = (CVkProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); + CVkProto *ppro = (CVkProto*)GetWindowLongPtr(hwndDlg, GWLP_USERDATA); switch (uMsg) { case WM_INITDIALOG: @@ -115,6 +115,8 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L ptrT tszPassw(ppro->GetUserStoredPassword()); if (tszPassw != NULL) SetDlgItemText(hwndDlg, IDC_PASSWORD, tszPassw); + + SetDlgItemText(hwndDlg, IDC_GROUPNAME, ppro->getGroup()); } CheckDlgButton(hwndDlg, IDC_DELIVERY, ppro->m_bServerDelivery); return TRUE; @@ -127,6 +129,7 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L case IDC_LOGIN: case IDC_PASSWORD: + case IDC_GROUPNAME: if (HIWORD(wParam) == EN_CHANGE && (HWND)lParam == GetFocus()) SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); break; @@ -144,6 +147,12 @@ INT_PTR CALLBACK CVkProto::OptionsProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, L GetDlgItemText(hwndDlg, IDC_LOGIN, str, SIZEOF(str)); ppro->setTString("Login", str); + GetDlgItemText(hwndDlg, IDC_GROUPNAME, str, SIZEOF(str)); + if (_tcscmp(ppro->getGroup(), str)) { + ppro->setGroup(str); + ppro->setTString("ProtoGroup", str); + } + GetDlgItemText(hwndDlg, IDC_PASSWORD, str, SIZEOF(str)); ptrA szRawPasswd(mir_utf8encodeT(str)); if (szRawPasswd != NULL) -- cgit v1.2.3