From de6bed3b8c62dcb0581b4271a75a00baa9ee639b Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 16 Jan 2024 17:00:22 +0300 Subject: code cleaning --- plugins/Clist_nicer/src/clui.cpp | 41 ---------------------------------------- 1 file changed, 41 deletions(-) (limited to 'plugins/Clist_nicer') diff --git a/plugins/Clist_nicer/src/clui.cpp b/plugins/Clist_nicer/src/clui.cpp index 843417553d..96d118cd16 100644 --- a/plugins/Clist_nicer/src/clui.cpp +++ b/plugins/Clist_nicer/src/clui.cpp @@ -1570,47 +1570,6 @@ buttons_done: } break; - case WM_CONTEXTMENU: - GetWindowRect(g_clistApi.hwndContactTree, &rc); - { - // x/y might be -1 if it was generated by a kb click - POINT pt = { GET_X_LPARAM(lParam), GET_Y_LPARAM(lParam) }; - if (pt.x == -1 && pt.y == -1) { - // all this is done in screen-coords! - GetCursorPos(&pt); - // the mouse isnt near the window, so put it in the middle of the window - if (!PtInRect(&rc, pt)) { - pt.x = rc.left + (rc.right - rc.left) / 2; - pt.y = rc.top + (rc.bottom - rc.top) / 2; - } - } - if (PtInRect(&rc, pt)) { - HMENU hMenu = Menu_BuildGroupMenu(); - TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, hwnd, nullptr); - Menu_DestroyNestedMenu(hMenu); - return 0; - } - GetWindowRect(g_clistApi.hwndStatus, &rc); - if (PtInRect(&rc, pt)) { - HMENU hMenu; - if (db_get_b(0, "CLUI", "SBarRightClk", 0)) - hMenu = Menu_GetMainMenu(); - else - hMenu = Menu_GetStatusMenu(); - TrackPopupMenu(hMenu, TPM_TOPALIGN | TPM_LEFTALIGN | TPM_RIGHTBUTTON, pt.x, pt.y, 0, hwnd, nullptr); - return 0; - } - } - break; - - case WM_MEASUREITEM: - if (((LPMEASUREITEMSTRUCT)lParam)->itemData == MENU_MIRANDAMENU) { - ((LPMEASUREITEMSTRUCT)lParam)->itemWidth = g_cxsmIcon * 4 / 3; - ((LPMEASUREITEMSTRUCT)lParam)->itemHeight = 0; - return TRUE; - } - return Menu_MeasureItem(lParam); - case WM_DRAWITEM: { LPDRAWITEMSTRUCT dis = (LPDRAWITEMSTRUCT)lParam; -- cgit v1.2.3