summaryrefslogtreecommitdiff
path: root/protocols/Tox
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox')
-rw-r--r--protocols/Tox/res/resource.rc2
-rw-r--r--protocols/Tox/src/tox_profile.cpp14
2 files changed, 14 insertions, 2 deletions
diff --git a/protocols/Tox/res/resource.rc b/protocols/Tox/res/resource.rc
index 12df8301a4..3d4c63a511 100644
--- a/protocols/Tox/res/resource.rc
+++ b/protocols/Tox/res/resource.rc
@@ -123,7 +123,7 @@ CAPTION "Tox profile import"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
PUSHBUTTON "Import",IDOK,124,66,50,14,WS_DISABLED
- LTEXT "Tox profile contains your ID and friend list.\r\nYou may import existing profile from other tox client.\r\nPress "Import" to perform import from existing profile.\r\nPress "Cancel" or close this window to create new profile.",IDC_STATIC,7,7,221,31
+ LTEXT "Tox profile contains your ID and friend list.\r\nYou may import existing profile from other tox client.\r\nPress ""Import"" to perform import from existing profile.\r\nPress ""Cancel"" or close this window to create new profile.",IDC_STATIC,7,7,221,31
EDITTEXT IDC_PROFILE_PATH,7,38,202,14,ES_AUTOHSCROLL
PUSHBUTTON "...",IDC_BROWSE_PROFILE,212,38,16,14
DEFPUSHBUTTON "Cancel",IDCANCEL,178,66,50,14
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 };