summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-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();