From 0976190894d653d5062f8ef6befabf46218f2d24 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 3 Oct 2016 16:48:12 +0000 Subject: - inlined helpers for fonts, colors & effects creation replaced with functions; - services for getting fonts, colors & effects removed; - some memory corruptions removed git-svn-id: http://svn.miranda-ng.org/main/trunk@17347 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_modern/src/modern_clcopts.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'plugins/Clist_modern/src') diff --git a/plugins/Clist_modern/src/modern_clcopts.cpp b/plugins/Clist_modern/src/modern_clcopts.cpp index f3c9ae692a..a7ab4ba676 100644 --- a/plugins/Clist_modern/src/modern_clcopts.cpp +++ b/plugins/Clist_modern/src/modern_clcopts.cpp @@ -150,7 +150,7 @@ void RegisterCLUIFonts(void) fontid.deffontsettings.style = fontOptionsList[i].defStyle; mir_wstrncpy(fontid.deffontsettings.szFace, fontOptionsList[i].szDefFace, _countof(fontid.deffontsettings.szFace)); - FontRegisterW(&fontid); + Font_RegisterW(&fontid); mir_wstrncpy(effectid.group, fontOptionsList[i].szGroup, _countof(effectid.group)); mir_wstrncpy(effectid.name, fontOptionsList[i].szDescr, _countof(effectid.name)); @@ -162,7 +162,7 @@ void RegisterCLUIFonts(void) effectid.defeffect.baseColour = fontOptionsList[i].defeffect.baseColour; effectid.defeffect.secondaryColour = fontOptionsList[i].defeffect.secondaryColour; - EffectRegisterW(&effectid); + Effect_RegisterW(&effectid); } ColourIDW colourid = { 0 }; @@ -175,7 +175,7 @@ void RegisterCLUIFonts(void) mir_strncpy(colourid.dbSettingsGroup, colourOptionsList[i].chGroup, _countof(colourid.dbSettingsGroup)); colourid.defcolour = colourOptionsList[i].defColour; colourid.order = i + 1; - ColourRegisterW(&colourid); + Colour_RegisterW(&colourid); } registered = true; } @@ -203,12 +203,7 @@ void GetFontSetting(int i, LOGFONT *lf, COLORREF *colour, BYTE *effect, COLORREF if (index == _countof(fontOptionsList)) return; - FontIDW fontid = { 0 }; - fontid.cbSize = sizeof(fontid); - mir_wstrncpy(fontid.group, fontOptionsList[index].szGroup, _countof(fontid.group)); - mir_wstrncpy(fontid.name, fontOptionsList[index].szDescr, _countof(fontid.name)); - - COLORREF col = CallService(MS_FONT_GETW, (WPARAM)&fontid, (LPARAM)lf); + COLORREF col = Font_GetW(fontOptionsList[index].szGroup, fontOptionsList[index].szDescr, lf); if (colour) *colour = col; -- cgit v1.2.3