summaryrefslogtreecommitdiff
path: root/plugins/BasicHistory
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2016-10-03 16:48:12 +0000
committerGeorge Hazan <george.hazan@gmail.com>2016-10-03 16:48:12 +0000
commit0976190894d653d5062f8ef6befabf46218f2d24 (patch)
tree4a26f4baa9a535256d7220a0c04a698390cab4e5 /plugins/BasicHistory
parent3c4ccf82586be6b22380df2bc35ae4770f91651f (diff)
- 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
Diffstat (limited to 'plugins/BasicHistory')
-rw-r--r--plugins/BasicHistory/src/Options.cpp16
1 files changed, 4 insertions, 12 deletions
diff --git a/plugins/BasicHistory/src/Options.cpp b/plugins/BasicHistory/src/Options.cpp
index 6b1bf7ba1d..3e6fd6d8de 100644
--- a/plugins/BasicHistory/src/Options.cpp
+++ b/plugins/BasicHistory/src/Options.cpp
@@ -255,7 +255,7 @@ void Options::Load(void)
wcsncpy_s(fid.name, g_FontOptionsList[i].szDescr, _TRUNCATE);
wcsncpy_s(fid.backgroundName, g_FontOptionsList[i].szBackgroundName, _TRUNCATE);
fid.flags = FIDF_DEFAULTVALID | FIDF_CLASSGENERAL | g_FontOptionsList[i].flags;
- FontRegisterW(&fid);
+ Font_RegisterW(&fid);
}
strncpy_s(cid.dbSettingsGroup, "BasicHistory_Fonts", _TRUNCATE);
@@ -265,7 +265,7 @@ void Options::Load(void)
mir_snprintf(cid.setting, _countof(cid.setting), "Color%d", i);
cid.order = i;
cid.defcolour = g_ColorOptionsList[i].def;
- ColourRegisterW(&cid);
+ Colour_RegisterW(&cid);
}
hid.dwFlags = HKD_UNICODE;
@@ -412,20 +412,12 @@ void Options::Load(void)
COLORREF Options::GetFont(Fonts fontId, PLOGFONT font)
{
- FontIDW fid = { 0 };
- fid.cbSize = sizeof(FontIDW);
- wcsncpy_s(fid.group, LPGENW("History"), _TRUNCATE);
- wcsncpy_s(fid.name, g_FontOptionsList[fontId].szDescr, _TRUNCATE);
- return (COLORREF)CallService(MS_FONT_GETW, (WPARAM)&fid, (LPARAM)font);
+ return Font_GetW(LPGENW("History"), g_FontOptionsList[fontId].szDescr, font);
}
COLORREF Options::GetColor(Colors colorId)
{
- ColourIDW cid = { 0 };
- cid.cbSize = sizeof(ColourIDW);
- wcsncpy_s(cid.group, LPGENW("History"), _TRUNCATE);
- wcsncpy_s(cid.name, g_ColorOptionsList[colorId].tszName, _TRUNCATE);
- return (COLORREF)CallService(MS_COLOUR_GETW, (WPARAM)&cid, NULL);
+ return Colour_GetW(LPGENW("History"), g_ColorOptionsList[colorId].tszName);
}
void Options::Save()