summaryrefslogtreecommitdiff
path: root/plugins/Clist_modern/src/modern_clcutils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-06-01 11:02:25 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-06-01 11:02:25 +0000
commitfd23c78f121f3f1d07d97d657c617b46b25c614f (patch)
tree6fc12a82ed0e537228e6c712d0c571afcdf10e1c /plugins/Clist_modern/src/modern_clcutils.cpp
parentea68d4474bb7329a5e59e0388b88155b96f31f7c (diff)
- finally clist_modern's own rebuild all function got wiped out;
- massive removal of duplicate code; - code cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@16894 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_modern/src/modern_clcutils.cpp')
-rw-r--r--plugins/Clist_modern/src/modern_clcutils.cpp28
1 files changed, 13 insertions, 15 deletions
diff --git a/plugins/Clist_modern/src/modern_clcutils.cpp b/plugins/Clist_modern/src/modern_clcutils.cpp
index b5d01c3a08..34050275bf 100644
--- a/plugins/Clist_modern/src/modern_clcutils.cpp
+++ b/plugins/Clist_modern/src/modern_clcutils.cpp
@@ -151,13 +151,12 @@ void cliScrollTo(HWND hwnd, ClcData *dat, int desty, int noSmooth)
dat->yScroll = oldy + (desty - oldy)*(int)(nowTick - startTick) / dat->scrollTime;
if (/*dat->backgroundBmpUse&CLBF_SCROLL || dat->hBmpBackground == NULL && */FALSE)
ScrollWindowEx(hwnd, 0, previousy - dat->yScroll, NULL, NULL, NULL, NULL, SW_INVALIDATE);
- else {
- CallService(MS_SKINENG_UPTATEFRAMEIMAGE, (WPARAM)hwnd, (LPARAM)0);
- //InvalidateRectZ(hwnd,NULL,FALSE);
- }
+ else
+ CallService(MS_SKINENG_UPTATEFRAMEIMAGE, (WPARAM)hwnd, 0);
+
previousy = dat->yScroll;
SetScrollPos(hwnd, SB_VERT, dat->yScroll, TRUE);
- CallService(MS_SKINENG_UPTATEFRAMEIMAGE, (WPARAM)hwnd, (LPARAM)0);
+ CallService(MS_SKINENG_UPTATEFRAMEIMAGE, (WPARAM)hwnd, 0);
UpdateWindow(hwnd);
}
}
@@ -430,14 +429,13 @@ void LoadCLCFonts(HWND hwnd, ClcData *dat)
HFONT holdfont = (HFONT)GetCurrentObject(hdc, OBJ_FONT);
for (int i = 0; i <= FONTID_MODERN_MAX; i++) {
- if (!dat->fontModernInfo[i].changed && dat->fontModernInfo[i].hFont) {
+ if (!dat->fontModernInfo[i].changed && dat->fontModernInfo[i].hFont)
DeleteObject(dat->fontModernInfo[i].hFont);
- }
- LOGFONT lf;
// Issue 40: Do not reload font colors for embedded clists
// Parent window is responsible to re-set fonts colors if needed
- GetFontSetting(i, &lf, dat->force_in_dialog ? NULL : &dat->fontModernInfo[i].colour, &dat->fontModernInfo[i].effect, &dat->fontModernInfo[i].effectColour1, &dat->fontModernInfo[i].effectColour2);
+ LOGFONT lf;
+ GetFontSetting(i, &lf, dat->bForceInDialog ? NULL : &dat->fontModernInfo[i].colour, &dat->fontModernInfo[i].effect, &dat->fontModernInfo[i].effectColour1, &dat->fontModernInfo[i].effectColour2);
dat->fontModernInfo[i].hFont = CreateFontIndirect(&lf);
dat->fontModernInfo[i].changed = 0;
@@ -450,7 +448,7 @@ void LoadCLCFonts(HWND hwnd, ClcData *dat)
ReleaseDC(hwnd, hdc);
}
-void LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst)
+void cli_LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst)
{
g_CluiData.fDisableSkinEngine = db_get_b(NULL, "ModernData", "DisableEngine", SETTING_DISABLESKIN_DEFAULT);
@@ -596,7 +594,7 @@ void LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst)
else memset(&dat->thirdLine, 0, sizeof(dat->thirdLine));
dat->rightMargin = db_get_b(NULL, "CLC", "RightMargin", CLCDEFAULT_RIGHTMARGIN);
- dat->force_in_dialog = (pcli->hwndContactTree) ? (hwnd != pcli->hwndContactTree) : 0;
+ dat->bForceInDialog = (pcli->hwndContactTree) ? (hwnd != pcli->hwndContactTree) : 0;
dat->subIndent = db_get_b(NULL, "CLC", "SubIndent", CLCDEFAULT_GROUPINDENT);
if (dat->hBmpBackground) { DeleteObject(dat->hBmpBackground); dat->hBmpBackground = NULL; }
@@ -620,13 +618,13 @@ void LoadCLCOptions(HWND hwnd, ClcData *dat, BOOL bFirst)
dat->IsMetaContactsEnabled = (!(GetWindowLongPtr(hwnd, GWL_STYLE)&CLS_MANUALUPDATE)) && db_get_b(NULL, META_PROTO, "Enabled", 1);
if (pcli->hwndContactTree == NULL || dat->hWnd == pcli->hwndContactTree)
- dat->MetaIgnoreEmptyExtra = db_get_b(NULL, "CLC", "MetaIgnoreEmptyExtra", SETTING_METAIGNOREEMPTYEXTRA_DEFAULT);
+ dat->bMetaIgnoreEmptyExtra = db_get_b(NULL, "CLC", "bMetaIgnoreEmptyExtra", SETTING_METAIGNOREEMPTYEXTRA_DEFAULT) != 0;
else
- dat->MetaIgnoreEmptyExtra = FALSE;
+ dat->bMetaIgnoreEmptyExtra = false;
- dat->expandMeta = db_get_b(NULL, "CLC", "MetaExpanding", SETTING_METAEXPANDING_DEFAULT);
- dat->useMetaIcon = db_get_b(NULL, "CLC", "Meta", SETTING_USEMETAICON_DEFAULT);
+ dat->bMetaExpanding = db_get_b(NULL, "CLC", "MetaExpanding", SETTING_METAEXPANDING_DEFAULT) != 0;
+ dat->bPlaceOfflineToRoot = db_get_b(NULL, "CList", "PlaceOfflineToRoot", SETTING_PLACEOFFLINETOROOT_DEFAULT) != 0;
dat->drawOverlayedStatus = db_get_b(NULL, "CLC", "DrawOverlayedStatus", SETTING_DRAWOVERLAYEDSTATUS_DEFAULT);
dat->dbbMetaHideExtra = db_get_b(NULL, "CLC", "MetaHideExtra", SETTING_METAHIDEEXTRA_DEFAULT);