diff options
author | George Hazan <george.hazan@gmail.com> | 2016-05-23 13:32:02 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-05-23 13:32:02 +0000 |
commit | c8b51e0745cc481644752d29c1c779e14e3530bb (patch) | |
tree | 4e160962d2c13cccb8dc39f29a897c3f84487f6a /plugins/Clist_modern/src/modern_clcutils.cpp | |
parent | 0c4dc97b703e93e2503c9cabedaa6c42984d0f00 (diff) |
- optimization in cli_SaveStateAndRebuildList applied to all clists (bLockScrollbar);
- boolean variables were made bool;
git-svn-id: http://svn.miranda-ng.org/main/trunk@16863 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcutils.cpp')
-rw-r--r-- | plugins/Clist_modern/src/modern_clcutils.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp index 29ca5e9ceb..46fc22fb79 100644 --- a/plugins/Clist_modern/src/modern_clcutils.cpp +++ b/plugins/Clist_modern/src/modern_clcutils.cpp @@ -168,7 +168,8 @@ void cliScrollTo(HWND hwnd, ClcData *dat, int desty, int noSmooth) void cliRecalcScrollBar(HWND hwnd, ClcData *dat)
{
- if (LOCK_RECALC_SCROLLBAR) return;
+ if (dat->bLockScrollbar)
+ return;
RowHeights_CalcRowHeights(dat, hwnd);
@@ -199,8 +200,8 @@ void cliRecalcScrollBar(HWND hwnd, ClcData *dat) si.nPos = dat->yScroll;
if (GetWindowLongPtr(hwnd, GWL_STYLE)&CLS_CONTACTLIST) {
- if (dat->noVScrollbar == 0) SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
- //else SetScrollInfo(hwnd,SB_VERT,&si,FALSE);
+ if (!dat->bNoVScrollbar)
+ SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
}
else SetScrollInfo(hwnd, SB_VERT, &si, TRUE);
@@ -641,7 +642,7 @@ void LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst) dat->selTextColour = db_get_dw(NULL, "CLC", "SelTextColour", CLCDEFAULT_MODERN_SELTEXTCOLOUR);
dat->hotTextColour = db_get_dw(NULL, "CLC", "HotTextColour", CLCDEFAULT_MODERN_HOTTEXTCOLOUR);
dat->quickSearchColour = db_get_dw(NULL, "CLC", "QuickSearchColour", CLCDEFAULT_MODERN_QUICKSEARCHCOLOUR);
- dat->useWindowsColours = false; // because it's missing in the options
+ dat->bUseWindowsColours = false; // because it's missing in the options
}
int ExpandMetaContact(HWND hwnd, ClcContact *contact, ClcData *dat, BOOL bExpand)
@@ -652,7 +653,7 @@ int ExpandMetaContact(HWND hwnd, ClcContact *contact, ClcData *dat, BOOL bExpand contact->SubExpanded = bExpand;
db_set_b(contact->hContact, "CList", "Expanded", contact->SubExpanded);
- dat->needsResort = 1;
+ dat->bNeedsResort = true;
pcli->pfnSortCLC(hwnd, dat, 1);
cliRecalcScrollBar(hwnd, dat);
return contact->SubExpanded;
@@ -677,7 +678,7 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk) contact = group->cl.items[group->scanIndex];
if (contact->type != CLCIT_DIVIDER) {
bool found;
- if (dat->filterSearch) {
+ if (dat->bFilterSearch) {
TCHAR *lowered_szText = CharLowerW(NEWTSTR_ALLOCA(contact->szText));
TCHAR *lowered_text = CharLowerW(NEWTSTR_ALLOCA(text));
found = _tcsstr(lowered_szText, lowered_text) != NULL;
@@ -707,7 +708,7 @@ int cliFindRowByText(HWND hwnd, ClcData *dat, const TCHAR *text, int prefixOk) ClcContact *subcontact = &(contact->subcontacts[i]);
bool found;
- if (dat->filterSearch) {
+ if (dat->bFilterSearch) {
TCHAR *lowered_szText = CharLowerW(NEWTSTR_ALLOCA(subcontact->szText));
TCHAR *lowered_text = CharLowerW(NEWTSTR_ALLOCA(text));
found = _tcsstr(lowered_szText, lowered_text) != NULL;
|