summaryrefslogtreecommitdiff
path: root/protocols/JabberG
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 /protocols/JabberG
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 'protocols/JabberG')
-rw-r--r--protocols/JabberG/src/jabber.cpp6
-rw-r--r--protocols/JabberG/src/jabber_frame.cpp16
2 files changed, 6 insertions, 16 deletions
diff --git a/protocols/JabberG/src/jabber.cpp b/protocols/JabberG/src/jabber.cpp
index ff4ec8afe3..5b1ad552b1 100644
--- a/protocols/JabberG/src/jabber.cpp
+++ b/protocols/JabberG/src/jabber.cpp
@@ -142,12 +142,12 @@ static int OnModulesLoaded(WPARAM, LPARAM)
wcsncpy_s(fontid.name, LPGENW("Frame title"), _TRUNCATE);
strncpy_s(fontid.prefix, "fntFrameTitle", _TRUNCATE);
fontid.deffontsettings.style = DBFONTF_BOLD;
- FontRegisterW(&fontid);
+ Font_RegisterW(&fontid);
wcsncpy_s(fontid.name, LPGENW("Frame text"), _TRUNCATE);
strncpy_s(fontid.prefix, "fntFrameClock", _TRUNCATE);
fontid.deffontsettings.style = 0;
- FontRegisterW(&fontid);
+ Font_RegisterW(&fontid);
ColourIDW colourid = {0};
colourid.cbSize = sizeof(colourid);
@@ -157,7 +157,7 @@ static int OnModulesLoaded(WPARAM, LPARAM)
wcsncpy_s(colourid.name, L"Background", _TRUNCATE);
strncpy_s(colourid.setting, "clFrameBack", _TRUNCATE);
colourid.defcolour = GetSysColor(COLOR_WINDOW);
- ColourRegisterW(&colourid);
+ Colour_RegisterW(&colourid);
return 0;
}
diff --git a/protocols/JabberG/src/jabber_frame.cpp b/protocols/JabberG/src/jabber_frame.cpp
index be116dc5ae..acf6098cde 100644
--- a/protocols/JabberG/src/jabber_frame.cpp
+++ b/protocols/JabberG/src/jabber_frame.cpp
@@ -239,25 +239,15 @@ void CJabberInfoFrame::Update()
void CJabberInfoFrame::ReloadFonts()
{
LOGFONT lfFont;
-
- FontIDW fontid = {0};
- fontid.cbSize = sizeof(fontid);
- wcsncpy_s(fontid.group, L"Jabber", _TRUNCATE);
- wcsncpy_s(fontid.name, L"Frame title", _TRUNCATE);
- m_clTitle = CallService(MS_FONT_GETW, (WPARAM)&fontid, (LPARAM)&lfFont);
+ m_clTitle = Font_GetW(L"Jabber", L"Frame title", &lfFont);
DeleteObject(m_hfntTitle);
m_hfntTitle = CreateFontIndirect(&lfFont);
- wcsncpy_s(fontid.name, L"Frame text", _TRUNCATE);
- m_clText = CallService(MS_FONT_GETW, (WPARAM)&fontid, (LPARAM)&lfFont);
+ m_clText = Font_GetW(L"Jabber", L"Frame text",&lfFont);
DeleteObject(m_hfntText);
m_hfntText = CreateFontIndirect(&lfFont);
- ColourIDW colourid = {0};
- colourid.cbSize = sizeof(colourid);
- wcsncpy_s(colourid.group, L"Jabber", _TRUNCATE);
- wcsncpy_s(colourid.name, L"Background", _TRUNCATE);
- m_clBack = CallService(MS_COLOUR_GETW, (WPARAM)&colourid, 0);
+ m_clBack = Colour_GetW(L"Jabber", L"Background");
UpdateSize();
}