summaryrefslogtreecommitdiff
path: root/plugins/Clist_nicer/src/clcutils.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-07-26 17:02:28 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-07-26 17:02:28 +0000
commite52c300401ddd8188a9fb9db307e369428cbeb19 (patch)
tree3e0b77f5a73dfd3b4ca9cfbb85701d847b0dee76 /plugins/Clist_nicer/src/clcutils.cpp
parent0aa96e0a23064eb3d2a041c2acebd30855d5245e (diff)
- unified bkChanged processing;
- clist background bitmap processing also moved to the core git-svn-id: http://svn.miranda-ng.org/main/trunk@9950 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Clist_nicer/src/clcutils.cpp')
-rw-r--r--plugins/Clist_nicer/src/clcutils.cpp41
1 files changed, 21 insertions, 20 deletions
diff --git a/plugins/Clist_nicer/src/clcutils.cpp b/plugins/Clist_nicer/src/clcutils.cpp
index 80bb802e79..632b9e0774 100644
--- a/plugins/Clist_nicer/src/clcutils.cpp
+++ b/plugins/Clist_nicer/src/clcutils.cpp
@@ -572,26 +572,29 @@ void LoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst)
dat->bkColour = cfg::getByte("CLC", "UseWinColours", CLCDEFAULT_USEWINDOWSCOLOURS) ?
GetSysColor(COLOR_3DFACE) : cfg::getDword("CLC", "BkColour", CLCDEFAULT_BKCOLOUR);
- dat->bkChanged = 0;
- if (cfg::dat.hBrushCLCBk)
- DeleteObject(cfg::dat.hBrushCLCBk);
- cfg::dat.hBrushCLCBk = CreateSolidBrush(dat->bkColour);
- if (dat->hBmpBackground) {
- if (cfg::dat.hdcPic) {
- SelectObject(cfg::dat.hdcPic, cfg::dat.hbmPicOld);
- DeleteDC(cfg::dat.hdcPic);
- cfg::dat.hdcPic = 0;
- cfg::dat.hbmPicOld = 0;
+ coreCli.pfnLoadClcOptions(hwnd, dat, bFirst);
+
+ if (!dat->bkChanged) {
+ if (cfg::dat.hBrushCLCBk)
+ DeleteObject(cfg::dat.hBrushCLCBk);
+ cfg::dat.hBrushCLCBk = CreateSolidBrush(dat->bkColour);
+ if (dat->hBmpBackground) {
+ if (cfg::dat.hdcPic) {
+ SelectObject(cfg::dat.hdcPic, cfg::dat.hbmPicOld);
+ DeleteDC(cfg::dat.hdcPic);
+ cfg::dat.hdcPic = 0;
+ cfg::dat.hbmPicOld = 0;
+ }
}
- }
- cfg::dat.bmpBackground = dat->hBmpBackground;
- if (cfg::dat.bmpBackground) {
- HDC hdcThis = GetDC(pcli->hwndContactList);
- GetObject(cfg::dat.bmpBackground, sizeof(cfg::dat.bminfoBg), &(cfg::dat.bminfoBg));
- cfg::dat.hdcPic = CreateCompatibleDC(hdcThis);
- cfg::dat.hbmPicOld = reinterpret_cast<HBITMAP>(SelectObject(cfg::dat.hdcPic, cfg::dat.bmpBackground));
- ReleaseDC(pcli->hwndContactList, hdcThis);
+ cfg::dat.bmpBackground = dat->hBmpBackground;
+ if (cfg::dat.bmpBackground) {
+ HDC hdcThis = GetDC(pcli->hwndContactList);
+ GetObject(cfg::dat.bmpBackground, sizeof(cfg::dat.bminfoBg), &(cfg::dat.bminfoBg));
+ cfg::dat.hdcPic = CreateCompatibleDC(hdcThis);
+ cfg::dat.hbmPicOld = reinterpret_cast<HBITMAP>(SelectObject(cfg::dat.hdcPic, cfg::dat.bmpBackground));
+ ReleaseDC(pcli->hwndContactList, hdcThis);
+ }
}
if (cfg::getByte("CLCExt", "EXBK_FillWallpaper", 0)) {
@@ -616,6 +619,4 @@ void LoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst)
ReleaseDC(pcli->hwndContactList, hdcThis);
}
}
-
- coreCli.pfnLoadClcOptions(hwnd, dat, bFirst);
}