summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/msgdlgutils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2016-11-22 17:16:32 +0300
committerGeorge Hazan <ghazan@miranda.im>2016-11-22 17:16:32 +0300
commit9cb1507b7ad4f8546496e3bcd765949509bb2c9e (patch)
tree61361c206d48971e62170af51043a34facef8a9f /plugins/TabSRMM/src/msgdlgutils.cpp
parent0edfbcc3fd42701475505e6ac7cf6a153bc1e25a (diff)
fixes #634 (Latest update to TabSRMM broke message log behavior)
Diffstat (limited to 'plugins/TabSRMM/src/msgdlgutils.cpp')
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp6
1 files changed, 3 insertions, 3 deletions
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;
}