From 9cb1507b7ad4f8546496e3bcd765949509bb2c9e Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 22 Nov 2016 17:16:32 +0300 Subject: fixes #634 (Latest update to TabSRMM broke message log behavior) --- plugins/TabSRMM/src/msgdlgutils.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'plugins/TabSRMM/src/msgdlgutils.cpp') diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp index a0a896b99e..d07dc77e1b 100644 --- a/plugins/TabSRMM/src/msgdlgutils.cpp +++ b/plugins/TabSRMM/src/msgdlgutils.cpp @@ -1222,17 +1222,17 @@ void TSAPI PlayIncomingSound(const TWindowData *dat) // reads send format and configures the toolbar buttons // if mode == 0, int only configures the buttons and does not change send format +static UINT controls[] = { IDC_FONTBOLD, IDC_FONTITALIC, IDC_FONTUNDERLINE, IDC_FONTSTRIKEOUT }; + void TSAPI GetSendFormat(TWindowData *dat) { - UINT controls[5] = { IDC_FONTBOLD, IDC_FONTITALIC, IDC_FONTUNDERLINE, IDC_FONTSTRIKEOUT }; - dat->SendFormat = M.GetDword(dat->hContact, "sendformat", PluginConfig.m_SendFormat); if (dat->SendFormat == -1) // per contact override to disable it.. dat->SendFormat = 0; else if (dat->SendFormat == 0) dat->SendFormat = PluginConfig.m_SendFormat ? 1 : 0; - for (int i = 0; i < 5; i++) + for (int i = 0; i < _countof(controls); i++) Utils::enableDlgControl(dat->hwnd, controls[i], dat->SendFormat != 0); return; } -- cgit v1.2.3