From a411a7391bb879db8da398f067245a13c7fa7aee Mon Sep 17 00:00:00 2001 From: George Hazan Date: Wed, 25 Jul 2018 23:10:36 +0300 Subject: major code cleaning of all font-related structures --- plugins/Alarms/src/alarm_win.cpp | 7 ++----- plugins/Alarms/src/frame.cpp | 4 +--- 2 files changed, 3 insertions(+), 8 deletions(-) (limited to 'plugins/Alarms/src') diff --git a/plugins/Alarms/src/alarm_win.cpp b/plugins/Alarms/src/alarm_win.cpp index 83cd180c2b..fc4813f962 100644 --- a/plugins/Alarms/src/alarm_win.cpp +++ b/plugins/Alarms/src/alarm_win.cpp @@ -347,29 +347,26 @@ int ReloadFonts(WPARAM, LPARAM) int AlarmWinModulesLoaded(WPARAM, LPARAM) { - title_font_id.cbSize = sizeof(FontIDW); wcsncpy_s(title_font_id.group, LPGENW("Alarms"), _TRUNCATE); wcsncpy_s(title_font_id.name, LPGENW("Title"), _TRUNCATE); strncpy_s(title_font_id.dbSettingsGroup, MODULENAME, _TRUNCATE); - strncpy_s(title_font_id.prefix, "FontTitle", _TRUNCATE); + strncpy_s(title_font_id.setting, "FontTitle", _TRUNCATE); wcsncpy_s(title_font_id.backgroundGroup, LPGENW("Alarms"), _TRUNCATE); wcsncpy_s(title_font_id.backgroundName, LPGENW("Background"), _TRUNCATE); title_font_id.flags = 0; title_font_id.order = 0; g_plugin.addFont(&title_font_id); - window_font_id.cbSize = sizeof(FontIDW); wcsncpy_s(window_font_id.group, LPGENW("Alarms"), _TRUNCATE); wcsncpy_s(window_font_id.name, LPGENW("Window"), _TRUNCATE); strncpy_s(window_font_id.dbSettingsGroup, MODULENAME, _TRUNCATE); - strncpy_s(window_font_id.prefix, "FontWindow", _TRUNCATE); + strncpy_s(window_font_id.setting, "FontWindow", _TRUNCATE); wcsncpy_s(window_font_id.backgroundGroup, LPGENW("Alarms"), _TRUNCATE); wcsncpy_s(window_font_id.backgroundName, LPGENW("Background"), _TRUNCATE); window_font_id.flags = 0; window_font_id.order = 1; g_plugin.addFont(&window_font_id); - bk_colour_id.cbSize = sizeof(ColourIDW); strncpy_s(bk_colour_id.dbSettingsGroup, MODULENAME, _TRUNCATE); wcsncpy_s(bk_colour_id.group, LPGENW("Alarms"), _TRUNCATE); wcsncpy_s(bk_colour_id.name, LPGENW("Background"), _TRUNCATE); diff --git a/plugins/Alarms/src/frame.cpp b/plugins/Alarms/src/frame.cpp index 744892450d..921ca4f290 100755 --- a/plugins/Alarms/src/frame.cpp +++ b/plugins/Alarms/src/frame.cpp @@ -555,15 +555,13 @@ int CreateFrame() SendMessage(hwnd_plugin, WMU_INITIALIZE, 0, 0); - font_id.cbSize = sizeof(font_id); strncpy_s(font_id.group, LPGEN("Frames"), _TRUNCATE); strncpy_s(font_id.name, LPGEN("Alarm reminders"), _TRUNCATE); strncpy_s(font_id.dbSettingsGroup, MODULENAME, _TRUNCATE); - strncpy_s(font_id.prefix, "Font", _TRUNCATE); + strncpy_s(font_id.setting, "Font", _TRUNCATE); font_id.order = 0; g_plugin.addFont(&font_id); - framebk_colour_id.cbSize = sizeof(ColourID); strncpy_s(framebk_colour_id.dbSettingsGroup, MODULENAME, _TRUNCATE); strncpy_s(framebk_colour_id.group, LPGEN("Frames"), _TRUNCATE); strncpy_s(framebk_colour_id.name, LPGEN("Alarm reminders"), _TRUNCATE); -- cgit v1.2.3