From dac9bb3e102ffd6511f377085f765d97a05f26ee Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 24 Apr 2018 22:52:15 +0200 Subject: fix: willful protocol disabling in Accounts Manager makes a red icon instead of simple empty checkbox --- src/mir_app/src/proto_accs.cpp | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'src') 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; + } + } } } -- cgit v1.2.3