From 5d2487dc97a63b0545b2d7d56405e7417fa2dd75 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Wed, 9 Apr 2014 12:06:39 +0000 Subject: Steam: - add searching by name - added contact info updating - small improvements git-svn-id: http://svn.miranda-ng.org/main/trunk@8901 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Steam/src/steam_dialogs.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'protocols/Steam/src/steam_dialogs.cpp') diff --git a/protocols/Steam/src/steam_dialogs.cpp b/protocols/Steam/src/steam_dialogs.cpp index a03114f6c8..ad836d841a 100644 --- a/protocols/Steam/src/steam_dialogs.cpp +++ b/protocols/Steam/src/steam_dialogs.cpp @@ -167,8 +167,10 @@ INT_PTR CALLBACK CSteamProto::MainOptionsProc(HWND hwnd, UINT message, WPARAM wP switch(LOWORD(wParam)) { case IDC_USERNAME: + if ((HWND)lParam == GetFocus()) { - if ((HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) return 0; + EnableWindow(GetDlgItem(hwnd, IDC_USERNAME), !proto->IsOnline()); + if (HIWORD(wParam) != EN_CHANGE) return 0; proto->delSetting("SteamID"); proto->delSetting("Cookies"); proto->delSetting("TokenSecret"); @@ -179,8 +181,10 @@ INT_PTR CALLBACK CSteamProto::MainOptionsProc(HWND hwnd, UINT message, WPARAM wP break; case IDC_PASSWORD: + if ((HWND)lParam == GetFocus()) { - if ((HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus())) return 0; + EnableWindow(GetDlgItem(hwnd, IDC_PASSWORD), !proto->IsOnline()); + if (HIWORD(wParam) != EN_CHANGE) return 0; proto->delSetting("Cookie"); proto->delSetting("TokenSecret"); char password[128]; @@ -212,17 +216,17 @@ INT_PTR CALLBACK CSteamProto::MainOptionsProc(HWND hwnd, UINT message, WPARAM wP char password[128]; GetDlgItemTextA(hwnd, IDC_PASSWORD, password, SIZEOF(password)); proto->setString("Password", password); + } - wchar_t groupName[128]; - GetDlgItemText(hwnd, IDC_GROUP, groupName, SIZEOF(groupName)); - if (lstrlen(groupName) > 0) - { - proto->setWString(NULL, "DefaultGroup", groupName); - Clist_CreateGroup(0, groupName); - } - else - proto->delSetting(NULL, "DefaultGroup"); + wchar_t groupName[128]; + GetDlgItemText(hwnd, IDC_GROUP, groupName, SIZEOF(groupName)); + if (lstrlen(groupName) > 0) + { + proto->setWString(NULL, "DefaultGroup", groupName); + Clist_CreateGroup(0, groupName); } + else + proto->delSetting(NULL, "DefaultGroup"); return TRUE; } -- cgit v1.2.3