summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/clist/clc.cpp2
-rw-r--r--src/modules/clist/clcmsgs.cpp6
-rw-r--r--src/modules/clist/clcutils.cpp14
3 files changed, 18 insertions, 4 deletions
diff --git a/src/modules/clist/clc.cpp b/src/modules/clist/clc.cpp
index b0dfa19bb9..e6914a6089 100644
--- a/src/modules/clist/clc.cpp
+++ b/src/modules/clist/clc.cpp
@@ -1323,7 +1323,7 @@ LRESULT CALLBACK fnContactListControlWndProc(HWND hwnd, UINT msg, WPARAM wParam,
ImageList_Destroy(dat->himlHighlight);
if (dat->hwndRenameEdit)
DestroyWindow(dat->hwndRenameEdit);
- if (!dat->bkChanged && dat->hBmpBackground)
+ if (dat->hBmpBackground)
DeleteObject(dat->hBmpBackground);
cli.pfnFreeGroup(&dat->list);
mir_free(dat);
diff --git a/src/modules/clist/clcmsgs.cpp b/src/modules/clist/clcmsgs.cpp
index 96738ab866..a3d477c871 100644
--- a/src/modules/clist/clcmsgs.cpp
+++ b/src/modules/clist/clcmsgs.cpp
@@ -331,18 +331,18 @@ LRESULT fnProcessExternalMessages(HWND hwnd, struct ClcData *dat, UINT msg, WPAR
}
case CLM_SETBKBITMAP:
- if (!dat->bkChanged && dat->hBmpBackground) {
+ if (dat->hBmpBackground) {
DeleteObject(dat->hBmpBackground);
dat->hBmpBackground = NULL;
}
- dat->hBmpBackground = (HBITMAP) lParam;
+ dat->hBmpBackground = (HBITMAP)lParam;
dat->backgroundBmpUse = wParam;
dat->bkChanged = 1;
cli.pfnInvalidateRect(hwnd, NULL, FALSE);
break;
case CLM_SETBKCOLOR:
- if (!dat->bkChanged && dat->hBmpBackground) {
+ if (dat->hBmpBackground) {
DeleteObject(dat->hBmpBackground);
dat->hBmpBackground = NULL;
}
diff --git a/src/modules/clist/clcutils.cpp b/src/modules/clist/clcutils.cpp
index 0a155c8e22..87222c1ce1 100644
--- a/src/modules/clist/clcutils.cpp
+++ b/src/modules/clist/clcutils.cpp
@@ -737,6 +737,20 @@ void fnLoadClcOptions(HWND hwnd, struct ClcData *dat, BOOL bFirst)
dat->quickSearchColour = db_get_dw(NULL, "CLC", "QuickSearchColour", CLCDEFAULT_QUICKSEARCHCOLOUR);
dat->useWindowsColours = db_get_b(NULL, "CLC", "UseWinColours", CLCDEFAULT_USEWINDOWSCOLOURS);
+ if (!dat->bkChanged) {
+ dat->bkColour = db_get_dw(NULL, "CLC", "BkColour", CLCDEFAULT_BKCOLOUR);
+ if (dat->hBmpBackground) {
+ DeleteObject(dat->hBmpBackground);
+ dat->hBmpBackground = NULL;
+ }
+ if (db_get_b(NULL, "CLC", "UseBitmap", CLCDEFAULT_USEBITMAP)) {
+ ptrT tszBitmap(db_get_tsa(NULL, "CLC", "BkBitmap"));
+ if (tszBitmap)
+ dat->hBmpBackground = (HBITMAP)CallService(MS_UTILS_LOADBITMAPT, 0, tszBitmap);
+ }
+ dat->backgroundBmpUse = db_get_w(NULL, "CLC", "BkBmpUse", CLCDEFAULT_BKBMPUSE);
+ }
+
NMHDR hdr;
hdr.code = CLN_OPTIONSCHANGED;
hdr.hwndFrom = hwnd;