summaryrefslogtreecommitdiff
path: root/plugins/Popup/src/font.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/Popup/src/font.cpp')
-rw-r--r--plugins/Popup/src/font.cpp48
1 files changed, 24 insertions, 24 deletions
diff --git a/plugins/Popup/src/font.cpp b/plugins/Popup/src/font.cpp
index fca4c1cf12..df6e1640ca 100644
--- a/plugins/Popup/src/font.cpp
+++ b/plugins/Popup/src/font.cpp
@@ -34,35 +34,35 @@ void InitFonts() {
fid.flags = FIDF_DEFAULTVALID;
fid.deffontsettings.charset = DEFAULT_CHARSET;
fid.deffontsettings.size = -11;
- lstrcpy(fid.backgroundGroup,_T(PU_FNT_AND_COLOR));
- lstrcpy(fid.backgroundName,_T(PU_COL_BACK_NAME));
- lstrcpy(fid.deffontsettings.szFace, _T("Tahoma"));
+ lstrcpyn(fid.backgroundGroup,_T(PU_FNT_AND_COLOR), SIZEOF(fid.backgroundGroup));
+ lstrcpyn(fid.backgroundName,PU_COL_BACK_NAME, SIZEOF(fid.backgroundName));
+ lstrcpyn(fid.deffontsettings.szFace, _T("Tahoma"), SIZEOF(fid.deffontsettings.szFace));
- lstrcpy(fid.name, _T(PU_FNT_NAME_TITLE));
+ lstrcpyn(fid.name, 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);
- lstrcpy(fid.name, _T(PU_FNT_NAME_CLOCK));
+ lstrcpyn(fid.name, 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);
- lstrcpy(fid.name, _T(PU_FNT_NAME_TEXT));
+ lstrcpyn(fid.name, 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);
- lstrcpy(fid.name, _T("Action"));
+ lstrcpyn(fid.name, _T("Action"), SIZEOF(fid.name));
mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, "Action");
//fid.deffontsettings.style = 0;
fid.deffontsettings.colour = RGB(0,0,255);
FontRegisterT(&fid);
- lstrcpy(fid.name, LPGENT("Hovered Action"));
+ lstrcpyn(fid.name, LPGENT("Hovered Action"), SIZEOF(fid.name));
mir_snprintf(fid.prefix, sizeof(fid.prefix), PU_FNT_PREFIX, "Hovered Action");
fid.deffontsettings.style = DBFONTF_UNDERLINE;
//fid.deffontsettings.colour = RGB(0,0,255);
@@ -70,16 +70,16 @@ void InitFonts() {
ColourIDT cid = {0};
cid.cbSize = sizeof(ColourIDT);
- lstrcpy(cid.group, _T(PU_FNT_AND_COLOR));
- strcpy(cid.dbSettingsGroup, PU_FNT_AND_COLOR_DB);
+ lstrcpyn(cid.group, _T(PU_FNT_AND_COLOR), SIZEOF(cid.group));
+ strncpy(cid.dbSettingsGroup, PU_FNT_AND_COLOR_DB, SIZEOF(cid.dbSettingsGroup));
- lstrcpy(cid.name, _T(PU_COL_BACK_NAME));
- strcpy(cid.setting, PU_COL_BACK_SETTING);
+ lstrcpyn(cid.name, PU_COL_BACK_NAME, SIZEOF(cid.name));
+ strncpy(cid.setting, PU_COL_BACK_SETTING, SIZEOF(cid.setting));
cid.defcolour = SETTING_BACKCOLOUR_DEFAULT;
ColourRegisterT(&cid);
- lstrcpy(cid.name, _T(PU_COL_AVAT_NAME));
- strcpy(cid.setting, PU_COL_AVAT_SETTING);
+ lstrcpyn(cid.name, PU_COL_AVAT_NAME, SIZEOF(cid.name));
+ strncpy(cid.setting, PU_COL_AVAT_SETTING, SIZEOF(cid.setting));
cid.defcolour = SETTING_TEXTCOLOUR_DEFAULT;
ColourRegisterT(&cid);
@@ -98,36 +98,36 @@ void ReloadFonts()
LOGFONT lf = {0};
FontIDT fid = {0};
fid.cbSize = sizeof(FontIDT);
- lstrcpy(fid.group, _T(PU_FNT_AND_COLOR));
+ lstrcpyn(fid.group, _T(PU_FNT_AND_COLOR),SIZEOF(fid.name));
- lstrcpy(fid.name, _T(PU_FNT_NAME_TITLE));
+ 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);
- lstrcpy(fid.name, LPGENT("Clock"));
+ lstrcpyn(fid.name, LPGENT("Clock"),SIZEOF(fid.name));
fonts.clClock = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
fonts.clock = CreateFontIndirect(&lf);
- lstrcpy(fid.name, _T(PU_FNT_NAME_TEXT));
+ 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);
- lstrcpy(fid.name, _T("Action"));
+ lstrcpyn(fid.name, LPGENT("Action"),SIZEOF(fid.name));
fonts.clAction = (COLORREF)CallService(MS_FONT_GETT, (WPARAM)&fid, (LPARAM)&lf);
fonts.action = CreateFontIndirect(&lf);
- lstrcpy(fid.name, LPGENT("Hovered Action"));
+ lstrcpyn(fid.name, LPGENT("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);
- lstrcpy(cid.group, _T(PU_FNT_AND_COLOR));
- lstrcpy(cid.name, _T(PU_COL_BACK_NAME));
+ lstrcpyn(cid.group, _T(PU_FNT_AND_COLOR),SIZEOF(cid.group));
+ lstrcpyn(cid.name, PU_COL_BACK_NAME,SIZEOF(cid.name));
fonts.clBack = (COLORREF)CallService(MS_COLOUR_GETT, (WPARAM)&cid, (LPARAM)&lf);
- lstrcpy(cid.group, _T(PU_FNT_AND_COLOR));
- lstrcpy(cid.name, _T(PU_COL_AVAT_NAME));
+ lstrcpyn(cid.group, _T(PU_FNT_AND_COLOR),SIZEOF(cid.group));
+ lstrcpyn(cid.name, PU_COL_AVAT_NAME,SIZEOF(cid.name));
fonts.clAvatarBorder = (COLORREF)CallService(MS_COLOUR_GETT, (WPARAM)&cid, (LPARAM)&lf);
//update class popupps(only temp at this point, must rework)