diff options
author | Alexander Lantsev <aunsane@gmail.com> | 2014-09-27 10:19:26 +0000 |
---|---|---|
committer | Alexander Lantsev <aunsane@gmail.com> | 2014-09-27 10:19:26 +0000 |
commit | 22b35cdc0d13336366efe44b57d682d5be6bae52 (patch) | |
tree | dc4fb01f13f4b11391c2c1c704d10b4ecc9c66b8 /protocols/Tox/src/tox_options.cpp | |
parent | 93467b8c3702be5fc9f9b60c3ff6863cb37ccd8d (diff) |
Tox:
- password field temporary disables
- some changes
git-svn-id: http://svn.miranda-ng.org/main/trunk@10613 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_options.cpp')
-rw-r--r-- | protocols/Tox/src/tox_options.cpp | 35 |
1 files changed, 11 insertions, 24 deletions
diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index d811569175..0b24416308 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -12,16 +12,16 @@ INT_PTR CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l proto = (CToxProto*)lParam;
SetWindowLongPtr(hwnd, GWLP_USERDATA, lParam);
- ptrW nick(proto->getTStringA("Nick"));
+ ptrT nick(proto->getTStringA("Nick"));
SetDlgItemText(hwnd, IDC_NAME, nick);
- ptrW pass(proto->getTStringA("Password"));
+ ptrT pass(proto->getTStringA("Password"));
SetDlgItemText(hwnd, IDC_PASSWORD, pass);
std::string address = proto->getStringA(NULL, TOX_SETTINGS_ID);
SetDlgItemTextA(hwnd, IDC_TOXID, address.c_str());
- ptrW group(proto->getTStringA(TOX_SETTINGS_GROUP));
+ ptrT group(proto->getTStringA(TOX_SETTINGS_GROUP));
SetDlgItemText(hwnd, IDC_GROUP, group);
SendDlgItemMessage(hwnd, IDC_GROUP, EM_LIMITTEXT, 64, 0);
@@ -35,6 +35,8 @@ INT_PTR CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l switch (LOWORD(wParam))
{
case IDC_NAME:
+ case IDC_GROUP:
+ case IDC_PASSWORD:
if ((HWND)lParam == GetFocus())
{
if (HIWORD(wParam) != EN_CHANGE) return 0;
@@ -42,13 +44,11 @@ INT_PTR CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l }
break;
- case IDC_PASSWORD:
- if ((HWND)lParam == GetFocus())
- {
- if (HIWORD(wParam) != EN_CHANGE) return 0;
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- }
+ case IDC_DISABLE_UDP:
+ case IDC_DISABLE_IPV6:
+ SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
break;
+ }
case IDC_CLIPBOARD:
{
@@ -65,21 +65,6 @@ INT_PTR CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l }
}
break;
-
- case IDC_GROUP:
- if ((HIWORD(wParam) != EN_CHANGE || (HWND)lParam != GetFocus()))
- return 0;
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- break;
-
- case IDC_DISABLE_UDP:
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- break;
-
- case IDC_DISABLE_IPV6:
- SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
- break;
- }
}
break;
@@ -108,6 +93,8 @@ INT_PTR CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l proto->delSetting(NULL, TOX_SETTINGS_GROUP);
}
+ proto->SaveToxData();
+
return TRUE;
}
break;
|