diff options
author | Tobias Weimer <wishmaster51@googlemail.com> | 2014-04-27 16:07:42 +0000 |
---|---|---|
committer | Tobias Weimer <wishmaster51@googlemail.com> | 2014-04-27 16:07:42 +0000 |
commit | f3b5ee60a8e1ada21848105d839198956af6df79 (patch) | |
tree | 031c01e3c9039837fe7a7a5a1a9d853c78341630 /plugins/Popup/src/font.cpp | |
parent | 238c5baeb88885cebb530d3d988de7eeb8b2c638 (diff) |
Fixed broken font settings (fixes #658)
String "%s (colors only)" must be translated manually for each
git-svn-id: http://svn.miranda-ng.org/main/trunk@9091 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Popup/src/font.cpp')
-rw-r--r-- | plugins/Popup/src/font.cpp | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/plugins/Popup/src/font.cpp b/plugins/Popup/src/font.cpp index df6e1640ca..defe5852c6 100644 --- a/plugins/Popup/src/font.cpp +++ b/plugins/Popup/src/font.cpp @@ -29,8 +29,8 @@ void InitFonts() { // Fonts
FontIDT fid = {0};
fid.cbSize = sizeof(FontIDT);
- lstrcpy(fid.group, _T(PU_FNT_AND_COLOR));
- strcpy(fid.dbSettingsGroup, PU_FNT_AND_COLOR_DB);
+ lstrcpyn(fid.group, _T(PU_FNT_AND_COLOR), SIZEOF(fid.group));
+ strncpy(fid.dbSettingsGroup, PU_FNT_AND_COLOR_DB, SIZEOF(fid.dbSettingsGroup));
fid.flags = FIDF_DEFAULTVALID;
fid.deffontsettings.charset = DEFAULT_CHARSET;
fid.deffontsettings.size = -11;
@@ -38,32 +38,32 @@ void InitFonts() { lstrcpyn(fid.backgroundName,PU_COL_BACK_NAME, SIZEOF(fid.backgroundName));
lstrcpyn(fid.deffontsettings.szFace, _T("Tahoma"), SIZEOF(fid.deffontsettings.szFace));
- lstrcpyn(fid.name, PU_FNT_NAME_TITLE, SIZEOF(fid.name));
+ lstrcpyn(fid.name, _T(PU_FNT_NAME_TITLE), SIZEOF(fid.name));
mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_TITLE);
fid.deffontsettings.style = DBFONTF_BOLD;
fid.deffontsettings.colour = RGB(0,0,0);
FontRegisterT(&fid);
- lstrcpyn(fid.name, PU_FNT_NAME_CLOCK, SIZEOF(fid.name));
+ lstrcpyn(fid.name, _T(PU_FNT_NAME_CLOCK), SIZEOF(fid.name));
mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_CLOCK);
//fid.deffontsettings.style = DBFONTF_BOLD;
//fid.deffontsettings.colour = RGB(0,0,0);
FontRegisterT(&fid);
- lstrcpyn(fid.name, PU_FNT_NAME_TEXT, SIZEOF(fid.name));
+ lstrcpyn(fid.name, _T(PU_FNT_NAME_TEXT), SIZEOF(fid.name));
mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_TEXT);
fid.deffontsettings.style = 0;
//fid.deffontsettings.colour = RGB(0,0,0);
FontRegisterT(&fid);
- lstrcpyn(fid.name, _T("Action"), SIZEOF(fid.name));
- mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, "Action");
+ lstrcpyn(fid.name, _T(PU_FNT_NAME_ACTION), SIZEOF(fid.name));
+ mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_ACTION);
//fid.deffontsettings.style = 0;
fid.deffontsettings.colour = RGB(0,0,255);
FontRegisterT(&fid);
- lstrcpyn(fid.name, LPGENT("Hovered Action"), SIZEOF(fid.name));
- mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, "Hovered Action");
+ lstrcpyn(fid.name, _T(PU_FNT_NAME_HOVERED_ACTION), SIZEOF(fid.name));
+ mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, PU_FNT_NAME_HOVERED_ACTION);
fid.deffontsettings.style = DBFONTF_UNDERLINE;
//fid.deffontsettings.colour = RGB(0,0,255);
FontRegisterT(&fid);
@@ -100,25 +100,25 @@ void ReloadFonts() fid.cbSize = sizeof(FontIDT);
lstrcpyn(fid.group, _T(PU_FNT_AND_COLOR),SIZEOF(fid.name));
- lstrcpyn(fid.name, PU_FNT_NAME_TITLE,SIZEOF(fid.name));
- fonts.clTitle = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
- fonts.title = CreateFontIndirect(&lf);
+ lstrcpyn(fid.name, _T(PU_FNT_NAME_TITLE),SIZEOF(fid.name));
+ fonts.clTitle = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.title = CreateFontIndirect(&lf);
- lstrcpyn(fid.name, LPGENT("Clock"),SIZEOF(fid.name));
- fonts.clClock = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
- fonts.clock = CreateFontIndirect(&lf);
+ lstrcpyn(fid.name, _T(PU_FNT_NAME_CLOCK),SIZEOF(fid.name));
+ fonts.clClock = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.clock = CreateFontIndirect(&lf);
- lstrcpyn(fid.name, PU_FNT_NAME_TEXT,SIZEOF(fid.name));
- fonts.clText = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
- fonts.text = CreateFontIndirect(&lf);
+ lstrcpyn(fid.name, _T(PU_FNT_NAME_TEXT),SIZEOF(fid.name));
+ fonts.clText = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.text = CreateFontIndirect(&lf);
- lstrcpyn(fid.name, LPGENT("Action"),SIZEOF(fid.name));
- fonts.clAction = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
- fonts.action = CreateFontIndirect(&lf);
+ lstrcpyn(fid.name, _T(PU_FNT_NAME_ACTION),SIZEOF(fid.name));
+ fonts.clAction = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.action = CreateFontIndirect(&lf);
- lstrcpyn(fid.name, LPGENT("Hovered Action"),SIZEOF(fid.name));
- fonts.clActionHover = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
- fonts.actionHover = CreateFontIndirect(&lf);
+ lstrcpyn(fid.name, _T(PU_FNT_NAME_HOVERED_ACTION),SIZEOF(fid.name));
+ fonts.clActionHover = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
+ fonts.actionHover = CreateFontIndirect(&lf);
ColourIDT cid = {0};
cid.cbSize = sizeof(ColourIDT);
|