From 6beb2d44b3ab2811417507be4c78c19626c9ee7e Mon Sep 17 00:00:00 2001 From: Alexander Lantsev Date: Mon, 29 Sep 2014 17:47:24 +0000 Subject: Tox: - profile manager is now profile import - tox profile renaming without reloading of tox core - updated tox core git-svn-id: http://svn.miranda-ng.org/main/trunk@10632 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/Tox/src/tox_accounts.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'protocols/Tox/src/tox_accounts.cpp') diff --git a/protocols/Tox/src/tox_accounts.cpp b/protocols/Tox/src/tox_accounts.cpp index acab9db206..97b6f9b345 100644 --- a/protocols/Tox/src/tox_accounts.cpp +++ b/protocols/Tox/src/tox_accounts.cpp @@ -32,26 +32,23 @@ int CToxProto::OnAccountListChanged(WPARAM wParam, LPARAM lParam) switch (wParam) { case PRAC_ADDED: - if (this->getStringA("ToxID")) - UninitToxCore(); DialogBoxParam( g_hInstance, - MAKEINTRESOURCE(IDD_PROFILE_MANAGER), + MAKEINTRESOURCE(IDD_PROFILE_IMPORT), account->hwndAccMgrUI, CToxProto::ToxProfileManagerProc, (LPARAM)this); InitToxCore(); + SaveToxProfile(); break; case PRAC_CHANGED: - UninitToxCore(); std::tstring newPath = GetToxProfilePath(); TCHAR oldPath[MAX_PATH]; mir_sntprintf(oldPath, MAX_PATH, _T("%s\\%s.tox"), VARST(_T("%miranda_userdata%")), accountName); - MoveFileEx(oldPath, newPath.c_str(), MOVEFILE_REPLACE_EXISTING); + MoveFileEx(oldPath, newPath.c_str(), MOVEFILE_REPLACE_EXISTING | MOVEFILE_COPY_ALLOWED); mir_free(accountName); accountName = mir_tstrdup(m_tszUserName); - InitToxCore(); break; } } -- cgit v1.2.3