summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/Scriver/src/msgdialog.cpp3
-rw-r--r--plugins/Scriver/src/msgs.h1
-rw-r--r--plugins/Scriver/src/msgutils.cpp9
-rw-r--r--plugins/TabSRMM/src/msgdialog.cpp2
-rw-r--r--plugins/TabSRMM/src/msgdlgother.cpp9
-rw-r--r--plugins/TabSRMM/src/msgs.h1
6 files changed, 21 insertions, 4 deletions
diff --git a/plugins/Scriver/src/msgdialog.cpp b/plugins/Scriver/src/msgdialog.cpp
index 78ab1229ee..b5ab5506ea 100644
--- a/plugins/Scriver/src/msgdialog.cpp
+++ b/plugins/Scriver/src/msgdialog.cpp
@@ -502,7 +502,8 @@ void CMsgDialog::onClick_Filter(CCtrlButton *pButton)
return;
m_bFilterEnabled = !m_bFilterEnabled;
- pButton->SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bFilterEnabled ? IDI_FILTER2 : IDI_FILTER));
+ UpdateFilterButton();
+
if (m_bFilterEnabled && !g_chatApi.bRightClickFilter)
ShowFilterMenu();
else
diff --git a/plugins/Scriver/src/msgs.h b/plugins/Scriver/src/msgs.h
index 30c228f101..44d53eebd6 100644
--- a/plugins/Scriver/src/msgs.h
+++ b/plugins/Scriver/src/msgs.h
@@ -177,6 +177,7 @@ public:
void LoadSettings() override;
void SetStatusText(const wchar_t *, HICON) override;
void ShowFilterMenu() override;
+ void UpdateFilterButton() override;
void UpdateNickList() override;
void UpdateOptions() override;
void UpdateStatusBar() override;
diff --git a/plugins/Scriver/src/msgutils.cpp b/plugins/Scriver/src/msgutils.cpp
index 4df469e568..7d659b85bd 100644
--- a/plugins/Scriver/src/msgutils.cpp
+++ b/plugins/Scriver/src/msgutils.cpp
@@ -530,6 +530,13 @@ void CMsgDialog::UpdateIcon()
SendDlgItemMessage(m_hwnd, IDC_USERMENU, BM_SETIMAGE, IMAGE_ICON, (LPARAM)m_hStatusIcon);
}
+void CMsgDialog::UpdateFilterButton()
+{
+ CSuper::UpdateFilterButton();
+
+ m_btnFilter.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bFilterEnabled ? IDI_FILTER2 : IDI_FILTER));
+}
+
void CMsgDialog::UpdateNickList()
{
m_nickList.SetDraw(false);
@@ -552,10 +559,10 @@ void CMsgDialog::UpdateNickList()
void CMsgDialog::UpdateOptions()
{
m_btnNickList.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bNicklistEnabled ? IDI_NICKLIST2 : IDI_NICKLIST));
- m_btnFilter.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bFilterEnabled ? IDI_FILTER2 : IDI_FILTER));
GetAvatar();
+ UpdateFilterButton();
UpdateStatusBar();
UpdateTitle();
FixTabIcons();
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp
index 0c0e1257be..9088f3c08d 100644
--- a/plugins/TabSRMM/src/msgdialog.cpp
+++ b/plugins/TabSRMM/src/msgdialog.cpp
@@ -996,7 +996,7 @@ void CMsgDialog::onClick_Filter(CCtrlButton *pButton)
return;
m_bFilterEnabled = !m_bFilterEnabled;
- m_btnFilter.SendMsg(BUTTONSETOVERLAYICON, (LPARAM)(m_bFilterEnabled ? PluginConfig.g_iconOverlayEnabled : PluginConfig.g_iconOverlayDisabled), 0);
+ UpdateFilterButton();
if (m_bFilterEnabled && !g_chatApi.bRightClickFilter)
ShowFilterMenu();
diff --git a/plugins/TabSRMM/src/msgdlgother.cpp b/plugins/TabSRMM/src/msgdlgother.cpp
index 88f6e5d735..b2e293ab74 100644
--- a/plugins/TabSRMM/src/msgdlgother.cpp
+++ b/plugins/TabSRMM/src/msgdlgother.cpp
@@ -2485,6 +2485,13 @@ int CMsgDialog::Typing(int secs)
/////////////////////////////////////////////////////////////////////////////////////////
+void CMsgDialog::UpdateFilterButton()
+{
+ CSuper::UpdateFilterButton();
+
+ m_btnFilter.SendMsg(BUTTONSETOVERLAYICON, (LPARAM)(m_bFilterEnabled ? PluginConfig.g_iconOverlayEnabled : PluginConfig.g_iconOverlayDisabled), 0);
+}
+
void CMsgDialog::UpdateNickList()
{
int i = m_nickList.SendMsg(LB_GETTOPINDEX, 0, 0);
@@ -2506,7 +2513,7 @@ void CMsgDialog::UpdateOptions()
m_nickList.SetItemHeight(0, g_Settings.iNickListFontHeight);
InvalidateRect(m_nickList.GetHwnd(), nullptr, TRUE);
- m_btnFilter.SendMsg(BUTTONSETOVERLAYICON, (LPARAM)(m_bFilterEnabled ? PluginConfig.g_iconOverlayEnabled : PluginConfig.g_iconOverlayDisabled), 0);
+ UpdateFilterButton();
CSuper::UpdateOptions();
}
diff --git a/plugins/TabSRMM/src/msgs.h b/plugins/TabSRMM/src/msgs.h
index 8f0082470a..15bbd42352 100644
--- a/plugins/TabSRMM/src/msgs.h
+++ b/plugins/TabSRMM/src/msgs.h
@@ -637,6 +637,7 @@ public:
void LoadSettings() override;
void SetStatusText(const wchar_t *, HICON) override;
void ShowFilterMenu() override;
+ void UpdateFilterButton() override;
void UpdateNickList() override;
void UpdateOptions() override;
void UpdateStatusBar() override;