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 --- src/core/stdchat/src/main.cpp | 10 +++++----- src/core/stdclist/src/clcfonts.cpp | 10 +++++----- src/core/stdmsg/src/msgoptions.cpp | 4 ++-- 3 files changed, 12 insertions(+), 12 deletions(-) (limited to 'src/core') diff --git a/src/core/stdchat/src/main.cpp b/src/core/stdchat/src/main.cpp index d12604f44e..581022c42c 100644 --- a/src/core/stdchat/src/main.cpp +++ b/src/core/stdchat/src/main.cpp @@ -292,27 +292,27 @@ static void RegisterFonts() strncpy(colourid.setting, "ColorLogBG", _countof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Group chat log background"), _countof(colourid.name)); colourid.defcolour = GetSysColor(COLOR_WINDOW); - ColourRegisterW(&colourid); + Colour_RegisterW(&colourid); strncpy(colourid.setting, "ColorMessageBG", _countof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Message background"), _countof(colourid.name)); colourid.defcolour = GetSysColor(COLOR_WINDOW); - ColourRegisterW(&colourid); + Colour_RegisterW(&colourid); strncpy(colourid.setting, "ColorNicklistBG", _countof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Nick list background"), _countof(colourid.name)); colourid.defcolour = GetSysColor(COLOR_WINDOW); - ColourRegisterW(&colourid); + Colour_RegisterW(&colourid); strncpy(colourid.setting, "ColorNicklistLines", _countof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Nick list lines"), _countof(colourid.name)); colourid.defcolour = GetSysColor(COLOR_INACTIVEBORDER); - ColourRegisterW(&colourid); + Colour_RegisterW(&colourid); strncpy(colourid.setting, "ColorNicklistSelectedBG", _countof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Nick list background (selected)"), _countof(colourid.name)); colourid.defcolour = GetSysColor(COLOR_HIGHLIGHT); - ColourRegisterW(&colourid); + Colour_RegisterW(&colourid); } static int OnCheckPlugins(WPARAM, LPARAM) diff --git a/src/core/stdclist/src/clcfonts.cpp b/src/core/stdclist/src/clcfonts.cpp index dc53eed62d..7fb8c60095 100644 --- a/src/core/stdclist/src/clcfonts.cpp +++ b/src/core/stdclist/src/clcfonts.cpp @@ -76,7 +76,7 @@ void RegisterCListFonts() mir_snprintf(idstr, "Font%d", i); strncpy(fontid.prefix, idstr, _countof(fontid.prefix)); fontid.order = i; - FontRegisterW(&fontid); + Font_RegisterW(&fontid); } ReleaseDC(NULL, hdc); @@ -90,25 +90,25 @@ void RegisterCListFonts() wcsncpy(colourid.name, LPGENW("Background"), _countof(colourid.name)); wcsncpy(colourid.group, LPGENW("Contact list"), _countof(colourid.group)); colourid.defcolour = CLCDEFAULT_BKCOLOUR; - ColourRegisterW(&colourid); + Colour_RegisterW(&colourid); strncpy(colourid.setting, "SelTextColour", sizeof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Selected text"), _countof(colourid.name)); colourid.order = 1; colourid.defcolour = CLCDEFAULT_SELTEXTCOLOUR; - ColourRegisterW(&colourid); + Colour_RegisterW(&colourid); strncpy(colourid.setting, "HotTextColour", sizeof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Hottrack text"), _countof(colourid.name)); colourid.order = 1; colourid.defcolour = CLCDEFAULT_HOTTEXTCOLOUR; - ColourRegisterW(&colourid); + Colour_RegisterW(&colourid); strncpy(colourid.setting, "QuickSearchColour", sizeof(colourid.setting)); wcsncpy(colourid.name, LPGENW("Quicksearch text"), _countof(colourid.name)); colourid.order = 1; colourid.defcolour = CLCDEFAULT_QUICKSEARCHCOLOUR; - ColourRegisterW(&colourid); + Colour_RegisterW(&colourid); HookEvent(ME_FONT_RELOAD, FS_FontsChanged); } diff --git a/src/core/stdmsg/src/msgoptions.cpp b/src/core/stdmsg/src/msgoptions.cpp index 9935c9d747..0c59ddabaa 100644 --- a/src/core/stdmsg/src/msgoptions.cpp +++ b/src/core/stdmsg/src/msgoptions.cpp @@ -117,7 +117,7 @@ void RegisterSRMMFonts(void) fontid.deffontsettings.charset = MsgDlgGetFontDefaultCharset(fontOptionsList[i].szDefFace); wcsncpy_s(fontid.backgroundGroup, LPGENW("Message log"), _TRUNCATE); wcsncpy_s(fontid.backgroundName, LPGENW("Background"), _TRUNCATE); - FontRegisterW(&fontid); + Font_RegisterW(&fontid); } ColourIDW colourid = { sizeof(colourid) }; @@ -126,7 +126,7 @@ void RegisterSRMMFonts(void) colourid.defcolour = SRMSGDEFSET_BKGCOLOUR; wcsncpy_s(colourid.name, LPGENW("Background"), _TRUNCATE); wcsncpy_s(colourid.group, LPGENW("Message log"), _TRUNCATE); - ColourRegisterW(&colourid); + Colour_RegisterW(&colourid); } ///////////////////////////////////////////////////////////////////////////////////////// -- cgit v1.2.3