summaryrefslogtreecommitdiff
path: root/protocols/Tox/src
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-09-29 18:51:27 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-09-29 18:51:27 +0000
commit9e8da84fff2f4e11bb9182bbd1b727e525ff0d30 (patch)
tree46715595a491def36318b8132c66ec0fef65573f /protocols/Tox/src
parentfcda6b058c75eb84c0ce1ab04e7a9a9f76f0bcc7 (diff)
Tox: fixed crash on closing tox profile import window
git-svn-id: http://svn.miranda-ng.org/main/trunk@10635 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src')
-rw-r--r--protocols/Tox/src/tox_profile.cpp14
1 files changed, 13 insertions, 1 deletions
diff --git a/protocols/Tox/src/tox_profile.cpp b/protocols/Tox/src/tox_profile.cpp
index 168e998d8c..1ad015dee3 100644
--- a/protocols/Tox/src/tox_profile.cpp
+++ b/protocols/Tox/src/tox_profile.cpp
@@ -124,7 +124,11 @@ INT_PTR CToxProto::ToxProfileManagerProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP
return TRUE;
case WM_CLOSE:
- EndDialog(hwnd, 0);
+ {
+ std::tstring defaultProfilePath = proto->GetToxProfilePath();
+ fclose(_wfopen(defaultProfilePath.c_str(), _T("w")));
+ EndDialog(hwnd, 0);
+ }
break;
case WM_DESTROY:
@@ -134,6 +138,14 @@ INT_PTR CToxProto::ToxProfileManagerProc(HWND hwnd, UINT uMsg, WPARAM wParam, LP
case WM_COMMAND:
switch (LOWORD(wParam))
{
+ case IDC_PROFILE_PATH:
+ if ((HWND)lParam == GetFocus())
+ {
+ if (HIWORD(wParam) != EN_CHANGE) return 0;
+ EnableWindow(GetDlgItem(hwnd, IDOK), TRUE);
+ }
+ break;
+
case IDC_BROWSE_PROFILE:
{
TCHAR filter[MAX_PATH] = { 0 };