summaryrefslogtreecommitdiff
path: root/plugins/TrafficCounter
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/TrafficCounter
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/TrafficCounter')
-rw-r--r--plugins/TrafficCounter/src/TrafficCounter.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/plugins/TrafficCounter/src/TrafficCounter.cpp b/plugins/TrafficCounter/src/TrafficCounter.cpp
index 3739e261c1..0694b3da0b 100644
--- a/plugins/TrafficCounter/src/TrafficCounter.cpp
+++ b/plugins/TrafficCounter/src/TrafficCounter.cpp
@@ -256,7 +256,7 @@ int TrafficCounterModulesLoaded(WPARAM, LPARAM)
TrafficFontID.deffontsettings.style = 0;
mir_wstrcpy(TrafficFontID.deffontsettings.szFace, L"Arial");
TrafficFontID.order = 0;
- FontRegisterW(&TrafficFontID);
+ Font_RegisterW(&TrafficFontID);
// Регистрируем цвет фона
TrafficBackgroundColorID.cbSize = sizeof(ColourIDW);
@@ -265,7 +265,7 @@ int TrafficCounterModulesLoaded(WPARAM, LPARAM)
mir_strcpy(TrafficBackgroundColorID.dbSettingsGroup, TRAFFIC_SETTINGS_GROUP);
mir_strcpy(TrafficBackgroundColorID.setting, "FontBkColor");
TrafficBackgroundColorID.defcolour = GetSysColor(COLOR_BTNFACE);
- ColourRegisterW(&TrafficBackgroundColorID);
+ Colour_RegisterW(&TrafficBackgroundColorID);
HookEvent(ME_FONT_RELOAD, UpdateFonts);
@@ -1162,15 +1162,13 @@ int ProtocolAckHook(WPARAM, LPARAM lParam)
int UpdateFonts(WPARAM, LPARAM)
{
LOGFONT logfont;
- //if no font service
- if (!ServiceExists(MS_FONT_GETW)) return 0;
//update traffic font
if (Traffic_h_font) DeleteObject(Traffic_h_font);
- Traffic_FontColor = CallService(MS_FONT_GETW, (WPARAM)&TrafficFontID, (LPARAM)&logfont);
+ Traffic_FontColor = Font_GetW(TrafficFontID, &logfont);
Traffic_h_font = CreateFontIndirect(&logfont);
- //
+
TrafficFontHeight = abs(logfont.lfHeight) + 1;
- Traffic_BkColor = CallService(MS_COLOUR_GETW, (WPARAM)&TrafficBackgroundColorID, 0);
+ Traffic_BkColor = Colour_GetW(TrafficBackgroundColorID);
// Ключевой цвет
UseKeyColor = db_get_b(NULL, "ModernSettings", "UseKeyColor", 1);