diff options
author | George Hazan <george.hazan@gmail.com> | 2016-10-03 16:48:12 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2016-10-03 16:48:12 +0000 |
commit | 0976190894d653d5062f8ef6befabf46218f2d24 (patch) | |
tree | 4a26f4baa9a535256d7220a0c04a698390cab4e5 /plugins/TooltipNotify | |
parent | 3c4ccf82586be6b22380df2bc35ae4770f91651f (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/TooltipNotify')
-rw-r--r-- | plugins/TooltipNotify/src/TooltipNotify.cpp | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/plugins/TooltipNotify/src/TooltipNotify.cpp b/plugins/TooltipNotify/src/TooltipNotify.cpp index 3008beffb2..864fad80c1 100644 --- a/plugins/TooltipNotify/src/TooltipNotify.cpp +++ b/plugins/TooltipNotify/src/TooltipNotify.cpp @@ -95,11 +95,11 @@ void CTooltipNotify::RegisterFonts() wcsncpy(fontId.name, s_fontTable[i].name, _countof(fontId.name) - 1);
strncpy(fontId.prefix, s_fontTable[i].fontPrefix, _countof(fontId.prefix) - 1);
wcsncpy(fontId.backgroundName, s_fontTable[i].name, _countof(fontId.backgroundName) - 1);
- ::FontRegisterW(&fontId);
+ ::Font_RegisterW(&fontId);
wcsncpy(colorId.name, s_fontTable[i].name, _countof(colorId.name) - 1);
strncpy(colorId.setting, s_fontTable[i].clrPrefix, _countof(colorId.setting) - 1);
- ::ColourRegisterW(&colorId);
+ ::Colour_RegisterW(&colorId);
}
}
@@ -111,17 +111,12 @@ void CTooltipNotify::GetFont(int iStatus, LOGFONT* lf, COLORREF* text, COLORREF* fontName = s_fontTable[i].name;
}
}
- if (fontName == 0) {
+ if (fontName == 0)
fontName = s_fontTable[_countof(s_fontTable) - 1].name;
- }
// name and group only
- FontIDW fontId = { sizeof(fontId), FONTSERV_GROUP, 0 };
- wcsncpy(fontId.name, fontName, _countof(fontId.name) - 1);
- *text = (COLORREF)::CallService(MS_FONT_GETW, (WPARAM)&fontId, (LPARAM)lf);
- ColourIDW colorId = { sizeof(colorId), FONTSERV_GROUP, 0 };
- wcsncpy(colorId.name, fontName, _countof(colorId.name) - 1);
- *bg = (COLORREF)::CallService(MS_COLOUR_GETW, (WPARAM)&colorId, 0);
+ *text = ::Font_GetW(FONTSERV_GROUP, fontName, lf);
+ *bg = ::Colour_GetW(FONTSERV_GROUP, fontName);
}
int CTooltipNotify::ModulesLoaded(WPARAM, LPARAM)
|