diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-22 13:55:17 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-22 13:55:17 +0300 |
commit | 1a71e02f8edb73943f3ce7de693c7f3c3e9ebc48 (patch) | |
tree | be2427163320829c1cf8c2fa193dcfe64232598f /protocols/Tox/src/tox_accounts.cpp | |
parent | 39be473138bfb1055733516edbfa893d6e870525 (diff) |
unused constant removed
Diffstat (limited to 'protocols/Tox/src/tox_accounts.cpp')
-rw-r--r-- | protocols/Tox/src/tox_accounts.cpp | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/protocols/Tox/src/tox_accounts.cpp b/protocols/Tox/src/tox_accounts.cpp index 2d02f68c4b..ff40c4bb2e 100644 --- a/protocols/Tox/src/tox_accounts.cpp +++ b/protocols/Tox/src/tox_accounts.cpp @@ -1,18 +1,21 @@ #include "stdafx.h"
-int CToxProto::OnAccountRenamed(WPARAM, LPARAM)
+int CToxProto::OnAccountRenamed(WPARAM wParam, LPARAM lParam)
{
- mir_cslock lock(m_profileLock);
+ PROTOACCOUNT *pa = (PROTOACCOUNT*)lParam;
+ if (wParam == PRAC_CHANGED && pa->ppro == this) {
+ mir_cslock lock(m_profileLock);
- ptrW newPath(GetToxProfilePath());
- wchar_t oldPath[MAX_PATH];
- mir_snwprintf(oldPath, MAX_PATH, L"%s\\%s.tox", VARSW(L"%miranda_userdata%"), m_accountName);
- _wrename(oldPath, newPath);
- m_accountName = mir_wstrdup(m_tszUserName);
+ ptrW newPath(GetToxProfilePath());
+ wchar_t oldPath[MAX_PATH];
+ mir_snwprintf(oldPath, MAX_PATH, L"%s\\%s.tox", VARSW(L"%miranda_userdata%"), m_accountName);
+ _wrename(oldPath, newPath);
+ m_accountName = mir_wstrdup(m_tszUserName);
+ }
return 0;
}
INT_PTR CToxProto::OnAccountManagerInit(WPARAM, LPARAM lParam)
{
return (INT_PTR)(CToxOptionsMain::CreateAccountManagerPage(this, (HWND)lParam))->GetHwnd();
-}
\ No newline at end of file +}
|