From d770f3eb807b9b1c9f844a005179f93893183133 Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Thu, 5 Mar 2015 19:18:03 +0000 Subject: Tox: add folders support git-svn-id: http://svn.miranda-ng.org/main/trunk@12331 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_options.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'protocols/Tox/src/tox_options.cpp') diff --git a/protocols/Tox/src/tox_options.cpp b/protocols/Tox/src/tox_options.cpp index 623b05c673..764d3d9469 100644 --- a/protocols/Tox/src/tox_options.cpp +++ b/protocols/Tox/src/tox_options.cpp @@ -74,9 +74,17 @@ INT_PTR CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l case IDC_IMPORT_PROFILE: { + TCHAR *pFilter, filter[MAX_PATH] = { 0 }; + pFilter = &filter[0]; + mir_tstrcat(pFilter, TranslateT("Tox profile(*.tox)")); + pFilter += mir_tstrlen(pFilter) + 1; + mir_tstrcat(pFilter, _T("*.tox")); + pFilter += mir_tstrlen(pFilter) + 1; + mir_tstrcat(pFilter, TranslateT("All files(*.*)")); + pFilter += mir_tstrlen(pFilter) + 1; + mir_tstrcat(pFilter, _T("*.*")); + TCHAR profilePath[MAX_PATH] = { 0 }; - TCHAR filter[MAX_PATH] = { 0 }; - mir_sntprintf(filter, MAX_PATH, _T("%s\0*.*"), TranslateT("All files (*.*)")); OPENFILENAME ofn = { sizeof(ofn) }; ofn.hwndOwner = hwnd; @@ -86,6 +94,7 @@ INT_PTR CToxProto::MainOptionsProc(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM l ofn.lpstrTitle = TranslateT("Select tox profile"); ofn.nMaxFile = MAX_PATH; ofn.Flags = OFN_FILEMUSTEXIST | OFN_PATHMUSTEXIST | OFN_EXPLORER; + ofn.lpstrInitialDir = _T("%APPDATA%\\Tox"); if (GetOpenFileName(&ofn)) { -- cgit v1.2.3