diff options
author | George Hazan <george.hazan@gmail.com> | 2013-01-27 18:11:22 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-01-27 18:11:22 +0000 |
commit | 5434c7b224bafd30c382f0590a55c921dfedea54 (patch) | |
tree | 59b67c5666f5cb765d9b8de52f4c61da9cc56e6c /protocols/JabberG/src/jabber_console.cpp | |
parent | fb8d04451e6808b1c88116c7d6d6c473831c5a2b (diff) |
- fix for the Jabber chat's Member Info dialog
- ++i -> i++
git-svn-id: http://svn.miranda-ng.org/main/trunk@3310 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG/src/jabber_console.cpp')
-rw-r--r-- | protocols/JabberG/src/jabber_console.cpp | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/protocols/JabberG/src/jabber_console.cpp b/protocols/JabberG/src/jabber_console.cpp index 6a804623a6..38ee266f3f 100644 --- a/protocols/JabberG/src/jabber_console.cpp +++ b/protocols/JabberG/src/jabber_console.cpp @@ -106,13 +106,13 @@ bool CJabberProto::RecursiveCheckFilter(HXML node, DWORD flags) {
int i;
- for (i = 0; i < xmlGetAttrCount(node); ++i)
+ for (i = 0; i < xmlGetAttrCount(node); i++)
{
if (JabberStrIStr(xmlGetAttr(node,i), m_filterInfo.pattern))
return true;
}
- for (i = 0; i < xmlGetChildCount(node); ++i) {
+ for (i = 0; i < xmlGetChildCount(node); i++) {
if (RecursiveCheckFilter(xmlGetChild(node, i), flags))
return true;
}
@@ -267,7 +267,7 @@ static void sttRtfAppendXml(StringBuf *buf, HXML node, DWORD flags, int indent) sttAppendBufRaw(buf, RTF_ENDTEXT);
}
- for (i = 0; i < xmlGetChildCount(node) ; ++i)
+ for (i = 0; i < xmlGetChildCount(node) ; i++)
sttRtfAppendXml(buf, xmlGetChild(node ,i), flags & ~(JCPF_IN|JCPF_OUT), indent+1);
if (xmlGetChildCount(node) || xmlGetText(node))
@@ -314,9 +314,9 @@ static void sttJabberConsoleRebuildStrings(CJabberProto* ppro, HWND hwndCombo) SendMessage(hwndCombo, CB_RESETCONTENT, 0, 0);
- for (i = 0; g_JabberFeatCapPairs[i].szFeature; ++i)
+ for (i = 0; g_JabberFeatCapPairs[i].szFeature; i++)
SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)g_JabberFeatCapPairs[i].szFeature);
- for (i = 0; g_JabberFeatCapPairsExt[i].szFeature; ++i)
+ for (i = 0; g_JabberFeatCapPairsExt[i].szFeature; i++)
SendMessage(hwndCombo, CB_ADDSTRING, 0, (LPARAM)g_JabberFeatCapPairsExt[i].szFeature);
LISTFOREACH_NODEF(i, ppro, LIST_ROSTER)
@@ -369,8 +369,6 @@ void CJabberDlgConsole::OnInitDialog() {
CSuper::OnInitDialog();
- int i;
-
WindowSetIcon(m_hwnd, m_proto, "xmlconsole");
SendDlgItemMessage(m_hwnd, IDC_CONSOLE, EM_SETEDITSTYLE, SES_EXTENDBACKCOLOR, SES_EXTENDBACKCOLOR);
SendDlgItemMessage(m_hwnd, IDC_CONSOLE, EM_EXLIMITTEXT, 0, 0x80000000);
@@ -399,14 +397,15 @@ void CJabberDlgConsole::OnInitDialog() BOOL pushed;
} buttons[] =
{
- {IDC_BTN_MSG, "Messages", "pl_msg_allow", true, m_proto->m_filterInfo.msg},
- {IDC_BTN_PRESENCE, "Presences", "pl_prin_allow", true, m_proto->m_filterInfo.presence},
- {IDC_BTN_IQ, "Queries", "pl_iq_allow", true, m_proto->m_filterInfo.iq},
- {IDC_BTN_FILTER, "Filter mode", "sd_filter_apply", true, FALSE},
- {IDC_BTN_FILTER_REFRESH, "Refresh list", "sd_nav_refresh", false, FALSE},
+ {IDC_BTN_MSG, "Messages", "pl_msg_allow", true, m_proto->m_filterInfo.msg},
+ {IDC_BTN_PRESENCE, "Presences", "pl_prin_allow", true, m_proto->m_filterInfo.presence},
+ {IDC_BTN_IQ, "Queries", "pl_iq_allow", true, m_proto->m_filterInfo.iq},
+ {IDC_BTN_FILTER, "Filter mode", "sd_filter_apply", true, FALSE},
+ {IDC_BTN_FILTER_REFRESH, "Refresh list", "sd_nav_refresh", false, FALSE},
};
- for (i = 0; i < SIZEOF(buttons); ++i)
- {
+
+ int i;
+ for (i = 0; i < SIZEOF(buttons); i++) {
SendDlgItemMessage(m_hwnd, buttons[i].idc, BM_SETIMAGE, IMAGE_ICON, (LPARAM)m_proto->LoadIconEx(buttons[i].icon));
SendDlgItemMessage(m_hwnd, buttons[i].idc, BUTTONSETASFLATBTN, TRUE, 0);
SendDlgItemMessage(m_hwnd, buttons[i].idc, BUTTONADDTOOLTIP, (WPARAM)buttons[i].title, 0);
@@ -414,13 +413,13 @@ void CJabberDlgConsole::OnInitDialog() if (buttons[i].pushed) CheckDlgButton(m_hwnd, buttons[i].idc, TRUE);
}
- for (i = 0; i < SIZEOF(filter_modes); ++i)
- if (filter_modes[i].type == m_proto->m_filterInfo.type)
- {
+ for (i = 0; i < SIZEOF(filter_modes); i++)
+ if (filter_modes[i].type == m_proto->m_filterInfo.type) {
g_ReleaseIcon((HICON)SendDlgItemMessage(m_hwnd, IDC_BTN_FILTER, BM_SETIMAGE, IMAGE_ICON, (LPARAM)m_proto->LoadIconEx(filter_modes[i].icon)));
SendDlgItemMessage(m_hwnd, IDC_BTN_FILTER, BM_SETIMAGE, IMAGE_ICON, (LPARAM)m_proto->LoadIconEx(filter_modes[i].icon));
break;
}
+
EnableWindow(GetDlgItem(m_hwnd, IDC_CB_FILTER), (m_proto->m_filterInfo.type == TFilterInfo::T_OFF) ? FALSE : TRUE);
EnableWindow(GetDlgItem(m_hwnd, IDC_BTN_FILTER_REFRESH), (m_proto->m_filterInfo.type == TFilterInfo::T_OFF) ? FALSE : TRUE);
@@ -604,7 +603,7 @@ INT_PTR CJabberDlgConsole::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) {
int i;
HMENU hMenu = CreatePopupMenu();
- for (i = 0; i < SIZEOF(filter_modes); ++i)
+ for (i = 0; i < SIZEOF(filter_modes); i++)
{
AppendMenu(hMenu,
MF_STRING | ((filter_modes[i].type == m_proto->m_filterInfo.type) ? MF_CHECKED : 0),
@@ -619,7 +618,7 @@ INT_PTR CJabberDlgConsole::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) if (res)
{
m_proto->m_filterInfo.type = (TFilterInfo::Type)(res - 1);
- for (i = 0; i < SIZEOF(filter_modes); ++i)
+ for (i = 0; i < SIZEOF(filter_modes); i++)
if (filter_modes[i].type == m_proto->m_filterInfo.type)
{
g_ReleaseIcon((HICON)SendDlgItemMessage(m_hwnd, IDC_BTN_FILTER, BM_SETIMAGE, IMAGE_ICON, (LPARAM)m_proto->LoadIconEx(filter_modes[i].icon)));
|