From 205963dfbb2297f5fab4adeec027342394329d2d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 6 Apr 2018 20:59:25 +0300 Subject: CLIST_INTERFACE::pfnGetGroupCountsText => Clist_GetGroupCountsText CLIST_INTERFACE::pfnEnsureVisible => Clist_EnsureVisible --- plugins/Clist_blind/src/clcpaint.cpp | 2 +- plugins/Clist_blind/src/init.cpp | 4 ++-- plugins/Clist_modern/src/modern_clc.cpp | 10 +++++----- plugins/Clist_modern/src/modern_clcmsgs.cpp | 2 +- plugins/Clist_modern/src/modern_clcpaint.cpp | 10 +++++----- plugins/Clist_modern/src/modern_rowheight_funcs.cpp | 4 ++-- plugins/Clist_nicer/src/clc.cpp | 6 +++--- plugins/Clist_nicer/src/clcpaint.cpp | 2 +- plugins/Clist_nicer/src/clcutils.cpp | 4 ++-- 9 files changed, 22 insertions(+), 22 deletions(-) (limited to 'plugins') diff --git a/plugins/Clist_blind/src/clcpaint.cpp b/plugins/Clist_blind/src/clcpaint.cpp index 26bc796c49..56bf6c6f66 100644 --- a/plugins/Clist_blind/src/clcpaint.cpp +++ b/plugins/Clist_blind/src/clcpaint.cpp @@ -307,7 +307,7 @@ void PaintClc(HWND hwnd, struct ClcData *dat, HDC hdc, RECT * rcPaint) GetTextExtentPoint32(hdcMem, cc->szText, (int)mir_wstrlen(cc->szText), &textSize); width = textSize.cx; if (cc->type == CLCIT_GROUP) { - szCounts = pcli->pfnGetGroupCountsText(dat, cc); + szCounts = Clist_GetGroupCountsText(dat, cc); if (szCounts[0]) { GetTextExtentPoint32(hdcMem, L" ", 1, &spaceSize); ChangeToFont(hdcMem, dat, FONTID_GROUPCOUNTS, &fontHeight); diff --git a/plugins/Clist_blind/src/init.cpp b/plugins/Clist_blind/src/init.cpp index b5800648a9..4adbb48c05 100644 --- a/plugins/Clist_blind/src/init.cpp +++ b/plugins/Clist_blind/src/init.cpp @@ -396,7 +396,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L KillTimer(hwnd, TIMERID_RENAME); dat->szQuickSearch[0] = 0; pcli->pfnInvalidateRect(hwnd, nullptr, FALSE); - pcli->pfnEnsureVisible(hwnd, (ClcData*)dat, dat->selection, 0); + Clist_EnsureVisible(hwnd, (ClcData*)dat, dat->selection, 0); UpdateWindow(hwnd); break; @@ -528,7 +528,7 @@ void RebuildEntireListInternal(HWND hwnd, ClcData *tmp_dat, BOOL call_orig) switch (item->type) { case CLCIT_GROUP: { - wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, item); + wchar_t *szCounts = Clist_GetGroupCountsText(dat, item); const wchar_t *t[] = { L"%name%", L"%count%", diff --git a/plugins/Clist_modern/src/modern_clc.cpp b/plugins/Clist_modern/src/modern_clc.cpp index 39d920265c..23cca110e2 100644 --- a/plugins/Clist_modern/src/modern_clc.cpp +++ b/plugins/Clist_modern/src/modern_clc.cpp @@ -431,7 +431,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM dat->selection = index; pcli->pfnInvalidateRect(hwnd, nullptr, FALSE); - pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0); + Clist_EnsureVisible(hwnd, dat, dat->selection, 0); return 0; } @@ -532,7 +532,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM ClcGroup *group2; if (Clist_FindItem(hwnd, dat, contact->hContact, &contact2, &group2, nullptr)) { int i = cliGetRowsPriorTo(&dat->list, group2, group2->cl.indexOf(contact2)); - pcli->pfnEnsureVisible(hwnd, dat, i + contact->iSubAllocated, 0); + Clist_EnsureVisible(hwnd, dat, i + contact->iSubAllocated, 0); } } hitcontact = nullptr; @@ -571,7 +571,7 @@ static LRESULT clcOnKeyDown(ClcData *dat, HWND hwnd, UINT, WPARAM wParam, LPARAM if (dat->bCompactMode) SendMessage(hwnd, WM_SIZE, 0, 0); cliInvalidateRect(hwnd, nullptr, FALSE); - pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0); + Clist_EnsureVisible(hwnd, dat, dat->selection, 0); UpdateWindow(hwnd); } SetCapture(hwnd); @@ -626,7 +626,7 @@ static LRESULT clcOnTimer(ClcData *dat, HWND hwnd, UINT msg, WPARAM wParam, LPAR ClcGroup *group; if (Clist_FindItem(hwnd, dat, hitcontact->hContact, &contact, &group, nullptr)) { i = cliGetRowsPriorTo(&dat->list, group, group->cl.indexOf(contact)); - pcli->pfnEnsureVisible(hwnd, dat, i + hitcontact->iSubAllocated, 0); + Clist_EnsureVisible(hwnd, dat, i + hitcontact->iSubAllocated, 0); } } hitcontact = nullptr; @@ -810,7 +810,7 @@ static LRESULT clcOnLButtonDown(ClcData *dat, HWND hwnd, UINT, WPARAM, LPARAM lP SendMessage(hwnd, WM_SIZE, 0, 0); if (dat->selection != -1) - pcli->pfnEnsureVisible(hwnd, dat, hit, 0); + Clist_EnsureVisible(hwnd, dat, hit, 0); return TRUE; } diff --git a/plugins/Clist_modern/src/modern_clcmsgs.cpp b/plugins/Clist_modern/src/modern_clcmsgs.cpp index f40be03600..06f688619d 100644 --- a/plugins/Clist_modern/src/modern_clcmsgs.cpp +++ b/plugins/Clist_modern/src/modern_clcmsgs.cpp @@ -212,7 +212,7 @@ LRESULT cli_ProcessExternalMessages(HWND hwnd, ClcData *dat, UINT msg, WPARAM wP } dat->selection = pcli->pfnGetRowsPriorTo(&dat->list, group, index); - pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0); + Clist_EnsureVisible(hwnd, dat, dat->selection, 0); } return 0; } diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index 6f33458f9d..0ddeeabdc4 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -780,7 +780,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R RECT count_rc = { 0 }; SIZE count_size = { 0 }; int space_width = 0; - szCounts = pcli->pfnGetGroupCountsText(dat, Drawing); + szCounts = Clist_GetGroupCountsText(dat, Drawing); // Has to draw the count? if (szCounts && mir_wstrlen(szCounts) > 0) { // calc width and height @@ -852,7 +852,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R return; } else if (Drawing->type == CLCIT_GROUP) { - szCounts = pcli->pfnGetGroupCountsText(dat, Drawing); + szCounts = Clist_GetGroupCountsText(dat, Drawing); // Has to draw the count? if (szCounts && szCounts[0]) { RECT space_rc = fr_rc; @@ -1001,7 +1001,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R RECT count_rc = { 0 }; SIZE count_size = { 0 }; int space_width = 0; - wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, Drawing); + wchar_t *szCounts = Clist_GetGroupCountsText(dat, Drawing); // Has to draw the count? if (szCounts && mir_wstrlen(szCounts) > 0) { // calc width and height @@ -2197,7 +2197,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT if (Drawing->type == CLCIT_GROUP) { int full_text_width = text_size.cx; // Has to draw the count? - wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, Drawing); + wchar_t *szCounts = Clist_GetGroupCountsText(dat, Drawing); if (szCounts && szCounts[0]) { RECT space_rc = free_row_rc; RECT counts_rc = free_row_rc; @@ -2683,7 +2683,7 @@ void CLCPaint::_DrawContactText(HDC hdcMem, ClcData *dat, ClcContact *Drawing, i void CLCPaint::_DrawContactSubText(HDC hdcMem, ClcData *dat, ClcContact *Drawing, int& selected, int& hottrack, RECT& text_rc, RECT *prcItem, UINT uTextFormat, BYTE itemType) { if (Drawing->type == CLCIT_GROUP) { - wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, Drawing); + wchar_t *szCounts = Clist_GetGroupCountsText(dat, Drawing); // Has to draw the count? if (szCounts && szCounts[0]) { diff --git a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp index 3bf61c98a3..4c259c58e1 100644 --- a/plugins/Clist_modern/src/modern_rowheight_funcs.cpp +++ b/plugins/Clist_modern/src/modern_rowheight_funcs.cpp @@ -70,7 +70,7 @@ int RowHeight_CalcRowHeight(ClcData *dat, ClcContact *contact, int item) if (dat->text_replace_smileys && dat->first_line_draw_smileys && !dat->text_resize_smileys) tmp = max(tmp, contact->ssText.iMaxSmileyHeight); if (contact->type == CLCIT_GROUP) { - wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, contact); + wchar_t *szCounts = Clist_GetGroupCountsText(dat, contact); // Has the count? if (szCounts && szCounts[0]) tmp = max(tmp, dat->fontModernInfo[contact->group->expanded ? FONTID_OPENGROUPCOUNTS : FONTID_CLOSEDGROUPCOUNTS].fontHeight); @@ -108,7 +108,7 @@ int RowHeight_CalcRowHeight(ClcData *dat, ClcContact *contact, int item) g_clcPainter.ChangeToFont(hdc, dat, g_clcPainter.GetBasicFontID(contact), nullptr); g_clcPainter.GetTextSize(&size, hdc, dummyRect, contact->szText, contact->ssText.plText, 0, dat->text_resize_smileys ? 0 : contact->ssText.iMaxSmileyHeight); if (contact->type == CLCIT_GROUP) { - wchar_t *szCounts = pcli->pfnGetGroupCountsText(dat, contact); + wchar_t *szCounts = Clist_GetGroupCountsText(dat, contact); if (szCounts && mir_wstrlen(szCounts) > 0) { RECT count_rc = { 0 }; // calc width and height diff --git a/plugins/Clist_nicer/src/clc.cpp b/plugins/Clist_nicer/src/clc.cpp index 839ba5f020..dd858bec85 100644 --- a/plugins/Clist_nicer/src/clc.cpp +++ b/plugins/Clist_nicer/src/clc.cpp @@ -620,7 +620,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L InvalidateRect(hwnd, nullptr, FALSE); if (dat->selection != -1) - pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0); + Clist_EnsureVisible(hwnd, dat, dat->selection, 0); if (hitFlags & CLCHT_ONAVATAR && cfg::dat.bDblClkAvatars) { CallService(MS_USERINFO_SHOWDIALOG, (WPARAM)contact->hContact, 0); return TRUE; @@ -645,7 +645,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L if (pt.x == -1 && pt.y == -1) { dat->selection = pcli->pfnGetRowByIndex(dat, dat->selection, &contact, nullptr); if (dat->selection != -1) - pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0); + Clist_EnsureVisible(hwnd, dat, dat->selection, 0); pt.x = dat->iconXSpace + 15; pt.y = RowHeight::getItemTopY(dat, dat->selection) - dat->yScroll + (int)(dat->row_heights[dat->selection] * .7); hitFlags = dat->selection == -1 ? CLCHT_NOWHERE : CLCHT_ONITEMLABEL; @@ -656,7 +656,7 @@ LRESULT CALLBACK ContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam, L } InvalidateRect(hwnd, nullptr, FALSE); if (dat->selection != -1) - pcli->pfnEnsureVisible(hwnd, dat, dat->selection, 0); + Clist_EnsureVisible(hwnd, dat, dat->selection, 0); UpdateWindow(hwnd); HMENU hMenu = nullptr; diff --git a/plugins/Clist_nicer/src/clcpaint.cpp b/plugins/Clist_nicer/src/clcpaint.cpp index a2476af09e..0db2306540 100644 --- a/plugins/Clist_nicer/src/clcpaint.cpp +++ b/plugins/Clist_nicer/src/clcpaint.cpp @@ -503,7 +503,7 @@ set_bg_l: if (type == CLCIT_GROUP) { GetTextExtentPoint32(hdcMem, contact->szText, (int)mir_wstrlen(contact->szText), &textSize); int width = textSize.cx; - szCounts = pcli->pfnGetGroupCountsText(dat, contact); + szCounts = Clist_GetGroupCountsText(dat, contact); if (szCounts[0]) { GetTextExtentPoint32(hdcMem, L" ", 1, &spaceSize); ChangeToFont(hdcMem, dat, FONTID_GROUPCOUNTS, &fontHeight); diff --git a/plugins/Clist_nicer/src/clcutils.cpp b/plugins/Clist_nicer/src/clcutils.cpp index 82e9722c2f..c59a735535 100644 --- a/plugins/Clist_nicer/src/clcutils.cpp +++ b/plugins/Clist_nicer/src/clcutils.cpp @@ -168,7 +168,7 @@ int RTL_HitTest(HWND hwnd, struct ClcData *dat, int testx, ClcContact *hitcontac width = textSize.cx; if (hitcontact->type == CLCIT_GROUP) { wchar_t *szCounts; - szCounts = pcli->pfnGetGroupCountsText(dat, hitcontact); + szCounts = Clist_GetGroupCountsText(dat, hitcontact); if (szCounts[0]) { GetTextExtentPoint32(hdc, L" ", 1, &textSize); width += textSize.cx; @@ -309,7 +309,7 @@ int HitTest(HWND hwnd, struct ClcData *dat, int testx, int testy, ClcContact **c width = textSize.cx; if (hitcontact->type == CLCIT_GROUP) { wchar_t *szCounts; - szCounts = pcli->pfnGetGroupCountsText(dat, hitcontact); + szCounts = Clist_GetGroupCountsText(dat, hitcontact); if (szCounts[0]) { GetTextExtentPoint32(hdc, L" ", 1, &textSize); width += textSize.cx; -- cgit v1.2.3