From da2edf0603f1552ef53325fa558c28a3c6fdec94 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Thu, 16 Jan 2014 11:33:08 +0000 Subject: - two chat HBRUSHes moved into CHAT_MANAGER; - fix for changing fonts; - crash fix for StdChat unloading; git-svn-id: http://svn.miranda-ng.org/main/trunk@7677 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/chat/chat_svc.cpp | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) (limited to 'src/modules/chat/chat_svc.cpp') diff --git a/src/modules/chat/chat_svc.cpp b/src/modules/chat/chat_svc.cpp index 46586ea2c3..4e8f9b114f 100644 --- a/src/modules/chat/chat_svc.cpp +++ b/src/modules/chat/chat_svc.cpp @@ -50,16 +50,7 @@ static int FontsChanged(WPARAM wParam, LPARAM lParam) { LoadLogFonts(); - LOGFONT lf; - HFONT hFont; - int iText; - - LoadMsgDlgFont(0, &lf, NULL); - hFont = CreateFontIndirect(&lf); - iText = GetTextPixelSize(MakeTimeStamp(ci.pSettings->pszTimeStamp, time(NULL)), hFont, TRUE); - DeleteObject(hFont); - ci.pSettings->LogTextIndent = iText; - ci.pSettings->LogTextIndent = ci.pSettings->LogTextIndent * 12 / 10; + SetIndentSize(); ci.pSettings->LogIndentEnabled = (db_get_b(NULL, "Chat", "LogIndentEnabled", 1) != 0) ? TRUE : FALSE; ci.MM_FontsChanged(); @@ -71,8 +62,8 @@ static int FontsChanged(WPARAM wParam, LPARAM lParam) static int IconsChanged(WPARAM wParam, LPARAM lParam) { FreeMsgLogBitmaps(); - LoadMsgLogBitmaps(); + ci.MM_IconsChanged(); ci.SM_BroadcastMessage(NULL, GC_SETWNDPROPS, 0, 0, FALSE); return 0; @@ -84,6 +75,9 @@ static int PreShutdown(WPARAM wParam, LPARAM lParam) ci.SM_RemoveAll(); ci.MM_RemoveAll(); + + DeleteObject(ci.hListBkgBrush); + DeleteObject(ci.hListSelectedBkgBrush); return 0; } -- cgit v1.2.3