From ed1449fa491e90197b78b64b52c70910f1736dd7 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Mon, 25 Jun 2012 15:05:30 +0000 Subject: dynamic fonts' options translation git-svn-id: http://svn.miranda-ng.org/main/trunk@633 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Clist_mw/CLUIFrames/cluiframes.cpp | 24 ++++++++++++------------ plugins/Clist_mw/clcfonts.cpp | 11 +++++------ 2 files changed, 17 insertions(+), 18 deletions(-) (limited to 'plugins/Clist_mw') diff --git a/plugins/Clist_mw/CLUIFrames/cluiframes.cpp b/plugins/Clist_mw/CLUIFrames/cluiframes.cpp index 3d5eb1d676..df70ff4d02 100644 --- a/plugins/Clist_mw/CLUIFrames/cluiframes.cpp +++ b/plugins/Clist_mw/CLUIFrames/cluiframes.cpp @@ -2853,18 +2853,18 @@ static int CLUIFrameOnFontChange(WPARAM wParam,LPARAM lParam) static void CLUIRegisterFonts() { - if (ServiceExists(MS_FONT_REGISTER)) { - FontID fid = {0}; - fid.cbSize = sizeof(fid); - strcpy(fid.group,LPGEN("Frames")); - strcpy(fid.name,LPGEN("TitleBarFont")); - strcpy(fid.dbSettingsGroup,"CLUIFrames"); - strcpy(fid.prefix,"FramesTitleBarFont"); - - CallService(MS_FONT_REGISTER,(WPARAM)&fid,0); - CLUIFrameOnFontChange(0,0); - HookEvent(ME_FONT_RELOAD,CLUIFrameOnFontChange); -} } + FontID fid = {0}; + fid.cbSize = sizeof(fid); + strcpy(fid.group, LPGEN("Frames")); + strcpy(fid.name, LPGEN("TitleBarFont")); + strcpy(fid.dbSettingsGroup, "CLUIFrames"); + strcpy(fid.prefix, "FramesTitleBarFont"); + FontRegister(&fid); + + CLUIFrameOnFontChange(0,0); + + HookEvent(ME_FONT_RELOAD,CLUIFrameOnFontChange); +} static int CLUIFrameOnModulesLoad(WPARAM wParam,LPARAM lParam) { diff --git a/plugins/Clist_mw/clcfonts.cpp b/plugins/Clist_mw/clcfonts.cpp index 346c53c9f3..1ad20dc2b0 100644 --- a/plugins/Clist_mw/clcfonts.cpp +++ b/plugins/Clist_mw/clcfonts.cpp @@ -99,8 +99,7 @@ void RegisterCListFonts() sprintf(idstr, "Font%d", fontListOrder[i]); strncpy(fontid.prefix, idstr, SIZEOF(fontid.prefix)); fontid.order = fontListOrder[i]; - - CallService(MS_FONT_REGISTERT, (WPARAM)&fontid, 0); + FontRegisterT(&fontid); } } @@ -113,25 +112,25 @@ void RegisterCListFonts() _tcsncpy(colourid.name, LPGENT("Background"), SIZEOF(colourid.name)); _tcsncpy(colourid.group, LPGENT("Contact List"), SIZEOF(colourid.group)); colourid.defcolour = CLCDEFAULT_BKCOLOUR; - CallService(MS_COLOUR_REGISTERT, (WPARAM)&colourid, 0); + ColourRegisterT(&colourid); strncpy(colourid.setting, "SelTextColour", sizeof(colourid.setting)); _tcsncpy(colourid.name, LPGENT("Selected Text"), SIZEOF(colourid.name)); colourid.order = 1; colourid.defcolour = CLCDEFAULT_SELTEXTCOLOUR; - CallService(MS_COLOUR_REGISTERT, (WPARAM)&colourid, 0); + ColourRegisterT(&colourid); strncpy(colourid.setting, "HotTextColour", sizeof(colourid.setting)); _tcsncpy(colourid.name, LPGENT("Hottrack Text"), SIZEOF(colourid.name)); colourid.order = 1; colourid.defcolour = CLCDEFAULT_HOTTEXTCOLOUR; - CallService(MS_COLOUR_REGISTERT, (WPARAM)&colourid, 0); + ColourRegisterT(&colourid); strncpy(colourid.setting, "QuickSearchColour", sizeof(colourid.setting)); _tcsncpy(colourid.name, LPGENT("Quicksearch Text"), SIZEOF(colourid.name)); colourid.order = 1; colourid.defcolour = CLCDEFAULT_QUICKSEARCHCOLOUR; - CallService(MS_COLOUR_REGISTERT, (WPARAM)&colourid, 0); + ColourRegisterT(&colourid); HookEvent(ME_FONT_RELOAD, FS_FontsChanged); } -- cgit v1.2.3