summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_accounts.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-02-16 22:18:39 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-02-16 22:18:39 +0000
commit2b014d61a528785fef5374627f8e841721e0e4e0 (patch)
tree718262e176d33159e1a606fdc9d895314a611614 /protocols/Tox/src/tox_accounts.cpp
parent160215636a1e482e6638bb5a771fdeabcd2da890 (diff)
Tox: restyled nodes list option page
git-svn-id: http://svn.miranda-ng.org/main/trunk@12152 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_accounts.cpp')
-rw-r--r--protocols/Tox/src/tox_accounts.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/protocols/Tox/src/tox_accounts.cpp b/protocols/Tox/src/tox_accounts.cpp
index edefe94051..369fbf5fdd 100644
--- a/protocols/Tox/src/tox_accounts.cpp
+++ b/protocols/Tox/src/tox_accounts.cpp
@@ -12,12 +12,15 @@ CToxProto* CToxProto::InitAccount(const char *protoName, const wchar_t *userName
ptrA address(db_get_sa(NULL, protoName, TOX_SETTINGS_ID));
if (address == NULL)
{
- DialogBoxParam(
+ if (DialogBoxParam(
g_hInstance,
MAKEINTRESOURCE(IDD_PROFILE_IMPORT),
GetActiveWindow(),
CToxProto::ToxProfileImportProc,
- (LPARAM)userName);
+ (LPARAM)userName) == IDOK)
+ {
+ db_set_s(NULL, protoName, TOX_SETTINGS_ID, "");
+ }
}
CToxProto *proto = new CToxProto(protoName, userName);
@@ -41,10 +44,8 @@ int CToxProto::OnAccountLoaded(WPARAM, LPARAM)
return 0;
}
-int CToxProto::OnAccountRenamed(WPARAM, LPARAM lParam)
+int CToxProto::OnAccountRenamed(WPARAM, LPARAM)
{
- PROTOACCOUNT *account = (PROTOACCOUNT*)lParam;
-
std::tstring newPath = GetToxProfilePath();
TCHAR oldPath[MAX_PATH];
mir_sntprintf(oldPath, MAX_PATH, _T("%s\\%s.tox"), VARST(_T("%miranda_userdata%")), accountName);