summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2017-03-22 12:30:59 +0300
committerGeorge Hazan <ghazan@miranda.im>2017-03-22 12:30:59 +0300
commit337a21c7b838d8e5135fe3d28b320508442ad69c (patch)
tree67e74da9b1eb42272184ad387681beed0b724feb /plugins/Clist_nicer
parentf5c571324515ea69e1e031dd2243aecba94e834a (diff)
- Clist_ClearSearch considered useless;
- pfnDoSelectionDefaultAction rewritten to handle search correctly
Diffstat (limited to 'plugins/Clist_nicer')
-rw-r--r--plugins/Clist_nicer/src/clc.cpp34
1 files changed, 16 insertions, 18 deletions
diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp
index 4d8e7a88c1..a185c7f40f 100644
--- a/plugins/Clist_nicer/src/clc.cpp
+++ b/plugins/Clist_nicer/src/clc.cpp
@@ -612,24 +612,22 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
pcli->pfnHideInfoTip(hwnd, dat);
KillTimer(hwnd, TIMERID_RENAME);
KillTimer(hwnd, TIMERID_INFOTIP);
- dat->szQuickSearch[0] = 0;
- {
- DWORD hitFlags;
- dat->selection = HitTest(hwnd, dat, (short)LOWORD(lParam), (short)HIWORD(lParam), &contact, NULL, &hitFlags);
- if (hitFlags & CLCHT_ONITEMEXTRA)
- break;
- InvalidateRect(hwnd, NULL, FALSE);
- if (dat->selection != -1)
- pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0);
- if (hitFlags & CLCHT_ONAVATAR && cfg::dat.bDblClkAvatars) {
- CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)contact->hContact, 0);
- return TRUE;
- }
- if (hitFlags & (CLCHT_ONITEMICON | CLCHT_ONITEMLABEL | CLCHT_ONITEMSPACE)) {
- UpdateWindow(hwnd);
- pcli->pfnDoSelectionDefaultAction(hwnd, dat);
- }
+ DWORD hitFlags;
+ dat->selection = HitTest(hwnd, dat, (short)LOWORD(lParam), (short)HIWORD(lParam), &contact, NULL, &hitFlags);
+ if (hitFlags & CLCHT_ONITEMEXTRA)
+ break;
+
+ InvalidateRect(hwnd, NULL, FALSE);
+ if (dat->selection != -1)
+ pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0);
+ if (hitFlags & CLCHT_ONAVATAR && cfg::dat.bDblClkAvatars) {
+ CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)contact->hContact, 0);
+ return TRUE;
+ }
+ if (hitFlags & (CLCHT_ONITEMICON | CLCHT_ONITEMLABEL | CLCHT_ONITEMSPACE)) {
+ UpdateWindow(hwnd);
+ pcli->pfnDoSelectionDefaultAction(hwnd, dat);
}
return TRUE;
@@ -680,7 +678,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L
PostMessage(GetParent(hwnd), WM_CONTEXTMENU, wParam, lParam);
return 0;
}
- if (hMenu != NULL) {
+ if (hMenu != nullptr) {
ClientToScreen(hwnd, &pt);
TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, hwnd, NULL);
DestroyMenu(hMenu);