diff options
-rw-r--r-- | include/m_srmm_int.h | 1 | ||||
-rw-r--r-- | libs/win32/mir_app.lib | bin | 240174 -> 240514 bytes | |||
-rw-r--r-- | libs/win64/mir_app.lib | bin | 237116 -> 237462 bytes | |||
-rw-r--r-- | plugins/Scriver/src/msgdialog.cpp | 3 | ||||
-rw-r--r-- | plugins/Scriver/src/msgs.h | 1 | ||||
-rw-r--r-- | plugins/Scriver/src/msgutils.cpp | 9 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 2 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgdlgother.cpp | 9 | ||||
-rw-r--r-- | plugins/TabSRMM/src/msgs.h | 1 | ||||
-rw-r--r-- | src/core/stdmsg/src/chat_window.cpp | 9 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgdialog.cpp | 3 | ||||
-rw-r--r-- | src/core/stdmsg/src/msgs.h | 1 | ||||
-rw-r--r-- | src/mir_app/src/mir_app.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/mir_app64.def | 1 | ||||
-rw-r--r-- | src/mir_app/src/srmm_base.cpp | 5 |
15 files changed, 40 insertions, 6 deletions
diff --git a/include/m_srmm_int.h b/include/m_srmm_int.h index ad53c773f3..ce5c7c5845 100644 --- a/include/m_srmm_int.h +++ b/include/m_srmm_int.h @@ -254,6 +254,7 @@ public: virtual void LoadSettings() PURE;
virtual void SetStatusText(const wchar_t *, HICON) {}
virtual void ShowFilterMenu() {}
+ virtual void UpdateFilterButton();
virtual void UpdateNickList() {}
virtual void UpdateOptions();
virtual void UpdateStatusBar() {}
diff --git a/libs/win32/mir_app.lib b/libs/win32/mir_app.lib Binary files differindex 718693e434..cecab7c652 100644 --- a/libs/win32/mir_app.lib +++ b/libs/win32/mir_app.lib diff --git a/libs/win64/mir_app.lib b/libs/win64/mir_app.lib Binary files differindex dcc344ccd4..d3bd81fbae 100644 --- a/libs/win64/mir_app.lib +++ b/libs/win64/mir_app.lib 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;
diff --git a/src/core/stdmsg/src/chat_window.cpp b/src/core/stdmsg/src/chat_window.cpp index 8e1871dd4c..25d1be4f76 100644 --- a/src/core/stdmsg/src/chat_window.cpp +++ b/src/core/stdmsg/src/chat_window.cpp @@ -42,6 +42,13 @@ void CMsgDialog::ShowFilterMenu() SetWindowPos(hwnd, HWND_TOP, rc.left - 85, (IsWindowVisible(m_btnFilter.GetHwnd()) || IsWindowVisible(m_btnBold.GetHwnd())) ? rc.top - 206 : rc.top - 186, 0, 0, SWP_NOSIZE | SWP_SHOWWINDOW);
}
+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()
{
int i = m_nickList.SendMsg(LB_GETTOPINDEX, 0, 0);
@@ -54,7 +61,7 @@ void CMsgDialog::UpdateNickList() void CMsgDialog::UpdateOptions()
{
m_btnNickList.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bNicklistEnabled ? IDI_NICKLIST2 : IDI_NICKLIST, FALSE));
- m_btnFilter.SendMsg(BM_SETIMAGE, IMAGE_ICON, (LPARAM)g_plugin.getIcon(m_bFilterEnabled ? IDI_FILTER2 : IDI_FILTER, FALSE));
+ UpdateFilterButton();
HICON hIcon = ImageList_GetIcon(Clist_GetImageList(), GetImageId(), ILD_TRANSPARENT);
SendMessage(m_pOwner->m_hwndStatus, SB_SETICON, 0, (LPARAM)hIcon);
diff --git a/src/core/stdmsg/src/msgdialog.cpp b/src/core/stdmsg/src/msgdialog.cpp index 5e42c9f18a..d80148a7f5 100644 --- a/src/core/stdmsg/src/msgdialog.cpp +++ b/src/core/stdmsg/src/msgdialog.cpp @@ -285,7 +285,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, FALSE));
+ UpdateFilterButton();
+
if (m_bFilterEnabled && !g_chatApi.bRightClickFilter)
ShowFilterMenu();
else
diff --git a/src/core/stdmsg/src/msgs.h b/src/core/stdmsg/src/msgs.h index 2087c094ba..7a3656500a 100644 --- a/src/core/stdmsg/src/msgs.h +++ b/src/core/stdmsg/src/msgs.h @@ -158,6 +158,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/src/mir_app/src/mir_app.def b/src/mir_app/src/mir_app.def index 8c408aa850..b413153316 100644 --- a/src/mir_app/src/mir_app.def +++ b/src/mir_app/src/mir_app.def @@ -830,3 +830,4 @@ Chat_IsMuted @941 NONAME ?iPopupFlags@Chat@@3V?$CMOption@I@@A @945 NONAME
?iSoundFlags@Chat@@3V?$CMOption@I@@A @946 NONAME
?iTrayIconFlags@Chat@@3V?$CMOption@I@@A @947 NONAME
+?UpdateFilterButton@CSrmmBaseDialog@@UAEXXZ @948 NONAME
diff --git a/src/mir_app/src/mir_app64.def b/src/mir_app/src/mir_app64.def index 6fea4dc002..7577223e3f 100644 --- a/src/mir_app/src/mir_app64.def +++ b/src/mir_app/src/mir_app64.def @@ -830,3 +830,4 @@ Chat_IsMuted @941 NONAME ?iPopupFlags@Chat@@3V?$CMOption@I@@A @945 NONAME
?iSoundFlags@Chat@@3V?$CMOption@I@@A @946 NONAME
?iTrayIconFlags@Chat@@3V?$CMOption@I@@A @947 NONAME
+?UpdateFilterButton@CSrmmBaseDialog@@UEAAXXZ @948 NONAME
diff --git a/src/mir_app/src/srmm_base.cpp b/src/mir_app/src/srmm_base.cpp index 5b115a1a1d..811ce635b6 100644 --- a/src/mir_app/src/srmm_base.cpp +++ b/src/mir_app/src/srmm_base.cpp @@ -676,6 +676,11 @@ void CSrmmBaseDialog::UpdateChatLog() m_pLog->LogEvents(m_si->pLogEnd, false);
}
+void CSrmmBaseDialog::UpdateFilterButton()
+{
+ m_btnFilter.SendMsg(BUTTONADDTOOLTIP, (WPARAM)(m_bFilterEnabled ? TranslateT("Disable filter") : TranslateT("Enable filter")), BATF_UNICODE);
+}
+
/////////////////////////////////////////////////////////////////////////////////////////
void CSrmmBaseDialog::onClick_Color(CCtrlButton *pButton)
|