diff options
author | George Hazan <ghazan@miranda.im> | 2023-03-01 19:51:17 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2023-03-01 19:51:17 +0300 |
commit | 9a2a681890306f05bc443d71f6e70725b099a7cc (patch) | |
tree | 2187592ff6dac8b5cc10c8fd374e290096e64aa5 /plugins/TabSRMM/src | |
parent | 40a2497838dcaf2f48366731904ddcbc2545a073 (diff) |
tabSRMM: never activate infopanel for group chats
Diffstat (limited to 'plugins/TabSRMM/src')
-rw-r--r-- | plugins/TabSRMM/src/controls.h | 4 | ||||
-rw-r--r-- | plugins/TabSRMM/src/generic_msghandlers.cpp | 6 | ||||
-rw-r--r-- | plugins/TabSRMM/src/infopanel.cpp | 13 | ||||
-rw-r--r-- | plugins/TabSRMM/src/infopanel.h | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 2 |
5 files changed, 17 insertions, 10 deletions
diff --git a/plugins/TabSRMM/src/controls.h b/plugins/TabSRMM/src/controls.h index b878f347d4..818712bdc1 100644 --- a/plugins/TabSRMM/src/controls.h +++ b/plugins/TabSRMM/src/controls.h @@ -61,8 +61,8 @@ public: {
m_activeSubMenu = hMenu;
}
- void setAero(bool fState) { m_isAero = fState; }
- const bool getAero(void) const { return(m_isAero); }
+ void setAero(bool fState) { m_isAero = fState; }
+ const bool getAero(void) const { return(m_isAero); }
const LRESULT processAccelerator(wchar_t a, UINT& ctlId) const
{
diff --git a/plugins/TabSRMM/src/generic_msghandlers.cpp b/plugins/TabSRMM/src/generic_msghandlers.cpp index ad5df5726d..91a8906c30 100644 --- a/plugins/TabSRMM/src/generic_msghandlers.cpp +++ b/plugins/TabSRMM/src/generic_msghandlers.cpp @@ -136,8 +136,10 @@ bool CMsgDialog::DM_GenericHotkeysCheck(MSG *message) return true;
case TABSRMM_HK_TOGGLEINFOPANEL:
- m_pPanel.setActive(!m_pPanel.isActive());
- m_pPanel.showHide();
+ if (!isChat()) {
+ m_pPanel.setActive(!m_pPanel.isActive());
+ m_pPanel.showHide();
+ }
return true;
case TABSRMM_HK_TOGGLETOOLBAR:
diff --git a/plugins/TabSRMM/src/infopanel.cpp b/plugins/TabSRMM/src/infopanel.cpp index 37d433cd7f..5cf4751391 100644 --- a/plugins/TabSRMM/src/infopanel.cpp +++ b/plugins/TabSRMM/src/infopanel.cpp @@ -64,9 +64,9 @@ CInfoPanel::~CInfoPanel() /////////////////////////////////////////////////////////////////////////////////////////
-void CInfoPanel::setActive(const int newActive)
+void CInfoPanel::setActive(bool bActive)
{
- m_active = newActive ? true : false;
+ m_active = bActive;
}
/////////////////////////////////////////////////////////////////////////////////////////
@@ -218,10 +218,15 @@ void CInfoPanel::showHide() const bool CInfoPanel::getVisibility()
{
- uint8_t bDefault = (m_dat->m_pContainer->cfg.flags.m_bInfoPanel) ? 1 : 0;
uint8_t bContact = M.GetByte(m_dat->m_hContact, "infopanel", 0);
- uint8_t visible = (bContact == 0 ? bDefault : (bContact == (uint8_t)-1 ? 0 : 1));
+ bool visible;
+ if (m_dat->isChat())
+ visible = false;
+ else if (bContact == 0)
+ visible = (m_dat->m_pContainer->cfg.flags.m_bInfoPanel); // default for container
+ else
+ visible = (bContact == (uint8_t)-1 ? 0 : 1);
setActive(visible);
return m_active;
}
diff --git a/plugins/TabSRMM/src/infopanel.h b/plugins/TabSRMM/src/infopanel.h index ffa8c884a1..a6afb3399b 100644 --- a/plugins/TabSRMM/src/infopanel.h +++ b/plugins/TabSRMM/src/infopanel.h @@ -139,7 +139,7 @@ public: __forceinline const CMsgDialog* getDat() const { return m_dat; }
void setHeight(LONG newHeight, bool fBroadcast = false);
- void setActive(const int newActive);
+ void setActive(bool bActive);
void loadHeight();
void saveHeight(bool fFlush = false);
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h index 01ad889666..42dc16239b 100644 --- a/plugins/TabSRMM/src/msgs.h +++ b/plugins/TabSRMM/src/msgs.h @@ -417,7 +417,7 @@ class CMsgDialog : public CSrmmBaseDialog friend class CLogWindow;
friend class CProxyWindow;
- std::map<CustomButtonData *, bool> mapHidden;
+ std::map<CustomButtonData*, bool> mapHidden;
__forceinline bool BB_IsDisplayed(CustomButtonData *cbd) const
{
|