From 47d5ff93323f788ed160c930617a2c997c803453 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 10 Jun 2022 11:22:10 +0300 Subject: UInfoEx: minor fix for condition --- plugins/UserInfoEx/src/classPsTree.cpp | 7 +++---- plugins/UserInfoEx/src/classPsTreeItem.cpp | 2 +- plugins/UserInfoEx/src/stdafx.h | 4 ++-- 3 files changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/UserInfoEx/src/classPsTree.cpp b/plugins/UserInfoEx/src/classPsTree.cpp index ac023b5b83..3b486b8955 100644 --- a/plugins/UserInfoEx/src/classPsTree.cpp +++ b/plugins/UserInfoEx/src/classPsTree.cpp @@ -132,15 +132,14 @@ void CPsTree::Remove(HINSTANCE hInst) for (auto &it : _pages.rev_iter()) { if (it->Inst() == hInst) { - if (!bRemoved) { - TreeView_DeleteAllItems(_hWndTree); - bRemoved = true; - } + bRemoved = true; _pages.removeItem(&it); } } if (bRemoved) { + TreeView_DeleteAllItems(_hWndTree); + for (auto &it : _pages) it->Hti(nullptr); diff --git a/plugins/UserInfoEx/src/classPsTreeItem.cpp b/plugins/UserInfoEx/src/classPsTreeItem.cpp index 914e80da31..189d9fd9a1 100644 --- a/plugins/UserInfoEx/src/classPsTreeItem.cpp +++ b/plugins/UserInfoEx/src/classPsTreeItem.cpp @@ -528,7 +528,7 @@ void CPsTreeItem::OnInfoChanged() **/ void CPsTreeItem::OnPageIconsChanged() { - if (_hWnd && _initParam) { + if (_hWnd && _hInst == g_plugin.getInst()) { auto *pDlg = (PSPBaseDlg *)_pDialog; pDlg->OnIconsChanged(); } diff --git a/plugins/UserInfoEx/src/stdafx.h b/plugins/UserInfoEx/src/stdafx.h index 2d71b7698a..9acf9e3f0a 100644 --- a/plugins/UserInfoEx/src/stdafx.h +++ b/plugins/UserInfoEx/src/stdafx.h @@ -158,13 +158,13 @@ struct CMPlugin : public PLUGIN * UserInfoEx global variables ***********************************************************************************************************/ -typedef struct _MGLOBAL +struct MGLOBAL { uint8_t CanChangeDetails : 1; // is service to upload own contact information for icq present? uint8_t TzIndexExist : 1; // Win Reg has Timzone Index Info uint8_t ShowPropsheetColours : 1; // cached SET_PROPSHEET_SHOWCOLOURS database value uint8_t WantAeroAdaption : 1; // reserved for later use -} MGLOBAL, *LPMGLOBAL; +}; extern MGLOBAL myGlobals; extern int nCountriesCount; -- cgit v1.2.3