diff options
Diffstat (limited to 'plugins/TabSRMM/src/msgdialog.cpp')
-rw-r--r-- | plugins/TabSRMM/src/msgdialog.cpp | 57 |
1 files changed, 0 insertions, 57 deletions
diff --git a/plugins/TabSRMM/src/msgdialog.cpp b/plugins/TabSRMM/src/msgdialog.cpp index a93a455a2a..02b5eb8de5 100644 --- a/plugins/TabSRMM/src/msgdialog.cpp +++ b/plugins/TabSRMM/src/msgdialog.cpp @@ -1976,63 +1976,6 @@ LRESULT CMsgDialog::WndProc_Nicklist(UINT msg, WPARAM wParam, LPARAM lParam) PostMessage(m_hwnd, WM_CLOSE, 0, 1);
return TRUE;
}
-
- if (wParam == VK_ESCAPE || wParam == VK_UP || wParam == VK_DOWN || wParam == VK_NEXT || wParam == VK_PRIOR || wParam == VK_TAB || wParam == VK_HOME || wParam == VK_END) {
- m_wszSearch[0] = 0;
- m_iSearchItem = -1;
- }
- break;
-
- case WM_SETFOCUS:
- case WM_KILLFOCUS:
- m_wszSearch[0] = 0;
- m_iSearchItem = -1;
- break;
-
- case WM_CHAR:
- case WM_UNICHAR:
- // simple incremental search for the user (nick) - list control
- // typing esc or movement keys will clear the current search string
- if (wParam == 27 && m_wszSearch[0]) { // escape - reset everything
- m_wszSearch[0] = 0;
- m_iSearchItem = -1;
- break;
- }
- if (wParam == '\b' && m_wszSearch[0]) // backspace
- m_wszSearch[mir_wstrlen(m_wszSearch) - 1] = '\0';
- else if (wParam < ' ')
- break;
- else {
- if (mir_wstrlen(m_wszSearch) >= _countof(m_wszSearch) - 2) {
- MessageBeep(MB_OK);
- break;
- }
- wchar_t szNew[2];
- szNew[0] = (wchar_t)wParam;
- szNew[1] = '\0';
- mir_wstrcat(m_wszSearch, szNew);
- }
- if (m_wszSearch[0]) {
- // iterate over the (sorted) list of nicknames and search for the
- // string we have
- int i, iItems = m_nickList.SendMsg(LB_GETCOUNT, 0, 0);
- for (i = 0; i < iItems; i++) {
- if (auto *ui = (USERINFO *)m_nickList.GetItemData(i)) {
- if (!wcsnicmp(ui->pszNick, m_wszSearch, mir_wstrlen(m_wszSearch))) {
- m_nickList.SendMsg(LB_SETSEL, FALSE, -1);
- m_nickList.SendMsg(LB_SETSEL, TRUE, i);
- m_iSearchItem = i;
- InvalidateRect(m_nickList.GetHwnd(), nullptr, FALSE);
- return 0;
- }
- }
- }
- if (i == iItems) {
- MessageBeep(MB_OK);
- m_wszSearch[mir_wstrlen(m_wszSearch) - 1] = '\0';
- return 0;
- }
- }
break;
}
|