From b4a93a7e34aee5476b9ab962dd75b25b53d8eee2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 22 Mar 2017 21:32:11 +0300 Subject: code cleaning --- plugins/TabSRMM/src/chat_tools.cpp | 1 - plugins/TabSRMM/src/chat_window.cpp | 18 +----------------- 2 files changed, 1 insertion(+), 18 deletions(-) (limited to 'plugins/TabSRMM') 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); -- cgit v1.2.3