summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_options.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-03-05 19:18:03 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-03-05 19:18:03 +0000
commitd770f3eb807b9b1c9f844a005179f93893183133 (patch)
treee2b55b57e528020d789321da3a3bfc63c19448c0 /protocols/Tox/src/tox_options.cpp
parent0611ac72c7020b46466309c19622afe0fb3bc122 (diff)
Tox: add folders support
git-svn-id: http://svn.miranda-ng.org/main/trunk@12331 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_options.cpp')
-rw-r--r--protocols/Tox/src/tox_options.cpp13
1 files changed, 11 insertions, 2 deletions
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))
{