summaryrefslogtreecommitdiff
path: root/src/modules/chat/chat_svc.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2014-01-16 11:33:08 +0000
committerGeorge Hazan <george.hazan@gmail.com>2014-01-16 11:33:08 +0000
commitda2edf0603f1552ef53325fa558c28a3c6fdec94 (patch)
treed8e7844e7ae6c42cb53559ab1e5fcd5aa4bfa6bf /src/modules/chat/chat_svc.cpp
parent38ab4dde6b080defc5e7d7b286110d580cabdaa0 (diff)
- 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
Diffstat (limited to 'src/modules/chat/chat_svc.cpp')
-rw-r--r--src/modules/chat/chat_svc.cpp16
1 files changed, 5 insertions, 11 deletions
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;
}