diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-22 19:47:48 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-22 19:47:48 +0300 |
commit | 45eed63e9c7a99c9c88e6a98678c0098a06de27a (patch) | |
tree | ab46a406a0c4e85c0baa721e76ce005f41a2fee5 /plugins/Scriver/src/chat_window.cpp | |
parent | 429859059db4093bf95dbe2695e205025dd7b3a7 (diff) |
nick list moved to mir_app
Diffstat (limited to 'plugins/Scriver/src/chat_window.cpp')
-rw-r--r-- | plugins/Scriver/src/chat_window.cpp | 34 |
1 files changed, 2 insertions, 32 deletions
diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp index 6c43be27ca..12ff411673 100644 --- a/plugins/Scriver/src/chat_window.cpp +++ b/plugins/Scriver/src/chat_window.cpp @@ -176,7 +176,7 @@ LRESULT CALLBACK CChatRoomDlg::MessageSubclassProc(HWND hwnd, UINT msg, WPARAM w else dat->lastEnterTime = 0;
if (wParam == VK_TAB && isShift && !isCtrl) { // SHIFT-TAB (go to nick list)
- SetFocus(GetDlgItem(GetParent(hwnd), IDC_CHAT_LIST));
+ SetFocus(pDlg->m_nickList.GetHwnd());
return TRUE;
}
@@ -747,7 +747,6 @@ CChatRoomDlg::CChatRoomDlg(SESSION_INFO *si) m_log(this, IDC_LOG),
m_message(this, IDC_MESSAGE),
- m_nickList(this, IDC_CHAT_LIST),
m_splitterX(this, IDC_SPLITTERX),
m_splitterY(this, IDC_SPLITTERY),
@@ -761,8 +760,6 @@ CChatRoomDlg::CChatRoomDlg(SESSION_INFO *si) m_btnFilter.OnClick = Callback(this, &CChatRoomDlg::onClick_Filter);
m_btnNickList.OnClick = Callback(this, &CChatRoomDlg::onClick_ShowList);
- m_nickList.OnDblClick = Callback(this, &CChatRoomDlg::onDblClick_List);
-
m_message.OnChange = Callback(this, &CChatRoomDlg::onChange_Message);
m_splitterX.OnChange = Callback(this, &CChatRoomDlg::OnSplitterX);
@@ -877,33 +874,6 @@ void CChatRoomDlg::OnSplitterY(CSplitter *pSplitter) m_pParent->iSplitterY = rc.bottom - pSplitter->GetPos();
}
-void CChatRoomDlg::onDblClick_List(CCtrlListBox*)
-{
- TVHITTESTINFO hti;
- hti.pt.x = (short)LOWORD(GetMessagePos());
- hti.pt.y = (short)HIWORD(GetMessagePos());
- ScreenToClient(m_nickList.GetHwnd(), &hti.pt);
-
- int item = LOWORD(m_nickList.SendMsg(LB_ITEMFROMPOINT, 0, MAKELPARAM(hti.pt.x, hti.pt.y)));
- USERINFO *ui = pci->SM_GetUserFromIndex(m_si->ptszID, m_si->pszModule, item);
- if (ui) {
- if (GetKeyState(VK_SHIFT) & 0x8000) {
- LRESULT lResult = (LRESULT)m_message.SendMsg(EM_GETSEL, 0, 0);
- int start = LOWORD(lResult);
- size_t dwNameLenMax = (mir_wstrlen(ui->pszUID) + 4);
- wchar_t* pszName = (wchar_t*)alloca(sizeof(wchar_t) * dwNameLenMax);
- if (start == 0)
- mir_snwprintf(pszName, dwNameLenMax, L"%s: ", ui->pszUID);
- else
- mir_snwprintf(pszName, dwNameLenMax, L"%s ", ui->pszUID);
-
- m_message.SendMsg(EM_REPLACESEL, FALSE, (LPARAM)pszName);
- PostMessage(m_hwnd, WM_MOUSEACTIVATE, 0, 0);
- }
- else DoEventHook(GC_USER_PRIVMESS, ui, nullptr, 0);
- }
-}
-
void CChatRoomDlg::onClick_Ok(CCtrlButton *pButton)
{
if (!pButton->Enabled())
@@ -1244,7 +1214,7 @@ INT_PTR CChatRoomDlg::DlgProc(UINT uMsg, WPARAM wParam, LPARAM lParam) if (dis->CtlType == ODT_MENU)
return Menu_DrawItem(lParam);
- if (dis->CtlID == IDC_CHAT_LIST) {
+ if (dis->CtlID == IDC_SRMM_NICKLIST) {
int index = dis->itemID;
USERINFO *ui = pci->SM_GetUserFromIndex(m_si->ptszID, m_si->pszModule, index);
if (ui) {
|