summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_accounts.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Tox/src/tox_accounts.cpp')
-rw-r--r--protocols/Tox/src/tox_accounts.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/protocols/Tox/src/tox_accounts.cpp b/protocols/Tox/src/tox_accounts.cpp
index 97b6f9b345..091923ccdf 100644
--- a/protocols/Tox/src/tox_accounts.cpp
+++ b/protocols/Tox/src/tox_accounts.cpp
@@ -9,6 +9,17 @@ int CToxProto::CompareAccounts(const CToxProto *p1, const CToxProto *p2)
CToxProto* CToxProto::InitAccount(const char* protoName, const wchar_t* userName)
{
+ ptrA address(db_get_sa(NULL, protoName, TOX_SETTINGS_ID));
+ if (address == NULL)
+ {
+ DialogBoxParam(
+ g_hInstance,
+ MAKEINTRESOURCE(IDD_PROFILE_IMPORT),
+ GetActiveWindow(),
+ CToxProto::ToxProfileImportProc,
+ (LPARAM)userName);
+ }
+
CToxProto *ppro = new CToxProto(protoName, userName);
accounts.insert(ppro);
@@ -31,17 +42,6 @@ int CToxProto::OnAccountListChanged(WPARAM wParam, LPARAM lParam)
{
switch (wParam)
{
- case PRAC_ADDED:
- DialogBoxParam(
- g_hInstance,
- MAKEINTRESOURCE(IDD_PROFILE_IMPORT),
- account->hwndAccMgrUI,
- CToxProto::ToxProfileManagerProc,
- (LPARAM)this);
- InitToxCore();
- SaveToxProfile();
- break;
-
case PRAC_CHANGED:
std::tstring newPath = GetToxProfilePath();
TCHAR oldPath[MAX_PATH];