summaryrefslogtreecommitdiff
path: root/plugins/Scriver
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2023-03-20 18:20:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2023-03-20 18:20:03 +0300
commit00f13b022dbf89fd630a8d43ffd602c84caff7e9 (patch)
tree188b6f7b2891b21a3942688da8c94cd6c60dccc3 /plugins/Scriver
parentf12de5d0954a0e24852a1a309dffee37b5536970 (diff)
fixes #3443 (Менять подсказку к фильтру событий при изменении иконки)
Diffstat (limited to 'plugins/Scriver')
-rw-r--r--plugins/Scriver/src/msgdialog.cpp3
-rw-r--r--plugins/Scriver/src/msgs.h1
-rw-r--r--plugins/Scriver/src/msgutils.cpp9
3 files changed, 11 insertions, 2 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();