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/Weather/src | |
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/Weather/src')
-rw-r--r-- | plugins/Weather/src/weather_mwin.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/plugins/Weather/src/weather_mwin.cpp b/plugins/Weather/src/weather_mwin.cpp index d51d9e6606..14266b6a4f 100644 --- a/plugins/Weather/src/weather_mwin.cpp +++ b/plugins/Weather/src/weather_mwin.cpp @@ -155,16 +155,8 @@ static LRESULT CALLBACK wndProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPara }
clr = db_get_dw(NULL, WEATHERPROTONAME, "ColorMwinFrame", GetSysColor(COLOR_3DFACE));
-
- {
- FontIDW fntid = { 0 };
- mir_wstrcpy(fntid.group, _A2W(WEATHERPROTONAME));
- mir_wstrcpy(fntid.name, LPGENW("Frame Font"));
- fntc = CallService(MS_FONT_GETW, (WPARAM)&fntid, (LPARAM)&lfnt);
-
- mir_wstrcpy(fntid.name, LPGENW("Frame Title Font"));
- fntc1 = CallService(MS_FONT_GETW, (WPARAM)&fntid, (LPARAM)&lfnt1);
- }
+ fntc = Font_GetW(_A2W(WEATHERPROTONAME), LPGENW("Frame Font"), &lfnt);
+ fntc1 = Font_GetW(_A2W(WEATHERPROTONAME), LPGENW("Frame Title Font"), &lfnt1);
ptrW tszInfo(db_get_wsa(data->hContact, WEATHERCONDITION, "WeatherInfo"));
@@ -331,7 +323,7 @@ void InitMwin(void) mir_wstrcpy(colourid.name, LPGENW("Frame Background"));
mir_wstrcpy(colourid.group, _A2W(WEATHERPROTONAME));
colourid.defcolour = GetSysColor(COLOR_3DFACE);
- ColourRegisterW(&colourid);
+ Colour_RegisterW(&colourid);
FontIDW fontid = { 0 };
fontid.cbSize = sizeof(FontIDW);
@@ -349,12 +341,12 @@ void InitMwin(void) mir_wstrcpy(fontid.deffontsettings.szFace, L"Verdana");
mir_wstrcpy(fontid.backgroundGroup, _A2W(WEATHERPROTONAME));
mir_wstrcpy(fontid.backgroundName, LPGENW("Frame Background"));
- FontRegisterW(&fontid);
+ Font_RegisterW(&fontid);
fontid.deffontsettings.style = DBFONTF_BOLD;
mir_wstrcpy(fontid.name, LPGENW("Frame Title Font"));
mir_strcpy(fontid.prefix, "fnt1");
- FontRegisterW(&fontid);
+ Font_RegisterW(&fontid);
for (MCONTACT hContact = db_find_first(WEATHERPROTONAME); hContact; hContact = db_find_next(hContact, WEATHERPROTONAME))
if (db_get_dw(hContact, WEATHERPROTONAME, "mwin", 0))
|