diff options
author | George Hazan <ghazan@miranda.im> | 2018-07-25 23:10:36 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-07-25 23:10:36 +0300 |
commit | a411a7391bb879db8da398f067245a13c7fa7aee (patch) | |
tree | 4b2c76ca8bc0b43b1084b8234746810c3ef6c446 /plugins/Popup/src/services.cpp | |
parent | 942c498d6e8901f751b088c0adfcb8f3fc67576c (diff) |
major code cleaning of all font-related structures
Diffstat (limited to 'plugins/Popup/src/services.cpp')
-rw-r--r-- | plugins/Popup/src/services.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/plugins/Popup/src/services.cpp b/plugins/Popup/src/services.cpp index 960762e556..77ab39de01 100644 --- a/plugins/Popup/src/services.cpp +++ b/plugins/Popup/src/services.cpp @@ -381,8 +381,7 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam) mir_snprintf(setting, "%s/TextCol", ptd->pupClass.pszName);
ptd->pupClass.colorText = (COLORREF)db_get_dw(NULL, PU_MODULCLASS, setting, fonts.clText/*pc->colorText*/);
- FontIDW fid = { 0 };
- fid.cbSize = sizeof(FontIDW);
+ FontIDW fid = {};
mir_snwprintf(fid.group, L"%S/%s", PU_FNT_AND_COLOR, ptd->pszDescription);
strncpy_s(fid.dbSettingsGroup, PU_MODULCLASS, _TRUNCATE);
fid.flags = FIDF_DEFAULTVALID;
@@ -390,8 +389,8 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam) fid.deffontsettings.size = -11;
wcsncpy_s(fid.deffontsettings.szFace, L"Verdana", _TRUNCATE);
wcsncpy_s(fid.name, _A2W(PU_FNT_NAME_TEXT), _TRUNCATE);
- strncpy_s(fid.prefix, setting, _TRUNCATE);
- mir_snprintf(fid.prefix, "%s/Text", ptd->pupClass.pszName); // result is "%s/TextCol"
+ strncpy_s(fid.setting, setting, _TRUNCATE);
+ mir_snprintf(fid.setting, "%s/Text", ptd->pupClass.pszName); // result is "%s/TextCol"
fid.deffontsettings.style = 0;
fid.deffontsettings.colour = fonts.clText;
g_plugin.addFont(&fid);
@@ -400,8 +399,7 @@ INT_PTR Popup_RegisterPopupClass(WPARAM, LPARAM lParam) mir_snprintf(setting, "%s/BgCol", ptd->pupClass.pszName);
ptd->pupClass.colorBack = (COLORREF)db_get_dw(NULL, PU_MODULCLASS, setting, (DWORD)fonts.clBack/*pc->colorBack*/);
- ColourIDW cid = { 0 };
- cid.cbSize = sizeof(ColourIDW);
+ ColourIDW cid = {};
mir_snwprintf(cid.group, L"%S/%s", PU_FNT_AND_COLOR, ptd->pszDescription);
wcsncpy_s(cid.name, PU_COL_BACK_NAME, _TRUNCATE);
strncpy_s(cid.dbSettingsGroup, PU_MODULCLASS, _TRUNCATE);
|