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/NotesAndReminders/src/options.cpp | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'plugins/NotesAndReminders/src/options.cpp') diff --git a/plugins/NotesAndReminders/src/options.cpp b/plugins/NotesAndReminders/src/options.cpp index aa9a47e53b..b1de471297 100644 --- a/plugins/NotesAndReminders/src/options.cpp +++ b/plugins/NotesAndReminders/src/options.cpp @@ -253,7 +253,7 @@ void RegisterFontServiceFonts() strncpy(fontid.deffontsettings.szFace, fontOptionsList[i].szDefFace, _countof(fontid.deffontsettings.szFace)); strncpy(fontid.backgroundName, fontOptionsList[i].szBkgName, _countof(fontid.backgroundName)); - FontRegister(&fontid); + Font_Register(&fontid); } ColourID colorid = { 0 }; @@ -269,7 +269,7 @@ void RegisterFontServiceFonts() colorid.defcolour = colourOptionsList[i].defColour; strncpy(colorid.setting, colourOptionsList[i].szSettingName, _countof(colorid.setting)); - ColourRegister(&colorid); + Colour_Register(&colorid); } hkFontChange = HookEvent(ME_FONT_RELOAD, FS_FontsChanged); @@ -278,12 +278,7 @@ void RegisterFontServiceFonts() void LoadNRFont(int i, LOGFONT *lf, COLORREF *colour) { - FontID fontid = { 0 }; - fontid.cbSize = sizeof(fontid); - strncpy(fontid.group, LPGEN(SECTIONNAME), _countof(fontid.group)); - strncpy(fontid.name, fontOptionsList[i].szDescr, _countof(fontid.name)); - - COLORREF col = CallService(MS_FONT_GET, (WPARAM)&fontid, (LPARAM)lf); + COLORREF col = Font_Get(SECTIONNAME, fontOptionsList[i].szDescr, lf); if (colour) *colour = col; } -- cgit v1.2.3