summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-25 13:11:15 +0200
committerGeorge Hazan <ghazan@miranda.im>2018-04-25 13:11:15 +0200
commit5b87c5f200b8b897a1a8c849eb9b9c1e7bb8c5f3 (patch)
tree322e865ee76f93a241cbbbb82b55c119f5795f90 /src/mir_app
parent555407743e03465f43a2840bae8e0146e7152b32 (diff)
fix for wrong processing of No button in Account Manager
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/proto_opts.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp
index 4ed01ec110..208ccb107f 100644
--- a/src/mir_app/src/proto_opts.cpp
+++ b/src/mir_app/src/proto_opts.cpp
@@ -448,19 +448,20 @@ public:
if (pa == nullptr || pa->bOldProto || pa->bDynDisabled)
return;
- pa->bIsEnabled = !pa->bIsEnabled;
- if (pa->bIsEnabled)
+ if (!pa->bIsEnabled) {
+ pa->bIsEnabled = true;
ActivateAccount(pa, true);
+ }
else {
if (pa->iRealStatus >= ID_STATUS_ONLINE) {
wchar_t buf[200];
mir_snwprintf(buf, TranslateT("Account %s is being disabled"), pa->tszAccountName);
if (IDNO == ::MessageBox(m_hwnd, TranslateT("Account is online. Disable account?"), buf, MB_ICONWARNING | MB_DEFBUTTON2 | MB_YESNO))
- pa->bIsEnabled = true; // stay enabled
+ return; // stay enabled
}
- if (!pa->bIsEnabled)
- DeactivateAccount(pa, DAF_DYNAMIC | DAF_FORK);
+ pa->bIsEnabled = false;
+ DeactivateAccount(pa, DAF_DYNAMIC | DAF_FORK);
}
WriteDbAccounts();