summaryrefslogtreecommitdiff
path: root/plugins/TabSRMM/src/msgdlgutils.cpp
diff options
context:
space:
mode:
authorTobias Weimer <wishmaster51@googlemail.com>2014-03-09 17:45:14 +0000
committerTobias Weimer <wishmaster51@googlemail.com>2014-03-09 17:45:14 +0000
commit535b7733c38c9e4c75a8ff73f231c8b807194124 (patch)
tree95fe152f1c608768d7ae3d800f2c9f7ee21a2269 /plugins/TabSRMM/src/msgdlgutils.cpp
parent79ef51422c7fa9cc9867355b1518ec6ce7be52c2 (diff)
minor cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@8514 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/TabSRMM/src/msgdlgutils.cpp')
-rw-r--r--plugins/TabSRMM/src/msgdlgutils.cpp10
1 files changed, 3 insertions, 7 deletions
diff --git a/plugins/TabSRMM/src/msgdlgutils.cpp b/plugins/TabSRMM/src/msgdlgutils.cpp
index 842648bd23..ee8378c24c 100644
--- a/plugins/TabSRMM/src/msgdlgutils.cpp
+++ b/plugins/TabSRMM/src/msgdlgutils.cpp
@@ -53,12 +53,10 @@ static int g_status_events_size = 0;
BOOL TSAPI IsStatusEvent(int eventType)
{
- int i;
-
if (g_status_events_size == 0)
g_status_events_size = MAX_REGS(g_status_events);
- for (i=0; i < g_status_events_size; i++) {
+ for (int i=0; i < g_status_events_size; i++) {
if (eventType == g_status_events[i])
return TRUE;
}
@@ -1492,7 +1490,6 @@ void TSAPI PlayIncomingSound(const TWindowData *dat)
void TSAPI GetSendFormat(TWindowData *dat, int mode)
{
UINT controls[5] = {IDC_FONTBOLD, IDC_FONTITALIC, IDC_FONTUNDERLINE,IDC_FONTSTRIKEOUT, IDC_FONTFACE};
- int i;
if (mode) {
dat->SendFormat = M.GetDword(dat->hContact, "sendformat", PluginConfig.m_SendFormat);
@@ -1501,7 +1498,7 @@ void TSAPI GetSendFormat(TWindowData *dat, int mode)
else if (dat->SendFormat == 0)
dat->SendFormat = PluginConfig.m_SendFormat ? 1 : 0;
}
- for (i=0; i < 5; i++)
+ for (int i=0; i < 5; i++)
Utils::enableDlgControl(dat->hwnd, controls[i], dat->SendFormat != 0 ? TRUE : FALSE);
return;
}
@@ -2147,11 +2144,10 @@ LRESULT TSAPI GetSendButtonState(HWND hwnd)
void TSAPI EnableSendButton(const TWindowData *dat, int iMode)
{
- HWND hwndOK;
SendMessage(GetDlgItem(dat->hwnd, IDOK), BUTTONSETASNORMAL, iMode, 0);
SendMessage(GetDlgItem(dat->hwnd, IDC_PIC), BUTTONSETASNORMAL, dat->fEditNotesActive ? TRUE : (!iMode && dat->iOpenJobs == 0) ? TRUE : FALSE, 0);
- hwndOK = GetDlgItem(GetParent(GetParent(dat->hwnd)), IDOK);
+ HWND hwndOK = GetDlgItem(GetParent(GetParent(dat->hwnd)), IDOK);
if (IsWindow(hwndOK))
SendMessage(hwndOK, BUTTONSETASNORMAL, iMode, 0);