diff options
author | George Hazan <george.hazan@gmail.com> | 2016-04-28 11:27:27 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-04-28 11:27:27 +0000 |
commit | 7c2e75f14ad9dd186a85b17587c21c2561286581 (patch) | |
tree | fcd4db66a9b149cb7ee480a89d3f20582bea2823 /plugins/Clist_modern/src/modern_clcpaint.cpp | |
parent | 01433b81e943d57b1ec2ebb5758bd2a85d836753 (diff) |
- 2nd & 3rd lines handling unification;
- no need to copy data to make async calls;
- no need to launch a thread to save a couple of msecs on a very large roster;
- unused code & params cleaning
git-svn-id: http://svn.miranda-ng.org/main/trunk@16785 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcpaint.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clcpaint.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/plugins/Clist_modern/src/modern_clcpaint.cpp b/plugins/Clist_modern/src/modern_clcpaint.cpp index 5a256386f5..8f1e6d7563 100644 --- a/plugins/Clist_modern/src/modern_clcpaint.cpp +++ b/plugins/Clist_modern/src/modern_clcpaint.cpp @@ -1099,7 +1099,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R // Select font
UINT uTextFormat = (dat->text_rtl ? DT_RTLREADING : 0);
- if (dat->second_line_show && dat->second_line_type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
+ if (dat->secondLine.show && dat->secondLine.type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
// Get contact time
TCHAR buf[70] = _T("");
mir_free_and_nil(pdnce->szSecondLineText);
@@ -1127,7 +1127,7 @@ void CLCPaint::_PaintRowItemsEx(HDC hdcMem, ClcData *dat, ClcContact *Drawing, R // Select font
UINT uTextFormat = (dat->text_rtl ? DT_RTLREADING : 0);
- if (dat->third_line_show && dat->third_line_type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
+ if (dat->thirdLine.show && dat->thirdLine.type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
// Get contact time
TCHAR buf[70] = _T("");
mir_free(pdnce->szThirdLineText);
@@ -2320,8 +2320,8 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT }
else if (Drawing->type == CLCIT_CONTACT && !CheckMiniMode(dat, selected)) {
int tmp;
- if (dat->second_line_show) {
- if (dat->second_line_type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
+ if (dat->secondLine.show) {
+ if (dat->secondLine.type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
// Get contact time
TCHAR buf[70] = _T("");
TimeZone_PrintDateTime(pdnce->hTimeZone, _T("t"), buf, _countof(buf), 0);
@@ -2329,7 +2329,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT pdnce->szSecondLineText = mir_tstrdup(buf);
}
- if (pdnce->szSecondLineText && pdnce->szSecondLineText[0] && free_height > dat->second_line_top_space) {
+ if (pdnce->szSecondLineText && pdnce->szSecondLineText[0] && free_height > dat->secondLine.top_space) {
ChangeToFont(hdcMem, dat, FONTID_SECONDLINE, NULL);
// Get sizes
@@ -2337,7 +2337,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT uTextFormat, dat->text_resize_smileys ? 0 : pdnce->ssSecondLine.iMaxSmileyHeight);
// Get rect
- tmp = min(free_height, dat->second_line_top_space + second_line_text_size.cy);
+ tmp = min(free_height, dat->secondLine.top_space + second_line_text_size.cy);
free_height -= tmp;
text_rc.top = free_row_rc.top + (free_height >> 1);
@@ -2351,18 +2351,18 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT selection_text_rc.top = text_rc.top;
selection_text_rc.bottom = min(selection_text_rc.bottom, selection_text_rc.top + text_size.cy);
- max_bottom_selection_border = min(max_bottom_selection_border, dat->second_line_top_space / 2);
+ max_bottom_selection_border = min(max_bottom_selection_border, dat->secondLine.top_space / 2);
}
}
- if (dat->third_line_show) {
- if (dat->third_line_type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
+ if (dat->thirdLine.show) {
+ if (dat->thirdLine.type == TEXT_CONTACT_TIME && pdnce->hTimeZone) {
// Get contact time
TCHAR buf[70] = _T("");
TimeZone_PrintDateTime(pdnce->hTimeZone, _T("t"), buf, _countof(buf), 0);
mir_free(pdnce->szThirdLineText);
pdnce->szThirdLineText = mir_tstrdup(buf);
}
- if (pdnce->szThirdLineText != NULL && pdnce->szThirdLineText[0] && free_height > dat->third_line_top_space) {
+ if (pdnce->szThirdLineText != NULL && pdnce->szThirdLineText[0] && free_height > dat->thirdLine.top_space) {
//RECT rc_tmp = free_row_rc;
ChangeToFont(hdcMem, dat, FONTID_THIRDLINE, NULL);
@@ -2372,7 +2372,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT uTextFormat, dat->text_resize_smileys ? 0 : pdnce->ssThirdLine.iMaxSmileyHeight);
// Get rect
- tmp = min(free_height, dat->third_line_top_space + third_line_text_size.cy);
+ tmp = min(free_height, dat->thirdLine.top_space + third_line_text_size.cy);
free_height -= tmp;
text_rc.top = free_row_rc.top + (free_height >> 1);
@@ -2386,7 +2386,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT selection_text_rc.top = text_rc.top;
selection_text_rc.bottom = min(selection_text_rc.bottom, selection_text_rc.top + text_size.cy);
- max_bottom_selection_border = min(max_bottom_selection_border, dat->third_line_top_space / 2);
+ max_bottom_selection_border = min(max_bottom_selection_border, dat->thirdLine.top_space / 2);
}
}
@@ -2488,7 +2488,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT }
uTextFormat &= ~DT_VCENTER;
if (second_line_text_size.cx > 0 && free_rc.bottom > free_rc.top) {
- free_rc.top += dat->second_line_top_space;
+ free_rc.top += dat->secondLine.top_space;
if (free_rc.bottom > free_rc.top) {
RECT rc = free_rc;
@@ -2506,7 +2506,7 @@ void CLCPaint::_CalcItemsPos(HDC hdcMem, ClcData *dat, ClcContact *Drawing, RECT }
if (third_line_text_size.cx > 0 && free_rc.bottom > free_rc.top) {
- free_rc.top += dat->third_line_top_space;
+ free_rc.top += dat->thirdLine.top_space;
if (free_rc.bottom > free_rc.top) {
RECT rc = free_rc;
|