diff options
author | George Hazan <george.hazan@gmail.com> | 2015-05-05 22:15:11 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2015-05-05 22:15:11 +0000 |
commit | b0782cc92dbcf328a47c7a702386723d15e56497 (patch) | |
tree | 4502cc006ffed030b93a57d7c6f5ec59d8d97e49 /protocols/JabberG | |
parent | 2aabf6594cb0fb4f8db16771c988bf5a6eab2c4b (diff) |
some another sudden Unicode appearances
git-svn-id: http://svn.miranda-ng.org/main/trunk@13457 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/JabberG')
-rw-r--r-- | protocols/JabberG/src/jabber_disco.cpp | 29 | ||||
-rw-r--r-- | protocols/JabberG/src/jabber_opttree.cpp | 23 |
2 files changed, 20 insertions, 32 deletions
diff --git a/protocols/JabberG/src/jabber_disco.cpp b/protocols/JabberG/src/jabber_disco.cpp index f4a7dbfad8..e15a37a8c5 100644 --- a/protocols/JabberG/src/jabber_disco.cpp +++ b/protocols/JabberG/src/jabber_disco.cpp @@ -989,7 +989,7 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) HWND hwndList = GetDlgItem(m_hwnd, IDC_TREE_DISCO);
RECT rcCtl; GetClientRect(hwndList, &rcCtl);
RECT rcHdr; GetClientRect(ListView_GetHeader(hwndList), &rcHdr);
- LVHITTESTINFO lvhti = {0};
+ LVHITTESTINFO lvhti = { 0 };
lvhti.pt.x = rcCtl.left + 5;
lvhti.pt.y = rcHdr.bottom + 5;
int iFirst = ListView_HitTest(hwndList, &lvhti);
@@ -1003,9 +1003,8 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) XmlNode packet(NULL);
{
mir_cslock lck(m_proto->m_SDManager.cs());
- for (int i = iFirst; i <= iLast; i++)
- {
- LVITEM lvi = {0};
+ for (int i = iFirst; i <= iLast; i++) {
+ LVITEM lvi = { 0 };
lvi.mask = LVIF_PARAM;
lvi.iItem = i;
ListView_GetItem(hwndList, &lvi);
@@ -1029,13 +1028,12 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) break;
case WM_CONTEXTMENU:
- if (GetWindowLongPtr((HWND)wParam, GWL_ID) == IDC_TREE_DISCO)
- {
+ if (GetWindowLongPtr((HWND)wParam, GWL_ID) == IDC_TREE_DISCO) {
HWND hwndList = (HWND)wParam;
POINT pt = { (signed short)LOWORD(lParam), (signed short)HIWORD(lParam) };
if ((pt.x == -1) && (pt.y == -1)) {
- LVITEM lvi = {0};
+ LVITEM lvi = { 0 };
lvi.iItem = ListView_GetNextItem(hwndList, -1, LVNI_SELECTED);
if (lvi.iItem < 0) return FALSE;
@@ -1103,13 +1101,11 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) }
return TRUE;
}
-
break;
case WM_COMMAND:
- switch (LOWORD(wParam))
- {
- case IDOK:
+ switch (LOWORD(wParam)) {
+ case IDOK:
{
HWND hwndFocus = GetFocus();
if (!hwndFocus) return TRUE;
@@ -1119,13 +1115,12 @@ INT_PTR CJabberDlgDiscovery::DlgProc(UINT msg, WPARAM wParam, LPARAM lParam) break;
else if ((GetWindowLongPtr(hwndFocus, GWL_ID) == IDC_COMBO_NODE) || (GetWindowLongPtr(hwndFocus, GWL_ID) == IDC_COMBO_JID))
PostMessage(m_hwnd, WM_COMMAND, MAKEWPARAM(IDC_BUTTON_BROWSE, 0), 0);
- return TRUE;
- }
- case IDCANCEL:
- {
- PostMessage(m_hwnd, WM_CLOSE, 0, 0);
- return TRUE;
}
+ return TRUE;
+
+ case IDCANCEL:
+ PostMessage(m_hwnd, WM_CLOSE, 0, 0);
+ return TRUE;
}
break;
diff --git a/protocols/JabberG/src/jabber_opttree.cpp b/protocols/JabberG/src/jabber_opttree.cpp index 6395bdca3b..5eddddfb65 100644 --- a/protocols/JabberG/src/jabber_opttree.cpp +++ b/protocols/JabberG/src/jabber_opttree.cpp @@ -65,32 +65,22 @@ BOOL CCtrlTreeOpts::OnNotify(int idCtrl, NMHDR *pnmh) hti.pt.y = (short)HIWORD(GetMessagePos());
ScreenToClient(pnmh->hwndFrom, &hti.pt);
if (HitTest(&hti))
- if (hti.flags&TVHT_ONITEMICON)
- ProcessItemClick(hti.hItem);
+ if (hti.flags & TVHT_ONITEMICON)
+ ProcessItemClick(hti.hItem);
}
break;
- case TVN_ITEMEXPANDEDW:
+ case TVN_ITEMEXPANDED:
{
- LPNMTREEVIEWW lpnmtv = (LPNMTREEVIEWW)pnmh;
+ LPNMTREEVIEW lpnmtv = (LPNMTREEVIEW)pnmh;
TVITEM tvi;
tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
tvi.hItem = lpnmtv->itemNew.hItem;
tvi.iImage = tvi.iSelectedImage =
(lpnmtv->itemNew.state & TVIS_EXPANDED) ? IMG_GRPOPEN : IMG_GRPCLOSED;
- SendMessageW(pnmh->hwndFrom, TVM_SETITEMW, 0, (LPARAM)&tvi);
+ SendMessage(pnmh->hwndFrom, TVM_SETITEM, 0, (LPARAM)&tvi);
}
break;
-
- case TVN_ITEMEXPANDEDA:
- LPNMTREEVIEWA lpnmtv = (LPNMTREEVIEWA)pnmh;
- TVITEM tvi;
- tvi.mask = TVIF_HANDLE | TVIF_IMAGE | TVIF_SELECTEDIMAGE;
- tvi.hItem = lpnmtv->itemNew.hItem;
- tvi.iImage = tvi.iSelectedImage =
- (lpnmtv->itemNew.state & TVIS_EXPANDED) ? IMG_GRPOPEN : IMG_GRPCLOSED;
- SendMessageA(pnmh->hwndFrom, TVM_SETITEMA, 0, (LPARAM)&tvi);
- break;
}
return CCtrlTreeView::OnNotify(idCtrl, pnmh);
@@ -201,6 +191,7 @@ void CCtrlTreeOpts::ProcessItemClick(HTREEITEM hti) tvi.iImage = tvi.iSelectedImage = IMG_GRPCLOSED;
Expand(tvi.hItem, TVE_COLLAPSE);
break;
+
case IMG_GRPCLOSED:
tvi.iImage = tvi.iSelectedImage = IMG_GRPOPEN;
Expand(tvi.hItem, TVE_EXPAND);
@@ -210,10 +201,12 @@ void CCtrlTreeOpts::ProcessItemClick(HTREEITEM hti) tvi.iImage = tvi.iSelectedImage = IMG_NOCHECK;
SendMessage(::GetParent(::GetParent(m_hwnd)), PSM_CHANGED, 0, 0);
break;
+
case IMG_NOCHECK:
tvi.iImage = tvi.iSelectedImage = IMG_CHECK;
SendMessage(::GetParent(::GetParent(m_hwnd)), PSM_CHANGED, 0, 0);
break;
+
case IMG_NORCHECK:
for (int i = 0; i < m_options.getCount(); i++) {
if (m_options[i]->m_groupId == m_options[tvi.lParam]->m_groupId) {
|