diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-23 19:26:32 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-23 19:26:32 +0300 |
commit | 7950cd0b91e0c5ffcf97f62378542822cea2ad37 (patch) | |
tree | ca13b7e86918641742c79a18f2731f02cff62403 | |
parent | 389fa94f1b09f0b1e97d2ecc11c994a12801b898 (diff) |
account's icon remains red after dynamic protocol loading
-rw-r--r-- | src/mir_app/src/pluginopts.cpp | 13 | ||||
-rw-r--r-- | src/mir_app/src/proto_opts.cpp | 2 |
2 files changed, 10 insertions, 5 deletions
diff --git a/src/mir_app/src/pluginopts.cpp b/src/mir_app/src/pluginopts.cpp index 0bddc0f6f4..f2730dcfaa 100644 --- a/src/mir_app/src/pluginopts.cpp +++ b/src/mir_app/src/pluginopts.cpp @@ -189,10 +189,15 @@ static bool LoadPluginDynamically(PluginListItemData *dat) if (pd->hInst != pPlug->bpi.hInst)
continue;
- for (auto &pa : accounts)
- if (pa->ppro == nullptr && !mir_strcmp(pa->szProtoName, pd->szName) && pa->bIsEnabled)
- if (ActivateAccount(pa, true))
- NotifyEventHooks(hAccListChanged, PRAC_ADDED, (LPARAM)pa);
+ for (auto &pa : accounts) {
+ if (pa->ppro == nullptr && !mir_strcmp(pa->szProtoName, pd->szName)) {
+ if (pa->bIsEnabled) {
+ if (ActivateAccount(pa, true))
+ NotifyEventHooks(hAccListChanged, PRAC_ADDED, (LPARAM)pa);
+ }
+ else pa->bDynDisabled = false;
+ }
+ }
}
dat->hInst = pPlug->bpi.hInst;
diff --git a/src/mir_app/src/proto_opts.cpp b/src/mir_app/src/proto_opts.cpp index e8f76ad3f0..4ed01ec110 100644 --- a/src/mir_app/src/proto_opts.cpp +++ b/src/mir_app/src/proto_opts.cpp @@ -456,7 +456,7 @@ public: 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 = 1; // stay enabled
+ pa->bIsEnabled = true; // stay enabled
}
if (!pa->bIsEnabled)
|