summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_accounts.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2014-09-29 17:47:24 +0000
committerAlexander Lantsev <aunsane@gmail.com>2014-09-29 17:47:24 +0000
commit6beb2d44b3ab2811417507be4c78c19626c9ee7e (patch)
tree0292dd1424658b2a34850dfaebafe2bdde36bfdc /protocols/Tox/src/tox_accounts.cpp
parent8f994ff592a5501018ba601d33d59a558a2d9840 (diff)
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
Diffstat (limited to 'protocols/Tox/src/tox_accounts.cpp')
-rw-r--r--protocols/Tox/src/tox_accounts.cpp9
1 files changed, 3 insertions, 6 deletions
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;
}
}