summaryrefslogtreecommitdiff
path: root/src/mir_app
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2020-07-30 21:01:11 +0300
committerGeorge Hazan <ghazan@miranda.im>2020-07-30 21:01:11 +0300
commit5f027b06337ab7bd21f69361637aebd1a871c079 (patch)
tree55b11267872ab3b6bd2cede8d1ae64880656e6e2 /src/mir_app
parent41753e1ebe629eaf5965fd2d605db6f967c73801 (diff)
Event Filters dialog: ability to check / uncheck whole column
Diffstat (limited to 'src/mir_app')
-rw-r--r--src/mir_app/src/chat_ui.cpp17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/mir_app/src/chat_ui.cpp b/src/mir_app/src/chat_ui.cpp
index 21e3cc66db..5db35ef894 100644
--- a/src/mir_app/src/chat_ui.cpp
+++ b/src/mir_app/src/chat_ui.cpp
@@ -53,6 +53,13 @@ class CChatEventOptionDlg : public CDlgBase
CCtrlCheck chkTray, chkPopup;
CCtrlMButton btn1, btn2, btn3, btn4;
+ void InvertColumn(int ctrlId)
+ {
+ int enabled = !IsDlgButtonChecked(m_hwnd, ctrlId);
+ for (int i = 0; i < _countof(_eventorder); i++)
+ CheckDlgButton(m_hwnd, ctrlId + i, enabled);
+ }
+
public:
CChatEventOptionDlg() :
CDlgBase(g_plugin, IDD_OPT_CHAT_EVENTS),
@@ -65,6 +72,11 @@ public:
{
CreateLink(chkTray, g_bChatTrayInactive);
CreateLink(chkPopup, g_bChatPopupInactive);
+
+ btn1.OnClick = Callback(this, &CChatEventOptionDlg::onClick_Popup);
+ btn2.OnClick = Callback(this, &CChatEventOptionDlg::onClick_Tray);
+ btn3.OnClick = Callback(this, &CChatEventOptionDlg::onClick_Sound);
+ btn4.OnClick = Callback(this, &CChatEventOptionDlg::onClick_Log);
}
bool OnInitDialog() override
@@ -111,6 +123,11 @@ public:
LoadGlobalSettings();
return true;
}
+
+ void onClick_Popup(CCtrlButton *) { InvertColumn(IDC_P1); }
+ void onClick_Sound(CCtrlButton *) { InvertColumn(IDC_S1); }
+ void onClick_Tray(CCtrlButton *) { InvertColumn(IDC_T1); }
+ void onClick_Log(CCtrlButton *) { InvertColumn(IDC_L1); }
};
void ChatOptionsInit(WPARAM wParam)