diff options
author | George Hazan <george.hazan@gmail.com> | 2012-06-25 15:05:30 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-06-25 15:05:30 +0000 |
commit | ed1449fa491e90197b78b64b52c70910f1736dd7 (patch) | |
tree | 208788e9ee24ec2bcd90a4f4d7a166a534baa53e /protocols | |
parent | 2a06d7b1dbe99233e078819c78956e346175b420 (diff) |
dynamic fonts' options translation
git-svn-id: http://svn.miranda-ng.org/main/trunk@633 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols')
-rw-r--r-- | protocols/JabberG/jabber.cpp | 6 | ||||
-rw-r--r-- | protocols/Weather/weather_mwin.cpp | 15 |
2 files changed, 8 insertions, 13 deletions
diff --git a/protocols/JabberG/jabber.cpp b/protocols/JabberG/jabber.cpp index b571e06bbf..d265df4fc8 100644 --- a/protocols/JabberG/jabber.cpp +++ b/protocols/JabberG/jabber.cpp @@ -188,12 +188,12 @@ static int OnModulesLoaded( WPARAM, LPARAM ) strcpy(fontid.name, "Frame title");
strcpy(fontid.prefix, "fntFrameTitle");
fontid.deffontsettings.style = DBFONTF_BOLD;
- CallService(MS_FONT_REGISTER, (WPARAM)&fontid, 0);
+ FontRegister(&fontid);
strcpy(fontid.name, "Frame text");
strcpy(fontid.prefix, "fntFrameClock");
fontid.deffontsettings.style = 0;
- CallService(MS_FONT_REGISTER, (WPARAM)&fontid, 0);
+ FontRegister(&fontid);
ColourID colourid = {0};
colourid.cbSize = sizeof(colourid);
@@ -203,7 +203,7 @@ static int OnModulesLoaded( WPARAM, LPARAM ) strcpy(colourid.name, "Background");
strcpy(colourid.setting, "clFrameBack");
colourid.defcolour = GetSysColor(COLOR_WINDOW);
- CallService(MS_COLOUR_REGISTER, (WPARAM)&colourid, 0);
+ ColourRegister(&colourid);
// Init extra icons
hExtraActivity = ExtraIcon_Register("activity", "Jabber Activity" /* No icons registered, "working" */);
diff --git a/protocols/Weather/weather_mwin.cpp b/protocols/Weather/weather_mwin.cpp index 4c43cc2afe..4e4fd125bd 100644 --- a/protocols/Weather/weather_mwin.cpp +++ b/protocols/Weather/weather_mwin.cpp @@ -373,19 +373,16 @@ void InitMwin(void) }
{
- FontID fontid = {0};
ColourID colourid = {0};
- HDC hdc;
-
colourid.cbSize = sizeof(ColourID);
strcpy(colourid.dbSettingsGroup, WEATHERPROTONAME);
strcpy(colourid.setting, "ColorMwinFrame");
strcpy(colourid.name, "Frame Background");
strcpy(colourid.group, WEATHERPROTONAME);
colourid.defcolour = GetSysColor(COLOR_3DFACE);
+ ColourRegister(&colourid);
- CallService(MS_COLOUR_REGISTER, (WPARAM)&colourid, 0);
-
+ FontID fontid = {0};
fontid.cbSize = sizeof(FontID);
fontid.flags = FIDF_ALLOWREREGISTER | FIDF_DEFAULTVALID;
strcpy(fontid.dbSettingsGroup, WEATHERPROTONAME);
@@ -393,7 +390,7 @@ void InitMwin(void) strcpy(fontid.name, "Frame Font");
strcpy(fontid.prefix, "fnt0");
- hdc = GetDC(NULL);
+ HDC hdc = GetDC(NULL);
fontid.deffontsettings.size = -13;
ReleaseDC(0, hdc);
@@ -401,14 +398,12 @@ void InitMwin(void) strcpy(fontid.deffontsettings.szFace, "Verdana");
strcpy(fontid.backgroundGroup, WEATHERPROTONAME);
strcpy(fontid.backgroundName, "Frame Background");
-
- CallService(MS_FONT_REGISTER, (WPARAM)&fontid, 0);
+ FontRegister(&fontid);
fontid.deffontsettings.style = DBFONTF_BOLD;
strcpy(fontid.name, "Frame Title Font");
strcpy(fontid.prefix, "fnt1");
-
- CallService(MS_FONT_REGISTER, (WPARAM)&fontid, 0);
+ FontRegister(&fontid);
}
hContact = (HANDLE)CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
|