summaryrefslogtreecommitdiff
path: root/protocols/VKontakte/src/vk_options.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/VKontakte/src/vk_options.cpp')
-rw-r--r--protocols/VKontakte/src/vk_options.cpp11
1 files changed, 10 insertions, 1 deletions
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)