summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2018-04-24 22:52:15 +0200
committerGeorge Hazan <ghazan@miranda.im>2018-04-24 22:52:15 +0200
commitdac9bb3e102ffd6511f377085f765d97a05f26ee (patch)
treedd9209e34c8255ee9fd7e5a5a0a2caae7c95da01
parent18c1c4651f12513aa31a4d181d9298fc4f9aa21a (diff)
fix: willful protocol disabling in Accounts Manager makes a red icon instead of simple empty checkbox
-rw-r--r--src/mir_app/src/proto_accs.cpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/mir_app/src/proto_accs.cpp b/src/mir_app/src/proto_accs.cpp
index 9a482dae82..15174fc395 100644
--- a/src/mir_app/src/proto_accs.cpp
+++ b/src/mir_app/src/proto_accs.cpp
@@ -377,11 +377,10 @@ void DeactivateAccount(PROTOACCOUNT *pa, int flags)
pa->bAccMgrUIChanged = FALSE;
}
- if (flags & DAF_DYNAMIC) {
- pa->bDynDisabled = true;
+ if (flags & DAF_DYNAMIC)
NotifyEventHooks(hAccListChanged, PRAC_REMOVED, (LPARAM)pa);
- }
- else pa->iIconBase = -1;
+ else
+ pa->iIconBase = -1;
if (pa->ppro == nullptr) {
if (flags & DAF_ERASE)
@@ -408,9 +407,12 @@ void KillModuleAccounts(HINSTANCE hInst)
if (pd->hInst != hInst)
continue;
- for (auto &pa : accounts.rev_iter())
- if (!mir_strcmp(pa->szProtoName, pd->szName))
+ for (auto &pa : accounts.rev_iter()) {
+ if (!mir_strcmp(pa->szProtoName, pd->szName)) {
DeactivateAccount(pa, DAF_DYNAMIC);
+ pa->bDynDisabled = true;
+ }
+ }
}
}