diff options
author | George Hazan <ghazan@miranda.im> | 2017-03-22 21:32:11 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-03-22 21:32:11 +0300 |
commit | b4a93a7e34aee5476b9ab962dd75b25b53d8eee2 (patch) | |
tree | 6568a57f54229f9b3f016afef691925c6761bee7 /plugins | |
parent | 45eed63e9c7a99c9c88e6a98678c0098a06de27a (diff) |
code cleaning
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/Scriver/src/chat_window.cpp | 3 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat_tools.cpp | 1 | ||||
-rw-r--r-- | plugins/TabSRMM/src/chat_window.cpp | 18 |
3 files changed, 2 insertions, 20 deletions
diff --git a/plugins/Scriver/src/chat_window.cpp b/plugins/Scriver/src/chat_window.cpp index 12ff411673..ea9f20ba37 100644 --- a/plugins/Scriver/src/chat_window.cpp +++ b/plugins/Scriver/src/chat_window.cpp @@ -528,14 +528,13 @@ LRESULT CALLBACK CChatRoomDlg::NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM USERINFO *ui = pci->SM_GetUserFromIndex(pDlg->m_si->ptszID, pDlg->m_si->pszModule, (int)item);
if (ui) {
HMENU hMenu = 0;
- UINT uID;
USERINFO uinew;
memcpy(&uinew, ui, sizeof(USERINFO));
if (hti.pt.x == -1 && hti.pt.y == -1)
hti.pt.y += height - 4;
ClientToScreen(hwnd, &hti.pt);
- uID = CreateGCMenu(hwnd, &hMenu, 0, hti.pt, pDlg->m_si, uinew.pszUID, uinew.pszNick);
+ UINT uID = CreateGCMenu(hwnd, &hMenu, 0, hti.pt, pDlg->m_si, uinew.pszUID, uinew.pszNick);
switch (uID) {
case 0:
diff --git a/plugins/TabSRMM/src/chat_tools.cpp b/plugins/TabSRMM/src/chat_tools.cpp index 68fa39beff..a2e87e9781 100644 --- a/plugins/TabSRMM/src/chat_tools.cpp +++ b/plugins/TabSRMM/src/chat_tools.cpp @@ -584,7 +584,6 @@ UINT CreateGCMenu(HWND hwndDlg, HMENU *hMenu, int iIndex, POINT pt, SESSION_INFO AppendMenu(*hMenu, MF_SEPARATOR, 0, 0);
int pos = GetMenuItemCount(*hMenu);
InsertMenu(*hMenu, pos, MF_BYPOSITION, (UINT_PTR)20020, TranslateT("Highlight user..."));
- InsertMenu(*hMenu, pos, MF_BYPOSITION, (UINT_PTR)20021, TranslateT("Edit highlight list..."));
}
return TrackPopupMenu(*hMenu, TPM_RETURNCMD, pt.x, pt.y, 0, hwndDlg, nullptr);
diff --git a/plugins/TabSRMM/src/chat_window.cpp b/plugins/TabSRMM/src/chat_window.cpp index faa6d514f5..83bedb7aa0 100644 --- a/plugins/TabSRMM/src/chat_window.cpp +++ b/plugins/TabSRMM/src/chat_window.cpp @@ -1310,23 +1310,7 @@ LRESULT CALLBACK CChatRoomDlg::NicklistSubclassProc(HWND hwnd, UINT msg, WPARAM break; default: - int iCount = SendMessage(hwnd, LB_GETCOUNT, 0, 0); - if (iCount != LB_ERR) { - int iSelectedItems = SendMessage(hwnd, LB_GETSELCOUNT, 0, 0); - if (iSelectedItems != LB_ERR) { - int *pItems = (int *)mir_alloc(sizeof(int) * (iSelectedItems + 1)); - if (pItems) { - if (SendMessage(hwnd, LB_GETSELITEMS, iSelectedItems, (LPARAM)pItems) != LB_ERR) { - for (int i = 0; i < iSelectedItems; i++) { - USERINFO *ui1 = pci->SM_GetUserFromIndex(si->ptszID, si->pszModule, pItems[i]); - if (ui1) - dat->DoEventHook(GC_USER_NICKLISTMENU, ui1, nullptr, uID); - } - } - mir_free(pItems); - } - } - } + dat->DoEventHook(GC_USER_NICKLISTMENU, ui, nullptr, uID); break; } DestroyGCMenu(&hMenu, 1); |